vendor: 6,899 bytes, lines 1-9
1var fCe=Object.defineProperty;var iq=e=>{throw TypeError(e)};var hCe=(e,t,r)=>t in e?fCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Le=(e,t,r)=>hCe(e,typeof t!="symbol"?t+"":t,r),g4=(e,t,r)=>t.has(e)||iq("Cannot "+r);var et=(e,t,r)=>(g4(e,t,"read from private field"),r?r.call(e):t.get(e)),Jr=(e,t,r)=>t.has(e)?iq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Tr=(e,t,r,n)=>(g4(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),zn=(e,t,r)=>(g4(e,t,"access private method"),r);var rP=(e,t,r,n)=>({set _(i){Tr(e,t,i,r)},get _(){return et(e,t,n)}});function fle(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function AB(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var hle={exports:{}},PO={},ple={exports:{}},ai={};/** 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 EA=Symbol.for("react.element"),pCe=Symbol.for("react.portal"),mCe=Symbol.for("react.fragment"),gCe=Symbol.for("react.strict_mode"),yCe=Symbol.for("react.profiler"),vCe=Symbol.for("react.provider"),_Ce=Symbol.for("react.context"),bCe=Symbol.for("react.forward_ref"),wCe=Symbol.for("react.suspense"),xCe=Symbol.for("react.memo"),ECe=Symbol.for("react.lazy"),aq=Symbol.iterator;function TCe(e){return e===null||typeof e!="object"?null:(e=aq&&e[aq]||e["@@iterator"],typeof e=="function"?e:null)}var mle={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gle=Object.assign,yle={};function Hw(e,t,r){this.props=e,this.context=t,this.refs=yle,this.updater=r||mle}Hw.prototype.isReactComponent={};Hw.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")};Hw.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function vle(){}vle.prototype=Hw.prototype;function CB(e,t,r){this.props=e,this.context=t,this.refs=yle,this.updater=r||mle}var PB=CB.prototype=new vle;PB.constructor=CB;gle(PB,Hw.prototype);PB.isPureReactComponent=!0;var sq=Array.isArray,_le=Object.prototype.hasOwnProperty,MB={current:null},ble={key:!0,ref:!0,__self:!0,__source:!0};function wle(e,t,r){var n,i={},a=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)_le.call(t,n)&&!ble.hasOwnProperty(n)&&(i[n]=t[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var l=Array(o),u=0;u<o;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:EA,type:e,key:a,ref:s,props:i,_owner:MB.current}}function SCe(e,t){return{$$typeof:EA,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kB(e){return typeof e=="object"&&e!==null&&e.$$typeof===EA}function ACe(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var oq=/\/+/g;function y4(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ACe(""+e.key):t.toString(36)}function GM(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case EA:case pCe:s=!0}}if(s)return s=e,i=i(s),e=n===""?"."+y4(s,0):n,sq(i)?(r="",e!=null&&(r=e.replace(oq,"$&/")+"/"),GM(i,t,r,"",function(u){return u})):i!=null&&(kB(i)&&(i=SCe(i,r+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(oq,"$&/")+"/")+e)),t.push(i)),1;if(s=0,n=n===""?".":n+":",sq(e))for(var o=0;o<e.length;o++){a=e[o];var l=n+y4(a,o);s+=GM(a,t,r,l,i)}else if(l=TCe(e),typeof l=="function")for(e=l.call(e),o=0;!(a=e.next()).done;)a=a.value,l=n+y4(a,o++),s+=GM(a,t,r,l,i);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 s}function nP(e,t,r){if(e==null)return e;var n=[],i=0;return GM(e,n,"","",function(a){return t.call(r,a,i++)}),n}function CCe(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 Mu={current:null},qM={transition:null},PCe={ReactCurrentDispatcher:Mu,ReactCurrentBatchConfig:qM,ReactCurrentOwner:MB};function xle(){throw Error("act(...) is not supported in production builds of React.")}ai.Children={map:nP,forEach:function(e,t,r){nP(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return nP(e,function(){t++}),t},toArray:function(e){return nP(e,function(t){return t})||[]},only:function(e){if(!kB(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ai.Component=Hw;ai.Fragment=mCe;ai.Profiler=yCe;ai.PureComponent=CB;ai.StrictMode=gCe;ai.Suspense=wCe;
vendor: 5,096 bytes, lines 9-25
9ai.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PCe;ai.act=xle;ai.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=gle({},e.props),i=e.key,a=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,s=MB.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)_le.call(t,l)&&!ble.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var u=0;u<l;u++)o[u]=arguments[u+2];n.children=o}return{$$typeof:EA,type:e.type,key:i,ref:a,props:n,_owner:s}};ai.createContext=function(e){return e={$$typeof:_Ce,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:vCe,_context:e},e.Consumer=e};ai.createElement=wle;ai.createFactory=function(e){var t=wle.bind(null,e);return t.type=e,t};ai.createRef=function(){return{current:null}};ai.forwardRef=function(e){return{$$typeof:bCe,render:e}};ai.isValidElement=kB;ai.lazy=function(e){return{$$typeof:ECe,_payload:{_status:-1,_result:e},_init:CCe}};ai.memo=function(e,t){return{$$typeof:xCe,type:e,compare:t===void 0?null:t}};ai.startTransition=function(e){var t=qM.transition;qM.transition={};try{e()}finally{qM.transition=t}};ai.unstable_act=xle;ai.useCallback=function(e,t){return Mu.current.useCallback(e,t)};ai.useContext=function(e){return Mu.current.useContext(e)};ai.useDebugValue=function(){};ai.useDeferredValue=function(e){return Mu.current.useDeferredValue(e)};ai.useEffect=function(e,t){return Mu.current.useEffect(e,t)};ai.useId=function(){return Mu.current.useId()};ai.useImperativeHandle=function(e,t,r){return Mu.current.useImperativeHandle(e,t,r)};ai.useInsertionEffect=function(e,t){return Mu.current.useInsertionEffect(e,t)};ai.useLayoutEffect=function(e,t){return Mu.current.useLayoutEffect(e,t)};ai.useMemo=function(e,t){return Mu.current.useMemo(e,t)};ai.useReducer=function(e,t,r){return Mu.current.useReducer(e,t,r)};ai.useRef=function(e){return Mu.current.useRef(e)};ai.useState=function(e){return Mu.current.useState(e)};ai.useSyncExternalStore=function(e,t,r){return Mu.current.useSyncExternalStore(e,t,r)};ai.useTransition=function(){return Mu.current.useTransition()};ai.version="18.3.1";ple.exports=ai;var R=ple.exports;const _e=mi(R),OB=fle({__proto__:null,default:_e},[R]);/** 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 MCe=R,kCe=Symbol.for("react.element"),OCe=Symbol.for("react.fragment"),NCe=Object.prototype.hasOwnProperty,ICe=MCe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,DCe={key:!0,ref:!0,__self:!0,__source:!0};function Ele(e,t,r){var n,i={},a=null,s=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)NCe.call(t,n)&&!DCe.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:kCe,type:e,key:a,ref:s,props:i,_owner:ICe.current}}PO.Fragment=OCe;PO.jsx=Ele;PO.jsxs=Ele;hle.exports=PO;var g=hle.exports,Tle={exports:{}},od={},Sle={exports:{}},Ale={};/** 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(z,q){var L=z.length;z.push(q);e:for(;0<L;){var K=L-1>>>1,O=z[K];if(0<i(O,q))z[K]=q,z[L]=O,L=K;else break e}}function r(z){return z.length===0?null:z[0]}function n(z){if(z.length===0)return null;var q=z[0],L=z.pop();if(L!==q){z[0]=L;e:for(var K=0,O=z.length,N=O>>>1;K<N;){var X=2*(K+1)-1,ie=z[X],ee=X+1,le=z[ee];if(0>i(ie,L))ee<O&&0>i(le,ie)?(z[K]=le,z[ee]=L,K=ee):(z[K]=ie,z[X]=L,K=X);else if(ee<O&&0>i(le,L))z[K]=le,z[ee]=L,K=ee;else break e}}return q}function i(z,q){var L=z.sortIndex-q.sortIndex;return L!==0?L:z.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(z){for(var q=r(u);q!==null;){if(q.callback===null)n(u);else if(q.startTime<=z)n(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=r(u)}}function w(z){if(m=!1,b(z),!p)if(r(l)!==null)p=!0,U(x);else{var q=r(u);q!==null&&B(w,q.startTime-z)}}function x(z,q){p=!1,m&&(m=!1,y(S),S=-1),h=!0;var L=f;try{for(b(q),d=r(l);d!==null&&(!(d.expirationTime>q)||z&&!k());){var K=d.callback;
vendor: 9,174 bytes, lines 25-34
25if(typeof K=="function"){d.callback=null,f=d.priorityLevel;var O=K(d.expirationTime<=q);q=e.unstable_now(),typeof O=="function"?d.callback=O:d===r(l)&&n(l),b(q)}else n(l);d=r(l)}if(d!==null)var N=!0;else{var X=r(u);X!==null&&B(w,X.startTime-q),N=!1}return N}finally{d=null,f=L,h=!1}}var E=!1,T=null,S=-1,A=5,C=-1;function k(){return!(e.unstable_now()-C<A)}function M(){if(T!==null){var z=e.unstable_now();C=z;var q=!0;try{q=T(!0,z)}finally{q?D():(E=!1,T=null)}}else E=!1}var D;if(typeof v=="function")D=function(){v(M)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,V=$.port2;$.port1.onmessage=M,D=function(){V.postMessage(null)}}else D=function(){_(M,0)};function U(z){T=z,E||(E=!0,D())}function B(z,q){S=_(function(){z(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,U(x))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(z){switch(f){case 1:case 2:case 3:var q=3;break;default:q=f}var L=f;f=q;try{return z()}finally{f=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var L=f;f=z;try{return q()}finally{f=L}},e.unstable_scheduleCallback=function(z,q,L){var K=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?K+L:K):L=K,z){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=L+O,z={id:c++,callback:q,priorityLevel:z,startTime:L,expirationTime:O,sortIndex:-1},L>K?(z.sortIndex=L,t(u,z),r(l)===null&&z===r(u)&&(m?(y(S),S=-1):m=!0,B(w,L-K))):(z.sortIndex=O,t(l,z),p||h||(p=!0,U(x))),z},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(z){var q=f;return function(){var L=f;f=q;try{return z.apply(this,arguments)}finally{f=L}}}})(Ale);Sle.exports=Ale;var LCe=Sle.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 jCe=R,td=LCe;function qt(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 Cle=new Set,NT={};function Qv(e,t){kb(e,t),kb(e+"Capture",t)}function kb(e,t){for(NT[e]=t,e=0;e<t.length;e++)Cle.add(t[e])}var Qp=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yR=Object.prototype.hasOwnProperty,RCe=/^[: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]*$/,lq={},uq={};function $Ce(e){return yR.call(uq,e)?!0:yR.call(lq,e)?!1:RCe.test(e)?uq[e]=!0:(lq[e]=!0,!1)}function FCe(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 BCe(e,t,r,n){if(t===null||typeof t>"u"||FCe(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 ku(e,t,r,n,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var wl={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wl[e]=new ku(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wl[t]=new ku(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wl[e]=new ku(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wl[e]=new ku(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){wl[e]=new ku(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wl[e]=new ku(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wl[e]=new ku(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wl[e]=new ku(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wl[e]=new ku(e,5,!1,e.toLowerCase(),null,!1,!1)});var NB=/[\-:]([a-z])/g;function IB(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-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(NB,IB);wl[t]=new ku(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(NB,IB);wl[t]=new ku(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(NB,IB);wl[t]=new ku(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wl[e]=new ku(e,1,!1,e.toLowerCase(),null,!1,!1)});wl.xlinkHref=new ku("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wl[e]=new ku(e,1,!1,e.toLowerCase(),null,!0,!0)});function DB(e,t,r,n){var i=wl.hasOwnProperty(t)?wl[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(BCe(t,r,i,n)&&(r=null),n||i===null?$Ce(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var um=jCe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,iP=Symbol.for("react.element"),b1=Symbol.for("react.portal"),w1=Symbol.for("react.fragment"),LB=Symbol.for("react.strict_mode"),vR=Symbol.for("react.profiler"),Ple=Symbol.for("react.provider"),Mle=Symbol.for("react.context"),jB=Symbol.for("react.forward_ref"),_R=Symbol.for("react.suspense"),bR=Symbol.for("react.suspense_list"),RB=Symbol.for("react.memo"),Km=Symbol.for("react.lazy"),kle=Symbol.for("react.offscreen"),cq=Symbol.iterator;function c2(e){return e===null||typeof e!="object"?null:(e=cq&&e[cq]||e["@@iterator"],typeof e=="function"?e:null)}var As=Object.assign,v4;function nE(e){if(v4===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);v4=t&&t[1]||""}return` 34`+v4+e}var _4=!1;function b4(e,t){if(!e||_4)return"";_4=!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()}}
vendor: 18,277 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(` 35`),a=n.stack.split(` 36`),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==a[o]){var l=` 37`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=o);break}}}finally{_4=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?nE(e):""}function zCe(e){switch(e.tag){case 5:return nE(e.type);case 16:return nE("Lazy");case 13:return nE("Suspense");case 19:return nE("SuspenseList");case 0:case 2:case 15:return e=b4(e.type,!1),e;case 11:return e=b4(e.type.render,!1),e;case 1:return e=b4(e.type,!0),e;default:return""}}function wR(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 w1:return"Fragment";case b1:return"Portal";case vR:return"Profiler";case LB:return"StrictMode";case _R:return"Suspense";case bR:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mle:return(e.displayName||"Context")+".Consumer";case Ple:return(e._context.displayName||"Context")+".Provider";case jB:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case RB:return t=e.displayName||null,t!==null?t:wR(e.type)||"Memo";case Km:t=e._payload,e=e._init;try{return wR(e(t))}catch{}}return null}function UCe(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 wR(t);case 8:return t===LB?"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 Kg(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ole(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WCe(e){var t=Ole(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 i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function aP(e){e._valueTracker||(e._valueTracker=WCe(e))}function Nle(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Ole(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function zk(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 xR(e,t){var r=t.checked;return As({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function dq(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Kg(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 Ile(e,t){t=t.checked,t!=null&&DB(e,"checked",t,!1)}function ER(e,t){Ile(e,t);var r=Kg(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")?TR(e,t.type,r):t.hasOwnProperty("defaultValue")&&TR(e,t.type,Kg(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fq(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 TR(e,t,r){(t!=="number"||zk(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var iE=Array.isArray;function H1(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Kg(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function SR(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(qt(91));return As({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hq(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(qt(92));if(iE(r)){if(1<r.length)throw Error(qt(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Kg(r)}}function Dle(e,t){var r=Kg(t.value),n=Kg(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 pq(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Lle(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 AR(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Lle(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sP,jle=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(sP=sP||document.createElement("div"),sP.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=sP.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function IT(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var DE={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},VCe=["Webkit","ms","Moz","O"];Object.keys(DE).forEach(function(e){VCe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),DE[t]=DE[e]})});function Rle(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||DE.hasOwnProperty(e)&&DE[e]?(""+t).trim():t+"px"}function $le(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Rle(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var HCe=As({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 CR(e,t){if(t){if(HCe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(qt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(qt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(qt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(qt(62))}}function PR(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 MR=null;function $B(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kR=null,G1=null,q1=null;function mq(e){if(e=AA(e)){if(typeof kR!="function")throw Error(qt(280));var t=e.stateNode;t&&(t=IO(t),kR(e.stateNode,e.type,t))}}function Fle(e){G1?q1?q1.push(e):q1=[e]:G1=e}function Ble(){if(G1){var e=G1,t=q1;if(q1=G1=null,mq(e),t)for(e=0;e<t.length;e++)mq(t[e])}}function zle(e,t){return e(t)}function Ule(){}var w4=!1;function Wle(e,t,r){if(w4)return e(t,r);w4=!0;try{return zle(e,t,r)}finally{w4=!1,(G1!==null||q1!==null)&&(Ule(),Ble())}}function DT(e,t){var r=e.stateNode;if(r===null)return null;var n=IO(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(qt(231,t,typeof r));return r}var OR=!1;if(Qp)try{var d2={};Object.defineProperty(d2,"passive",{get:function(){OR=!0}}),window.addEventListener("test",d2,d2),window.removeEventListener("test",d2,d2)}catch{OR=!1}function GCe(e,t,r,n,i,a,s,o,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var LE=!1,Uk=null,Wk=!1,NR=null,qCe={onError:function(e){LE=!0,Uk=e}};function KCe(e,t,r,n,i,a,s,o,l){LE=!1,Uk=null,GCe.apply(qCe,arguments)}function YCe(e,t,r,n,i,a,s,o,l){if(KCe.apply(this,arguments),LE){if(LE){var u=Uk;LE=!1,Uk=null}else throw Error(qt(198));Wk||(Wk=!0,NR=u)}}function Zv(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 Vle(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 gq(e){if(Zv(e)!==e)throw Error(qt(188))}function XCe(e){var t=e.alternate;if(!t){if(t=Zv(e),t===null)throw Error(qt(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return gq(i),e;if(a===n)return gq(i),t;a=a.sibling}throw Error(qt(188))}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,o=i.child;o;){if(o===r){s=!0,r=i,n=a;break}if(o===n){s=!0,n=i,r=a;break}o=o.sibling}if(!s){for(o=a.child;o;){if(o===r){s=!0,r=a,n=i;break}if(o===n){s=!0,n=a,r=i;break}o=o.sibling}if(!s)throw Error(qt(189))}}if(r.alternate!==n)throw Error(qt(190))}if(r.tag!==3)throw Error(qt(188));return r.stateNode.current===r?e:t}function Hle(e){return e=XCe(e),e!==null?Gle(e):null}function Gle(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Gle(e);if(t!==null)return t;e=e.sibling}return null}var qle=td.unstable_scheduleCallback,yq=td.unstable_cancelCallback,QCe=td.unstable_shouldYield,ZCe=td.unstable_requestPaint,Ws=td.unstable_now,JCe=td.unstable_getCurrentPriorityLevel,FB=td.unstable_ImmediatePriority,Kle=td.unstable_UserBlockingPriority,Vk=td.unstable_NormalPriority,ePe=td.unstable_LowPriority,Yle=td.unstable_IdlePriority,MO=null,Fh=null;function tPe(e){if(Fh&&typeof Fh.onCommitFiberRoot=="function")try{Fh.onCommitFiberRoot(MO,e,void 0,(e.current.flags&128)===128)}catch{}}var Hf=Math.clz32?Math.clz32:iPe,rPe=Math.log,nPe=Math.LN2;function iPe(e){return e>>>=0,e===0?32:31-(rPe(e)/nPe|0)|0}var oP=64,lP=4194304;function aE(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 Hk(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,s=r&268435455;if(s!==0){var o=s&~i;o!==0?n=aE(o):(a&=s,a!==0&&(n=aE(a)))}else s=r&~i,s!==0?n=aE(s):a!==0&&(n=aE(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===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-Hf(t),i=1<<r,n|=e[r],t&=~i;return n}function aPe(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 sPe(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-Hf(a),o=1<<s,l=i[s];l===-1?(!(o&r)||o&n)&&(i[s]=aPe(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}}function IR(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Xle(){var e=oP;return oP<<=1,!(oP&4194240)&&(oP=64),e}function x4(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function TA(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Hf(t),e[t]=r}function oPe(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 i=31-Hf(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function BB(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Hf(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var na=0;function Qle(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Zle,zB,Jle,eue,tue,DR=!1,uP=[],Pg=null,Mg=null,kg=null,LT=new Map,jT=new Map,Zm=[],lPe="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 vq(e,t){switch(e){case"focusin":case"focusout":Pg=null;break;case"dragenter":case"dragleave":Mg=null;break;case"mouseover":case"mouseout":kg=null;break;case"pointerover":case"pointerout":LT.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jT.delete(t.pointerId)}}function f2(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=AA(t),t!==null&&zB(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function uPe(e,t,r,n,i){switch(t){case"focusin":return Pg=f2(Pg,e,t,r,n,i),!0;case"dragenter":return Mg=f2(Mg,e,t,r,n,i),!0;case"mouseover":return kg=f2(kg,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return LT.set(a,f2(LT.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,jT.set(a,f2(jT.get(a)||null,e,t,r,n,i)),!0}return!1}function rue(e){var t=Cy(e.target);if(t!==null){var r=Zv(t);if(r!==null){if(t=r.tag,t===13){if(t=Vle(r),t!==null){e.blockedOn=t,tue(e.priority,function(){Jle(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 KM(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=LR(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);MR=n,r.target.dispatchEvent(n),MR=null}else return t=AA(r),t!==null&&zB(t),e.blockedOn=r,!1;t.shift()}return!0}function _q(e,t,r){KM(e)&&r.delete(t)}function cPe(){DR=!1,Pg!==null&&KM(Pg)&&(Pg=null),Mg!==null&&KM(Mg)&&(Mg=null),kg!==null&&KM(kg)&&(kg=null),LT.forEach(_q),jT.forEach(_q)}function h2(e,t){e.blockedOn===t&&(e.blockedOn=null,DR||(DR=!0,td.unstable_scheduleCallback(td.unstable_NormalPriority,cPe)))}function RT(e){function t(i){return h2(i,e)}if(0<uP.length){h2(uP[0],e);for(var r=1;r<uP.length;r++){var n=uP[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Pg!==null&&h2(Pg,e),Mg!==null&&h2(Mg,e),kg!==null&&h2(kg,e),LT.forEach(t),jT.forEach(t),r=0;r<Zm.length;r++)n=Zm[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Zm.length&&(r=Zm[0],r.blockedOn===null);)rue(r),r.blockedOn===null&&Zm.shift()}var K1=um.ReactCurrentBatchConfig,Gk=!0;function dPe(e,t,r,n){var i=na,a=K1.transition;K1.transition=null;try{na=1,UB(e,t,r,n)}finally{na=i,K1.transition=a}}function fPe(e,t,r,n){var i=na,a=K1.transition;K1.transition=null;try{na=4,UB(e,t,r,n)}finally{na=i,K1.transition=a}}function UB(e,t,r,n){if(Gk){var i=LR(e,t,r,n);if(i===null)N4(e,t,n,qk,r),vq(e,n);else if(uPe(i,e,t,r,n))n.stopPropagation();else if(vq(e,n),t&4&&-1<lPe.indexOf(e)){for(;i!==null;){var a=AA(i);if(a!==null&&Zle(a),a=LR(e,t,r,n),a===null&&N4(e,t,n,qk,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else N4(e,t,n,null,r)}}var qk=null;function LR(e,t,r,n){if(qk=null,e=$B(n),e=Cy(e),e!==null)if(t=Zv(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Vle(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 qk=e,null}
vendor: 10,484 bytes, line 37
37function nue(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(JCe()){case FB:return 1;case Kle:return 4;case Vk:case ePe:return 16;case Yle:return 536870912;default:return 16}default:return 16}}var hg=null,WB=null,YM=null;function iue(){if(YM)return YM;var e,t=WB,r=t.length,n,i="value"in hg?hg.value:hg.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===i[a-n];n++);return YM=i.slice(e,1<n?1-n:void 0)}function XM(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 cP(){return!0}function bq(){return!1}function ld(e){function t(r,n,i,a,s){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?cP:bq,this.isPropagationStopped=bq,this}return As(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=cP)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=cP)},persist:function(){},isPersistent:cP}),t}var Gw={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},VB=ld(Gw),SA=As({},Gw,{view:0,detail:0}),hPe=ld(SA),E4,T4,p2,kO=As({},SA,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:HB,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!==p2&&(p2&&e.type==="mousemove"?(E4=e.screenX-p2.screenX,T4=e.screenY-p2.screenY):T4=E4=0,p2=e),E4)},movementY:function(e){return"movementY"in e?e.movementY:T4}}),wq=ld(kO),pPe=As({},kO,{dataTransfer:0}),mPe=ld(pPe),gPe=As({},SA,{relatedTarget:0}),S4=ld(gPe),yPe=As({},Gw,{animationName:0,elapsedTime:0,pseudoElement:0}),vPe=ld(yPe),_Pe=As({},Gw,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bPe=ld(_Pe),wPe=As({},Gw,{data:0}),xq=ld(wPe),xPe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EPe={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"},TPe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SPe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=TPe[e])?!!t[e]:!1}function HB(){return SPe}var APe=As({},SA,{key:function(e){if(e.key){var t=xPe[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=XM(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?EPe[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:HB,charCode:function(e){return e.type==="keypress"?XM(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?XM(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),CPe=ld(APe),PPe=As({},kO,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eq=ld(PPe),MPe=As({},SA,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:HB}),kPe=ld(MPe),OPe=As({},Gw,{propertyName:0,elapsedTime:0,pseudoElement:0}),NPe=ld(OPe),IPe=As({},kO,{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}),DPe=ld(IPe),LPe=[9,13,27,32],GB=Qp&&"CompositionEvent"in window,jE=null;Qp&&"documentMode"in document&&(jE=document.documentMode);var jPe=Qp&&"TextEvent"in window&&!jE,aue=Qp&&(!GB||jE&&8<jE&&11>=jE),Tq=" ",Sq=!1;function sue(e,t){switch(e){case"keyup":return LPe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oue(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var x1=!1;function RPe(e,t){switch(e){case"compositionend":return oue(t);case"keypress":return t.which!==32?null:(Sq=!0,Tq);case"textInput":return e=t.data,e===Tq&&Sq?null:e;default:return null}}function $Pe(e,t){if(x1)return e==="compositionend"||!GB&&sue(e,t)?(e=iue(),YM=WB=hg=null,x1=!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 aue&&t.locale!=="ko"?null:t.data;default:return null}}var FPe={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 Aq(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!FPe[e.type]:t==="textarea"}function lue(e,t,r,n){Fle(n),t=Kk(t,"onChange"),0<t.length&&(r=new VB("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var RE=null,$T=null;function BPe(e){_ue(e,0)}function OO(e){var t=S1(e);if(Nle(t))return e}function zPe(e,t){if(e==="change")return t}var uue=!1;if(Qp){var A4;if(Qp){var C4="oninput"in document;if(!C4){var Cq=document.createElement("div");Cq.setAttribute("oninput","return;"),C4=typeof Cq.oninput=="function"}A4=C4}else A4=!1;uue=A4&&(!document.documentMode||9<document.documentMode)}function Pq(){RE&&(RE.detachEvent("onpropertychange",cue),$T=RE=null)}function cue(e){if(e.propertyName==="value"&&OO($T)){var t=[];lue(t,$T,e,$B(e)),Wle(BPe,t)}}function UPe(e,t,r){e==="focusin"?(Pq(),RE=t,$T=r,RE.attachEvent("onpropertychange",cue)):e==="focusout"&&Pq()}function WPe(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return OO($T)}function VPe(e,t){if(e==="click")return OO(t)}function HPe(e,t){if(e==="input"||e==="change")return OO(t)}function GPe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xf=typeof Object.is=="function"?Object.is:GPe;function FT(e,t){if(Xf(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 i=r[n];if(!yR.call(t,i)||!Xf(e[i],t[i]))return!1}return!0}function Mq(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kq(e,t){var r=Mq(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=Mq(r)}}function due(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?due(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fue(){for(var e=window,t=zk();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=zk(e.document)}return t}function qB(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 qPe(e){var t=fue(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&due(r.ownerDocument.documentElement,r)){if(n!==null&&qB(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 i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=kq(r,a);var s=kq(r,n);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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 KPe=Qp&&"documentMode"in document&&11>=document.documentMode,E1=null,jR=null,$E=null,RR=!1;function Oq(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;RR||E1==null||E1!==zk(n)||(n=E1,"selectionStart"in n&&qB(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,529 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),$E&&FT($E,n)||($E=n,n=Kk(jR,"onSelect"),0<n.length&&(t=new VB("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=E1)))}function dP(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var T1={animationend:dP("Animation","AnimationEnd"),animationiteration:dP("Animation","AnimationIteration"),animationstart:dP("Animation","AnimationStart"),transitionend:dP("Transition","TransitionEnd")},P4={},hue={};Qp&&(hue=document.createElement("div").style,"AnimationEvent"in window||(delete T1.animationend.animation,delete T1.animationiteration.animation,delete T1.animationstart.animation),"TransitionEvent"in window||delete T1.transitionend.transition);function NO(e){if(P4[e])return P4[e];if(!T1[e])return e;var t=T1[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in hue)return P4[e]=t[r];return e}var pue=NO("animationend"),mue=NO("animationiteration"),gue=NO("animationstart"),yue=NO("transitionend"),vue=new Map,Nq="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 o0(e,t){vue.set(e,t),Qv(t,[e])}for(var M4=0;M4<Nq.length;M4++){var k4=Nq[M4],YPe=k4.toLowerCase(),XPe=k4[0].toUpperCase()+k4.slice(1);o0(YPe,"on"+XPe)}o0(pue,"onAnimationEnd");o0(mue,"onAnimationIteration");o0(gue,"onAnimationStart");o0("dblclick","onDoubleClick");o0("focusin","onFocus");o0("focusout","onBlur");o0(yue,"onTransitionEnd");kb("onMouseEnter",["mouseout","mouseover"]);kb("onMouseLeave",["mouseout","mouseover"]);kb("onPointerEnter",["pointerout","pointerover"]);kb("onPointerLeave",["pointerout","pointerover"]);Qv("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qv("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qv("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qv("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qv("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qv("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sE="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(" "),QPe=new Set("cancel close invalid load scroll toggle".split(" ").concat(sE));function Iq(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,YCe(n,t,void 0,e),e.currentTarget=null}function _ue(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;Iq(i,o,u),a=l}else for(s=0;s<n.length;s++){if(o=n[s],l=o.instance,u=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;Iq(i,o,u),a=l}}}if(Wk)throw e=NR,Wk=!1,NR=null,e}function Ga(e,t){var r=t[UR];r===void 0&&(r=t[UR]=new Set);var n=e+"__bubble";r.has(n)||(bue(t,e,2,!1),r.add(n))}function O4(e,t,r){var n=0;t&&(n|=4),bue(r,e,n,t)}var fP="_reactListening"+Math.random().toString(36).slice(2);function BT(e){if(!e[fP]){e[fP]=!0,Cle.forEach(function(r){r!=="selectionchange"&&(QPe.has(r)||O4(r,!1,e),O4(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fP]||(t[fP]=!0,O4("selectionchange",!1,t))}}function bue(e,t,r,n){switch(nue(t)){case 1:var i=dPe;break;case 4:i=fPe;break;default:i=UB}r=i.bind(null,t,r,e),i=void 0,!OR||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function N4(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;
vendor: 5,611 bytes, lines 37-38
37if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;o!==null;){if(s=Cy(o),s===null)return;if(l=s.tag,l===5||l===6){n=a=s;continue e}o=o.parentNode}}n=n.return}Wle(function(){var u=a,c=$B(r),d=[];e:{var f=vue.get(e);if(f!==void 0){var h=VB,p=e;switch(e){case"keypress":if(XM(r)===0)break e;case"keydown":case"keyup":h=CPe;break;case"focusin":p="focus",h=S4;break;case"focusout":p="blur",h=S4;break;case"beforeblur":case"afterblur":h=S4;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":h=wq;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=mPe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=kPe;break;case pue:case mue:case gue:h=vPe;break;case yue:h=NPe;break;case"scroll":h=hPe;break;case"wheel":h=DPe;break;case"copy":case"cut":case"paste":h=bPe;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Eq}var m=(t&4)!==0,_=!m&&e==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,b;v!==null;){b=v;var w=b.stateNode;if(b.tag===5&&w!==null&&(b=w,y!==null&&(w=DT(v,y),w!=null&&m.push(zT(v,w,b)))),_)break;v=v.return}0<m.length&&(f=new h(f,p,null,r,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==MR&&(p=r.relatedTarget||r.fromElement)&&(Cy(p)||p[Zp]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=r.relatedTarget||r.toElement,h=u,p=p?Cy(p):null,p!==null&&(_=Zv(p),p!==_||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=u),h!==p)){if(m=wq,w="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=Eq,w="onPointerLeave",y="onPointerEnter",v="pointer"),_=h==null?f:S1(h),b=p==null?f:S1(p),f=new m(w,v+"leave",h,r,c),f.target=_,f.relatedTarget=b,w=null,Cy(c)===u&&(m=new m(y,v+"enter",p,r,c),m.target=b,m.relatedTarget=_,w=m),_=w,h&&p)t:{for(m=h,y=p,v=0,b=m;b;b=j_(b))v++;for(b=0,w=y;w;w=j_(w))b++;for(;0<v-b;)m=j_(m),v--;for(;0<b-v;)y=j_(y),b--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=j_(m),y=j_(y)}m=null}else m=null;h!==null&&Dq(d,f,h,m,!1),p!==null&&_!==null&&Dq(d,_,p,m,!0)}}e:{if(f=u?S1(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var x=zPe;else if(Aq(f))if(uue)x=HPe;else{x=WPe;var E=UPe}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(x=VPe);if(x&&(x=x(e,u))){lue(d,x,r,c);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&TR(f,"number",f.value)}switch(E=u?S1(u):window,e){case"focusin":(Aq(E)||E.contentEditable==="true")&&(E1=E,jR=u,$E=null);break;case"focusout":$E=jR=E1=null;break;case"mousedown":RR=!0;break;case"contextmenu":case"mouseup":case"dragend":RR=!1,Oq(d,r,c);break;case"selectionchange":if(KPe)break;case"keydown":case"keyup":Oq(d,r,c)}var T;if(GB)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else x1?sue(e,r)&&(S="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(S="onCompositionStart");S&&(aue&&r.locale!=="ko"&&(x1||S!=="onCompositionStart"?S==="onCompositionEnd"&&x1&&(T=iue()):(hg=c,WB="value"in hg?hg.value:hg.textContent,x1=!0)),E=Kk(u,S),0<E.length&&(S=new xq(S,e,null,r,c),d.push({event:S,listeners:E}),T?S.data=T:(T=oue(r),T!==null&&(S.data=T)))),(T=jPe?RPe(e,r):$Pe(e,r))&&(u=Kk(u,"onBeforeInput"),0<u.length&&(c=new xq("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=T))}_ue(d,t)})}function zT(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Kk(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=DT(e,r),a!=null&&n.unshift(zT(e,a,i)),a=DT(e,t),a!=null&&n.push(zT(e,a,i))),e=e.return}return n}function j_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Dq(e,t,r,n,i){for(var a=t._reactName,s=[];r!==null&&r!==n;){var o=r,l=o.alternate,u=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&u!==null&&(o=u,i?(l=DT(r,a),l!=null&&s.unshift(zT(r,l,o))):i||(l=DT(r,a),l!=null&&s.push(zT(r,l,o)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var ZPe=/\r\n?/g,JPe=/\u0000|\uFFFD/g;function Lq(e){return(typeof e=="string"?e:""+e).replace(ZPe,` 38`).replace(JPe,"")}function hP(e,t,r){if(t=Lq(t),Lq(e)!==t&&r)throw Error(qt(425))}function Yk(){}var $R=null,FR=null;function BR(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 zR=typeof setTimeout=="function"?setTimeout:void 0,eMe=typeof clearTimeout=="function"?clearTimeout:void 0,jq=typeof Promise=="function"?Promise:void 0,tMe=typeof queueMicrotask=="function"?queueMicrotask:typeof jq<"u"?function(e){return jq.resolve(null).then(e).catch(rMe)}:zR;function rMe(e){setTimeout(function(){throw e})}function I4(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),RT(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}
vendor: 4,681 bytes, line 38
38while(r);RT(t)}function Og(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 Rq(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 qw=Math.random().toString(36).slice(2),Ph="__reactFiber$"+qw,UT="__reactProps$"+qw,Zp="__reactContainer$"+qw,UR="__reactEvents$"+qw,nMe="__reactListeners$"+qw,iMe="__reactHandles$"+qw;function Cy(e){var t=e[Ph];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Zp]||r[Ph]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Rq(e);e!==null;){if(r=e[Ph])return r;e=Rq(e)}return t}e=r,r=e.parentNode}return null}function AA(e){return e=e[Ph]||e[Zp],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function S1(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(qt(33))}function IO(e){return e[UT]||null}var WR=[],A1=-1;function l0(e){return{current:e}}function Qa(e){0>A1||(e.current=WR[A1],WR[A1]=null,A1--)}function Da(e,t){A1++,WR[A1]=e.current,e.current=t}var Yg={},Xl=l0(Yg),tc=l0(!1),bv=Yg;function Ob(e,t){var r=e.type.contextTypes;if(!r)return Yg;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function rc(e){return e=e.childContextTypes,e!=null}function Xk(){Qa(tc),Qa(Xl)}function $q(e,t,r){if(Xl.current!==Yg)throw Error(qt(168));Da(Xl,t),Da(tc,r)}function wue(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(qt(108,UCe(e)||"Unknown",i));return As({},r,n)}function Qk(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yg,bv=Xl.current,Da(Xl,e),Da(tc,tc.current),!0}function Fq(e,t,r){var n=e.stateNode;if(!n)throw Error(qt(169));r?(e=wue(e,t,bv),n.__reactInternalMemoizedMergedChildContext=e,Qa(tc),Qa(Xl),Da(Xl,e)):Qa(tc),Da(tc,r)}var Ap=null,DO=!1,D4=!1;function xue(e){Ap===null?Ap=[e]:Ap.push(e)}function aMe(e){DO=!0,xue(e)}function u0(){if(!D4&&Ap!==null){D4=!0;var e=0,t=na;try{var r=Ap;for(na=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ap=null,DO=!1}catch(i){throw Ap!==null&&(Ap=Ap.slice(e+1)),qle(FB,u0),i}finally{na=t,D4=!1}}return null}var C1=[],P1=0,Zk=null,Jk=0,Id=[],Dd=0,wv=null,jp=1,Rp="";function uy(e,t){C1[P1++]=Jk,C1[P1++]=Zk,Zk=e,Jk=t}function Eue(e,t,r){Id[Dd++]=jp,Id[Dd++]=Rp,Id[Dd++]=wv,wv=e;var n=jp;e=Rp;var i=32-Hf(n)-1;n&=~(1<<i),r+=1;var a=32-Hf(t)+i;if(30<a){var s=i-i%5;a=(n&(1<<s)-1).toString(32),n>>=s,i-=s,jp=1<<32-Hf(t)+i|r<<i|n,Rp=a+e}else jp=1<<a|r<<i|n,Rp=e}function KB(e){e.return!==null&&(uy(e,1),Eue(e,1,0))}function YB(e){for(;e===Zk;)Zk=C1[--P1],C1[P1]=null,Jk=C1[--P1],C1[P1]=null;for(;e===wv;)wv=Id[--Dd],Id[Dd]=null,Rp=Id[--Dd],Id[Dd]=null,jp=Id[--Dd],Id[Dd]=null}var Kc=null,Wc=null,is=!1,Rf=null;function Tue(e,t){var r=Wd(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 Bq(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,Kc=e,Wc=Og(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Kc=e,Wc=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=wv!==null?{id:jp,overflow:Rp}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Wd(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Kc=e,Wc=null,!0):!1;default:return!1}}function VR(e){return(e.mode&1)!==0&&(e.flags&128)===0}function HR(e){if(is){var t=Wc;if(t){var r=t;if(!Bq(e,t)){if(VR(e))throw Error(qt(418));t=Og(r.nextSibling);var n=Kc;t&&Bq(e,t)?Tue(n,r):(e.flags=e.flags&-4097|2,is=!1,Kc=e)}}else{if(VR(e))throw Error(qt(418));e.flags=e.flags&-4097|2,is=!1,Kc=e}}}function zq(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kc=e}function pP(e){if(e!==Kc)return!1;if(!is)return zq(e),is=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!BR(e.type,e.memoizedProps)),t&&(t=Wc)){if(VR(e))throw Sue(),Error(qt(418));for(;t;)Tue(e,t),t=Og(t.nextSibling)}if(zq(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(qt(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Wc=Og(e.nextSibling);break e}t--}
vendor: 13,203 bytes, line 38
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Wc=null}}else Wc=Kc?Og(e.stateNode.nextSibling):null;return!0}function Sue(){for(var e=Wc;e;)e=Og(e.nextSibling)}function Nb(){Wc=Kc=null,is=!1}function XB(e){Rf===null?Rf=[e]:Rf.push(e)}var sMe=um.ReactCurrentBatchConfig;function m2(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(qt(309));var n=r.stateNode}if(!n)throw Error(qt(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(s){var o=i.refs;s===null?delete o[a]:o[a]=s},t._stringRef=a,t)}if(typeof e!="string")throw Error(qt(284));if(!r._owner)throw Error(qt(290,e))}return e}function mP(e,t){throw e=Object.prototype.toString.call(t),Error(qt(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Uq(e){var t=e._init;return t(e._payload)}function Aue(e){function t(y,v){if(e){var b=y.deletions;b===null?(y.deletions=[v],y.flags|=16):b.push(v)}}function r(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function n(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function i(y,v){return y=Lg(y,v),y.index=0,y.sibling=null,y}function a(y,v,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<v?(y.flags|=2,v):b):(y.flags|=2,v)):(y.flags|=1048576,v)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function o(y,v,b,w){return v===null||v.tag!==6?(v=z4(b,y.mode,w),v.return=y,v):(v=i(v,b),v.return=y,v)}function l(y,v,b,w){var x=b.type;return x===w1?c(y,v,b.props.children,w,b.key):v!==null&&(v.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Km&&Uq(x)===v.type)?(w=i(v,b.props),w.ref=m2(y,v,b),w.return=y,w):(w=nk(b.type,b.key,b.props,null,y.mode,w),w.ref=m2(y,v,b),w.return=y,w)}function u(y,v,b,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=U4(b,y.mode,w),v.return=y,v):(v=i(v,b.children||[]),v.return=y,v)}function c(y,v,b,w,x){return v===null||v.tag!==7?(v=iv(b,y.mode,w,x),v.return=y,v):(v=i(v,b),v.return=y,v)}function d(y,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=z4(""+v,y.mode,b),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case iP:return b=nk(v.type,v.key,v.props,null,y.mode,b),b.ref=m2(y,null,v),b.return=y,b;case b1:return v=U4(v,y.mode,b),v.return=y,v;case Km:var w=v._init;return d(y,w(v._payload),b)}if(iE(v)||c2(v))return v=iv(v,y.mode,b,null),v.return=y,v;mP(y,v)}return null}function f(y,v,b,w){var x=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return x!==null?null:o(y,v,""+b,w);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case iP:return b.key===x?l(y,v,b,w):null;case b1:return b.key===x?u(y,v,b,w):null;case Km:return x=b._init,f(y,v,x(b._payload),w)}if(iE(b)||c2(b))return x!==null?null:c(y,v,b,w,null);mP(y,b)}return null}function h(y,v,b,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(b)||null,o(v,y,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case iP:return y=y.get(w.key===null?b:w.key)||null,l(v,y,w,x);case b1:return y=y.get(w.key===null?b:w.key)||null,u(v,y,w,x);case Km:var E=w._init;return h(y,v,b,E(w._payload),x)}if(iE(w)||c2(w))return y=y.get(b)||null,c(v,y,w,x,null);mP(v,w)}return null}function p(y,v,b,w){for(var x=null,E=null,T=v,S=v=0,A=null;T!==null&&S<b.length;S++){T.index>S?(A=T,T=null):A=T.sibling;var C=f(y,T,b[S],w);if(C===null){T===null&&(T=A);break}e&&T&&C.alternate===null&&t(y,T),v=a(C,v,S),E===null?x=C:E.sibling=C,E=C,T=A}if(S===b.length)return r(y,T),is&&uy(y,S),x;if(T===null){for(;S<b.length;S++)T=d(y,b[S],w),T!==null&&(v=a(T,v,S),E===null?x=T:E.sibling=T,E=T);return is&&uy(y,S),x}for(T=n(y,T);S<b.length;S++)A=h(T,y,S,b[S],w),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?S:A.key),v=a(A,v,S),E===null?x=A:E.sibling=A,E=A);return e&&T.forEach(function(k){return t(y,k)}),is&&uy(y,S),x}function m(y,v,b,w){var x=c2(b);if(typeof x!="function")throw Error(qt(150));if(b=x.call(b),b==null)throw Error(qt(151));for(var E=x=null,T=v,S=v=0,A=null,C=b.next();T!==null&&!C.done;S++,C=b.next()){T.index>S?(A=T,T=null):A=T.sibling;var k=f(y,T,C.value,w);if(k===null){T===null&&(T=A);break}e&&T&&k.alternate===null&&t(y,T),v=a(k,v,S),E===null?x=k:E.sibling=k,E=k,T=A}if(C.done)return r(y,T),is&&uy(y,S),x;if(T===null){for(;!C.done;S++,C=b.next())C=d(y,C.value,w),C!==null&&(v=a(C,v,S),E===null?x=C:E.sibling=C,E=C);return is&&uy(y,S),x}for(T=n(y,T);!C.done;S++,C=b.next())C=h(T,y,S,C.value,w),C!==null&&(e&&C.alternate!==null&&T.delete(C.key===null?S:C.key),v=a(C,v,S),E===null?x=C:E.sibling=C,E=C);return e&&T.forEach(function(M){return t(y,M)}),is&&uy(y,S),x}function _(y,v,b,w){if(typeof b=="object"&&b!==null&&b.type===w1&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case iP:e:{for(var x=b.key,E=v;E!==null;){if(E.key===x){if(x=b.type,x===w1){if(E.tag===7){r(y,E.sibling),v=i(E,b.props.children),v.return=y,y=v;break e}}else if(E.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Km&&Uq(x)===E.type){r(y,E.sibling),v=i(E,b.props),v.ref=m2(y,E,b),v.return=y,y=v;break e}r(y,E);break}else t(y,E);E=E.sibling}b.type===w1?(v=iv(b.props.children,y.mode,w,b.key),v.return=y,y=v):(w=nk(b.type,b.key,b.props,null,y.mode,w),w.ref=m2(y,v,b),w.return=y,y=w)}return s(y);case b1:e:{for(E=b.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){r(y,v.sibling),v=i(v,b.children||[]),v.return=y,y=v;break e}else{r(y,v);break}else t(y,v);v=v.sibling}v=U4(b,y.mode,w),v.return=y,y=v}return s(y);case Km:return E=b._init,_(y,v,E(b._payload),w)}if(iE(b))return p(y,v,b,w);if(c2(b))return m(y,v,b,w);mP(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(r(y,v.sibling),v=i(v,b),v.return=y,y=v):(r(y,v),v=z4(b,y.mode,w),v.return=y,y=v),s(y)):r(y,v)}return _}var Ib=Aue(!0),Cue=Aue(!1),e5=l0(null),t5=null,M1=null,QB=null;function ZB(){QB=M1=t5=null}function JB(e){var t=e5.current;Qa(e5),e._currentValue=t}function GR(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 Y1(e,t){t5=e,QB=M1=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xu=!0),e.firstContext=null)}function Qd(e){var t=e._currentValue;if(QB!==e)if(e={context:e,memoizedValue:t,next:null},M1===null){if(t5===null)throw Error(qt(308));M1=e,t5.dependencies={lanes:0,firstContext:e}}else M1=M1.next=e;return t}var Py=null;function ez(e){Py===null?Py=[e]:Py.push(e)}function Pue(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,ez(t)):(r.next=i.next,i.next=r),t.interleaved=r,Jp(e,n)}function Jp(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 Ym=!1;function tz(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mue(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 Up(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ng(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Pi&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Jp(e,r)}return i=n.interleaved,i===null?(t.next=t,ez(n)):(t.next=i.next,i.next=t),n.interleaved=t,Jp(e,r)}function QM(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,BB(e,r)}}function Wq(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=s:a=a.next=s,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,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 r5(e,t,r,n){var i=e.updateQueue;Ym=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,u=l.next;l.next=null,s===null?a=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==s&&(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=i.baseState;s=0,c=u=l=null,o=a;do{var f=o.lane,h=o.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,m=o;switch(f=t,h=r,m.tag){case 1:if(p=m.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=As({},d,f);break e;case 2:Ym=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[o]:f.push(o))}else h={eventTime:h,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;f=o,o=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ev|=s,e.lanes=s,e.memoizedState=d}}function Vq(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(qt(191,i));i.call(n)}}}var CA={},Bh=l0(CA),WT=l0(CA),VT=l0(CA);function My(e){if(e===CA)throw Error(qt(174));return e}function rz(e,t){switch(Da(VT,t),Da(WT,e),Da(Bh,CA),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:AR(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=AR(t,e)}Qa(Bh),Da(Bh,t)}function Db(){Qa(Bh),Qa(WT),Qa(VT)}function kue(e){My(VT.current);var t=My(Bh.current),r=AR(t,e.type);t!==r&&(Da(WT,e),Da(Bh,r))}function nz(e){WT.current===e&&(Qa(Bh),Qa(WT))}var bs=l0(0);function n5(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 L4=[];function iz(){for(var e=0;e<L4.length;e++)L4[e]._workInProgressVersionPrimary=null;L4.length=0}var ZM=um.ReactCurrentDispatcher,j4=um.ReactCurrentBatchConfig,xv=0,Ts=null,Io=null,el=null,i5=!1,FE=!1,HT=0,oMe=0;function Il(){throw Error(qt(321))}function az(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Xf(e[r],t[r]))return!1;return!0}function sz(e,t,r,n,i,a){if(xv=a,Ts=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ZM.current=e===null||e.memoizedState===null?dMe:fMe,e=r(n,i),FE){a=0;do{if(FE=!1,HT=0,25<=a)throw Error(qt(301));a+=1,el=Io=null,t.updateQueue=null,ZM.current=hMe,e=r(n,i)}while(FE)}if(ZM.current=a5,t=Io!==null&&Io.next!==null,xv=0,el=Io=Ts=null,i5=!1,t)throw Error(qt(300));return e}function oz(){var e=HT!==0;return HT=0,e}function _h(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return el===null?Ts.memoizedState=el=e:el=el.next=e,el}function Zd(){if(Io===null){var e=Ts.alternate;e=e!==null?e.memoizedState:null}else e=Io.next;var t=el===null?Ts.memoizedState:el.next;if(t!==null)el=t,Io=e;else{if(e===null)throw Error(qt(310));Io=e,e={memoizedState:Io.memoizedState,baseState:Io.baseState,baseQueue:Io.baseQueue,queue:Io.queue,next:null},el===null?Ts.memoizedState=el=e:el=el.next=e}return el}function GT(e,t){return typeof t=="function"?t(e):t}function R4(e){var t=Zd(),r=t.queue;if(r===null)throw Error(qt(311));r.lastRenderedReducer=e;var n=Io,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var o=s=null,l=null,u=a;do{var c=u.lane;if((xv&c)===c)l!==null&&(l=l.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 d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(o=l=d,s=n):l=l.next=d,Ts.lanes|=c,Ev|=c}u=u.next}while(u!==null&&u!==a);l===null?s=n:l.next=o,Xf(n,t.memoizedState)||(Xu=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,Ts.lanes|=a,Ev|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);
vendor: 4,945 bytes, line 38
38return[t.memoizedState,r.dispatch]}function $4(e){var t=Zd(),r=t.queue;if(r===null)throw Error(qt(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Xf(a,t.memoizedState)||(Xu=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function Oue(){}function Nue(e,t){var r=Ts,n=Zd(),i=t(),a=!Xf(n.memoizedState,i);if(a&&(n.memoizedState=i,Xu=!0),n=n.queue,lz(Lue.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||el!==null&&el.memoizedState.tag&1){if(r.flags|=2048,qT(9,Due.bind(null,r,n,i,t),void 0,null),nl===null)throw Error(qt(349));xv&30||Iue(r,t,i)}return i}function Iue(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ts.updateQueue,t===null?(t={lastEffect:null,stores:null},Ts.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Due(e,t,r,n){t.value=r,t.getSnapshot=n,jue(t)&&Rue(e)}function Lue(e,t,r){return r(function(){jue(t)&&Rue(e)})}function jue(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Xf(e,r)}catch{return!0}}function Rue(e){var t=Jp(e,1);t!==null&&Gf(t,e,1,-1)}function Hq(e){var t=_h();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:GT,lastRenderedState:e},t.queue=e,e=e.dispatch=cMe.bind(null,Ts,e),[t.memoizedState,e]}function qT(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ts.updateQueue,t===null?(t={lastEffect:null,stores:null},Ts.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 $ue(){return Zd().memoizedState}function JM(e,t,r,n){var i=_h();Ts.flags|=e,i.memoizedState=qT(1|t,r,void 0,n===void 0?null:n)}function LO(e,t,r,n){var i=Zd();n=n===void 0?null:n;var a=void 0;if(Io!==null){var s=Io.memoizedState;if(a=s.destroy,n!==null&&az(n,s.deps)){i.memoizedState=qT(t,r,a,n);return}}Ts.flags|=e,i.memoizedState=qT(1|t,r,a,n)}function Gq(e,t){return JM(8390656,8,e,t)}function lz(e,t){return LO(2048,8,e,t)}function Fue(e,t){return LO(4,2,e,t)}function Bue(e,t){return LO(4,4,e,t)}function zue(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 Uue(e,t,r){return r=r!=null?r.concat([e]):null,LO(4,4,zue.bind(null,t,e),r)}function uz(){}function Wue(e,t){var r=Zd();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&az(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Vue(e,t){var r=Zd();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&az(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Hue(e,t,r){return xv&21?(Xf(r,t)||(r=Xle(),Ts.lanes|=r,Ev|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xu=!0),e.memoizedState=r)}function lMe(e,t){var r=na;na=r!==0&&4>r?r:4,e(!0);var n=j4.transition;j4.transition={};try{e(!1),t()}finally{na=r,j4.transition=n}}function Gue(){return Zd().memoizedState}function uMe(e,t,r){var n=Dg(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},que(e))Kue(t,r);else if(r=Pue(e,t,r,n),r!==null){var i=Pu();Gf(r,e,n,i),Yue(r,t,n)}}function cMe(e,t,r){var n=Dg(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(que(e))Kue(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,r);if(i.hasEagerState=!0,i.eagerState=o,Xf(o,s)){var l=t.interleaved;l===null?(i.next=i,ez(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=Pue(e,t,i,n),r!==null&&(i=Pu(),Gf(r,e,n,i),Yue(r,t,n))}}function que(e){var t=e.alternate;return e===Ts||t!==null&&t===Ts}function Kue(e,t){FE=i5=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Yue(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,BB(e,r)}}var a5={readContext:Qd,useCallback:Il,useContext:Il,useEffect:Il,useImperativeHandle:Il,useInsertionEffect:Il,useLayoutEffect:Il,useMemo:Il,useReducer:Il,useRef:Il,useState:Il,useDebugValue:Il,useDeferredValue:Il,useTransition:Il,useMutableSource:Il,useSyncExternalStore:Il,useId:Il,unstable_isNewReconciler:!1},dMe={readContext:Qd,useCallback:function(e,t){return _h().memoizedState=[e,t===void 0?null:t],e},useContext:Qd,useEffect:Gq,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,JM(4194308,4,zue.bind(null,t,e),r)},useLayoutEffect:function(e,t){return JM(4194308,4,e,t)},useInsertionEffect:function(e,t){return JM(4,2,e,t)},useMemo:function(e,t){var r=_h();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=_h();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=uMe.bind(null,Ts,e),[n.memoizedState,e]}
vendor: 4,274 bytes, line 38
38,useRef:function(e){var t=_h();return e={current:e},t.memoizedState=e},useState:Hq,useDebugValue:uz,useDeferredValue:function(e){return _h().memoizedState=e},useTransition:function(){var e=Hq(!1),t=e[0];return e=lMe.bind(null,e[1]),_h().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ts,i=_h();if(is){if(r===void 0)throw Error(qt(407));r=r()}else{if(r=t(),nl===null)throw Error(qt(349));xv&30||Iue(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Gq(Lue.bind(null,n,a,e),[e]),n.flags|=2048,qT(9,Due.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=_h(),t=nl.identifierPrefix;if(is){var r=Rp,n=jp;r=(n&~(1<<32-Hf(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=HT++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=oMe++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fMe={readContext:Qd,useCallback:Wue,useContext:Qd,useEffect:lz,useImperativeHandle:Uue,useInsertionEffect:Fue,useLayoutEffect:Bue,useMemo:Vue,useReducer:R4,useRef:$ue,useState:function(){return R4(GT)},useDebugValue:uz,useDeferredValue:function(e){var t=Zd();return Hue(t,Io.memoizedState,e)},useTransition:function(){var e=R4(GT)[0],t=Zd().memoizedState;return[e,t]},useMutableSource:Oue,useSyncExternalStore:Nue,useId:Gue,unstable_isNewReconciler:!1},hMe={readContext:Qd,useCallback:Wue,useContext:Qd,useEffect:lz,useImperativeHandle:Uue,useInsertionEffect:Fue,useLayoutEffect:Bue,useMemo:Vue,useReducer:$4,useRef:$ue,useState:function(){return $4(GT)},useDebugValue:uz,useDeferredValue:function(e){var t=Zd();return Io===null?t.memoizedState=e:Hue(t,Io.memoizedState,e)},useTransition:function(){var e=$4(GT)[0],t=Zd().memoizedState;return[e,t]},useMutableSource:Oue,useSyncExternalStore:Nue,useId:Gue,unstable_isNewReconciler:!1};function kf(e,t){if(e&&e.defaultProps){t=As({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function qR(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:As({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var jO={isMounted:function(e){return(e=e._reactInternals)?Zv(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Pu(),i=Dg(e),a=Up(n,i);a.payload=t,r!=null&&(a.callback=r),t=Ng(e,a,i),t!==null&&(Gf(t,e,i,n),QM(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Pu(),i=Dg(e),a=Up(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Ng(e,a,i),t!==null&&(Gf(t,e,i,n),QM(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Pu(),n=Dg(e),i=Up(r,n);i.tag=2,t!=null&&(i.callback=t),t=Ng(e,i,n),t!==null&&(Gf(t,e,n,r),QM(t,e,n))}};function qq(e,t,r,n,i,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,s):t.prototype&&t.prototype.isPureReactComponent?!FT(r,n)||!FT(i,a):!0}function Xue(e,t,r){var n=!1,i=Yg,a=t.contextType;return typeof a=="object"&&a!==null?a=Qd(a):(i=rc(t)?bv:Xl.current,n=t.contextTypes,a=(n=n!=null)?Ob(e,i):Yg),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=jO,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Kq(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&&jO.enqueueReplaceState(t,t.state,null)}function KR(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},tz(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Qd(a):(a=rc(t)?bv:Xl.current,i.context=Ob(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(qR(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&jO.enqueueReplaceState(i,i.state,null),r5(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}
vendor: 7,917 bytes, lines 38-40
38function Lb(e,t){try{var r="",n=t;do r+=zCe(n),n=n.return;while(n);var i=r}catch(a){i=` 39Error generating stack: `+a.message+` 40`+a.stack}return{value:e,source:t,stack:i,digest:null}}function F4(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function YR(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var pMe=typeof WeakMap=="function"?WeakMap:Map;function Que(e,t,r){r=Up(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){o5||(o5=!0,a6=n),YR(e,t)},r}function Zue(e,t,r){r=Up(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){YR(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){YR(e,t),typeof n!="function"&&(Ig===null?Ig=new Set([this]):Ig.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function Yq(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new pMe;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=PMe.bind(null,e,t,r),t.then(e,e))}function Xq(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 Qq(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=Up(-1,1),t.tag=2,Ng(r,t,1))),r.lanes|=1),e)}var mMe=um.ReactCurrentOwner,Xu=!1;function mu(e,t,r,n){t.child=e===null?Cue(t,null,r,n):Ib(t,e.child,r,n)}function Zq(e,t,r,n,i){r=r.render;var a=t.ref;return Y1(t,i),n=sz(e,t,r,n,a,i),r=oz(),e!==null&&!Xu?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,em(e,t,i)):(is&&r&&KB(t),t.flags|=1,mu(e,t,n,i),t.child)}function Jq(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!yz(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,Jue(e,t,a,n,i)):(e=nk(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var s=a.memoizedProps;if(r=r.compare,r=r!==null?r:FT,r(s,n)&&e.ref===t.ref)return em(e,t,i)}return t.flags|=1,e=Lg(a,n),e.ref=t.ref,e.return=t,t.child=e}function Jue(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(FT(a,n)&&e.ref===t.ref)if(Xu=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(Xu=!0);else return t.lanes=e.lanes,em(e,t,i)}return XR(e,t,r,n,i)}function ece(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Da(O1,kc),kc|=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,Da(O1,kc),kc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Da(O1,kc),kc|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Da(O1,kc),kc|=n;return mu(e,t,i,r),t.child}function tce(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function XR(e,t,r,n,i){var a=rc(r)?bv:Xl.current;return a=Ob(t,a),Y1(t,i),r=sz(e,t,r,n,a,i),n=oz(),e!==null&&!Xu?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,em(e,t,i)):(is&&n&&KB(t),t.flags|=1,mu(e,t,r,i),t.child)}function eK(e,t,r,n,i){if(rc(r)){var a=!0;Qk(t)}else a=!1;if(Y1(t,i),t.stateNode===null)ek(e,t),Xue(t,r,n),KR(t,r,n,i),n=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var l=s.context,u=r.contextType;typeof u=="object"&&u!==null?u=Qd(u):(u=rc(r)?bv:Xl.current,u=Ob(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==n||l!==u)&&Kq(t,s,n,u),Ym=!1;var f=t.memoizedState;s.state=f,r5(t,n,s,i),l=t.memoizedState,o!==n||f!==l||tc.current||Ym?(typeof c=="function"&&(qR(t,r,c,n),l=t.memoizedState),(o=Ym||qq(t,r,o,n,f,l,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),s.props=n,s.state=l,s.context=u,n=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Mue(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:kf(t.type,o),s.props=u,d=t.pendingProps,f=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=Qd(l):(l=rc(r)?bv:Xl.current,l=Ob(t,l));var h=r.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==d||f!==l)&&Kq(t,s,n,l),Ym=!1,f=t.memoizedState,s.state=f,r5(t,n,s,i);var p=t.memoizedState;o!==d||f!==p||tc.current||Ym?(typeof h=="function"&&(qR(t,r,h,n),p=t.memoizedState),(u=Ym||qq(t,r,u,n,f,p,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,p,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),s.props=n,s.state=p,s.context=l,n=u):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return QR(e,t,r,n,a,i)}function QR(e,t,r,n,i,a){tce(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return i&&Fq(t,r,!1),em(e,t,a);n=t.stateNode,mMe.current=t;var o=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=Ib(t,e.child,null,a),t.child=Ib(t,null,o,a)):mu(e,t,o,a),t.memoizedState=n.state,i&&Fq(t,r,!0),t.child}function rce(e){var t=e.stateNode;t.pendingContext?$q(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$q(e,t.context,!1),rz(e,t.containerInfo)}function tK(e,t,r,n,i){return Nb(),XB(i),t.flags|=256,mu(e,t,r,n),t.child}var ZR={dehydrated:null,treeContext:null,retryLane:0};function JR(e){return{baseLanes:e,cachePool:null,transitions:null}}function nce(e,t,r){var n=t.pendingProps,i=bs.current,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Da(bs,i&1),e===null)return HR(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):(s=n.children,e=n.fallback,a?(n=t.mode,a=t.child,s={mode:"hidden",children:s},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=s):a=FO(s,n,0,null),e=iv(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=JR(r),t.memoizedState=ZR,e):cz(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return gMe(e,t,s,n,o,i,r);if(a){a=n.fallback,s=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:n.children};return!(s&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Lg(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?a=Lg(o,a):(a=iv(a,s,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,s=e.child.memoizedState,s=s===null?JR(r):{base
vendor: 7,095 bytes, line 40
40Lanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~r,t.memoizedState=ZR,n}return a=e.child,e=a.sibling,n=Lg(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 cz(e,t){return t=FO({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gP(e,t,r,n){return n!==null&&XB(n),Ib(t,e.child,null,r),e=cz(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gMe(e,t,r,n,i,a,s){if(r)return t.flags&256?(t.flags&=-257,n=F4(Error(qt(422))),gP(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=FO({mode:"visible",children:n.children},i,0,null),a=iv(a,i,s,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Ib(t,e.child,null,s),t.child.memoizedState=JR(s),t.memoizedState=ZR,a);if(!(t.mode&1))return gP(e,t,s,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,a=Error(qt(419)),n=F4(a,n,void 0),gP(e,t,s,n)}if(o=(s&e.childLanes)!==0,Xu||o){if(n=nl,n!==null){switch(s&-s){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|s)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Jp(e,i),Gf(n,e,i,-1))}return gz(),n=F4(Error(qt(421))),gP(e,t,s,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=MMe.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Wc=Og(i.nextSibling),Kc=t,is=!0,Rf=null,e!==null&&(Id[Dd++]=jp,Id[Dd++]=Rp,Id[Dd++]=wv,jp=e.id,Rp=e.overflow,wv=t),t=cz(t,n.children),t.flags|=4096,t)}function rK(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),GR(e.return,t,r)}function B4(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function ice(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(mu(e,t,n.children,r),n=bs.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&&rK(e,r,t);else if(e.tag===19)rK(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(Da(bs,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&n5(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),B4(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&n5(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}B4(t,!0,r,null,a);break;case"together":B4(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ek(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function em(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ev|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(qt(153));if(t.child!==null){for(e=t.child,r=Lg(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Lg(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function yMe(e,t,r){switch(t.tag){case 3:rce(t),Nb();break;case 5:kue(t);break;case 1:rc(t.type)&&Qk(t);break;case 4:rz(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Da(e5,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Da(bs,bs.current&1),t.flags|=128,null):r&t.child.childLanes?nce(e,t,r):(Da(bs,bs.current&1),e=em(e,t,r),e!==null?e.sibling:null);Da(bs,bs.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return ice(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Da(bs,bs.current),n)break;return null;case 22:case 23:return t.lanes=0,ece(e,t,r)}return em(e,t,r)}var ace,e6,sce,oce;ace=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}};e6=function(){};sce=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,My(Bh.current);var a=null;switch(r){case"input":i=xR(e,i),n=xR(e,n),a=[];break;case"select":i=As({},i,{value:void 0}),n=As({},n,{value:void 0}),a=[];break;case"textarea":i=SR(e,i),n=SR(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Yk)}CR(r,n);var s;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(s in o)o.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(NT.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(o=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==o&&(l!=null||o!=null))if(u==="style")if(o){for(s in o)!o.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&o[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(NT.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ga("scroll",e),a||o===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};oce=function(e,t,r,n){r!==n&&(t.flags|=4)};function g2(e,t){if(!is)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 Dl(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function vMe(e,t,r){var n=t.pendingProps;switch(YB(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dl(t),null;case 1:return rc(t.type)&&Xk(),Dl(t),null;
vendor: 33,980 bytes, line 40
40case 3:return n=t.stateNode,Db(),Qa(tc),Qa(Xl),iz(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pP(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rf!==null&&(l6(Rf),Rf=null))),e6(e,t),Dl(t),null;case 5:nz(t);var i=My(VT.current);if(r=t.type,e!==null&&t.stateNode!=null)sce(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(qt(166));return Dl(t),null}if(e=My(Bh.current),pP(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Ph]=t,n[UT]=a,e=(t.mode&1)!==0,r){case"dialog":Ga("cancel",n),Ga("close",n);break;case"iframe":case"object":case"embed":Ga("load",n);break;case"video":case"audio":for(i=0;i<sE.length;i++)Ga(sE[i],n);break;case"source":Ga("error",n);break;case"img":case"image":case"link":Ga("error",n),Ga("load",n);break;case"details":Ga("toggle",n);break;case"input":dq(n,a),Ga("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Ga("invalid",n);break;case"textarea":hq(n,a),Ga("invalid",n)}CR(r,a),i=null;for(var s in a)if(a.hasOwnProperty(s)){var o=a[s];s==="children"?typeof o=="string"?n.textContent!==o&&(a.suppressHydrationWarning!==!0&&hP(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(a.suppressHydrationWarning!==!0&&hP(n.textContent,o,e),i=["children",""+o]):NT.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&Ga("scroll",n)}switch(r){case"input":aP(n),fq(n,a,!0);break;case"textarea":aP(n),pq(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Yk)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Lle(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[Ph]=t,e[UT]=n,ace(e,t,!1,!1),t.stateNode=e;e:{switch(s=PR(r,n),r){case"dialog":Ga("cancel",e),Ga("close",e),i=n;break;case"iframe":case"object":case"embed":Ga("load",e),i=n;break;case"video":case"audio":for(i=0;i<sE.length;i++)Ga(sE[i],e);i=n;break;case"source":Ga("error",e),i=n;break;case"img":case"image":case"link":Ga("error",e),Ga("load",e),i=n;break;case"details":Ga("toggle",e),i=n;break;case"input":dq(e,n),i=xR(e,n),Ga("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=As({},n,{value:void 0}),Ga("invalid",e);break;case"textarea":hq(e,n),i=SR(e,n),Ga("invalid",e);break;default:i=n}CR(r,i),o=i;for(a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="style"?$le(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&jle(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&IT(e,l):typeof l=="number"&&IT(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(NT.hasOwnProperty(a)?l!=null&&a==="onScroll"&&Ga("scroll",e):l!=null&&DB(e,a,l,s))}switch(r){case"input":aP(e),fq(e,n,!1);break;case"textarea":aP(e),pq(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Kg(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?H1(e,!!n.multiple,a,!1):n.defaultValue!=null&&H1(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Yk)}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 Dl(t),null;case 6:if(e&&t.stateNode!=null)oce(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(qt(166));if(r=My(VT.current),My(Bh.current),pP(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ph]=t,(a=n.nodeValue!==r)&&(e=Kc,e!==null))switch(e.tag){case 3:hP(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hP(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ph]=t,t.stateNode=n}return Dl(t),null;case 13:if(Qa(bs),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(is&&Wc!==null&&t.mode&1&&!(t.flags&128))Sue(),Nb(),t.flags|=98560,a=!1;else if(a=pP(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(qt(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(qt(317));a[Ph]=t}else Nb(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Dl(t),a=!1}else Rf!==null&&(l6(Rf),Rf=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||bs.current&1?Fo===0&&(Fo=3):gz())),t.updateQueue!==null&&(t.flags|=4),Dl(t),null);case 4:return Db(),e6(e,t),e===null&&BT(t.stateNode.containerInfo),Dl(t),null;case 10:return JB(t.type._context),Dl(t),null;case 17:return rc(t.type)&&Xk(),Dl(t),null;case 19:if(Qa(bs),a=t.memoizedState,a===null)return Dl(t),null;if(n=(t.flags&128)!==0,s=a.rendering,s===null)if(n)g2(a,!1);else{if(Fo!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=n5(e),s!==null){for(t.flags|=128,g2(a,!1),n=s.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,s=a.alternate,s===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=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Da(bs,bs.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ws()>jb&&(t.flags|=128,n=!0,g2(a,!1),t.lanes=4194304)}else{if(!n)if(e=n5(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),g2(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!is)return Dl(t),null}else 2*Ws()-a.renderingStartTime>jb&&r!==1073741824&&(t.flags|=128,n=!0,g2(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(r=a.last,r!==null?r.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ws(),t.sibling=null,r=bs.current,Da(bs,n?r&1|2:r&1),t):(Dl(t),null);case 22:case 23:return mz(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?kc&1073741824&&(Dl(t),t.subtreeFlags&6&&(t.flags|=8192)):Dl(t),null;case 24:return null;case 25:return null}throw Error(qt(156,t.tag))}function _Me(e,t){switch(YB(t),t.tag){case 1:return rc(t.type)&&Xk(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Db(),Qa(tc),Qa(Xl),iz(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nz(t),null;case 13:if(Qa(bs),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(qt(340));Nb()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qa(bs),null;case 4:return Db(),null;case 10:return JB(t.type._context),null;case 22:case 23:return mz(),null;case 24:return null;default:return null}}var yP=!1,Hl=!1,bMe=typeof WeakSet=="function"?WeakSet:Set,Or=null;function k1(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ls(e,t,n)}else r.current=null}function t6(e,t,r){try{r()}catch(n){Ls(e,t,n)}}var nK=!1;function wMe(e,t){if($R=Gk,e=fue(),qB(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 i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var s=0,o=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==r||i!==0&&d.nodeType!==3||(o=s+i),d!==a||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===r&&++u===i&&(o=s),f===a&&++c===n&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(FR={focusedElem:e,selectionRange:r},Gk=!1,Or=t;Or!==null;)if(t=Or,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Or=e;else for(;Or!==null;){t=Or;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,_=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:kf(t.type,m),_);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(qt(163))}}catch(w){Ls(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,Or=e;break}Or=t.return}return p=nK,nK=!1,p}function BE(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&t6(t,r,a)}i=i.next}while(i!==n)}}function RO(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 r6(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 lce(e){var t=e.alternate;t!==null&&(e.alternate=null,lce(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ph],delete t[UT],delete t[UR],delete t[nMe],delete t[iMe])),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 uce(e){return e.tag===5||e.tag===3||e.tag===4}function iK(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uce(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 n6(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=Yk));else if(n!==4&&(e=e.child,e!==null))for(n6(e,t,r),e=e.sibling;e!==null;)n6(e,t,r),e=e.sibling}function i6(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(i6(e,t,r),e=e.sibling;e!==null;)i6(e,t,r),e=e.sibling}var ml=null,Df=!1;function km(e,t,r){for(r=r.child;r!==null;)cce(e,t,r),r=r.sibling}function cce(e,t,r){if(Fh&&typeof Fh.onCommitFiberUnmount=="function")try{Fh.onCommitFiberUnmount(MO,r)}catch{}switch(r.tag){case 5:Hl||k1(r,t);case 6:var n=ml,i=Df;ml=null,km(e,t,r),ml=n,Df=i,ml!==null&&(Df?(e=ml,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ml.removeChild(r.stateNode));break;case 18:ml!==null&&(Df?(e=ml,r=r.stateNode,e.nodeType===8?I4(e.parentNode,r):e.nodeType===1&&I4(e,r),RT(e)):I4(ml,r.stateNode));break;case 4:n=ml,i=Df,ml=r.stateNode.containerInfo,Df=!0,km(e,t,r),ml=n,Df=i;break;case 0:case 11:case 14:case 15:if(!Hl&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&t6(r,t,s),i=i.next}while(i!==n)}km(e,t,r);break;case 1:if(!Hl&&(k1(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){Ls(r,t,o)}km(e,t,r);break;case 21:km(e,t,r);break;case 22:r.mode&1?(Hl=(n=Hl)||r.memoizedState!==null,km(e,t,r),Hl=n):km(e,t,r);break;default:km(e,t,r)}}function aK(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new bMe),t.forEach(function(n){var i=kMe.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function vf(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:ml=o.stateNode,Df=!1;break e;case 3:ml=o.stateNode.containerInfo,Df=!0;break e;case 4:ml=o.stateNode.containerInfo,Df=!0;break e}o=o.return}if(ml===null)throw Error(qt(160));cce(a,s,i),ml=null,Df=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ls(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)dce(t,e),t=t.sibling}function dce(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vf(t,e),ph(e),n&4){try{BE(3,e,e.return),RO(3,e)}catch(m){Ls(e,e.return,m)}try{BE(5,e,e.return)}catch(m){Ls(e,e.return,m)}}break;case 1:vf(t,e),ph(e),n&512&&r!==null&&k1(r,r.return);break;case 5:if(vf(t,e),ph(e),n&512&&r!==null&&k1(r,r.return),e.flags&32){var i=e.stateNode;try{IT(i,"")}catch(m){Ls(e,e.return,m)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,s=r!==null?r.memoizedProps:a,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&a.type==="radio"&&a.name!=null&&Ile(i,a),PR(o,s);var u=PR(o,a);for(s=0;s<l.length;s+=2){var c=l[s],d=l[s+1];c==="style"?$le(i,d):c==="dangerouslySetInnerHTML"?jle(i,d):c==="children"?IT(i,d):DB(i,c,d,u)}switch(o){case"input":ER(i,a);break;case"textarea":Dle(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?H1(i,!!a.multiple,h,!1):f!==!!a.multiple&&(a.defaultValue!=null?H1(i,!!a.multiple,a.defaultValue,!0):H1(i,!!a.multiple,a.multiple?[]:"",!1))}i[UT]=a}catch(m){Ls(e,e.return,m)}}break;case 6:if(vf(t,e),ph(e),n&4){if(e.stateNode===null)throw Error(qt(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){Ls(e,e.return,m)}}break;case 3:if(vf(t,e),ph(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{RT(t.containerInfo)}catch(m){Ls(e,e.return,m)}break;case 4:vf(t,e),ph(e);break;case 13:vf(t,e),ph(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(hz=Ws())),n&4&&aK(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Hl=(u=Hl)||c,vf(t,e),Hl=u):vf(t,e),ph(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Or=e,c=e.child;c!==null;){for(d=Or=c;Or!==null;){switch(f=Or,h=f.child,f.tag){case 0:case 11:case 14:case 15:BE(4,f,f.return);break;case 1:k1(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){Ls(n,r,m)}}break;case 5:k1(f,f.return);break;case 22:if(f.memoizedState!==null){oK(d);continue}}h!==null?(h.return=f,Or=h):oK(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(o=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=Rle("display",s))}catch(m){Ls(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Ls(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:vf(t,e),ph(e),n&4&&aK(e);break;case 21:break;default:vf(t,e),ph(e)}}function ph(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(uce(r)){var n=r;break e}r=r.return}throw Error(qt(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(IT(i,""),n.flags&=-33);var a=iK(e);i6(e,a,i);break;case 3:case 4:var s=n.stateNode.containerInfo,o=iK(e);n6(e,o,s);break;default:throw Error(qt(161))}}catch(l){Ls(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xMe(e,t,r){Or=e,fce(e)}function fce(e,t,r){for(var n=(e.mode&1)!==0;Or!==null;){var i=Or,a=i.child;if(i.tag===22&&n){var s=i.memoizedState!==null||yP;if(!s){var o=i.alternate,l=o!==null&&o.memoizedState!==null||Hl;o=yP;var u=Hl;if(yP=s,(Hl=l)&&!u)for(Or=i;Or!==null;)s=Or,l=s.child,s.tag===22&&s.memoizedState!==null?lK(i):l!==null?(l.return=s,Or=l):lK(i);for(;a!==null;)Or=a,fce(a),a=a.sibling;Or=i,yP=o,Hl=u}sK(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Or=a):sK(e)}}function sK(e){for(;Or!==null;){var t=Or;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Hl||RO(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Hl)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:kf(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Vq(t,a,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Vq(t,s,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.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 c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&RT(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(qt(163))}Hl||t.flags&512&&r6(t)}catch(f){Ls(t,t.return,f)}}if(t===e){Or=null;break}if(r=t.sibling,r!==null){r.return=t.return,Or=r;break}Or=t.return}}function oK(e){for(;Or!==null;){var t=Or;if(t===e){Or=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Or=r;break}Or=t.return}}function lK(e){for(;Or!==null;){var t=Or;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{RO(4,t)}catch(l){Ls(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){Ls(t,i,l)}}var a=t.return;try{r6(t)}catch(l){Ls(t,a,l)}break;case 5:var s=t.return;try{r6(t)}catch(l){Ls(t,s,l)}}}catch(l){Ls(t,t.return,l)}if(t===e){Or=null;break}var o=t.sibling;if(o!==null){o.return=t.return,Or=o;break}Or=t.return}}var EMe=Math.ceil,s5=um.ReactCurrentDispatcher,dz=um.ReactCurrentOwner,qd=um.ReactCurrentBatchConfig,Pi=0,nl=null,fo=null,_l=0,kc=0,O1=l0(0),Fo=0,KT=null,Ev=0,$O=0,fz=0,zE=null,qu=null,hz=0,jb=1/0,xp=null,o5=!1,a6=null,Ig=null,vP=!1,pg=null,l5=0,UE=0,s6=null,tk=-1,rk=0;function Pu(){return Pi&6?Ws():tk!==-1?tk:tk=Ws()}function Dg(e){return e.mode&1?Pi&2&&_l!==0?_l&-_l:sMe.transition!==null?(rk===0&&(rk=Xle()),rk):(e=na,e!==0||(e=window.event,e=e===void 0?16:nue(e.type)),e):1}function Gf(e,t,r,n){if(50<UE)throw UE=0,s6=null,Error(qt(185));TA(e,r,n),(!(Pi&2)||e!==nl)&&(e===nl&&(!(Pi&2)&&($O|=r),Fo===4&&Jm(e,_l)),nc(e,n),r===1&&Pi===0&&!(t.mode&1)&&(jb=Ws()+500,DO&&u0()))}function nc(e,t){var r=e.callbackNode;sPe(e,t);var n=Hk(e,e===nl?_l:0);if(n===0)r!==null&&yq(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&yq(r),t===1)e.tag===0?aMe(uK.bind(null,e)):xue(uK.bind(null,e)),tMe(function(){!(Pi&6)&&u0()}),r=null;else{switch(Qle(n)){case 1:r=FB;break;case 4:r=Kle;break;case 16:r=Vk;break;case 536870912:r=Yle;break;default:r=Vk}r=bce(r,hce.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function hce(e,t){if(tk=-1,rk=0,Pi&6)throw Error(qt(327));var r=e.callbackNode;if(X1()&&e.callbackNode!==r)return null;var n=Hk(e,e===nl?_l:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=u5(e,n);else{t=n;var i=Pi;Pi|=2;var a=mce();(nl!==e||_l!==t)&&(xp=null,jb=Ws()+500,nv(e,t));do try{AMe();break}catch(o){pce(e,o)}while(!0);ZB(),s5.current=a,Pi=i,fo!==null?t=0:(nl=null,_l=0,t=Fo)}if(t!==0){if(t===2&&(i=IR(e),i!==0&&(n=i,t=o6(e,i))),t===1)throw r=KT,nv(e,0),Jm(e,n),nc(e,Ws()),r;if(t===6)Jm(e,n);else{if(i=e.current.alternate,!(n&30)&&!TMe(i)&&(t=u5(e,n),t===2&&(a=IR(e),a!==0&&(n=a,t=o6(e,a))),t===1))throw r=KT,nv(e,0),Jm(e,n),nc(e,Ws()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(qt(345));case 2:cy(e,qu,xp);break;case 3:if(Jm(e,n),(n&130023424)===n&&(t=hz+500-Ws(),10<t)){if(Hk(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Pu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=zR(cy.bind(null,e,qu,xp),t);break}cy(e,qu,xp);break;case 4:if(Jm(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var s=31-Hf(n);a=1<<s,s=t[s],s>i&&(i=s),n&=~a}if(n=i,n=Ws()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*EMe(n/1960))-n,10<n){e.timeoutHandle=zR(cy.bind(null,e,qu,xp),n);break}cy(e,qu,xp);break;case 5:cy(e,qu,xp);break;default:throw Error(qt(329))}}}return nc(e,Ws()),e.callbackNode===r?hce.bind(null,e):null}function o6(e,t){var r=zE;return e.current.memoizedState.isDehydrated&&(nv(e,t).flags|=256),e=u5(e,t),e!==2&&(t=qu,qu=r,t!==null&&l6(t)),e}function l6(e){qu===null?qu=e:qu.push.apply(qu,e)}function TMe(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 i=r[n],a=i.getSnapshot;i=i.value;try{if(!Xf(a(),i))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 Jm(e,t){for(t&=~fz,t&=~$O,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Hf(t),n=1<<r;e[r]=-1,t&=~n}}function uK(e){if(Pi&6)throw Error(qt(327));X1();var t=Hk(e,0);if(!(t&1))return nc(e,Ws()),null;var r=u5(e,t);if(e.tag!==0&&r===2){var n=IR(e);n!==0&&(t=n,r=o6(e,n))}if(r===1)throw r=KT,nv(e,0),Jm(e,t),nc(e,Ws()),r;if(r===6)throw Error(qt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cy(e,qu,xp),nc(e,Ws()),null}function pz(e,t){var r=Pi;Pi|=1;try{return e(t)}finally{Pi=r,Pi===0&&(jb=Ws()+500,DO&&u0())}}function Tv(e){pg!==null&&pg.tag===0&&!(Pi&6)&&X1();var t=Pi;Pi|=1;var r=qd.transition,n=na;try{if(qd.transition=null,na=1,e)return e()}finally{na=n,qd.transition=r,Pi=t,!(Pi&6)&&u0()}}function mz(){kc=O1.current,Qa(O1)}function nv(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,eMe(r)),fo!==null)for(r=fo.return;r!==null;){var n=r;switch(YB(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Xk();break;case 3:Db(),Qa(tc),Qa(Xl),iz();break;case 5:nz(n);break;case 4:Db();break;case 13:Qa(bs);break;case 19:Qa(bs);break;case 10:JB(n.type._context);break;case 22:case 23:mz()}r=r.return}if(nl=e,fo=e=Lg(e.current,null),_l=kc=t,Fo=0,KT=null,fz=$O=Ev=0,qu=zE=null,Py!==null){for(t=0;t<Py.length;t++)if(r=Py[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var s=a.next;a.next=i,n.next=s}r.pending=n}Py=null}return e}function pce(e,t){do{var r=fo;try{if(ZB(),ZM.current=a5,i5){for(var n=Ts.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}i5=!1}if(xv=0,el=Io=Ts=null,FE=!1,HT=0,dz.current=null,r===null||r.return===null){Fo=1,KT=t,fo=null;break}e:{var a=e,s=r.return,o=r,l=t;if(t=_l,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=o,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Xq(s);if(h!==null){h.flags&=-257,Qq(h,s,o,a,t),h.mode&1&&Yq(a,u,t),t=h,l=u;var p=t.updateQueue;if(p===null){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}else{if(!(t&1)){Yq(a,u,t),gz();break e}l=Error(qt(426))}}else if(is&&o.mode&1){var _=Xq(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Qq(_,s,o,a,t),XB(Lb(l,o));break e}}a=l=Lb(l,o),Fo!==4&&(Fo=2),zE===null?zE=[a]:zE.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=Que(a,l,t);Wq(a,y);break e;case 1:o=l;var v=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ig===null||!Ig.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=Zue(a,o,t);Wq(a,w);break e}}a=a.return}while(a!==null)}yce(r)}catch(x){t=x,fo===r&&r!==null&&(fo=r=r.return);continue}break}while(!0)}function mce(){var e=s5.current;return s5.current=a5,e===null?a5:e}function gz(){(Fo===0||Fo===3||Fo===2)&&(Fo=4),nl===null||!(Ev&268435455)&&!($O&268435455)||Jm(nl,_l)}function u5(e,t){var r=Pi;Pi|=2;var n=mce();(nl!==e||_l!==t)&&(xp=null,nv(e,t));do try{SMe();break}catch(i){pce(e,i)}while(!0);if(ZB(),Pi=r,s5.current=n,fo!==null)throw Error(qt(261));return nl=null,_l=0,Fo}function SMe(){for(;fo!==null;)gce(fo)}function AMe(){for(;fo!==null&&!QCe();)gce(fo)}function gce(e){var t=_ce(e.alternate,e,kc);e.memoizedProps=e.pendingProps,t===null?yce(e):fo=t,dz.current=null}function yce(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=_Me(r,t),r!==null){r.flags&=32767,fo=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fo=6,fo=null;return}}else if(r=vMe(r,t,kc),r!==null){fo=r;return}if(t=t.sibling,t!==null){fo=t;return}fo=t=e}while(t!==null);Fo===0&&(Fo=5)}function cy(e,t,r){var n=na,i=qd.transition;try{qd.transition=null,na=1,CMe(e,t,r,n)}finally{qd.transition=i,na=n}return null}function CMe(e,t,r,n){do X1();while(pg!==null);if(Pi&6)throw Error(qt(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(qt(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(oPe(e,a),e===nl&&(fo=nl=null,_l=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||vP||(vP=!0,bce(Vk,function(){return X1(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=qd.transition,qd.transition=null;var s=na;na=1;var o=Pi;Pi|=4,dz.current=null,wMe(e,r),dce(r,e),qPe(FR),Gk=!!$R,FR=$R=null,e.current=r,xMe(r),ZCe(),Pi=o,na=s,qd.transition=a}else e.current=r;if(vP&&(vP=!1,pg=e,l5=i),a=e.pendingLanes,a===0&&(Ig=null),tPe(r.stateNode),nc(e,Ws()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(o5)throw o5=!1,e=a6,a6=null,e;return l5&1&&e.tag!==0&&X1(),a=e.pendingLanes,a&1?e===s6?UE++:(UE=0,s6=e):UE=0,u0(),null}function X1(){if(pg!==null){var e=Qle(l5),t=qd.transition,r=na;try{if(qd.transition=null,na=16>e?16:e,pg===null)var n=!1;else{if(e=pg,pg=null,l5=0,Pi&6)throw Error(qt(331));var i=Pi;for(Pi|=4,Or=e.current;Or!==null;){var a=Or,s=a.child;if(Or.flags&16){var o=a.deletions;if(o!==null){for(var l=0;l<o.length;l++){var u=o[l];for(Or=u;Or!==null;){var c=Or;switch(c.tag){case 0:case 11:case 15:BE(8,c,a)}var d=c.child;if(d!==null)d.return=c,Or=d;else for(;Or!==null;){c=Or;var f=c.sibling,h=c.return;if(lce(c),c===u){Or=null;break}if(f!==null){f.return=h,Or=f;break}Or=h}}}var p=a.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}Or=a}}if(a.subtreeFlags&2064&&s!==null)s.return=a,Or=s;else e:for(;Or!==null;){if(a=Or,a.flags&2048)switch(a.tag){case 0:case 11:case 15:BE(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,Or=y;break e}Or=a.return}}var v=e.current;for(Or=v;Or!==null;){s=Or;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,Or=b;else e:for(s=v;Or!==null;){if(o=Or,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:RO(9,o)}}catch(x){Ls(o,o.return,x)}if(o===s){Or=null;break e}var w=o.sibling;if(w!==null){w.return=o.return,Or=w;break e}Or=o.return}}if(Pi=i,u0(),Fh&&typeof Fh.onPostCommitFiberRoot=="function")try{Fh.onPostCommitFiberRoot(MO,e)}catch{}n=!0}return n}finally{na=r,qd.transition=t}}return!1}function cK(e,t,r){t=Lb(r,t),t=Que(e,t,1),e=Ng(e,t,1),t=Pu(),e!==null&&(TA(e,1,t),nc(e,t))}function Ls(e,t,r){if(e.tag===3)cK(e,e,r);else for(;t!==null;){if(t.tag===3){cK(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ig===null||!Ig.has(n))){e=Lb(r,e),e=Zue(t,e,1),t=Ng(t,e,1),e=Pu(),t!==null&&(TA(t,1,e),nc(t,e));break}}t=t.return}}function PMe(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Pu(),e.pingedLanes|=e.suspendedLanes&r,nl===e&&(_l&r)===r&&(Fo===4||Fo===3&&(_l&130023424)===_l&&500>Ws()-hz?nv(e,0):fz|=r),nc(e,t)}function vce(e,t){t===0&&(e.mode&1?(t=lP,lP<<=1,!(lP&130023424)&&(lP=4194304)):t=1);var r=Pu();e=Jp(e,t),e!==null&&(TA(e,t,r),nc(e,r))}function MMe(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),vce(e,r)}function kMe(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(qt(314))}n!==null&&n.delete(t),vce(e,r)}var _ce;_ce=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||tc.current)Xu=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Xu=!1,yMe(e,t,r);Xu=!!(e.flags&131072)}else Xu=!1,is&&t.flags&1048576&&Eue(t,Jk,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ek(e,t),e=t.pendingProps;var i=Ob(t,Xl.current);Y1(t,r),i=sz(null,t,n,e,i,r);var a=oz();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rc(n)?(a=!0,Qk(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tz(t),i.updater=jO,t.stateNode=i,i._reactInternals=t,KR(t,n,e,r),t=QR(null,t,n,!0,a,r)):(t.tag=0,is&&a&&KB(t),mu(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ek(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=NMe(n),e=kf(n,e),i){case 0:t=XR(null,t,n,e,r);break e;case 1:t=eK(null,t,n,e,r);break e;case 11:t=Zq(null,t,n,e,r);break e;case 14:t=Jq(null,t,n,kf(n.type,e),r);break e}throw Error(qt(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:kf(n,i),XR(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:kf(n,i),eK(e,t,n,i,r);case 3:e:{if(rce(t),e===null)throw Error(qt(387));n=t.pendingProps,a=t.memoizedState,i=a.element,Mue(e,t),r5(t,n,null,r);var s=t.memoizedState;if(n=s.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Lb(Error(qt(423)),t),t=tK(e,t,n,r,i);break e}else if(n!==i){i=Lb(Error(qt(424)),t),t=tK(e,t,n,r,i);break e}else for(Wc=Og(t.stateNode.containerInfo.firstChild),Kc=t,is=!0,Rf=null,r=Cue(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Nb(),n===i){t=em(e,t,r);break e}mu(e,t,n,r)}t=t.child}return t;case 5:return kue(t),e===null&&HR(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,BR(n,i)?s=null:a!==null&&BR(n,a)&&(t.flags|=32),tce(e,t),mu(e,t,s,r),t.child;case 6:return e===null&&HR(t),null;case 13:return nce(e,t,r);case 4:return rz(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ib(t,null,n,r):mu(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:kf(n,i),Zq(e,t,n,i,r);case 7:return mu(e,t,t.pendingProps,r),t.child;case 8:return mu(e,t,t.pendingProps.children,r),t.child;case 12:return mu(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Da(e5,n._currentValue),n._currentValue=s,a!==null)if(Xf(a.value,s)){if(a.children===i.children&&!tc.current){t=em(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Up(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),GR(a.return,r,t),o.lanes|=r;break}l=l.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(qt(341));s.lanes|=r,o=s.alternate,o!==null&&(o.lanes|=r),GR(s,r,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}mu(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Y1(t,r),i=Qd(i),n=n(i),t.flags|=1,mu(e,t,n,r),t.child;case 14:return n=t.type,i=kf(n,t.pendingProps),i=kf(n.type,i),Jq(e,t,n,i,r);case 15:return Jue(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:kf(n,i),ek(e,t),t.tag=1,rc(n)?(e=!0,Qk(t)):e=!1,Y1(t,r),Xue(t,n,i),KR(t,n,i,r),QR(null,t,n,!0,e,r);case 19:return ice(e,t,r);case 22:return ece(e,t,r)}throw Error(qt(156,t.tag))};function bce(e,t){return qle(e,t)}function OMe(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 Wd(e,t,r,n){return new OMe(e,t,r,n)}function yz(e){return e=e.prototype,!(!e||!e.isReactComponent)}function NMe(e){if(typeof e=="function")return yz(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jB)return 11;if(e===RB)return 14}return 2}function Lg(e,t){var r=e.alternate;return r===null?(r=Wd(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: 4,247 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 nk(e,t,r,n,i,a){var s=2;if(n=e,typeof e=="function")yz(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case w1:return iv(r.children,i,a,t);case LB:s=8,i|=8;break;case vR:return e=Wd(12,r,t,i|2),e.elementType=vR,e.lanes=a,e;case _R:return e=Wd(13,r,t,i),e.elementType=_R,e.lanes=a,e;case bR:return e=Wd(19,r,t,i),e.elementType=bR,e.lanes=a,e;case kle:return FO(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ple:s=10;break e;case Mle:s=9;break e;case jB:s=11;break e;case RB:s=14;break e;case Km:s=16,n=null;break e}throw Error(qt(130,e==null?e:typeof e,""))}return t=Wd(s,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function iv(e,t,r,n){return e=Wd(7,e,n,t),e.lanes=r,e}function FO(e,t,r,n){return e=Wd(22,e,n,t),e.elementType=kle,e.lanes=r,e.stateNode={isHidden:!1},e}function z4(e,t,r){return e=Wd(6,e,null,t),e.lanes=r,e}function U4(e,t,r){return t=Wd(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function IMe(e,t,r,n,i){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=x4(0),this.expirationTimes=x4(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=x4(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function vz(e,t,r,n,i,a,s,o,l){return e=new IMe(e,t,r,o,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Wd(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},tz(a),e}function DMe(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b1,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function wce(e){if(!e)return Yg;e=e._reactInternals;e:{if(Zv(e)!==e||e.tag!==1)throw Error(qt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(rc(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(qt(171))}if(e.tag===1){var r=e.type;if(rc(r))return wue(e,r,t)}return t}function xce(e,t,r,n,i,a,s,o,l){return e=vz(r,n,!0,e,i,a,s,o,l),e.context=wce(null),r=e.current,n=Pu(),i=Dg(r),a=Up(n,i),a.callback=t??null,Ng(r,a,i),e.current.lanes=i,TA(e,i,n),nc(e,n),e}function BO(e,t,r,n){var i=t.current,a=Pu(),s=Dg(i);return r=wce(r),t.context===null?t.context=r:t.pendingContext=r,t=Up(a,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ng(i,t,s),e!==null&&(Gf(e,i,s,a),QM(e,i,s)),s}function c5(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 dK(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function _z(e,t){dK(e,t),(e=e.alternate)&&dK(e,t)}function LMe(){return null}var Ece=typeof reportError=="function"?reportError:function(e){console.error(e)};function bz(e){this._internalRoot=e}zO.prototype.render=bz.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(qt(409));BO(e,t,null,null)};zO.prototype.unmount=bz.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tv(function(){BO(null,e,null,null)}),t[Zp]=null}};function zO(e){this._internalRoot=e}zO.prototype.unstable_scheduleHydration=function(e){if(e){var t=eue();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Zm.length&&t!==0&&t<Zm[r].priority;r++);Zm.splice(r,0,e),r===0&&rue(e)}};function wz(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function UO(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fK(){}function jMe(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=c5(s);a.call(u)}}
vendor: 5,030 bytes, line 40
40var s=xce(t,n,e,0,null,!1,!1,"",fK);return e._reactRootContainer=s,e[Zp]=s.current,BT(e.nodeType===8?e.parentNode:e),Tv(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var u=c5(l);o.call(u)}}var l=vz(e,0,!1,null,null,!1,!1,"",fK);return e._reactRootContainer=l,e[Zp]=l.current,BT(e.nodeType===8?e.parentNode:e),Tv(function(){BO(t,l,r,n)}),l}function WO(e,t,r,n,i){var a=r._reactRootContainer;if(a){var s=a;if(typeof i=="function"){var o=i;i=function(){var l=c5(s);o.call(l)}}BO(t,s,e,i)}else s=jMe(r,t,e,i,n);return c5(s)}Zle=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=aE(t.pendingLanes);r!==0&&(BB(t,r|1),nc(t,Ws()),!(Pi&6)&&(jb=Ws()+500,u0()))}break;case 13:Tv(function(){var n=Jp(e,1);if(n!==null){var i=Pu();Gf(n,e,1,i)}}),_z(e,1)}};zB=function(e){if(e.tag===13){var t=Jp(e,134217728);if(t!==null){var r=Pu();Gf(t,e,134217728,r)}_z(e,134217728)}};Jle=function(e){if(e.tag===13){var t=Dg(e),r=Jp(e,t);if(r!==null){var n=Pu();Gf(r,e,t,n)}_z(e,t)}};eue=function(){return na};tue=function(e,t){var r=na;try{return na=e,t()}finally{na=r}};kR=function(e,t,r){switch(t){case"input":if(ER(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 i=IO(n);if(!i)throw Error(qt(90));Nle(n),ER(n,i)}}}break;case"textarea":Dle(e,r);break;case"select":t=r.value,t!=null&&H1(e,!!r.multiple,t,!1)}};zle=pz;Ule=Tv;var RMe={usingClientEntryPoint:!1,Events:[AA,S1,IO,Fle,Ble,pz]},y2={findFiberByHostInstance:Cy,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$Me={bundleType:y2.bundleType,version:y2.version,rendererPackageName:y2.rendererPackageName,rendererConfig:y2.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:um.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hle(e),e===null?null:e.stateNode},findFiberByHostInstance:y2.findFiberByHostInstance||LMe,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 _P=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_P.isDisabled&&_P.supportsFiber)try{MO=_P.inject($Me),Fh=_P}catch{}}od.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RMe;od.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wz(t))throw Error(qt(200));return DMe(e,t,null,r)};od.createRoot=function(e,t){if(!wz(e))throw Error(qt(299));var r=!1,n="",i=Ece;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=vz(e,1,!1,null,null,r,!1,n,i),e[Zp]=t.current,BT(e.nodeType===8?e.parentNode:e),new bz(t)};od.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(qt(188)):(e=Object.keys(e).join(","),Error(qt(268,e)));return e=Hle(t),e=e===null?null:e.stateNode,e};od.flushSync=function(e){return Tv(e)};od.hydrate=function(e,t,r){if(!UO(t))throw Error(qt(200));return WO(null,e,t,!0,r)};od.hydrateRoot=function(e,t,r){if(!wz(e))throw Error(qt(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",s=Ece;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=xce(t,null,e,1,r??null,i,!1,a,s),e[Zp]=t.current,BT(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new zO(t)};od.render=function(e,t,r){if(!UO(t))throw Error(qt(200));return WO(null,e,t,!1,r)};od.unmountComponentAtNode=function(e){if(!UO(e))throw Error(qt(40));return e._reactRootContainer?(Tv(function(){WO(null,null,e,!1,function(){e._reactRootContainer=null,e[Zp]=null})}),!0):!1};od.unstable_batchedUpdates=pz;od.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!UO(r))throw Error(qt(200));if(e==null||e._reactInternals===void 0)throw Error(qt(38));return WO(e,t,r,!1,n)};od.version="18.3.1-next-f1338f8080-20240426";function Tce(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tce)}catch(e){console.error(e)}}Tce(),Tle.exports=od;var Jv=Tle.exports;const xz=mi(Jv);var Sce,hK=Jv;Sce=hK.createRoot,hK.hydrateRoot;var FMe=typeof Element<"u",BMe=typeof Map=="function",zMe=typeof Set=="function",UMe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ik(e,t){if(e===t)return!0;
40if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ik(e[n],t[n]))return!1;return!0}var a;if(BMe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!ik(n.value[1],t.get(n.value[0])))return!1;return!0}if(zMe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(UMe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;if(FMe&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&e.$$typeof)&&!ik(e[i[n]],t[i[n]]))return!1;return!0}return e!==e&&t!==t}var WMe=function(t,r){try{return ik(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const VMe=mi(WMe);var HMe=function(e,t,r,n,i,a,s,o){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,a,s,o],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},GMe=HMe;const pK=mi(GMe);var qMe=function(t,r,n,i){var a=n?n.call(i,t,r):void 0;if(a!==void 0)return!!a;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var s=Object.keys(t),o=Object.keys(r);if(s.length!==o.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(r),u=0;u<s.length;u++){var c=s[u];if(!l(c))return!1;var d=t[c],f=r[c];if(a=n?n.call(i,d,f,c):void 0,a===!1||a===void 0&&d!==f)return!1}return!0};const KMe=mi(qMe);var Ace=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Ace||{}),W4={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},mK=Object.values(Ace),VO={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Cce=Object.entries(VO).reduce((e,[t,r])=>(e[r]=t,e),{}),Vf="data-rh",Q1={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Z1=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},YMe=e=>{let t=Z1(e,"title");const r=Z1(e,Q1.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Z1(e,Q1.DEFAULT_TITLE);return t||n||void 0},XMe=e=>Z1(e,Q1.ON_CHANGE_CLIENT_STATE)||(()=>{}),V4=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),QMe=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const i=Object.keys(n);for(let a=0;a<i.length;a+=1){const o=i[a].toLowerCase();if(e.indexOf(o)!==-1&&n[o])return r.concat(n)}}return r},[]),ZMe=e=>console&&typeof console.warn=="function"&&console.warn(e),v2=(e,t,r)=>{const n={};return r.filter(i=>Array.isArray(i[e])?!0:(typeof i[e]<"u"&&ZMe(`Helmet: ${e} should be of type "Array". Instead found type "${typeof i[e]}"`),!1)).map(i=>i[e]).reverse().reduce((i,a)=>{const s={};a.filter(l=>{let u;const c=Object.keys(l);for(let f=0;f<c.length;f+=1){const h=c[f],p=h.toLowerCase();t.indexOf(p)!==-1&&!(u==="rel"&&l[u].toLowerCase()==="canonical")&&!(p==="rel"&&l[p].toLowerCase()==="stylesheet")&&(u=p),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(u=h)}if(!u||!l[u])return!1;const d=l[u].toLowerCase();return n[u]||(n[u]={}),s[u]||(s[u]={}),n[u][d]?!1:(s[u][d]=!0,!0)}
40).reverse().forEach(l=>i.push(l));const o=Object.keys(s);for(let l=0;l<o.length;l+=1){const u=o[l],c={...n[u],...s[u]};n[u]=c}return i},[]).reverse()},JMe=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},eke=e=>({baseTag:QMe(["href"],e),bodyAttributes:V4("bodyAttributes",e),defer:Z1(e,Q1.DEFER),encode:Z1(e,Q1.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:V4("htmlAttributes",e),linkTags:v2("link",["rel","href"],e),metaTags:v2("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:v2("noscript",["innerHTML"],e),onChangeClientState:XMe(e),scriptTags:v2("script",["src","innerHTML"],e),styleTags:v2("style",["cssText"],e),title:YMe(e),titleAttributes:V4("titleAttributes",e),prioritizeSeoTags:JMe(e,Q1.PRIORITIZE_SEO_TAGS)}),Pce=e=>Array.isArray(e)?e.join(""):e,tke=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},H4=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(tke(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},gK=(e,t)=>({...e,[t]:void 0}),rke=["noscript","script","style"],u6=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Mce=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),nke=(e,t,r,n)=>{const i=Mce(r),a=Pce(t);return i?`<${e} ${Vf}="true" ${i}>${u6(a,n)}</${e}>`:`<${e} ${Vf}="true">${u6(a,n)}</${e}>`},ike=(e,t,r=!0)=>t.reduce((n,i)=>{const a=i,s=Object.keys(a).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,c)=>{const d=typeof a[c]>"u"?c:`${c}="${u6(a[c],r)}"`;return u?`${u} ${d}`:d},""),o=a.innerHTML||a.cssText||"",l=rke.indexOf(e)===-1;return`${n}<${e} ${Vf}="true" ${s}${l?"/>":`>${o}</${e}>`}`},""),kce=(e,t={})=>Object.keys(e).reduce((r,n)=>{const i=VO[n];return r[i||n]=e[n],r},t),ake=(e,t,r)=>{const n={key:t,[Vf]:!0},i=kce(r,n);return[_e.createElement("title",i,t)]},ak=(e,t)=>t.map((r,n)=>{const i={key:n,[Vf]:!0};return Object.keys(r).forEach(a=>{const o=VO[a]||a;if(o==="innerHTML"||o==="cssText"){const l=r.innerHTML||r.cssText;i.dangerouslySetInnerHTML={__html:l}}else i[o]=r[a]}),_e.createElement(e,i)}),Md=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>ake(e,t.title,t.titleAttributes),toString:()=>nke(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>kce(t),toString:()=>Mce(t)};default:return{toComponent:()=>ak(e,t),toString:()=>ike(e,t,r)}}},ske=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const i=H4(e,W4.meta),a=H4(t,W4.link),s=H4(r,W4.script);return{priorityMethods:{toComponent:()=>[...ak("meta",i.priority),...ak("link",a.priority),...ak("script",s.priority)],toString:()=>`${Md("meta",i.priority,n)} ${Md("link",a.priority,n)} ${Md("script",s.priority,n)}`},metaTags:i.default,linkTags:a.default,scriptTags:s.default}},oke=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:i,noscriptTags:a,styleTags:s,title:o="",titleAttributes:l,prioritizeSeoTags:u}=e;let{linkTags:c,metaTags:d,scriptTags:f}=e,h={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:h,linkTags:c,metaTags:d,scriptTags:f}=ske(e)),{priority:h,base:Md("base",t,n),bodyAttributes:Md("bodyAttributes",r,n),htmlAttributes:Md("htmlAttributes",i,n),link:Md("link",c,n),meta:Md("meta",d,n),noscript:Md("noscript",a,n),script:Md("script",f,n),style:Md("style",s,n),title:Md("title",{title:o,titleAttributes:l},n)}},c6=oke,bP=[],Ez=!!(typeof window<"u"&&window.document&&window.document.createElement),d6=class{constructor(e,t){Le(this,"instances",[]);Le(this,"canUseDOM",Ez);Le(this,"context");Le(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?bP:this.instances,add:e=>{(this.canUseDOM?bP:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?bP:this.instances).indexOf(e);(this.canUseDOM?bP:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=c6({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},lke=parseInt(_e.version.split(".")[0],10),f6=lke>=19,uke={},Oce=_e.createContext(uke),qy,Nce=(qy=class extends R.Component{constructor(r){super(r);Le(this,"helmetData");f6?this.helmetData=null:this.helmetData=new d6(this.props.context||{},qy.canUseDOM)}render(){return f6?_e.createElement(_e.Fragment,null,this.props.children):_e.createElement(Oce.Provider,{value:this.helmetData.value},this.props.children)}},Le(qy,"canUseDOM",Ez),qy),R_=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${Vf}]`),i=[].slice.call(n),a=[];let s;return t&&t.length&&t.forEach(o=>{const l=document.createElement(e);for(const u in o)if(Object.prototype.hasOwnProperty.call(o,u))if(u==="innerHTML")l.innerHTML=o.innerHTML;else if(u==="cssText"){const c=o.cssText;l.appendChild(document.createTextNode(c))}else{const c=u,d=typeof o[c]>"u"?"":o[c];l.setAttribute(u,d)}l.setAttribute(Vf,"true"),i.some((u,c)=>(s=c,l.isEqualNode(u)))?i.splice(s,1):a.push(l)}
40),i.forEach(o=>{var l;return(l=o.parentNode)==null?void 0:l.removeChild(o)}),a.forEach(o=>r.appendChild(o)),{oldTags:i,newTags:a}},h6=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(Vf),i=n?n.split(","):[],a=[...i],s=Object.keys(t);for(const o of s){const l=t[o]||"";r.getAttribute(o)!==l&&r.setAttribute(o,l),i.indexOf(o)===-1&&i.push(o);const u=a.indexOf(o);u!==-1&&a.splice(u,1)}for(let o=a.length-1;o>=0;o-=1)r.removeAttribute(a[o]);i.length===a.length?r.removeAttribute(Vf):r.getAttribute(Vf)!==s.join(",")&&r.setAttribute(Vf,s.join(","))},cke=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=Pce(e)),h6("title",t)},yK=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:i,linkTags:a,metaTags:s,noscriptTags:o,onChangeClientState:l,scriptTags:u,styleTags:c,title:d,titleAttributes:f}=e;h6("body",n),h6("html",i),cke(d,f);const h={baseTag:R_("base",r),linkTags:R_("link",a),metaTags:R_("meta",s),noscriptTags:R_("noscript",o),scriptTags:R_("script",u),styleTags:R_("style",c)},p={},m={};Object.keys(h).forEach(_=>{const{newTags:y,oldTags:v}=h[_];y.length&&(p[_]=y),v.length&&(m[_]=h[_].oldTags)}),t&&t(),l(e,p,m)},_2=null,dke=e=>{_2&&cancelAnimationFrame(_2),e.defer?_2=requestAnimationFrame(()=>{yK(e,()=>{_2=null})}):(yK(e),_2=null)},fke=dke,vK=class extends R.Component{constructor(){super(...arguments);Le(this,"rendered",!1)}shouldComponentUpdate(t){return!KMe(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const i=eke(t.get().map(a=>{const{context:s,...o}=a.props;return o}));Nce.canUseDOM?fke(i):c6&&(n=c6(i)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},sk=[],_K=e=>{const t={};for(const r of Object.keys(e))t[Cce[r]||r]=e[r];return t},X0=e=>{const t={};for(const r of Object.keys(e)){const n=VO[r];t[n||r]=e[r]}return t},bK=(e,t)=>{if(!Ez)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",i=r.getAttribute(n),a=i?i.split(","):[],s=Object.keys(t);for(const o of a)s.includes(o)||r.removeAttribute(o);for(const o of s){const l=t[o];l==null||l===!1?r.removeAttribute(o):l===!0?r.setAttribute(o,""):r.setAttribute(o,String(l))}s.length>0?r.setAttribute(n,s.join(",")):r.removeAttribute(n)},G4=()=>{const e={},t={};for(const r of sk){const{htmlAttributes:n,bodyAttributes:i}=r.props;n&&Object.assign(e,_K(n)),i&&Object.assign(t,_K(i))}bK("html",e),bK("body",t)},hke=class extends R.Component{componentDidMount(){sk.push(this),G4()}componentDidUpdate(){G4()}componentWillUnmount(){const e=sk.indexOf(this);e!==-1&&sk.splice(e,1),G4()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return _e.createElement("title",X0(t),e)}renderBase(){const{base:e}=this.props;return e?_e.createElement("base",X0(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>_e.createElement("meta",{key:r,...X0(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>_e.createElement("link",{key:r,...X0(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...i}=t,a=X0(i);return n&&(a.dangerouslySetInnerHTML={__html:n}),_e.createElement("script",{key:r,...a})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...i}=t,a=X0(i);return n&&(a.dangerouslySetInnerHTML={__html:n}),_e.createElement("style",{key:r,...a})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...i}=t,a=X0(i);return n&&(a.dangerouslySetInnerHTML={__html:n}),_e.createElement("noscript",{key:r,...a})})}render(){return _e.createElement(_e.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},gR,p6=(gR=class extends R.Component{shouldComponentUpdate(e){return!VMe(gK(this.props,"helmetData"),gK(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}
40warnOnInvalidChildren(e,t){return pK(mK.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${mK.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),pK(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return _e.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:i,...a}=n.props,s=Object.keys(a).reduce((l,u)=>(l[Cce[u]||u]=a[u],l),{});let{type:o}=n;switch(typeof o=="symbol"?o=o.toString():this.warnOnInvalidChildren(n,i),o){case"Symbol(react.fragment)":t=this.mapChildrenToProps(i,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,s,i);break;default:t=this.mapObjectTypeChildren(n,t,s,i);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof d6)){const i=n;n=new d6(i.context,!0),delete r.helmetData}return f6?_e.createElement(hke,{...r}):n?_e.createElement(vK,{...r,context:n.value}):_e.createElement(Oce.Consumer,null,i=>_e.createElement(vK,{...r,context:i}))}},Le(gR,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),gR);const pke=1,mke=1e6;let q4=0;function gke(){return q4=(q4+1)%Number.MAX_SAFE_INTEGER,q4.toString()}const K4=new Map,wK=e=>{if(K4.has(e))return;const t=setTimeout(()=>{K4.delete(e),WE({type:"REMOVE_TOAST",toastId:e})},mke);K4.set(e,t)},yke=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,pke)};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?wK(r):e.toasts.forEach(n=>{wK(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,991 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)}}},ok=[];let lk={toasts:[]};function WE(e){lk=yke(lk,e),ok.forEach(t=>{t(lk)})}function vke({...e}){const t=gke(),r=i=>WE({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>WE({type:"DISMISS_TOAST",toastId:t});return WE({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function Kw(){const[e,t]=R.useState(lk);return R.useEffect(()=>(ok.push(t),()=>{const r=ok.indexOf(t);r>-1&&ok.splice(r,1)}),[e]),{...e,toast:vke,dismiss:r=>WE({type:"DISMISS_TOAST",toastId:r})}}function _r(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function xK(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tz(...e){return t=>{let r=!1;const n=e.map(i=>{const a=xK(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():xK(e[i],null)}}}}function Gn(...e){return R.useCallback(Tz(...e),e)}function _ke(e,t){const r=R.createContext(t),n=a=>{const{children:s,...o}=a,l=R.useMemo(()=>o,Object.values(o));return g.jsx(r.Provider,{value:l,children:s})};n.displayName=e+"Provider";function i(a){const s=R.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Ou(e,t=[]){let r=[];function n(a,s){const o=R.createContext(s),l=r.length;r=[...r,s];const u=d=>{var y;const{scope:f,children:h,...p}=d,m=((y=f==null?void 0:f[e])==null?void 0:y[l])||o,_=R.useMemo(()=>p,Object.values(p));return g.jsx(m.Provider,{value:_,children:h})};u.displayName=a+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||o,p=R.useContext(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}const i=()=>{const a=r.map(s=>R.createContext(s));return function(o){const l=(o==null?void 0:o[e])||a;return R.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[n,bke(i,...t)]}function bke(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((o,{useScope:l,scopeName:u})=>{const d=l(a)[`__scope${u}`];return{...o,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Sv(e){const t=wke(e),r=R.forwardRef((n,i)=>{const{children:a,...s}=n,o=R.Children.toArray(a),l=o.find(xke);if(l){const u=l.props.children,c=o.map(d=>d===l?R.Children.count(u)>1?R.Children.only(null):R.isValidElement(u)?u.props.children:null:d);return g.jsx(t,{...s,ref:i,children:R.isValidElement(u)?R.cloneElement(u,void 0,c):null})}return g.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var Ice=Sv("Slot");function wke(e){const t=R.forwardRef((r,n)=>{const{children:i,...a}=r;if(R.isValidElement(i)){const s=Tke(i),o=Eke(a,i.props);return i.type!==R.Fragment&&(o.ref=n?Tz(n,s):s),R.cloneElement(i,o)}return R.Children.count(i)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dce=Symbol("radix.slottable");function Lce(e){const t=({children:r})=>g.jsx(g.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Dce,t}function xke(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Dce}function Eke(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...o)=>{const l=a(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function Tke(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Yw(e){const t=e+"CollectionProvider",[r,n]=Ou(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:_,children:y}=m,v=_e.useRef(null),b=_e.useRef(new Map).current;return g.jsx(i,{scope:_,itemMap:b,collectionRef:v,children:y})};s.displayName=t;const o=e+"CollectionSlot",l=Sv(o),u=_e.forwardRef((m,_)=>{const{scope:y,children:v}=m,b=a(o,y),w=Gn(_,b.collectionRef);return g.jsx(l,{ref:w,children:v})});u.displayName=o;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Sv(c),h=_e.forwardRef((m,_)=>{const{scope:y,children:v,...b}=m,w=_e.useRef(null),x=Gn(_,w),E=a(c,y);return _e.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),g.jsx(f,{[d]:"",ref:x,children:v})});h.displayName=c;function p(m){const _=a(e+"CollectionConsumer",m);return _e.useCallback(()=>{const v=_.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((E,T)=>b.indexOf(E.ref.current)-b.indexOf(T.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},p,n]}var Ske=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Hr=Ske.reduce((e,t)=>{const r=Sv(`Primitive.${t}`),n=R.forwardRef((i,a)=>{const{asChild:s,...o}=i,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...o,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function d5(e,t){e&&Jv.flushSync(()=>e.dispatchEvent(t))}function jo(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Ake(e,t=globalThis==null?void 0:globalThis.document){const r=jo(e);R.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Cke="DismissableLayer",m6="dismissableLayer.update",Pke="dismissableLayer.pointerDownOutside",Mke="dismissableLayer.focusOutside",EK,jce=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),e_=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...l}=e,u=R.useContext(jce),[c,d]=R.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=R.useState({}),p=Gn(t,T=>d(T)),m=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(_),v=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=y,x=Oke(T=>{const S=T.target,A=[...u.branches].some(C=>C.contains(S));!w||A||(i==null||i(T),s==null||s(T),T.defaultPrevented||o==null||o())},f),E=Nke(T=>{const S=T.target;[...u.branches].some(C=>C.contains(S))||(a==null||a(T),s==null||s(T),T.defaultPrevented||o==null||o())},f);return Ake(T=>{v===u.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},f),R.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(EK=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),TK(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=EK)}},[c,f,r,u]),R.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),TK())},[c,u]),R.useEffect(()=>{const T=()=>h({});return document.addEventListener(m6,T),()=>document.removeEventListener(m6,T)},[]),g.jsx(Hr.div,{...l,ref:p,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:_r(e.onFocusCapture,E.onFocusCapture),onBlurCapture:_r(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:_r(e.onPointerDownCapture,x.onPointerDownCapture)})});e_.displayName=Cke;var kke="DismissableLayerBranch",Rce=R.forwardRef((e,t)=>{const r=R.useContext(jce),n=R.useRef(null),i=Gn(t,n);return R.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),g.jsx(Hr.div,{...e,ref:i})});Rce.displayName=kke;function Oke(e,t=globalThis==null?void 0:globalThis.document){const r=jo(e),n=R.useRef(!1),i=R.useRef(()=>{});return R.useEffect(()=>{const a=o=>{if(o.target&&!n.current){let l=function(){$ce(Pke,r,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Nke(e,t=globalThis==null?void 0:globalThis.document){const r=jo(e),n=R.useRef(!1);return R.useEffect(()=>{const i=a=>{a.target&&!n.current&&$ce(Mke,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function TK(){const e=new CustomEvent(m6);document.dispatchEvent(e)}function $ce(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?d5(i,a):i.dispatchEvent(a)}var Ike=e_,Dke=Rce,Xs=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},Lke="Portal",PA=R.forwardRef((e,t)=>{var o;const{container:r,...n}=e,[i,a]=R.useState(!1);Xs(()=>a(!0),[]);const s=r||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return s?xz.createPortal(g.jsx(Hr.div,{...n,ref:t}),s):null});PA.displayName=Lke;function jke(e,t){return R.useReducer((r,n)=>t[r][n]??r,e)}var cc=e=>{const{present:t,children:r}=e,n=Rke(t),i=typeof r=="function"?r({present:n.isPresent}):R.Children.only(r),a=Gn(n.ref,$ke(i));return typeof r=="function"||n.isPresent?R.cloneElement(i,{ref:a}):null};cc.displayName="Presence";function Rke(e){const[t,r]=R.useState(),n=R.useRef(null),i=R.useRef(e),a=R.useRef("none"),s=e?"mounted":"unmounted",[o,l]=jke(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const u=wP(n.current);a.current=o==="mounted"?u:"none"},[o]),Xs(()=>{const u=n.current,c=i.current;if(c!==e){const f=a.current,h=wP(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Xs(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const m=wP(n.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},f=h=>{h.target===t&&(a.current=wP(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:R.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function wP(e){return(e==null?void 0:e.animationName)||"none"}function $ke(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Fke=OB[" useInsertionEffect ".trim().toString()]||Xs;function rd({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,s]=Bke({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:i;{const c=R.useRef(e!==void 0);R.useEffect(()=>{const d=c.current;d!==o&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${o?"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.`),c.current=o},[o,n])}const u=R.useCallback(c=>{var d;if(o){const f=zke(c)?c(e):c;f!==e&&((d=s.current)==null||d.call(s,f))}else a(c)},[o,e,a,s]);return[l,u]}function Bke({defaultProp:e,onChange:t}){const[r,n]=R.useState(e),i=R.useRef(r),a=R.useRef(t);return Fke(()=>{a.current=t},[t]),R.useEffect(()=>{var s;i.current!==r&&((s=a.current)==null||s.call(a,r),i.current=r)},[r,i]),[r,n,a]}function zke(e){return typeof e=="function"}var Fce=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"}),Uke="VisuallyHidden",HO=R.forwardRef((e,t)=>g.jsx(Hr.span,{...e,ref:t,style:{...Fce,...e.style}}));HO.displayName=Uke;var Bce=HO,Sz="ToastProvider",[Az,Wke,Vke]=Yw("Toast"),[zce,t5t]=Ou("Toast",[Vke]),[Hke,GO]=zce(Sz),Uce=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:s}=e,[o,l]=R.useState(null),[u,c]=R.useState(0),d=R.useRef(!1),f=R.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Sz}\`. Expected non-empty \`string\`.`),g.jsx(Az.Provider,{scope:t,children:g.jsx(Hke,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:o,onViewportChange:l,onToastAdd:R.useCallback(()=>c(h=>h+1),[]),onToastRemove:R.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:s})})};Uce.displayName=Sz;var Wce="ToastViewport",Gke=["F8"],g6="toast.viewportPause",y6="toast.viewportResume",Vce=R.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=Gke,label:i="Notifications ({hotkey})",...a}=e,s=GO(Wce,r),o=Wke(r),l=R.useRef(null),u=R.useRef(null),c=R.useRef(null),d=R.useRef(null),f=Gn(t,d,s.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=s.toastCount>0;R.useEffect(()=>{const _=y=>{var b;n.length!==0&&n.every(w=>y[w]||y.code===w)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[n]),R.useEffect(()=>{const _=l.current,y=d.current;if(p&&_&&y){const v=()=>{if(!s.isClosePausedRef.current){const E=new CustomEvent(g6);y.dispatchEvent(E),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){const E=new CustomEvent(y6);y.dispatchEvent(E),s.isClosePausedRef.current=!1}},w=E=>{!_.contains(E.relatedTarget)&&b()},x=()=>{_.contains(document.activeElement)||b()};return _.addEventListener("focusin",v),_.addEventListener("focusout",w),_.addEventListener("pointermove",v),_.addEventListener("pointerleave",x),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{_.removeEventListener("focusin",v),_.removeEventListener("focusout",w),_.removeEventListener("pointermove",v),_.removeEventListener("pointerleave",x),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[p,s.isClosePausedRef]);const m=R.useCallback(({tabbingDirection:_})=>{const v=o().map(b=>{const w=b.ref.current,x=[w,...a5e(w)];return _==="forwards"?x:x.reverse()});return(_==="forwards"?v.reverse():v).flat()},[o]);return R.useEffect(()=>{const _=d.current;if(_){const y=v=>{var x,E,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const S=document.activeElement,A=v.shiftKey;if(v.target===_&&A){(x=u.current)==null||x.focus();return}const M=m({tabbingDirection:A?"backwards":"forwards"}),D=M.findIndex($=>$===S);Y4(M.slice(D+1))?v.preventDefault():A?(E=u.current)==null||E.focus():(T=c.current)==null||T.focus()}};return _.addEventListener("keydown",y),()=>_.removeEventListener("keydown",y)}},[o,m]),g.jsxs(Dke,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&g.jsx(v6,{ref:u,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"forwards"});Y4(_)}}),g.jsx(Az.Slot,{scope:r,children:g.jsx(Hr.ol,{tabIndex:-1,...a,ref:f})}),p&&g.jsx(v6,{ref:c,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"backwards"});Y4(_)}})]})});Vce.displayName=Wce;var Hce="ToastFocusProxy",v6=R.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,a=GO(Hce,r);return g.jsx(HO,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const o=s.relatedTarget;!((u=a.viewport)!=null&&u.contains(o))&&n()}})});v6.displayName=Hce;var MA="Toast",qke="toast.swipeStart",Kke="toast.swipeMove",Yke="toast.swipeCancel",Xke="toast.swipeEnd",Gce=R.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:a,...s}=e,[o,l]=rd({prop:n,defaultProp:i??!0,onChange:a,caller:MA});return g.jsx(cc,{present:r||o,children:g.jsx(Jke,{open:o,...s,ref:t,onClose:()=>l(!1),onPause:jo(e.onPause),onResume:jo(e.onResume),onSwipeStart:_r(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_r(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:_r(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:_r(e.onSwipeEnd,u=>{const{x:c,y:d}=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",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Gce.displayName=MA;var[Qke,Zke]=zce(MA,{onClose(){}}),Jke=R.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:i,open:a,onClose:s,onEscapeKeyDown:o,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=GO(MA,r),[_,y]=R.useState(null),v=Gn(t,$=>y($)),b=R.useRef(null),w=R.useRef(null),x=i||m.duration,E=R.useRef(0),T=R.useRef(x),S=R.useRef(0),{onToastAdd:A,onToastRemove:C}=m,k=jo(()=>{var V;(_==null?void 0:_.contains(document.activeElement))&&((V=m.viewport)==null||V.focus()),s()}),M=R.useCallback($=>{!$||$===1/0||(window.clearTimeout(S.current),E.current=new Date().getTime(),S.current=window.setTimeout(k,$))},[k]);R.useEffect(()=>{const $=m.viewport;if($){const V=()=>{M(T.current),u==null||u()},U=()=>{const B=new Date().getTime()-E.current;T.current=T.current-B,window.clearTimeout(S.current),l==null||l()};return $.addEventListener(g6,U),$.addEventListener(y6,V),()=>{$.removeEventListener(g6,U),$.removeEventListener(y6,V)}}},[m.viewport,x,l,u,M]),R.useEffect(()=>{a&&!m.isClosePausedRef.current&&M(x)},[a,x,m.isClosePausedRef,M]),R.useEffect(()=>(A(),()=>C()),[A,C]);const D=R.useMemo(()=>_?Jce(_):null,[_]);return m.viewport?g.jsxs(g.Fragment,{children:[D&&g.jsx(e5e,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:D}),g.jsx(Qke,{scope:r,onClose:k,children:Jv.createPortal(g.jsx(Az.ItemSlot,{scope:r,children:g.jsx(Ike,{asChild:!0,onEscapeKeyDown:_r(o,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(Hr.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_r(e.onKeyDown,$=>{$.key==="Escape"&&(o==null||o($.nativeEvent),$.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:_r(e.onPointerDown,$=>{$.button===0&&(b.current={x:$.clientX,y:$.clientY})}),onPointerMove:_r(e.onPointerMove,$=>{if(!b.current)return;const V=$.clientX-b.current.x,U=$.clientY-b.current.y,B=!!w.current,z=["left","right"].includes(m.swipeDirection),q=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=z?q(0,V):0,K=z?0:q(0,U),O=$.pointerType==="touch"?10:2,N={x:L,y:K},X={originalEvent:$,delta:N};B?(w.current=N,xP(Kke,d,X,{discrete:!1})):SK(N,m.swipeDirection,O)?(w.current=N,xP(qke,c,X,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(V)>O||Math.abs(U)>O)&&(b.current=null)}),onPointerUp:_r(e.onPointerUp,$=>{const V=w.current,U=$.target;if(U.hasPointerCapture($.pointerId)&&U.releasePointerCapture($.pointerId),w.current=null,b.current=null,V){const B=$.currentTarget,z={originalEvent:$,delta:V};SK(V,m.swipeDirection,m.swipeThreshold)?xP(Xke,h,z,{discrete:!0}):xP(Yke,f,z,{discrete:!0}),B.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),e5e=e=>{const{__scopeToast:t,children:r,...n}=e,i=GO(MA,t),[a,s]=R.useState(!1),[o,l]=R.useState(!1);return n5e(()=>s(!0)),R.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:g.jsx(PA,{asChild:!0,children:g.jsx(HO,{...n,children:a&&g.jsxs(g.Fragment,{children:[i.label," ",r]})})})},t5e="ToastTitle",qce=R.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return g.jsx(Hr.div,{...n,ref:t})});qce.displayName=t5e;var r5e="ToastDescription",Kce=R.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return g.jsx(Hr.div,{...n,ref:t})});Kce.displayName=r5e;var Yce="ToastAction",Xce=R.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?g.jsx(Zce,{altText:r,asChild:!0,children:g.jsx(Cz,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yce}\`. Expected non-empty \`string\`.`),null)});Xce.displayName=Yce;var Qce="ToastClose",Cz=R.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,i=Zke(Qce,r);return g.jsx(Zce,{asChild:!0,children:g.jsx(Hr.button,{type:"button",...n,ref:t,onClick:_r(e.onClick,i.onClose)})})});Cz.displayName=Qce;var Zce=R.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...i}=e;return g.jsx(Hr.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});
vendor: 6,451 bytes, lines 40-95
40function Jce(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),i5e(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Jce(n))}}),t}function xP(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?d5(i,a):i.dispatchEvent(a)}var SK=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),a=n>i;return t==="left"||t==="right"?a&&n>r:!a&&i>r};function n5e(e=()=>{}){const t=jo(e);Xs(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function i5e(e){return e.nodeType===e.ELEMENT_NODE}function a5e(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Y4(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var s5e=Uce,ede=Vce,tde=Gce,rde=qce,nde=Kce,ide=Xce,ade=Cz;function sde(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=sde(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Dn(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=sde(e))&&(n&&(n+=" "),n+=t);return n}const AK=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,CK=Dn,kA=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return CK(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(u=>{const c=r==null?void 0:r[u],d=a==null?void 0:a[u];if(c===null)return null;const f=AK(c)||AK(d);return i[u][f]}),o=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(p=>{let[m,_]=p;return Array.isArray(_)?_.includes({...a,...o}[m]):{...a,...o}[m]===_})?[...u,d,f]:u},[]);return CK(e,s,l,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 o5e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ode=(...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 l5e={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 u5e=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...o},l)=>R.createElement("svg",{ref:l,...l5e,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ode("lucide",i),...o},[...s.map(([u,c])=>R.createElement(u,c)),...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 br=(e,t)=>{const r=R.forwardRef(({className:n,...i},a)=>R.createElement(u5e,{ref:a,iconNode:t,className:ode(`lucide-${o5e(e)}`,n),...i}));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 c5e=br("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 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 _6=br("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 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 t_=br("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 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 d5e=br("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 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 f5=br("Bird",[["path",{d:"M16 7h.01",key:"1kdx03"}],["path",{d:"M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20",key:"oj1oa8"}],["path",{d:"m20 7 2 .5-2 .5",key:"12nv4d"}],["path",{d:"M10 18v3",key:"1yea0a"}],["path",{d:"M14 17.75V21",key:"1pymcb"}],["path",{d:"M7 18a6 6 0 0 0 3.84-10.61",key:"1npnn0"}]]);/** 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 f5e=br("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 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 lde=br("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
95],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 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 PK=br("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** 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 h5e=br("CalendarPlus",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 16v6",key:"tddt3s"}]]);/** 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 jg=br("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"}]]);/** 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 h5=br("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"}]]);/** 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 p5e=br("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 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 p5=br("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 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 OA=br("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 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 ude=br("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 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 Pz=br("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 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 m5e=br("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 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 X4=br("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"}]]);/** 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 MK=br("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 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 kK=br("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 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 g5e=br("ClipboardCheck",[["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:"m9 14 2 2 4-4",key:"df797q"}]]);/** 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 OK=br("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 NK=br("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 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 Xw=br("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"}]]);/** 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 Mz=br("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"}]]);/** 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 y5e=br("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 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 kz=br("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"}]]);/** 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 v5e=br("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 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 _5e=br("FileDown",[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/** 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 av=br("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 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 b6=br("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 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 cde=br("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"}]]);/** 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 b5e=br("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"}]]);/** 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 m5=br("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 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 w6=br("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 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 w5e=br("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/** 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 x5e=br("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 x6=br("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 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 E5e=br("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"}]]);/** 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 T5e=br("LandPlot",[["path",{d:"m12 8 6-3-6-3v10",key:"mvpnpy"}],["path",{d:"m8 11.99-5.5 3.14a1 1 0 0 0 0 1.74l8.5 4.86a2 2 0 0 0 2 0l8.5-4.86a1 1 0 0 0 0-1.74L16 12",key:"ek95tt"}],["path",{d:"m6.49 12.85 11.02 6.3",key:"1kt42w"}],["path",{d:"M17.51 12.85 6.5 19.15",key:"v55bdg"}]]);/** 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 IK=br("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** 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 DK=br("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 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 yl=br("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 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 NA=br("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"}]]);/** 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 IA=br("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"}]]);/** 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 Yh=br("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"}]]);/** 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 g5=br("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** 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 S5e=br("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"}]]);/** 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 LK=br("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** 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 y5=br("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 c0=br("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 v5=br("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 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 A5e=br("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}
325],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/** 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 C5e=br("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"}]]);/** 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 P5e=br("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 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 M5e=br("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 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 jK=br("Shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);/** 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 k5e=br("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"}]]);/** 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 O5e=br("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 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 N5e=br("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/** 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 dde=br("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** 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 I5e=br("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 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 RK=br("Tent",[["path",{d:"M3.5 21 14 3",key:"1szst5"}],["path",{d:"M20.5 21 10 3",key:"1310c3"}],["path",{d:"M15.5 21 12 15l-3.5 6",key:"1ddtfw"}],["path",{d:"M2 21h20",key:"1nyx9w"}]]);/** 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 DA=br("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"}]]);/** 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 Rb=br("Trees",[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]]);/** 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 $K=br("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/** 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 _5=br("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 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 b5=br("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"}]]);/** 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 FK=br("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"}]]);/** 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 D5e=br("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"}]]);/** 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 $b=br("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"}]]);/** 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 L5e=br("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/** 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 Xg=br("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 8,259 bytes, line 425
425],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Oz="-",j5e=e=>{const t=$5e(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const o=s.split(Oz);return o[0]===""&&o.length!==1&&o.shift(),fde(o,t)||R5e(s)},getConflictingClassGroupIds:(s,o)=>{const l=r[s]||[];return o&&n[s]?[...l,...n[s]]:l}}},fde=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?fde(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Oz);return(s=t.validators.find(({validator:o})=>o(a)))==null?void 0:s.classGroupId},BK=/^\[(.+)\]$/,R5e=e=>{if(BK.test(e)){const t=BK.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},$5e=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return B5e(Object.entries(e.classGroups),r).forEach(([a,s])=>{E6(s,n,a,t)}),n},E6=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:zK(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(F5e(i)){E6(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,s])=>{E6(s,zK(t,a),r,n)})})},zK=(e,t)=>{let r=e;return t.split(Oz).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},F5e=e=>e.isThemeGetter,B5e=(e,t)=>t?e.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,o])=>[t+s,o])):a);return[r,i]}):e,z5e=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return i(a,s),s},set(a,s){r.has(a)?r.set(a,s):i(a,s)}}},hde="!",U5e=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,s=o=>{const l=[];let u=0,c=0,d;for(let _=0;_<o.length;_++){let y=o[_];if(u===0){if(y===i&&(n||o.slice(_,_+a)===t)){l.push(o.slice(c,_)),c=_+a;continue}if(y==="/"){d=_;continue}}y==="["?u++:y==="]"&&u--}const f=l.length===0?o:o.substring(c),h=f.startsWith(hde),p=h?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return r?o=>r({className:o,parseClassName:s}):s},W5e=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},V5e=e=>({cache:z5e(e.cacheSize),parseClassName:U5e(e),...j5e(e)}),H5e=/\s+/,G5e=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(H5e);let o="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let p=!!h,m=n(p?f.substring(0,h):f);if(!m){if(!p){o=u+(o.length>0?" "+o:o);continue}if(m=n(f),!m){o=u+(o.length>0?" "+o:o);continue}p=!1}const _=W5e(c).join(":"),y=d?_+hde:_,v=y+m;if(a.includes(v))continue;a.push(v);const b=i(m,p);for(let w=0;w<b.length;++w){const x=b[w];a.push(y+x)}o=u+(o.length>0?" "+o:o)}return o};function q5e(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=pde(t))&&(n&&(n+=" "),n+=r);return n}const pde=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=pde(e[n]))&&(r&&(r+=" "),r+=t);return r};function K5e(e,...t){let r,n,i,a=s;function s(l){const u=t.reduce((c,d)=>d(c),e());return r=V5e(u),n=r.cache.get,i=r.cache.set,a=o,o(l)}function o(l){const u=n(l);if(u)return u;const c=G5e(l,r);return i(l,c),c}return function(){return a(q5e.apply(null,arguments))}}const Ha=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},mde=/^\[(?:([a-z-]+):)?(.+)\]$/i,Y5e=/^\d+\/\d+$/,X5e=new Set(["px","full","screen"]),Q5e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Z5e=/\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$/,J5e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,e3e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t3e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hp=e=>J1(e)||X5e.has(e)||Y5e.test(e),Om=e=>Qw(e,"length",u3e),J1=e=>!!e&&!Number.isNaN(Number(e)),Q4=e=>Qw(e,"number",J1),b2=e=>!!e&&Number.isInteger(Number(e)),r3e=e=>e.endsWith("%")&&J1(e.slice(0,-1)),jn=e=>mde.test(e),Nm=e=>Q5e.test(e),n3e=new Set(["length","size","percentage"]),i3e=e=>Qw(e,n3e,gde),a3e=e=>Qw(e,"position",gde),s3e=new Set(["image","url"]),o3e=e=>Qw(e,s3e,d3e),l3e=e=>Qw(e,"",c3e),w2=()=>!0,Qw=(e,t,r)=>{const n=mde.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},u3e=e=>Z5e.test(e)&&!J5e.test(e),gde=()=>!1,c3e=e=>e3e.test(e),d3e=e=>t3e.test(e),f3e=()=>{const e=Ha("colors"),t=Ha("spacing"),r=Ha("blur"),n=Ha("brightness"),i=Ha("borderColor"),a=Ha("borderRadius"),s=Ha("borderSpacing"),o=Ha("borderWidth"),l=Ha("contrast"),u=Ha("grayscale"),c=Ha("hueRotate"),d=Ha("invert"),f=Ha("gap"),h=Ha("gradientColorStops"),p=Ha("gradientColorStopPositions"),m=Ha("inset"),_=Ha("margin"),y=Ha("opacity"),v=Ha("padding"),b=Ha("saturate"),w=Ha("scale"),x=Ha("sepia"),E=Ha("skew"),T=Ha("space"),S=Ha("translate"),A=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",jn,t],M=()=>[jn,t],D=()=>["",hp,Om],$=()=>["auto",J1,jn],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",jn],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[J1,jn];return{cacheSize:500,separator:":",theme:{colors:[w2],spacing:[hp,Om],blur:["none","",Nm,jn],brightness:K(),borderColor:[e],borderRadius:["none","","full",Nm,jn],borderSpacing:M(),borderWidth:D(),contrast:K(),grayscale:q(),hueRotate:K(),invert:q(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[r3e,Om],inset:k(),margin:k(),opacity:K(),padding:M(),saturate:K(),scale:K(),sepia:q(),skew:K(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",jn]}],container:["container"],columns:[{columns:[Nm]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...V(),jn]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",b2,jn]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",jn]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",b2,jn]}],"grid-cols":[{"grid-cols":[w2]}],"col-start-end":[{col:["auto",{span:["full",b2,jn]},jn]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[w2]}],"row-start-end":[{row:["auto",{span:[b2,jn]},jn]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}
vendor: 9,252 bytes, line 425
425],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",jn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",jn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",jn,t]}],"min-w":[{"min-w":[jn,t,"min","max","fit"]}],"max-w":[{"max-w":[jn,t,"none","full","min","max","fit","prose",{screen:[Nm]},Nm]}],h:[{h:[jn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[jn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[jn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[jn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Nm,Om]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Q4]}],"font-family":[{font:[w2]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",jn]}],"line-clamp":[{"line-clamp":["none",J1,Q4]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hp,jn]}],"list-image":[{"list-image":["none",jn]}],"list-style-type":[{list:["none","disc","decimal",jn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hp,Om]}],"underline-offset":[{"underline-offset":["auto",hp,jn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",jn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",jn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),a3e]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",i3e]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},o3e]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:U()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[hp,jn]}],"outline-w":[{outline:[hp,Om]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[hp,Om]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Nm,l3e]}],"shadow-color":[{shadow:[w2]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Nm,jn]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",jn]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",jn]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",jn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[b2,jn]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",jn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",jn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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,669 bytes, line 425
425],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",jn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hp,Om,Q4]}],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"]}}},h3e=K5e(f3e);function Xt(...e){return h3e(Dn(e))}const p3e=s5e,yde=R.forwardRef(({className:e,...t},r)=>g.jsx(ede,{ref:r,className:Xt("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}));yde.displayName=ede.displayName;const m3e=kA("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"}}),vde=R.forwardRef(({className:e,variant:t,...r},n)=>g.jsx(tde,{ref:n,className:Xt(m3e({variant:t}),e),...r}));vde.displayName=tde.displayName;const g3e=R.forwardRef(({className:e,...t},r)=>g.jsx(ide,{ref:r,className:Xt("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}));g3e.displayName=ide.displayName;const _de=R.forwardRef(({className:e,...t},r)=>g.jsx(ade,{ref:r,className:Xt("absolute right-2 top-2 rounded-md p-1 text-foreground
425/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:g.jsx(Xg,{className:"h-4 w-4"})}));_de.displayName=ade.displayName;const bde=R.forwardRef(({className:e,...t},r)=>g.jsx(rde,{ref:r,className:Xt("text-sm font-semibold",e),...t}));bde.displayName=rde.displayName;const wde=R.forwardRef(({className:e,...t},r)=>g.jsx(nde,{ref:r,className:Xt("text-sm opacity-90",e),...t}));wde.displayName=nde.displayName;function y3e(){const{toasts:e}=Kw();return g.jsxs(p3e,{children:[e.map(function({id:t,title:r,description:n,action:i,...a}){return g.jsxs(vde,{...a,children:[g.jsxs("div",{className:"grid gap-1",children:[r&&g.jsx(bde,{children:r}),n&&g.jsx(wde,{children:n})]}),i,g.jsx(_de,{})]},t)}),g.jsx(yde,{})]})}var UK=["light","dark"],v3e="(prefers-color-scheme: dark)",_3e=R.createContext(void 0),b3e={setTheme:e=>{},themes:[]},w3e=()=>{var e;return(e=R.useContext(_3e))!=null?e:b3e};R.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:i,defaultTheme:a,value:s,attrs:o,nonce:l})=>{let u=a==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(p=>`'${p}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=i?UK.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(p,m=!1,_=!0)=>{let y=s?s[p]:p,v=m?p+"|| ''":`'${y}'`,b="";return i&&_&&!m&&UK.includes(p)&&(b+=`d.style.colorScheme = '${p}';`),r==="class"?m||y?b+=`c.add(${v})`:b+="null":y&&(b+=`d[s](n,${v})`),b},h=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${v3e}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${f(s?"x[e]":"e",!0)}}${u?"":"else{"+f(a,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${f(s?"x[e]":"e",!0)}}else{${f(a,!1,!1)};}${d}}catch(t){}}();`;return R.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var x3e=e=>{switch(e){case"success":return S3e;case"info":return C3e;case"warning":return A3e;case"error":return P3e;default:return null}},E3e=Array(12).fill(0),T3e=({visible:e,className:t})=>_e.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},_e.createElement("div",{className:"sonner-spinner"},E3e.map((r,n)=>_e.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),S3e=_e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_e.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"})),A3e=_e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},_e.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"})),C3e=_e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_e.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"})),P3e=_e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_e.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"})),M3e=_e.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"},_e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),_e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),k3e=()=>{let[e,t]=_e.useState(document.hidden);return _e.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},T6=1,O3e=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>
425{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;let{message:n,...i}=t,a=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:T6++,s=this.toasts.find(l=>l.id===a),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:n}),{...l,...t,id:a,dismissible:o,title:n}):l):this.addToast({title:n,...i,dismissible:o,id:a}),a},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),this.subscribers.forEach(r=>r({id:t,dismiss:!0})),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let i=t instanceof Promise?t:t(),a=n!==void 0,s,o=i.then(async u=>{if(s=["resolve",u],_e.isValidElement(u))a=!1,this.create({id:n,type:"default",message:u});else if(I3e(u)&&!u.ok){a=!1;let c=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,d=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description;this.create({id:n,type:"error",message:c,description:d})}else if(r.success!==void 0){a=!1;let c=typeof r.success=="function"?await r.success(u):r.success,d=typeof r.description=="function"?await r.description(u):r.description;this.create({id:n,type:"success",message:c,description:d})}}).catch(async u=>{if(s=["reject",u],r.error!==void 0){a=!1;let c=typeof r.error=="function"?await r.error(u):r.error,d=typeof r.description=="function"?await r.description(u):r.description;this.create({id:n,type:"error",message:c,description:d})}}).finally(()=>{var u;a&&(this.dismiss(n),n=void 0),(u=r.finally)==null||u.call(r)}),l=()=>new Promise((u,c)=>o.then(()=>s[0]==="reject"?c(s[1]):u(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,r)=>{let n=(r==null?void 0:r.id)||T6++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Vu=new O3e,N3e=(e,t)=>{let r=(t==null?void 0:t.id)||T6++;return Vu.addToast({title:e,...t,id:r}),r},I3e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",D3e=N3e,L3e=()=>Vu.toasts,j3e=()=>Vu.getActiveToasts(),ba=Object.assign(D3e,{success:Vu.success,info:Vu.info,warning:Vu.warning,error:Vu.error,custom:Vu.custom,message:Vu.message,promise:Vu.promise,dismiss:Vu.dismiss,loading:Vu.loading},{getHistory:L3e,getToasts:j3e});function R3e(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))}R3e(`: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;
425left: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}
425: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%);
425--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%)} 426`);function EP(e){return e.label!==void 0}var $3e=3,F3e="32px",B3e="16px",WK=4e3,z3e=356,U3e=14,W3e=20,V3e=200;function _f(...e){return e.filter(Boolean).join(" ")}function H3e(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var G3e=e=>{var t,r,n,i,a,s,o,l,u,c,d;let{invert:f,toast:h,unstyled:p,interacting:m,setHeights:_,visibleToasts:y,heights:v,index:b,toasts:w,expanded:x,removeToast:E,defaultRichColors:T,closeButton:S,style:A,cancelButtonStyle:C,actionButtonStyle:k,className:M="",descriptionClassName:D="",duration:$,position:V,gap:U,loadingIcon:B,expandByDefault:z,classNames:q,icons:L,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:O}=e,[N,X]=_e.useState(null),[ie,ee]=_e.useState(null),[le,Te]=_e.useState(!1),[be,we]=_e.useState(!1),[ae,H]=_e.useState(!1),[fe,Se]=_e.useState(!1),[ne,$e]=_e.useState(!1),[me,Ue]=_e.useState(0),[ke,ce]=_e.useState(0),ve=_e.useRef(h.duration||$||WK),Re=_e.useRef(null),De=_e.useRef(null),tt=b===0,Ge=b+1<=y,Ie=h.type,He=h.dismissible!==!1,Ke=h.className||"",Xe=h.descriptionClassName||"",mt=_e.useMemo(()=>v.findIndex(wr=>wr.toastId===h.id)||0,[v,h.id]),gt=_e.useMemo(()=>{var wr;return(wr=h.closeButton)!=null?wr:S},[h.closeButton,S]),$t=_e.useMemo(()=>h.duration||$||WK,[h.duration,$]),kt=_e.useRef(0),Zt=_e.useRef(0),fr=_e.useRef(0),yr=_e.useRef(null),[Kt,pr]=V.split("-"),Ot=_e.useMemo(()=>v.reduce((wr,Ar,Jt)=>Jt>=mt?wr:wr+Ar.height,0),[v,mt]),Ir=k3e(),cn=h.invert||f,kr=Ie==="loading";Zt.current=_e.useMemo(()=>mt*U+Ot,[mt,Ot]),_e.useEffect(()=>{ve.current=$t},[$t]),_e.useEffect(()=>{Te(!0)},[]),_e.useEffect(()=>{let wr=De.current;if(wr){let Ar=wr.getBoundingClientRect().height;return ce(Ar),_(Jt=>[{toastId:h.id,height:Ar,position:h.position},...Jt]),()=>_(Jt=>Jt.filter(Ht=>Ht.toastId!==h.id))}},[_,h.id]),_e.useLayoutEffect(()=>{if(!le)return;let wr=De.current,Ar=wr.style.height;wr.style.height="auto";let Jt=wr.getBoundingClientRect().height;wr.style.height=Ar,ce(Jt),_(Ht=>Ht.find(Z=>Z.toastId===h.id)?Ht.map(Z=>Z.toastId===h.id?{...Z,height:Jt}:Z):[{toastId:h.id,height:Jt,position:h.position},...Ht])},[le,h.title,h.description,_,h.id]);let rr=_e.useCallback(()=>{we(!0),Ue(Zt.current),_(wr=>wr.filter(Ar=>Ar.toastId!==h.id)),setTimeout(()=>{E(h)},V3e)},[h,E,_,Zt]);_e.useEffect(()=>{if(h.promise&&Ie==="loading"||h.duration===1/0||h.type==="loading")return;let wr;return x||m||O&&Ir?(()=>{if(fr.current<kt.current){let Ar=new Date().getTime()-kt.current;ve.current=ve.current-Ar}
426fr.current=new Date().getTime()})():ve.current!==1/0&&(kt.current=new Date().getTime(),wr=setTimeout(()=>{var Ar;(Ar=h.onAutoClose)==null||Ar.call(h,h),rr()},ve.current)),()=>clearTimeout(wr)},[x,m,h,Ie,O,Ir,rr]),_e.useEffect(()=>{h.delete&&rr()},[rr,h.delete]);function Ut(){var wr,Ar,Jt;return L!=null&&L.loading?_e.createElement("div",{className:_f(q==null?void 0:q.loader,(wr=h==null?void 0:h.classNames)==null?void 0:wr.loader,"sonner-loader"),"data-visible":Ie==="loading"},L.loading):B?_e.createElement("div",{className:_f(q==null?void 0:q.loader,(Ar=h==null?void 0:h.classNames)==null?void 0:Ar.loader,"sonner-loader"),"data-visible":Ie==="loading"},B):_e.createElement(T3e,{className:_f(q==null?void 0:q.loader,(Jt=h==null?void 0:h.classNames)==null?void 0:Jt.loader),visible:Ie==="loading"})}return _e.createElement("li",{tabIndex:0,ref:De,className:_f(M,Ke,q==null?void 0:q.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,q==null?void 0:q.default,q==null?void 0:q[Ie],(r=h==null?void 0:h.classNames)==null?void 0:r[Ie]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:T,"data-styled":!(h.jsx||h.unstyled||p),"data-mounted":le,"data-promise":!!h.promise,"data-swiped":ne,"data-removed":be,"data-visible":Ge,"data-y-position":Kt,"data-x-position":pr,"data-index":b,"data-front":tt,"data-swiping":ae,"data-dismissible":He,"data-type":Ie,"data-invert":cn,"data-swipe-out":fe,"data-swipe-direction":ie,"data-expanded":!!(x||z&&le),style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${be?me:Zt.current}px`,"--initial-height":z?"auto":`${ke}px`,...A,...h.style},onDragEnd:()=>{H(!1),X(null),yr.current=null},onPointerDown:wr=>{kr||!He||(Re.current=new Date,Ue(Zt.current),wr.target.setPointerCapture(wr.pointerId),wr.target.tagName!=="BUTTON"&&(H(!0),yr.current={x:wr.clientX,y:wr.clientY}))},onPointerUp:()=>{var wr,Ar,Jt,Ht;if(fe||!He)return;yr.current=null;let Z=Number(((wr=De.current)==null?void 0:wr.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Pe=Number(((Ar=De.current)==null?void 0:Ar.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((Jt=Re.current)==null?void 0:Jt.getTime()),Ee=N==="x"?Z:Pe,Oe=Math.abs(Ee)/ue;if(Math.abs(Ee)>=W3e||Oe>.11){Ue(Zt.current),(Ht=h.onDismiss)==null||Ht.call(h,h),ee(N==="x"?Z>0?"right":"left":Pe>0?"down":"up"),rr(),Se(!0),$e(!1);return}H(!1),X(null)},onPointerMove:wr=>{var Ar,Jt,Ht,Z;if(!yr.current||!He||((Ar=window.getSelection())==null?void 0:Ar.toString().length)>0)return;let Pe=wr.clientY-yr.current.y,ue=wr.clientX-yr.current.x,Ee=(Jt=e.swipeDirections)!=null?Jt:H3e(V);!N&&(Math.abs(ue)>1||Math.abs(Pe)>1)&&X(Math.abs(ue)>Math.abs(Pe)?"x":"y");let Oe={x:0,y:0};N==="y"?(Ee.includes("top")||Ee.includes("bottom"))&&(Ee.includes("top")&&Pe<0||Ee.includes("bottom")&&Pe>0)&&(Oe.y=Pe):N==="x"&&(Ee.includes("left")||Ee.includes("right"))&&(Ee.includes("left")&&ue<0||Ee.includes("right")&&ue>0)&&(Oe.x=ue),(Math.abs(Oe.x)>0||Math.abs(Oe.y)>0)&&$e(!0),(Ht=De.current)==null||Ht.style.setProperty("--swipe-amount-x",`${Oe.x}px`),(Z=De.current)==null||Z.style.setProperty("--swipe-amount-y",`${Oe.y}px`)}},gt&&!h.jsx?_e.createElement("button",{"aria-label":K,"data-disabled":kr,"data-close-button":!0,onClick:kr||!He?()=>{}:()=>{var wr;rr(),(wr=h.onDismiss)==null||wr.call(h,h)},className:_f(q==null?void 0:q.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(a=L==null?void 0:L.close)!=null?a:M3e):null,h.jsx||R.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:_e.createElement(_e.Fragment,null,Ie||h.icon||h.promise?_e.createElement("div",{"data-icon":"",className:_f(q==null?void 0:q.icon,(s=h==null?void 0:h.classNames)==null?void 0:s.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Ut():null,h.type!=="loading"?h.icon||(L==null?void 0:L[Ie])||x3e(Ie):null):null,_e.createElement("div",{"data-content":"",className:_f(q==null?void 0:q.content,(o=h==null?void 0:h.classNames)==null?void 0:o.content)},_e.createElement("div",{"data-title":"",className:_f(q==null?void 0:q.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?_e.createElement("div",{"data-description":"",className:_f(D,Xe,q==null?void 0:q.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),R.isValidElement(h.cancel)?h.cancel:h.cancel&&EP(h.cancel)?_e.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||C,onClick:wr=>{var Ar,Jt;EP(h.cancel)&&He&&((Jt=(Ar=h.cancel).onClick)==null||Jt.call(Ar,wr),rr())},className:_f(q==null?void 0:q.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,R.isValidElement(h.action)?h.action:h.action&&EP(h.action)?_e.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||k,onClick:wr=>{var Ar,Jt;EP(h.action)&&((Jt=(Ar=h.action).onClick)==null||Jt.call(Ar,wr),!wr.defaultPrevented&&rr())},className:_f(q==null?void 0:q.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function VK(){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 q3e(e,t){let r={};return[e,t].forEach((n,i)=>{let a=i===1,s=a?"--mobile-offset":"--offset",o=a?B3e:F3e;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${s}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${s}-${u}`]=o:r[`${s}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(o)}),r}var K3e=R.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:s,className:o,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:p=$3e,toastOptions:m,dir:_=VK(),gap:y=U3e,loadingIcon:v,icons:b,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:x}=e,[E,T]=_e.useState([]),S=_e.useMemo(()=>Array.from(new Set([n].concat(E.filter(O=>O.position).map(O=>O.position)))),[E,n]),[A,C]=_e.useState([]),[k,M]=_e.useState(!1),[D,$]=_e.useState(!1),[V,U]=_e.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
426k":"light"),B=_e.useRef(null),z=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=_e.useRef(null),L=_e.useRef(!1),K=_e.useCallback(O=>{T(N=>{var X;return(X=N.find(ie=>ie.id===O.id))!=null&&X.delete||Vu.dismiss(O.id),N.filter(({id:ie})=>ie!==O.id)})},[]);return _e.useEffect(()=>Vu.subscribe(O=>{if(O.dismiss){T(N=>N.map(X=>X.id===O.id?{...X,delete:!0}:X));return}setTimeout(()=>{xz.flushSync(()=>{T(N=>{let X=N.findIndex(ie=>ie.id===O.id);return X!==-1?[...N.slice(0,X),{...N[X],...O},...N.slice(X+1)]:[O,...N]})})})}),[]),_e.useEffect(()=>{if(c!=="system"){U(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:N})=>{U(N?"dark":"light")})}catch{O.addListener(({matches:X})=>{try{U(X?"dark":"light")}catch(ie){console.error(ie)}})}},[c]),_e.useEffect(()=>{E.length<=1&&M(!1)},[E]),_e.useEffect(()=>{let O=N=>{var X,ie;i.every(ee=>N[ee]||N.code===ee)&&(M(!0),(X=B.current)==null||X.focus()),N.code==="Escape"&&(document.activeElement===B.current||(ie=B.current)!=null&&ie.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[i]),_e.useEffect(()=>{if(B.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,L.current=!1)}},[B.current]),_e.createElement("section",{ref:t,"aria-label":`${w} ${z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((O,N)=>{var X;let[ie,ee]=O.split("-");return E.length?_e.createElement("ol",{key:O,dir:_==="auto"?VK():_,tabIndex:-1,ref:B,className:o,"data-sonner-toaster":!0,"data-theme":V,"data-y-position":ie,"data-lifted":k&&E.length>1&&!a,"data-x-position":ee,style:{"--front-toast-height":`${((X=A[0])==null?void 0:X.height)||0}px`,"--width":`${z3e}px`,"--gap":`${y}px`,...h,...q3e(l,u)},onBlur:le=>{L.current&&!le.currentTarget.contains(le.relatedTarget)&&(L.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||L.current||(L.current=!0,q.current=le.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{D||M(!1)},onDragEnd:()=>M(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},E.filter(le=>!le.position&&N===0||le.position===O).map((le,Te)=>{var be,we;return _e.createElement(G3e,{key:le.id,icons:b,index:Te,toast:le,defaultRichColors:d,duration:(be=m==null?void 0:m.duration)!=null?be:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:p,closeButton:(we=m==null?void 0:m.closeButton)!=null?we:s,interacting:D,position:O,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:K,toasts:E.filter(ae=>ae.position==le.position),heights:A.filter(ae=>ae.position==le.position),setHeights:C,expandByDefault:a,gap:y,loadingIcon:v,expanded:k,pauseWhenPageIsHidden:x,swipeDirections:e.swipeDirections})})):null}))});const Y3e=({...e})=>{const{theme:t="system"}=w3e();return g.jsx(K3e,{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 X3e=OB[" useId ".trim().toString()]||(()=>{}),Q3e=0;function Yc(e){const[t,r]=R.useState(X3e());return Xs(()=>{e||r(n=>n??String(Q3e++))},[e]),e||(t?`radix-${t}`:"")}const Z3e=["top","right","bottom","left"],Qg=Math.min,Lc=Math.max,w5=Math.round,TP=Math.floor,zh=e=>({x:e,y:e}
vendor: 11,980 bytes, line 426
426),J3e={left:"right",right:"left",bottom:"top",top:"bottom"},eOe={start:"end",end:"start"};function S6(e,t,r){return Lc(e,Qg(t,r))}function tm(e,t){return typeof e=="function"?e(t):e}function rm(e){return e.split("-")[0]}function Zw(e){return e.split("-")[1]}function Nz(e){return e==="x"?"y":"x"}function Iz(e){return e==="y"?"height":"width"}const tOe=new Set(["top","bottom"]);function Oh(e){return tOe.has(rm(e))?"y":"x"}function Dz(e){return Nz(Oh(e))}function rOe(e,t,r){r===void 0&&(r=!1);const n=Zw(e),i=Dz(e),a=Iz(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=x5(s)),[s,x5(s)]}function nOe(e){const t=x5(e);return[A6(e),t,A6(t)]}function A6(e){return e.replace(/start|end/g,t=>eOe[t])}const HK=["left","right"],GK=["right","left"],iOe=["top","bottom"],aOe=["bottom","top"];function sOe(e,t,r){switch(e){case"top":case"bottom":return r?t?GK:HK:t?HK:GK;case"left":case"right":return t?iOe:aOe;default:return[]}}function oOe(e,t,r,n){const i=Zw(e);let a=sOe(rm(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(A6)))),a}function x5(e){return e.replace(/left|right|bottom|top/g,t=>J3e[t])}function lOe(e){return{top:0,right:0,bottom:0,left:0,...e}}function xde(e){return typeof e!="number"?lOe(e):{top:e,right:e,bottom:e,left:e}}function E5(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function qK(e,t,r){let{reference:n,floating:i}=e;const a=Oh(t),s=Dz(t),o=Iz(s),l=rm(t),u=a==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[o]/2-i[o]/2;let h;switch(l){case"top":h={x:c,y:n.y-i.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Zw(t)){case"start":h[s]-=f*(r&&u?-1:1);break;case"end":h[s]+=f*(r&&u?-1:1);break}return h}const uOe=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=qK(u,n,l),f=n,h={},p=0;for(let m=0;m<o.length;m++){const{name:_,fn:y}=o[m],{x:v,y:b,data:w,reset:x}=await y({x:c,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});c=v??c,d=b??d,h={...h,[_]:{...h[_],...w}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=qK(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function YT(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=tm(t,e),p=xde(h),_=o[f?d==="floating"?"reference":"floating":d],y=E5(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(_)))==null||r?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),w=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},x=E5(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-x.top+p.top)/w.y,bottom:(x.bottom-y.bottom+p.bottom)/w.y,left:(y.left-x.left+p.left)/w.x,right:(x.right-y.right+p.right)/w.x}}const cOe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:u,padding:c=0}=tm(e,t)||{};if(u==null)return{};const d=xde(c),f={x:r,y:n},h=Dz(i),p=Iz(h),m=await s.getDimensions(u),_=h==="y",y=_?"top":"left",v=_?"bottom":"right",b=_?"clientHeight":"clientWidth",w=a.reference[p]+a.reference[h]-f[h]-a.floating[p],x=f[h]-a.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let T=E?E[b]:0;(!T||!await(s.isElement==null?void 0:s.isElement(E)))&&(T=o.floating[b]||a.floating[p]);const S=w/2-x/2,A=T/2-m[p]/2-1,C=Qg(d[y],A),k=Qg(d[v],A),M=C,D=T-m[p]-k,$=T/2-m[p]/2+S,V=S6(M,$,D),U=!l.arrow&&Zw(i)!=null&&$!==V&&a.reference[p]/2-($<M?C:k)-m[p]/2<0,B=U?$<M?$-M:$-D:0;return{[h]:f[h]+B,data:{[h]:V,centerOffset:$-V-B,...U&&{alignmentOffset:B}},reset:U}}}),dOe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,..._}=tm(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=rm(i),v=Oh(o),b=rm(o)===o,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=f||(b||!m?[x5(o)]:nOe(o)),E=p!=="none";!f&&E&&x.push(...oOe(o,m,p,w));const T=[o,...x],S=await YT(t,_),A=[];let C=((n=a.flip)==null?void 0:n.overflows)||[];if(c&&A.push(S[y]),d){const $=rOe(i,s,w);A.push(S[$[0]],S[$[1]])}if(C=[...C,{placement:i,overflows:A}],!A.every($=>$<=0)){var k,M;const $=(((k=a.flip)==null?void 0:k.index)||0)+1,V=T[$];if(V&&(!(d==="alignment"?v!==Oh(V):!1)||C.every(z=>z.overflows[0]>0&&Oh(z.placement)===v)))return{data:{index:$,overflows:C},reset:{placement:V}};let U=(M=C.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:M.placement;if(!U)switch(h){case"bestFit":{var D;const B=(D=C.filter(z=>{if(E){const q=Oh(z.placement);return q===v||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,L)=>q+L,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:D[0];B&&(U=B);break}case"initialPlacement":U=o;break}if(i!==U)return{reset:{placement:U}}}return{}}}};function KK(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function YK(e){return Z3e.some(t=>e[t]>=0)}const fOe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=tm(e,t);switch(n){case"referenceHidden":{const a=await YT(t,{...i,elementContext:"reference"}),s=KK(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:YK(s)}}}case"escaped":{const a=await YT(t,{...i,altBoundary:!0}),s=KK(a,r.floating);return{data:{escapedOffsets:s,escaped:YK(s)}}}default:return{}}}}},Ede=new Set(["left","top"]);async function hOe(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=rm(r),o=Zw(r),l=Oh(r)==="y",u=Ede.has(s)?-1:1,c=a&&l?-1:1,d=tm(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof p=="number"&&(h=o==="end"?p*-1:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const pOe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:o}=t,l=await hOe(t,e);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}},mOe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:_=>{let{x:y,y:v}=_;return{x:y,y:v}}},...l}=tm(e,t),u={x:r,y:n},c=await YT(t,l),d=Oh(rm(i)),f=Nz(d);let h=u[f],p=u[d];if(a){const _=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=h+c[_],b=h-c[y];h=S6(v,h,b)}if(s){const _=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=p+c[_],b=p-c[y];p=S6(v,p,b)}const m=o.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:a,[d]:s}}}}}},gOe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=tm(e,t),c={x:r,y:n},d=Oh(i),f=Nz(d);let h=c[f],p=c[d];const m=tm(o,t),_=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=f==="y"?"height":"width",w=a.reference[f]-a.floating[b]+_.mainAxis,x=a.reference[f]+a.reference[b]-_.mainAxis;h<w?h=w:h>x&&(h=x)}if(u){var y,v;const b=f==="y"?"width":"height",w=Ede.has(rm(i)),x=a.reference[d]-a.floating[b]+(w&&((y=s.offset)==null?void 0:y[d])||0)+(w?0:_.crossAxis),E=a.reference[d]+a.reference[b]+(w?0:((v=s.offset)==null?void 0:v[d])||0)-(w?_.crossAxis:0);p<x?p=x:p>E&&(p=E)}return{[f]:h,[d]:p}}}},yOe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:l=()=>{},...u}=tm(e,t),c=await YT(t,u),d=rm(i),f=Zw(i),h=Oh(i)==="y",{width:p,height:m}=a.floating;let _,y;d==="top"||d==="bottom"?(_=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(y=d,_=f==="end"?"top":"bottom");const v=m-c.top-c.bottom,b=p-c.left-c.right,w=Qg(m-c[_],v),x=Qg(p-c[y],b),E=!t.middlewareData.shift;let T=w,S=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(S=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=v),E&&!f){const C=Lc(c.left,0),k=Lc(c.right,0),M=Lc(c.top,0),D=Lc(c.bottom,0);h?S=p-2*(C!==0||k!==0?C+k:Lc(c.left,c.right)):T=m-2*(M!==0||D!==0?M+D:Lc(c.top,c.bottom))}await l({...t,availableWidth:S,availableHeight:T});const A=await s.getDimensions(o.floating);return p!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function qO(){return typeof window<"u"}function Jw(e){return Tde(e)?(e.nodeName||"").toLowerCase():"#document"}function Xc(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tp(e){var t;return(t=(Tde(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tde(e){return qO()?e instanceof Node||e instanceof Xc(e).Node:!1}function Qf(e){return qO()?e instanceof Element||e instanceof Xc(e).Element:!1}function Xh(e){return qO()?e instanceof HTMLElement||e instanceof Xc(e).HTMLElement:!1}function XK(e){return!qO()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xc(e).ShadowRoot}const vOe=new Set(["inline","contents"]);function LA(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Zf(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!vOe.has(i)}const _Oe=new Set(["table","td","th"]);function bOe(e){return _Oe.has(Jw(e))}const wOe=[":popover-open",":modal"];function KO(e){return wOe.some(t=>{try{return e.matches(t)}catch{return!1}})}const xOe=["transform","translate","scale","rotate","perspective"],EOe=["transform","translate","scale","rotate","perspective","filter"],TOe=["paint","layout","strict","content"];function Lz(e){const t=jz(),r=Qf(e)?Zf(e):e;return xOe.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)||EOe.some(n=>(r.willChange||"").includes(n))||TOe.some(n=>(r.contain||"").includes(n))}function SOe(e){let t=Zg(e);for(;Xh(t)&&!Fb(t);){if(Lz(t))return t;if(KO(t))return null;t=Zg(t)}return null}function jz(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const AOe=new Set(["html","body","#document"]);function Fb(e){return AOe.has(Jw(e))}function Zf(e){return Xc(e).getComputedStyle(e)}function YO(e){return Qf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zg(e){if(Jw(e)==="html")return e;const t=e.assignedSlot||e.parentNode||XK(e)&&e.host||tp(e);return XK(t)?t.host:t}function Sde(e){const t=Zg(e);return Fb(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xh(t)&&LA(t)?t:Sde(t)}function XT(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Sde(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=Xc(i);if(a){const o=C6(s);
vendor: 4,952 bytes, line 426
426return t.concat(s,s.visualViewport||[],LA(i)?i:[],o&&r?XT(o):[])}return t.concat(i,XT(i,[],r))}function C6(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ade(e){const t=Zf(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Xh(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=w5(r)!==a||w5(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function Rz(e){return Qf(e)?e:e.contextElement}function eb(e){const t=Rz(e);if(!Xh(t))return zh(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=Ade(t);let s=(a?w5(r.width):r.width)/n,o=(a?w5(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const COe=zh(0);function Cde(e){const t=Xc(e);return!jz()||!t.visualViewport?COe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function POe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Xc(e)?!1:t}function Av(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=Rz(e);let s=zh(1);t&&(n?Qf(n)&&(s=eb(n)):s=eb(e));const o=POe(a,r,n)?Cde(a):zh(0);let l=(i.left+o.x)/s.x,u=(i.top+o.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(a){const f=Xc(a),h=n&&Qf(n)?Xc(n):n;let p=f,m=C6(p);for(;m&&n&&h!==p;){const _=eb(m),y=m.getBoundingClientRect(),v=Zf(m),b=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*_.x,w=y.top+(m.clientTop+parseFloat(v.paddingTop))*_.y;l*=_.x,u*=_.y,c*=_.x,d*=_.y,l+=b,u+=w,p=Xc(m),m=C6(p)}}return E5({width:c,height:d,x:l,y:u})}function $z(e,t){const r=YO(e).scrollLeft;return t?t.left+r:Av(tp(e)).left+r}function Pde(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:$z(e,n)),a=n.top+t.scrollTop;return{x:i,y:a}}function MOe(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=tp(n),o=t?KO(t.floating):!1;if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},u=zh(1);const c=zh(0),d=Xh(n);if((d||!d&&!a)&&((Jw(n)!=="body"||LA(s))&&(l=YO(n)),Xh(n))){const h=Av(n);u=eb(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const f=s&&!d&&!a?Pde(s,l,!0):zh(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function kOe(e){return Array.from(e.getClientRects())}function OOe(e){const t=tp(e),r=YO(e),n=e.ownerDocument.body,i=Lc(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Lc(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+$z(e);const o=-r.scrollTop;return Zf(n).direction==="rtl"&&(s+=Lc(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:o}}function NOe(e,t){const r=Xc(e),n=tp(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;const u=jz();(!u||u&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:a,height:s,x:o,y:l}}const IOe=new Set(["absolute","fixed"]);function DOe(e,t){const r=Av(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=Xh(e)?eb(e):zh(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,l=i*a.x,u=n*a.y;return{width:s,height:o,x:l,y:u}}function QK(e,t,r){let n;if(t==="viewport")n=NOe(e,r);else if(t==="document")n=OOe(tp(e));else if(Qf(t))n=DOe(t,r);else{const i=Cde(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return E5(n)}function Mde(e,t){const r=Zg(e);return r===t||!Qf(r)||Fb(r)?!1:Zf(r).position==="fixed"||Mde(r,t)}function LOe(e,t){const r=t.get(e);if(r)return r;let n=XT(e,[],!1).filter(o=>Qf(o)&&Jw(o)!=="body"),i=null;const a=Zf(e).position==="fixed";let s=a?Zg(e):e;for(;Qf(s)&&!Fb(s);){const o=Zf(s),l=Lz(s);!l&&o.position==="fixed"&&(i=null),(a?!l&&!i:!l&&o.position==="static"&&!!i&&IOe.has(i.position)||LA(s)&&!l&&Mde(e,s))?n=n.filter(c=>c!==s):i=o,s=Zg(s)}return t.set(e,n),n}function jOe(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?KO(t)?[]:LOe(t,this._c):[].concat(r),n],o=s[0],l=s.reduce((u,c)=>{const d=QK(t,c,i);return u.top=Lc(d.top,u.top),u.right=Qg(d.right,u.right),u.bottom=Qg(d.bottom,u.bottom),u.left=Lc(d.left,u.left),u},QK(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ROe(e){const{width:t,height:r}=Ade(e);return{width:t,height:r}}function $Oe(e,t,r){const n=Xh(t),i=tp(t),a=r==="fixed",s=Av(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const l=zh(0);function u(){l.x=$z(i)}if(n||!n&&!a)if((Jw(t)!=="body"||LA(i))&&(o=YO(t)),n){const h=Av(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();a&&!n&&i&&u();const c=i&&!n&&!a?Pde(i,o):zh(0),d=s.left+o.scrollLeft-l.x-c.x,f=s.top+o.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function Z4(e){return Zf(e).position==="static"}function ZK(e,t){if(!Xh(e)||Zf(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return tp(e)===r&&(r=r.ownerDocument.body),r}function kde(e,t){const r=Xc(e);if(KO(e))return r;if(!Xh(e)){let i=Zg(e);for(;i&&!Fb(i);){if(Qf(i)&&!Z4(i))return i;i=Zg(i)}return r}let n=ZK(e,t);for(;n&&bOe(n)&&Z4(n);)n=ZK(n,t);
vendor: 9,092 bytes, line 426
426return n&&Fb(n)&&Z4(n)&&!Lz(n)?r:n||SOe(e)||r}const FOe=async function(e){const t=this.getOffsetParent||kde,r=this.getDimensions,n=await r(e.floating);return{reference:$Oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function BOe(e){return Zf(e).direction==="rtl"}const zOe={convertOffsetParentRelativeRectToViewportRelativeRect:MOe,getDocumentElement:tp,getClippingRect:jOe,getOffsetParent:kde,getElementRects:FOe,getClientRects:kOe,getDimensions:ROe,getScale:eb,isElement:Qf,isRTL:BOe};function Ode(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UOe(e,t){let r=null,n;const i=tp(e);function a(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(o||t(),!f||!h)return;const p=TP(d),m=TP(i.clientWidth-(c+f)),_=TP(i.clientHeight-(d+h)),y=TP(c),b={rootMargin:-p+"px "+-m+"px "+-_+"px "+-y+"px",threshold:Lc(0,Qg(1,l))||1};let w=!0;function x(E){const T=E[0].intersectionRatio;if(T!==l){if(!w)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!Ode(u,e.getBoundingClientRect())&&s(),w=!1}try{r=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{r=new IntersectionObserver(x,b)}r.observe(e)}return s(!0),a}function WOe(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Rz(e),c=i||a?[...u?XT(u):[],...XT(t)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const d=u&&o?UOe(u,r):null;let f=-1,h=null;s&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let p,m=l?Av(e):null;l&&_();function _(){const y=Av(e);m&&!Ode(m,y)&&r(),m=y,p=requestAnimationFrame(_)}return r(),()=>{var y;c.forEach(v=>{i&&v.removeEventListener("scroll",r),a&&v.removeEventListener("resize",r)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const VOe=pOe,HOe=mOe,GOe=dOe,qOe=yOe,KOe=fOe,JK=cOe,YOe=gOe,XOe=(e,t,r)=>{const n=new Map,i={platform:zOe,...r},a={...i.platform,_c:n};return uOe(e,t,{...i,platform:a})};var QOe=typeof document<"u",ZOe=function(){},uk=QOe?R.useLayoutEffect:ZOe;function T5(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!T5(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!T5(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Nde(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eY(e,t){const r=Nde(e);return Math.round(t*r)/r}function J4(e){const t=R.useRef(e);return uk(()=>{t.current=e}),t}function JOe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[c,d]=R.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=R.useState(n);T5(f,n)||h(n);const[p,m]=R.useState(null),[_,y]=R.useState(null),v=R.useCallback(z=>{z!==E.current&&(E.current=z,m(z))},[]),b=R.useCallback(z=>{z!==T.current&&(T.current=z,y(z))},[]),w=a||p,x=s||_,E=R.useRef(null),T=R.useRef(null),S=R.useRef(c),A=l!=null,C=J4(l),k=J4(i),M=J4(u),D=R.useCallback(()=>{if(!E.current||!T.current)return;const z={placement:t,strategy:r,middleware:f};k.current&&(z.platform=k.current),XOe(E.current,T.current,z).then(q=>{const L={...q,isPositioned:M.current!==!1};$.current&&!T5(S.current,L)&&(S.current=L,Jv.flushSync(()=>{d(L)}))})},[f,t,r,k,M]);uk(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(z=>({...z,isPositioned:!1})))},[u]);const $=R.useRef(!1);uk(()=>($.current=!0,()=>{$.current=!1}),[]),uk(()=>{if(w&&(E.current=w),x&&(T.current=x),w&&x){if(C.current)return C.current(w,x,D);D()}},[w,x,D,C,A]);const V=R.useMemo(()=>({reference:E,floating:T,setReference:v,setFloating:b}),[v,b]),U=R.useMemo(()=>({reference:w,floating:x}),[w,x]),B=R.useMemo(()=>{const z={position:r,left:0,top:0};if(!U.floating)return z;const q=eY(U.floating,c.x),L=eY(U.floating,c.y);return o?{...z,transform:"translate("+q+"px, "+L+"px)",...Nde(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:q,top:L}},[r,o,U.floating,c.x,c.y]);return R.useMemo(()=>({...c,update:D,refs:V,elements:U,floatingStyles:B}),[c,D,V,U,B])}const eNe=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?JK({element:n.current,padding:i}).fn(r):{}:n?JK({element:n,padding:i}).fn(r):{}}}},tNe=(e,t)=>({...VOe(e),options:[e,t]}),rNe=(e,t)=>({...HOe(e),options:[e,t]}),nNe=(e,t)=>({...YOe(e),options:[e,t]}),iNe=(e,t)=>({...GOe(e),options:[e,t]}),aNe=(e,t)=>({...qOe(e),options:[e,t]}),sNe=(e,t)=>({...KOe(e),options:[e,t]}),oNe=(e,t)=>({...eNe(e),options:[e,t]});var lNe="Arrow",Ide=R.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return g.jsx(Hr.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ide.displayName=lNe;var uNe=Ide;function Dde(e){const[t,r]=R.useState(void 0);return Xs(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,o=u.blockSize}else s=e.offsetWidth,o=e.offsetHeight;r({width:s,height:o})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Fz="Popper",[Lde,ex]=Ou(Fz),[cNe,jde]=Lde(Fz),Rde=e=>{const{__scopePopper:t,children:r}=e,[n,i]=R.useState(null);return g.jsx(cNe,{scope:t,anchor:n,onAnchorChange:i,children:r})};Rde.displayName=Fz;var $de="PopperAnchor",Fde=R.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=jde($de,r),s=R.useRef(null),o=Gn(t,s);return R.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:g.jsx(Hr.div,{...i,ref:o})});Fde.displayName=$de;var Bz="PopperContent",[dNe,fNe]=Lde(Bz),Bde=R.forwardRef((e,t)=>{var le,Te,be,we,ae,H;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=e,_=jde(Bz,r),[y,v]=R.useState(null),b=Gn(t,fe=>v(fe)),[w,x]=R.useState(null),E=Dde(w),T=(E==null?void 0:E.width)??0,S=(E==null?void 0:E.height)??0,A=n+(a!=="center"?"-"+a:""),C=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},k=Array.isArray(u)?u:[u],M=k.length>0,D={padding:C,boundary:k.filter(pNe),altBoundary:M},{refs:$,floatingStyles:V,placement:U,isPositioned:B,middlewareData:z}=JOe({strategy:"fixed",placement:A,whileElementsMounted:(...fe)=>WOe(...fe,{animationFrame:h==="always"}),elements:{reference:_.anchor},middleware:[tNe({mainAxis:i+S,alignmentAxis:s}),l&&rNe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?nNe():void 0,...D}),l&&iNe({...D}),aNe({...D,apply:({elements:fe,rects:Se,availableWidth:ne,availableHeight:$e})=>{const{width:me,height:Ue}=Se.reference,ke=fe.floating.style;ke.setProperty("--radix-popper-available-width",`${ne}px`),ke.setProperty("--radix-popper-available-height",`${$e}px`),ke.setProperty("--radix-popper-anchor-width",`${me}px`),ke.setProperty("--radix-popper-anchor-height",`${Ue}px`)}}),w&&oNe({element:w,padding:o}),mNe({arrowWidth:T,arrowHeight:S}),f&&sNe({strategy:"referenceHidden",...D})]}),[q,L]=Wde(U),K=jo(p);Xs(()=>{B&&(K==null||K())},[B,K]);const O=(le=z.arrow)==null?void 0:le.x,N=(Te=z.arrow)==null?void 0:Te.y,X=((be=z.arrow)==null?void 0:be.centerOffset)!==0,[ie,ee]=R.useState();return Xs(()=>{y&&ee(window.getComputedStyle(y).zIndex)},[y]),g.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:B?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(we=z.transformOrigin)==null?void 0:we.x,(ae=z.transformOrigin)==null?void 0:ae.y].join(" "),...((H=z.hide)==null?void 0:H.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(dNe,{scope:r,placedSide:q,onArrowChange:x,arrowX:O,arrowY:N,shouldHideArrow:X,children:g.jsx(Hr.div,{"data-side":q,"data-align":L,...m,ref:b,style:{...m.style,animation:B?void 0:"none"}})})})});Bde.displayName=Bz;var zde="PopperArrow",hNe={top:"bottom",right:"left",bottom:"top",left:"r
426ight"},Ude=R.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=fNe(zde,n),s=hNe[a.placedSide];return g.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:g.jsx(uNe,{...i,ref:r,style:{...i.style,display:"block"}})})});Ude.displayName=zde;function pNe(e){return e!==null}var mNe=e=>({name:"transformOrigin",options:e,fn(t){var _,y,v;const{placement:r,rects:n,middlewareData:i}=t,s=((_=i.arrow)==null?void 0:_.centerOffset)!==0,o=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=Wde(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((y=i.arrow)==null?void 0:y.x)??0)+o/2,h=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let p="",m="";return u==="bottom"?(p=s?d:`${f}px`,m=`${-l}px`):u==="top"?(p=s?d:`${f}px`,m=`${n.floating.height+l}px`):u==="right"?(p=`${-l}px`,m=s?d:`${h}px`):u==="left"&&(p=`${n.floating.width+l}px`,m=s?d:`${h}px`),{data:{x:p,y:m}}}});function Wde(e){const[t,r="center"]=e.split("-");return[t,r]}var Vde=Rde,XO=Fde,zz=Bde,Uz=Ude,[QO,n5t]=Ou("Tooltip",[ex]),Wz=ex(),Hde="TooltipProvider",gNe=700,tY="tooltip.open",[yNe,Gde]=QO(Hde),qde=e=>{const{__scopeTooltip:t,delayDuration:r=gNe,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,s=R.useRef(!0),o=R.useRef(!1),l=R.useRef(0);return R.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(yNe,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:R.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:R.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:o,onPointerInTransitChange:R.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:a})};qde.displayName=Hde;var Kde="Tooltip",[i5t,ZO]=QO(Kde),P6="TooltipTrigger",vNe=R.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=ZO(P6,r),a=Gde(P6,r),s=Wz(r),o=R.useRef(null),l=Gn(t,o,i.onTriggerChange),u=R.useRef(!1),c=R.useRef(!1),d=R.useCallback(()=>u.current=!1,[]);return R.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(XO,{asChild:!0,...s,children:g.jsx(Hr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:l,onPointerMove:_r(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:_r(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:_r(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:_r(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:_r(e.onBlur,i.onClose),onClick:_r(e.onClick,i.onClose)})})});vNe.displayName=P6;var _Ne="TooltipPortal",[a5t,bNe]=QO(_Ne,{forceMount:void 0}),Bb="TooltipContent",Yde=R.forwardRef((e,t)=>{const r=bNe(Bb,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...a}=e,s=ZO(Bb,e.__scopeTooltip);return g.jsx(cc,{present:n||s.open,children:s.disableHoverableContent?g.jsx(Xde,{side:i,...a,ref:t}):g.jsx(wNe,{side:i,...a,ref:t})})}),wNe=R.forwardRef((e,t)=>{const r=ZO(Bb,e.__scopeTooltip),n=Gde(Bb,e.__scopeTooltip),i=R.useRef(null),a=Gn(t,i),[s,o]=R.useState(null),{trigger:l,onClose:u}=r,c=i.current,{onPointerInTransitChange:d}=n,f=R.useCallback(()=>{o(null),d(!1)},[d]),h=R.useCallback((p,m)=>{const _=p.currentTarget,y={x:p.clientX,y:p.clientY},v=ANe(y,_.getBoundingClientRect()),b=CNe(y,v),w=PNe(m.getBoundingClientRect()),x=kNe([...b,...w]);o(x),d(!0)},[d]);return R.useEffect(()=>()=>f(),[f]),R.useEffect(()=>{if(l&&c){const p=_=>h(_,c),m=_=>h(_,l);return l.addEventListener("pointerleave",p),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",p),c.removeEventListener("pointerleave",m)}}},[l,c,h,f]),R.useEffect(()=>{if(s){const p=m=>{const _=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(_))||(c==null?void 0:c.contains(_)),b=!MNe(y,s);v?f():b&&(f(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,c,s,u,f]),g.jsx(Xde,{...e,ref:a})}),[xNe,ENe]=QO(Kde,{isInside:!1}),TNe=Lce("TooltipContent"),Xde=R.forwardRef((e,t)=>
426{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...o}=e,l=ZO(Bb,r),u=Wz(r),{onClose:c}=l;return R.useEffect(()=>(document.addEventListener(tY,c),()=>document.removeEventListener(tY,c)),[c]),R.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),g.jsx(e_,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:g.jsxs(zz,{"data-state":l.stateAttribute,...u,...o,ref:t,style:{...o.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:[g.jsx(TNe,{children:n}),g.jsx(xNe,{scope:r,isInside:!0,children:g.jsx(Bce,{id:l.contentId,role:"tooltip",children:i||n})})]})})});Yde.displayName=Bb;var Qde="TooltipArrow",SNe=R.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=Wz(r);return ENe(Qde,r).isInside?null:g.jsx(Uz,{...i,...n,ref:t})});SNe.displayName=Qde;function ANe(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,i,a)){case a:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function CNe(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function PNe(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function MNe(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const o=t[a],l=t[s],u=o.x,c=o.y,d=l.x,f=l.y;c>n!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(i=!i)}return i}function kNe(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),ONe(t)}function ONe(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var NNe=qde,Zde=Yde;const INe=NNe,DNe=R.forwardRef(({className:e,sideOffset:t=4,...r},n)=>g.jsx(Zde,{ref:n,sideOffset:t,className:Xt("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}));DNe.displayName=Zde.displayName;var tx=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(){}},Cv=typeof window>"u"||"Deno"in globalThis;function vu(){}function LNe(e,t){return typeof e=="function"?e(t):e}function M6(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jde(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rg(e,t){return typeof e=="function"?e(t):e}function Nd(e,t){return typeof e=="function"?e(t):e}function rY(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Vz(s,t.options))return!1}else if(!QT(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function nY(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Pv(t.options.mutationKey)!==Pv(a))return!1}else if(!QT(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Vz(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pv)(e)}function Pv(e){return JSON.stringify(e,(t,r)=>k6(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function QT(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>QT(e[r],t[r])):!1}function efe(e,t){if(e===t)return e;const r=iY(e)&&iY(t);if(r||k6(e)&&k6(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<s;c++){const d=r?c:a[c];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,u++):(o[d]=efe(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&u++)}return i===s&&u===i?e:o}return t}function S5(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function iY(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function k6(e){if(!aY(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!aY(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function aY(e){return Object.prototype.toString.call(e)==="[object Object]"}function jNe(e){return new Promise(t=>{setTimeout(t,e)})}function O6(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?efe(e,t):t}function RNe(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function $Ne(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Hz=Symbol();function tfe(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Hz?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function rfe(e,t){return typeof e=="function"?e(...t):!!e}var Ky,ng,vb,rle,FNe=(rle=class extends tx{constructor(){super();Jr(this,Ky);Jr(this,ng);Jr(this,vb);Tr(this,vb,t=>{if(!Cv&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){et(this,ng)||this.setEventListener(et(this,vb))}onUnsubscribe(){var t;this.hasListeners()||((t=et(this,ng))==null||t.call(this),Tr(this,ng,void 0))}setEventListener(t){var r;Tr(this,vb,t),(r=et(this,ng))==null||r.call(this),Tr(this,ng,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){et(this,Ky)!==t&&(Tr(this,Ky,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 13,737 bytes, line 426
426this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof et(this,Ky)=="boolean"?et(this,Ky):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ky=new WeakMap,ng=new WeakMap,vb=new WeakMap,rle),Gz=new FNe,_b,ig,bb,nle,BNe=(nle=class extends tx{constructor(){super();Jr(this,_b,!0);Jr(this,ig);Jr(this,bb);Tr(this,bb,t=>{if(!Cv&&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(){et(this,ig)||this.setEventListener(et(this,bb))}onUnsubscribe(){var t;this.hasListeners()||((t=et(this,ig))==null||t.call(this),Tr(this,ig,void 0))}setEventListener(t){var r;Tr(this,bb,t),(r=et(this,ig))==null||r.call(this),Tr(this,ig,t(this.setOnline.bind(this)))}setOnline(t){et(this,_b)!==t&&(Tr(this,_b,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return et(this,_b)}},_b=new WeakMap,ig=new WeakMap,bb=new WeakMap,nle),A5=new BNe;function N6(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function zNe(e){return Math.min(1e3*2**e,3e4)}function nfe(e){return(e??"online")==="online"?A5.isOnline():!0}var ife=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eD(e){return e instanceof ife}function afe(e){let t=!1,r=0,n=!1,i;const a=N6(),s=m=>{var _;n||(f(new ife(m)),(_=e.abort)==null||_.call(e))},o=()=>{t=!0},l=()=>{t=!1},u=()=>Gz.isFocused()&&(e.networkMode==="always"||A5.isOnline())&&e.canRun(),c=()=>nfe(e.networkMode)&&e.canRun(),d=m=>{var _;n||(n=!0,(_=e.onSuccess)==null||_.call(e,m),i==null||i(),a.resolve(m))},f=m=>{var _;n||(n=!0,(_=e.onError)==null||_.call(e,m),i==null||i(),a.reject(m))},h=()=>new Promise(m=>{var _;i=y=>{(n||u())&&m(y)},(_=e.onPause)==null||_.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),p=()=>{if(n)return;let m;const _=r===0?e.initialPromise:void 0;try{m=_??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var E;if(n)return;const v=e.retry??(Cv?0:3),b=e.retryDelay??zNe,w=typeof b=="function"?b(r,y):b,x=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,y);if(t||!x){f(y);return}r++,(E=e.onFail)==null||E.call(e,r,y),jNe(w).then(()=>u()?void 0:h()).then(()=>{t?f(y):p()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:c,start:()=>(c()?p():h().then(p),a)}}var UNe=e=>setTimeout(e,0);function WNe(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=UNe;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ro=WNe(),Yy,ile,sfe=(ile=class{constructor(){Jr(this,Yy)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),M6(this.gcTime)&&Tr(this,Yy,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cv?1/0:5*60*1e3))}clearGcTimeout(){et(this,Yy)&&(clearTimeout(et(this,Yy)),Tr(this,Yy,void 0))}},Yy=new WeakMap,ile),wb,Xy,Od,Qy,Bl,_A,Zy,Nf,wp,ale,VNe=(ale=class extends sfe{constructor(t){super();Jr(this,Nf);Jr(this,wb);Jr(this,Xy);Jr(this,Od);Jr(this,Qy);Jr(this,Bl);Jr(this,_A);Jr(this,Zy);Tr(this,Zy,!1),Tr(this,_A,t.defaultOptions),this.setOptions(t.options),this.observers=[],Tr(this,Qy,t.client),Tr(this,Od,et(this,Qy).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Tr(this,wb,HNe(this.options)),this.state=t.state??et(this,wb),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=et(this,Bl))==null?void 0:t.promise}setOptions(t){this.options={...et(this,_A),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&et(this,Od).remove(this)}setData(t,r){const n=O6(this.state.data,t,this.options);return zn(this,Nf,wp).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){zn(this,Nf,wp).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=et(this,Bl))==null?void 0:n.promise;return(i=et(this,Bl))==null||i.cancel(t),r?r.then(vu).catch(vu):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(et(this,wb))}isActive(){return this.observers.some(t=>Nd(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hz||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Rg(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:!Jde(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=et(this,Bl))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=et(this,Bl))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),et(this,Od).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(et(this,Bl)&&(et(this,Zy)?et(this,Bl).cancel({revert:!0}):et(this,Bl).cancelRetry()),this.scheduleGc()),et(this,Od).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||zn(this,Nf,wp).call(this,{type:"invalidate"})}fetch(t,r){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(et(this,Bl))return et(this,Bl).continueRetry(),et(this,Bl).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Tr(this,Zy,!0),n.signal)})},a=()=>{const f=tfe(this.options,r),p=(()=>{const m={client:et(this,Qy),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return Tr(this,Zy,!1),this.options.persister?this.options.persister(f,p,this):f(p)},o=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:et(this,Qy),state:this.state,fetchFn:a};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(o,this),Tr(this,Xy,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&zn(this,Nf,wp).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,p,m,_;eD(f)&&f.silent||zn(this,Nf,wp).call(this,{type:"error",error:f}),eD(f)||((p=(h=et(this,Od).config).onError)==null||p.call(h,f,this),(_=(m=et(this,Od).config).onSettled)==null||_.call(m,this.state.data,f,this)),this.scheduleGc()};return Tr(this,Bl,afe({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,p,m,_;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){l(y);return}(p=(h=et(this,Od).config).onSuccess)==null||p.call(h,f,this),(_=(m=et(this,Od).config).onSettled)==null||_.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{zn(this,Nf,wp).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{zn(this,Nf,wp).call(this,{type:"pause"})},onContinue:()=>{zn(this,Nf,wp).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),et(this,Bl).start()}},wb=new WeakMap,Xy=new WeakMap,Od=new WeakMap,Qy=new WeakMap,Bl=new WeakMap,_A=new WeakMap,Zy=new WeakMap,Nf=new WeakSet,wp=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,...ofe(n.data,this.options),fetchMeta:t.meta??null};case"success":return Tr(this,Xy,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 i=t.error;return eD(i)&&i.revert&&et(this,Xy)?{...et(this,Xy),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ro.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),et(this,Od).notify({query:this,type:"updated",action:t})})},ale);function ofe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nfe(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function HNe(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 Th,sle,GNe=(sle=class extends tx{constructor(t={}){super();Jr(this,Th);this.config=t,Tr(this,Th,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Vz(i,r);let s=this.get(a);return s||(s=new VNe({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){et(this,Th).has(t.queryHash)||(et(this,Th).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=et(this,Th).get(t.queryHash);r&&(t.destroy(),r===t&&et(this,Th).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ro.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return et(this,Th).get(t)}getAll(){return[...et(this,Th).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>rY(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>rY(t,n)):r}notify(t){Ro.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ro.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ro.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Th=new WeakMap,sle),Sh,fu,Jy,Ah,zm,ole,qNe=(ole=class extends sfe{constructor(t){super();Jr(this,Ah);Jr(this,Sh);Jr(this,fu);Jr(this,Jy);this.mutationId=t.mutationId,Tr(this,fu,t.mutationCache),Tr(this,Sh,[]),this.state=t.state||lfe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){et(this,Sh).includes(t)||(et(this,Sh).push(t),this.clearGcTimeout(),et(this,fu).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Tr(this,Sh,et(this,Sh).filter(r=>r!==t)),this.scheduleGc(),et(this,fu).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){et(this,Sh).length||(this.state.status==="pending"?this.scheduleGc():et(this,fu).remove(this))}continue(){var t;return((t=et(this,Jy))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,u,c,d,f,h,p,m,_,y,v,b,w,x,E,T,S;const r=()=>{zn(this,Ah,zm).call(this,{type:"continue"})};Tr(this,Jy,afe({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,C)=>{zn(this,Ah,zm).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{zn(this,Ah,zm).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>et(this,fu).canRun(this)}));const n=this.state.status==="pending",i=!et(this,Jy).canStart();try{if(n)r();else{zn(this,Ah,zm).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=et(this,fu).config).onMutate)==null?void 0:s.call(a,t,this));const C=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));C!==this.state.context&&zn(this,Ah,zm).call(this,{type:"pending",context:C,variables:t,isPaused:i})}const A=await et(this,Jy).start();return await((c=(u=et(this,fu).config).onSuccess)==null?void 0:c.call(u,A,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,A,t,this.state.context)),await((p=(h=et(this,fu).config).onSettled)==null?void 0:p.call(h,A,null,this.state.variables,this.state.context,this)),await((_=(m=this.options).onSettled)==null?void 0:_.call(m,A,null,t,this.state.context)),zn(this,Ah,zm).call(this,{type:"success",data:A}),A}catch(A){try{throw await((v=(y=et(this,fu).config).onError)==null?void 0:v.call(y,A,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,A,t,this.state.context)),await((E=(x=et(this,fu).config).onSettled)==null?void 0:E.
426call(x,void 0,A,this.state.variables,this.state.context,this)),await((S=(T=this.options).onSettled)==null?void 0:S.call(T,void 0,A,t,this.state.context)),A}finally{zn(this,Ah,zm).call(this,{type:"error",error:A})}}finally{et(this,fu).runNext(this)}}},Sh=new WeakMap,fu=new WeakMap,Jy=new WeakMap,Ah=new WeakSet,zm=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),Ro.batch(()=>{et(this,Sh).forEach(n=>{n.onMutationUpdate(t)}),et(this,fu).notify({mutation:this,type:"updated",action:t})})},ole);function lfe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kp,If,bA,lle,KNe=(lle=class extends tx{constructor(t={}){super();Jr(this,kp);Jr(this,If);Jr(this,bA);this.config=t,Tr(this,kp,new Set),Tr(this,If,new Map),Tr(this,bA,0)}build(t,r,n){const i=new qNe({mutationCache:this,mutationId:++rP(this,bA)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){et(this,kp).add(t);const r=SP(t);if(typeof r=="string"){const n=et(this,If).get(r);n?n.push(t):et(this,If).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(et(this,kp).delete(t)){const r=SP(t);if(typeof r=="string"){const n=et(this,If).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&et(this,If).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=SP(t);if(typeof r=="string"){const n=et(this,If).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=SP(t);if(typeof r=="string"){const i=(n=et(this,If).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ro.batch(()=>{et(this,kp).forEach(t=>{this.notify({type:"removed",mutation:t})}),et(this,kp).clear(),et(this,If).clear()})}getAll(){return Array.from(et(this,kp))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>nY(r,n))}findAll(t={}){return this.getAll().filter(r=>nY(t,r))}notify(t){Ro.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 16,548 bytes, line 426
426r.state.isPaused);return Ro.batch(()=>Promise.all(t.map(r=>r.continue().catch(vu))))}},kp=new WeakMap,If=new WeakMap,bA=new WeakMap,lle);function SP(e){var t;return(t=e.options.scope)==null?void 0:t.id}function sY(e){return{onFetch:(t,r)=>{var c,d,f,h,p;const n=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const _=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=tfe(t.options,t.fetchOptions),v=async(b,w,x)=>{if(m)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const T=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:w,direction:x?"backward":"forward",meta:t.options.meta};return _(k),k})(),S=await y(T),{maxPages:A}=t.options,C=x?$Ne:RNe;return{pages:C(b.pages,S,A),pageParams:C(b.pageParams,w,A)}};if(i&&a.length){const b=i==="backward",w=b?YNe:oY,x={pages:a,pageParams:s},E=w(n,x);o=await v(x,E,b)}else{const b=e??a.length;do{const w=l===0?s[0]??n.initialPageParam:oY(n,o);if(l>0&&w==null)break;o=await v(o,w),l++}while(l<b)}return o};t.options.persister?t.fetchFn=()=>{var m,_;return(_=(m=t.options).persister)==null?void 0:_.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function oY(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 YNe(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 Ns,ag,sg,xb,Eb,og,Tb,Sb,ule,XNe=(ule=class{constructor(e={}){Jr(this,Ns);Jr(this,ag);Jr(this,sg);Jr(this,xb);Jr(this,Eb);Jr(this,og);Jr(this,Tb);Jr(this,Sb);Tr(this,Ns,e.queryCache||new GNe),Tr(this,ag,e.mutationCache||new KNe),Tr(this,sg,e.defaultOptions||{}),Tr(this,xb,new Map),Tr(this,Eb,new Map),Tr(this,og,0)}mount(){rP(this,og)._++,et(this,og)===1&&(Tr(this,Tb,Gz.subscribe(async e=>{e&&(await this.resumePausedMutations(),et(this,Ns).onFocus())})),Tr(this,Sb,A5.subscribe(async e=>{e&&(await this.resumePausedMutations(),et(this,Ns).onOnline())})))}unmount(){var e,t;rP(this,og)._--,et(this,og)===0&&((e=et(this,Tb))==null||e.call(this),Tr(this,Tb,void 0),(t=et(this,Sb))==null||t.call(this),Tr(this,Sb,void 0))}isFetching(e){return et(this,Ns).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return et(this,ag).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=et(this,Ns).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=et(this,Ns).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Rg(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return et(this,Ns).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=et(this,Ns).get(n.queryHash),a=i==null?void 0:i.state.data,s=LNe(t,a);if(s!==void 0)return et(this,Ns).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ro.batch(()=>et(this,Ns).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=et(this,Ns).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=et(this,Ns);Ro.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=et(this,Ns);return Ro.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ro.batch(()=>et(this,Ns).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(vu).catch(vu)}invalidateQueries(e,t={}){return Ro.batch(()=>(et(this,Ns).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=Ro.batch(()=>et(this,Ns).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(vu)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(vu)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=et(this,Ns).build(this,t);return r.isStaleByTime(Rg(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vu).catch(vu)}fetchInfiniteQuery(e){return e.behavior=sY(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vu).catch(vu)}ensureInfiniteQueryData(e){return e.behavior=sY(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return A5.isOnline()?et(this,ag).resumePausedMutations():Promise.resolve()}getQueryCache(){return et(this,Ns)}getMutationCache(){return et(this,ag)}getDefaultOptions(){return et(this,sg)}setDefaultOptions(e){Tr(this,sg,e)}setQueryDefaults(e,t){et(this,xb).set(Pv(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...et(this,xb).values()],r={};return t.forEach(n=>{QT(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){et(this,Eb).set(Pv(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...et(this,Eb).values()],r={};return t.forEach(n=>{QT(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...et(this,sg).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Vz(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===Hz&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...et(this,sg).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){et(this,Ns).clear(),et(this,ag).clear()}},Ns=new WeakMap,ag=new WeakMap,sg=new WeakMap,xb=new WeakMap,Eb=new WeakMap,og=new WeakMap,Tb=new WeakMap,Sb=new WeakMap,ule),zu,fi,wA,hu,ev,Ab,lg,ug,xA,Cb,Pb,tv,rv,cg,Mb,qi,oE,I6,D6,L6,j6,R6,$6,F6,ufe,cle,QNe=(cle=class extends tx{constructor(t,r){super();Jr(this,qi);Jr(this,zu);Jr(this,fi);Jr(this,wA);Jr(this,hu);Jr(this,ev);Jr(this,Ab);Jr(this,lg);Jr(this,ug);Jr(this,xA);Jr(this,Cb);Jr(this,Pb);Jr(this,tv);Jr(this,rv);Jr(this,cg);Jr(this,Mb,new Set);this.options=r,Tr(this,zu,t),Tr(this,ug,null),Tr(this,lg,N6()),this.options.experimental_prefetchInRender||et(this,lg).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(et(this,fi).addObserver(this),lY(et(this,fi),this.options)?zn(this,qi,oE).call(this):this.updateResult(),zn(this,qi,j6).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return B6(et(this,fi),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return B6(et(this,fi),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,zn(this,qi,R6).call(this),zn(this,qi,$6).call(this),et(this,fi).removeObserver(this)}setOptions(t){const r=this.options,n=et(this,fi);if(this.options=et(this,zu).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nd(this.options.enabled,et(this,fi))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");zn(this,qi,F6).call(this),et(this,fi).setOptions(this.options),r._defaulted&&!S5(this.options,r)&&et(this,zu).getQueryCache().notify({type:"observerOptionsUpdated",query:et(this,fi),observer:this});const i=this.hasListeners();i&&uY(et(this,fi),n,this.options,r)&&zn(this,qi,oE).call(this),this.updateResult(),i&&(et(this,fi)!==n||Nd(this.options.enabled,et(this,fi))!==Nd(r.enabled,et(this,fi))||Rg(this.options.staleTime,et(this,fi))!==Rg(r.staleTime,et(this,fi)))&&zn(this,qi,I6).call(this);const a=zn(this,qi,D6).call(this);i&&(et(this,fi)!==n||Nd(this.options.enabled,et(this,fi))!==Nd(r.enabled,et(this,fi))||a!==et(this,cg))&&zn(this,qi,L6).call(this,a)}getOptimisticResult(t){const r=et(this,zu).getQueryCache().build(et(this,zu),t),n=this.createResult(r,t);return JNe(this,n)&&(Tr(this,hu,n),Tr(this,Ab,this.options),Tr(this,ev,et(this,fi).state)),n}getCurrentResult(){return et(this,hu)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){et(this,Mb).add(t)}getCurrentQuery(){return et(this,fi)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=et(this,zu).defaultQueryOptions(t),n=et(this,zu).getQueryCache().build(et(this,zu),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return zn(this,qi,oE).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),et(this,hu)))}createResult(t,r){var A;const n=et(this,fi),i=this.options,a=et(this,hu),s=et(this,ev),o=et(this,Ab),u=t!==n?t.state:et(this,wA),{state:c}=t;let d={...c},f=!1,h;if(r._optimisticResults){const C=this.hasListeners(),k=!C&&lY(t,r),M=C&&uY(t,n,r,i);(k||M)&&(d={...d,...ofe(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:_}=d;h=d.data;let y=!1;if(r.placeholderData!==void 0&&h===void 0&&_==="pending"){let C;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(C=a.data,y=!0):C=typeof r.placeholderData=="function"?r.placeholderData((A=et(this,Pb))==null?void 0:A.state.data,et(this,Pb)):r.placeholderData,C!==void 0&&(_="success",h=O6(a==null?void 0:a.data,C,r),f=!0)}if(r.select&&h!==void 0&&!y)if(a&&h===(s==null?void 0:s.data)&&r.select===et(this,xA))h=et(this,Cb);else try{Tr(this,xA,r.select),h=r.select(h),h=O6(a==null?void 0:a.data,h,r),Tr(this,Cb,h),Tr(this,ug,null)}catch(C){Tr(this,ug,C)}et(this,ug)&&(p=et(this,ug),h=et(this,Cb),m=Date.now(),_="error");const v=d.fetchStatus==="fetching",b=_==="pending",w=_==="error",x=b&&v,E=h!==void 0,S={status:_,fetchStatus:d.fetchStatus,isPending:b,isSuccess:_==="success",isError:w,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:w&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&E,isStale:qz(t,r),refetch:this.refetch,promise:et(this,lg),isEnabled:Nd(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=D=>{S.status==="error"?D.reject(S.error):S.data!==void 0&&D.resolve(S.data)},k=()=>{const D=Tr(this,lg,S.promise=N6());C(D)},M=et(this,lg);switch(M.status){case"pending":t.queryHash===n.queryHash&&C(M);break;case"fulfilled":(S.status==="error"||S.data!==M.value)&&k();break;case"rejected":(S.status!=="error"||S.error!==M.reason)&&k();break}}return S}updateResult(){const t=et(this,hu),r=this.createResult(et(this,fi),this.options);if(Tr(this,ev,et(this,fi).state),Tr(this,Ab,this.options),et(this,ev).data!==void 0&&Tr(this,Pb,et(this,fi)),S5(r,t))return;Tr(this,hu,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!et(this,Mb).size)return!0;const s=new Set(a??et(this,Mb));return this.options.throwOnError&&s.add("error"),Object.keys(et(this,hu)).some(o=>{const l=o;return et(this,hu)[l]!==t[l]&&s.has(l)})};zn(this,qi,ufe).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&zn(this,qi,j6).call(this)}},zu=new WeakMap,fi=new WeakMap,wA=new WeakMap,hu=new WeakMap,ev=new WeakMap,Ab=new WeakMap,lg=new WeakMap,ug=new WeakMap,xA=new WeakMap,Cb=new WeakMap,Pb=new WeakMap,tv=new WeakMap,rv=new WeakMap,cg=new WeakMap,Mb=new WeakMap,qi=new WeakSet,oE=function(t){zn(this,qi,F6).call(this);let r=et(this,fi).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(vu)),r},I6=function(){zn(this,qi,R6).call(this);const t=Rg(this.options.staleTime,et(this,fi));if(Cv||et(this,hu).isStale||!M6(t))return;const n=Jde(et(this,hu).dataUpdatedAt,t)+1;Tr(this,tv,setTimeout(()=>{et(this,hu).isStale||this.updateResult()},n))},D6=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(et(this,fi)):this.options.refetchInterval)??!1},L6=function(t){zn(this,qi,$6).call(this),Tr(this,cg,t),!(Cv||Nd(this.options.enabled,et(this,fi))===!1||!M6(et(this,cg))||et(this,cg)===0)&&Tr(this,rv,setInterval(()=>{(this.options.refetchIntervalInBackground||Gz.isFocused())&&zn(this,qi,oE).call(this)},et(this,cg)))},j6=function(){zn(this,qi,I6).call(this),zn(this,qi,L6).call(this,zn(this,qi,D6).call(this))},R6=function(){et(this,tv)&&(clearTimeout(et(this,tv)),Tr(this,tv,void 0))},$6=function(){et(this,rv)&&(clearInterval(et(this,rv)),Tr(this,rv,void 0))},F6=function(){const t=et(this,zu).getQueryCache().build(et(this,zu),this.options);if(t===et(this,fi))return;const r=et(this,fi);Tr(this,fi,t),Tr(this,wA,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},ufe=function(t){Ro.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(et(this,hu))}),et(this,zu).getQueryCache().notify({query:et(this,fi),type:"observerResultsUpdated"})})},cle);function ZNe(e,t){return Nd(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function lY(e,t){return ZNe(e,t)||e.state.data!==void 0&&B6(e,t,t.refetchOnMount)}function B6(e,t,r){if(Nd(t.enabled,e)!==!1&&Rg(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&qz(e,t)}return!1}function uY(e,t,r,n){return(e!==t||Nd(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&qz(e,r)}function qz(e,t){return Nd(t.enabled,e)!==!1&&e.isStaleByTime(Rg(t.staleTime,e))}function JNe(e,t){return!S5(e.getCurrentResult(),t)}var dg,fg,Uu,Op,Xp,ck,z6,dle,eIe=(dle=class extends tx{constructor(r,n){super();Jr(this,Xp);Jr(this,dg);Jr(this,fg);Jr(this,Uu);Jr(this,Op);Tr(this,dg,r),this.setOptions(n),this.bindMethods(),zn(this,Xp,ck).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=et(this,dg).defaultMutationOptions(r),S5(this.options,n)||et(this,dg).getMutationCache().notify({type:"observerOptionsUpdated",mutation:et(this,Uu),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Pv(n.mutationKey)!==Pv(this.options.mutationKey)?this.reset():((i=et(this,Uu))==null?void 0:i.state.status)==="pending"&&et(this,Uu).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=et(this,Uu))==null||r.removeObserver(this)}onMutationUpdate(r){zn(this,Xp,ck).call(this),zn(this,Xp,z6).call(this,r)}getCurrentResult(){return et(this,fg)}reset(){var r;(r=et(this,Uu))==null||r.removeObserver(this),Tr(this,Uu,void 0),zn(this,Xp,ck).call(this),zn(this,Xp,z6).call(this)}mutate(r,n){var i;return Tr(this,Op,n),(i=et(this,Uu))==null||i.removeObserver(this),Tr(this,Uu,et(this,dg).getMutationCache().build(et(this,dg),this.options)),et(this,Uu).addObserver(this),et(this,Uu).execute(r)}},dg=new WeakMap,fg=new WeakMap,Uu=new WeakMap,Op=new WeakMap,Xp=new WeakSet,ck=function(){var n;const r=((n=et(this,Uu))==null?void 0:n.state)??lfe();Tr(this,fg,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},z6=function(r){Ro.batch(()=>{var n,i,a,s,o,l,u,c;if(et(this,Op)&&this.hasListeners()){const d=et(this,fg).variables,f=et(this,fg).context;(r==null?void 0:r.type)==="success"?((i=(n=et(this,Op)).onSuccess)==null||i.call(n,r.data,d,f),(s=(a=et(this,Op)).onSettled)==null||s.call(a,r.data,null,d,f)):(r==null?void 0:r.type)==="error"&&((l=(o=et(this,Op)).onError)==null||l.call(o,r.error,d,f),(c=(u=et(this,Op)).onSettled)==null||c.call(u,void 0,r.error,d,f))}
426this.listeners.forEach(d=>{d(et(this,fg))})})},dle),cfe=R.createContext(void 0),jA=e=>{const t=R.useContext(cfe);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tIe=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(cfe.Provider,{value:e,children:t})),dfe=R.createContext(!1),rIe=()=>R.useContext(dfe);dfe.Provider;function nIe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var iIe=R.createContext(nIe()),aIe=()=>R.useContext(iIe),sIe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},oIe=e=>{R.useEffect(()=>{e.clearReset()},[e])},lIe=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||rfe(r,[e.error,n])),uIe=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},cIe=(e,t)=>e.isLoading&&e.isFetching&&!t,dIe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,cY=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function fIe(e,t,r){var d,f,h,p,m;const n=rIe(),i=aIe(),a=jA(),s=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,s),s._optimisticResults=n?"isRestoring":"optimistic",uIe(s),sIe(s,i),oIe(i);const o=!a.getQueryCache().get(s.queryHash),[l]=R.useState(()=>new t(a,s)),u=l.getOptimisticResult(s),c=!n&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(_=>{const y=c?l.subscribe(Ro.batchCalls(_)):vu;return l.updateResult(),y},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(s)},[s,l]),dIe(s,u))throw cY(s,l,i);if(lIe({result:u,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw u.error;if((p=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||p.call(h,s,u),s.experimental_prefetchInRender&&!Cv&&cIe(u,n)){const _=o?cY(s,l,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;_==null||_.catch(vu).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?u:l.trackResult(u)}function r_(e,t){return fIe(e,QNe)}function $p(e,t){const r=jA(),[n]=R.useState(()=>new eIe(r,e));R.useEffect(()=>{n.setOptions(e)},[n,e]);const i=R.useSyncExternalStore(R.useCallback(s=>n.subscribe(Ro.batchCalls(s)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=R.useCallback((s,o)=>{n.mutate(s,o).catch(vu)},[n]);if(i.error&&rfe(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}/** 427 * @remix-run/router v1.23.0 428 * 429 * Copyright (c) Remix Software Inc. 430 * 431 * This source code is licensed under the MIT license found in the 432 * LICENSE.md file in the root directory of this source tree. 433 * 434 * @license MIT 435 */function ZT(){return ZT=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},ZT.apply(this,arguments)}var mg;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(mg||(mg={}));const dY="popstate";function hIe(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:s,hash:o}=n.location;return U6("",{pathname:a,search:s,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:C5(i)}return mIe(t,r,null,e)}function Ss(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ffe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pIe(){return Math.random().toString(36).substr(2,8)}function fY(e,t){return{usr:e.state,key:e.key,idx:t}}function U6(e,t,r,n){return r===void 0&&(r=null),ZT({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rx(t):t,{state:r,key:t&&t.key||n||pIe()})}function C5(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 rx(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 mIe(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,s=i.history,o=mg.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(ZT({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){o=mg.Pop;let _=c(),y=_==null?null:_-u;u=_,l&&l({action:o,location:m.location,delta:y})}function f(_,y){o=mg.Push;let v=U6(m.location,_,y);u=c()+1;let b=fY(v,u),w=m.createHref(v);try{s.pushState(b,"",w)}
vendor: 3,354 bytes, line 435
435catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(w)}a&&l&&l({action:o,location:m.location,delta:1})}function h(_,y){o=mg.Replace;let v=U6(m.location,_,y);u=c();let b=fY(v,u),w=m.createHref(v);s.replaceState(b,"",w),a&&l&&l({action:o,location:m.location,delta:0})}function p(_){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof _=="string"?_:C5(_);return v=v.replace(/ $/,"%20"),Ss(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return o},get location(){return e(i,s)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(dY,d),l=_,()=>{i.removeEventListener(dY,d),l=null}},createHref(_){return t(i,_)},createURL:p,encodeLocation(_){let y=p(_);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:h,go(_){return s.go(_)}};return m}var hY;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(hY||(hY={}));function gIe(e,t,r){return r===void 0&&(r="/"),yIe(e,t,r,!1)}function yIe(e,t,r,n){let i=typeof t=="string"?rx(t):t,a=zb(i.pathname||"/",r);if(a==null)return null;let s=hfe(e);vIe(s);let o=null;for(let l=0;o==null&&l<s.length;++l){let u=MIe(a);o=CIe(s[l],u,n)}return o}function hfe(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,s,o)=>{let l={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};l.relativePath.startsWith("/")&&(Ss(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=$g([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(Ss(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hfe(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:SIe(u,a.index),routesMeta:c})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let l of pfe(a.path))i(a,s,l)}),t}function pfe(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let s=pfe(n.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),i&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function vIe(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:AIe(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const _Ie=/^:[\w-]+$/,bIe=3,wIe=2,xIe=1,EIe=10,TIe=-2,pY=e=>e==="*";function SIe(e,t){let r=e.split("/"),n=r.length;return r.some(pY)&&(n+=TIe),t&&(n+=wIe),r.filter(i=>!pY(i)).reduce((i,a)=>i+(_Ie.test(a)?bIe:a===""?xIe:EIe),n)}function AIe(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function CIe(e,t,r){let{routesMeta:n}=e,i={},a="/",s=[];for(let o=0;o<n.length;++o){let l=n[o],u=o===n.length-1,c=a==="/"?t:t.slice(a.length)||"/",d=P5({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=P5({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 9,311 bytes, lines 435-444
435Object.assign(i,d.params),s.push({params:i,pathname:$g([a,d.pathname]),pathnameBase:IIe($g([a,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(a=$g([a,d.pathnameBase]))}return s}function P5(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=PIe(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let m=o[d]||"";s=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const p=o[d];return h&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:s,pattern:e}}function PIe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ffe(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function MIe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ffe(!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 zb(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 kIe(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?rx(e):e;return{pathname:r?r.startsWith("/")?r:OIe(r,t):t,search:DIe(n),hash:LIe(i)}}function OIe(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function tD(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 NIe(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Kz(e,t){let r=NIe(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Yz(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=rx(e):(i=ZT({},e),Ss(!i.pathname||!i.pathname.includes("?"),tD("?","pathname","search",i)),Ss(!i.pathname||!i.pathname.includes("#"),tD("#","pathname","hash",i)),Ss(!i.search||!i.search.includes("#"),tD("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,o;if(s==null)o=r;else{let d=t.length-1;if(!n&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}o=d>=0?t[d]:"/"}let l=kIe(i,o),u=s&&s!=="/"&&s.endsWith("/"),c=(a||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const $g=e=>e.join("/").replace(/\/\/+/g,"/"),IIe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),DIe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,LIe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function jIe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const mfe=["post","put","patch","delete"];new Set(mfe);const RIe=["get",...mfe];new Set(RIe);/** 436 * React Router v6.30.1 437 * 438 * Copyright (c) Remix Software Inc. 439 * 440 * This source code is licensed under the MIT license found in the 441 * LICENSE.md file in the root directory of this source tree. 442 * 443 * @license MIT 444 */function JT(){return JT=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},JT.apply(this,arguments)}const JO=R.createContext(null),gfe=R.createContext(null),cm=R.createContext(null),eN=R.createContext(null),dm=R.createContext({outlet:null,matches:[],isDataRoute:!1}),yfe=R.createContext(null);function $Ie(e,t){let{relative:r}=t===void 0?{}:t;nx()||Ss(!1);let{basename:n,navigator:i}=R.useContext(cm),{hash:a,pathname:s,search:o}=tN(e,{relative:r}),l=s;return n!=="/"&&(l=s==="/"?n:$g([n,s])),i.createHref({pathname:l,search:o,hash:a})}function nx(){return R.useContext(eN)!=null}function rp(){return nx()||Ss(!1),R.useContext(eN).location}function vfe(e){R.useContext(cm).static||R.useLayoutEffect(e)}function ix(){let{isDataRoute:e}=R.useContext(dm);return e?ZIe():FIe()}function FIe(){nx()||Ss(!1);let e=R.useContext(JO),{basename:t,future:r,navigator:n}=R.useContext(cm),{matches:i}=R.useContext(dm),{pathname:a}=rp(),s=JSON.stringify(Kz(i,r.v7_relativeSplatPath)),o=R.useRef(!1);return vfe(()=>{o.current=!0}),R.useCallback(function(u,c){if(c===void 0&&(c={}),!o.current)return;if(typeof u=="number"){n.go(u);return}let d=Yz(u,JSON.parse(s),a,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:$g([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,s,a,e])}function BIe(){let{matches:e}=R.useContext(dm),t=e[e.length-1];return t?t.params:{}}function tN(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=R.useContext(cm),{matches:i}=R.useContext(dm),{pathname:a}=rp(),s=JSON.stringify(Kz(i,n.v7_relativeSplatPath));return R.useMemo(()=>Yz(e,JSON.parse(s),a,r==="path"),[e,s,a,r])}function zIe(e,t){return UIe(e,t)}function UIe(e,t,r,n){nx()||Ss(!1);let{navigator:i}=R.useContext(cm),{matches:a}=R.useContext(dm),s=a[a.length-1],o=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=rp(),c;if(t){var d;let _=typeof t=="string"?rx(t):t;l==="/"||(d=_.pathname)!=null&&d.startsWith(l)||Ss(!1),c=_}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let _=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(_.length).join("/")}let p=gIe(e,{pathname:h}),m=qIe(p&&p.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:$g([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:$g([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),a,r,n);return t&&m?R.createElement(eN.Provider,{value:{location:JT({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:mg.Pop}},m):m}function WIe(){let e=QIe(),t=jIe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),r?R.createElement("pre",{style:i},r):null,null)}const VIe=R.createElement(WIe,null);class HIe extends R.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?R.createElement(dm.Provider,{value:this.props.routeContext},R.createElement(yfe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function GIe(e){let{routeContext:t,match:r,children:n}=e,i=R.useContext(JO);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),R.createElement(dm.Provider,{value:t},n)}function qIe(e,t,r,n){var i;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 s=e,o=(i=r)==null?void 0:i.errors;if(o!=null){let c=s.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);c>=0||Ss(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<s.length;c++){let d=s[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,p=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||p){l=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,f)=>{let h,p=!1,m=null,_=null;r&&(h=o&&d.route.id?o[d.route.id]:void 0,m=d.route.errorElement||VIe,l&&(u<0&&f===0?(p=!0,_=null):u===f&&(p=!0,_=d.route.hydrateFallbackElement||null)));let y=t.concat(s.slice(0,f+1)),v=()=>{let b;return h?b=m:p?b=_:d.route.Component?b=R.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,R.createElement(GIe,{match:d,routeC
444ontext:{outlet:c,matches:y,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?R.createElement(HIe,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var _fe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_fe||{}),M5=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}(M5||{});function KIe(e){let t=R.useContext(JO);return t||Ss(!1),t}function YIe(e){let t=R.useContext(gfe);return t||Ss(!1),t}function XIe(e){let t=R.useContext(dm);return t||Ss(!1),t}function bfe(e){let t=XIe(),r=t.matches[t.matches.length-1];return r.route.id||Ss(!1),r.route.id}function QIe(){var e;let t=R.useContext(yfe),r=YIe(M5.UseRouteError),n=bfe(M5.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function ZIe(){let{router:e}=KIe(_fe.UseNavigateStable),t=bfe(M5.UseNavigateStable),r=R.useRef(!1);return vfe(()=>{r.current=!0}),R.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,JT({fromRouteId:t},a)))},[e,t])}function JIe(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function e4e(e){let{to:t,replace:r,state:n,relative:i}=e;nx()||Ss(!1);let{future:a,static:s}=R.useContext(cm),{matches:o}=R.useContext(dm),{pathname:l}=rp(),u=ix(),c=Yz(t,Kz(o,a.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(c);return R.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:i}),[u,d,i,r,n]),null}function Zi(e){Ss(!1)}function t4e(e){let{basename:t="/",children:r=null,location:n,navigationType:i=mg.Pop,navigator:a,static:s=!1,future:o}=e;nx()&&Ss(!1);let l=t.replace(/^\/*/,"/"),u=R.useMemo(()=>({basename:l,navigator:a,static:s,future:JT({v7_relativeSplatPath:!1},o)}),[l,o,a,s]);typeof n=="string"&&(n=rx(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default"}=n,m=R.useMemo(()=>{let _=zb(c,l);return _==null?null:{location:{pathname:_,search:d,hash:f,state:h,key:p},navigationType:i}},[l,c,d,f,h,p,i]);return m==null?null:R.createElement(cm.Provider,{value:u},R.createElement(eN.Provider,{children:r,value:m}))}function r4e(e){let{children:t,location:r}=e;return zIe(W6(t),r)}new Promise(()=>{});function W6(e,t){t===void 0&&(t=[]);let r=[];return R.Children.forEach(e,(n,i)=>{if(!R.isValidElement(n))return;let a=[...t,i];if(n.type===R.Fragment){r.push.apply(r,W6(n.props.children,a));return}n.type!==Zi&&Ss(!1),!n.props.index||!n.props.children||Ss(!1);let s={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&&(s.children=W6(n.props.children,a)),r.push(s)}),r}/** 445 * React Router DOM v6.30.1 446 * 447 * Copyright (c) Remix Software Inc. 448 * 449 * This source code is licensed under the MIT license found in the 450 * LICENSE.md file in the root directory of this source tree. 451 * 452 * @license MIT 453 */function k5(){return k5=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},k5.apply(this,arguments)}function wfe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function n4e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function i4e(e,t){return e.button===0&&(!t||t==="_self")&&!n4e(e)}const a4e=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],s4e=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],o4e="6";try{window.__reactRouterVersion=o4e}catch{}const l4e=R.createContext({isTransitioning:!1}),u4e="startTransition",mY=OB[u4e];function c4e(e){let{basename:t,children:r,future:n,window:i}=e,a=R.useRef();a.current==null&&(a.current=hIe({window:i,v5Compat:!0}));let s=a.current,[o,l]=R.useState({action:s.action,location:s.location}),{v7_startTransition:u}=n||{},c=R.useCallback(d=>{u&&mY?mY(()=>l(d)):l(d)},[l,u]);return R.useLayoutEffect(()=>s.listen(c),[s,c]),R.useEffect(()=>JIe(n),[n]),R.createElement(t4e,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:s,future:n})}const d4e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f4e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rs=R.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:s,state:o,target:l,to:u,preventScrollReset:c,viewTransition:d}
453=t,f=wfe(t,a4e),{basename:h}=R.useContext(cm),p,m=!1;if(typeof u=="string"&&f4e.test(u)&&(p=u,d4e))try{let b=new URL(window.location.href),w=u.startsWith("//")?new URL(b.protocol+u):new URL(u),x=zb(w.pathname,h);w.origin===b.origin&&x!=null?u=x+w.search+w.hash:m=!0}catch{}let _=$Ie(u,{relative:i}),y=m4e(u,{replace:s,state:o,target:l,preventScrollReset:c,relative:i,viewTransition:d});function v(b){n&&n(b),b.defaultPrevented||y(b)}return R.createElement("a",k5({},f,{href:p||_,onClick:m||a?n:v,ref:r,target:l}))}),h4e=R.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:s=!1,style:o,to:l,viewTransition:u,children:c}=t,d=wfe(t,s4e),f=tN(l,{relative:d.relative}),h=rp(),p=R.useContext(gfe),{navigator:m,basename:_}=R.useContext(cm),y=p!=null&&g4e(f)&&u===!0,v=m.encodeLocation?m.encodeLocation(f).pathname:f.pathname,b=h.pathname,w=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&_&&(w=zb(w,_)||w);const x=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let E=b===v||!s&&b.startsWith(v)&&b.charAt(x)==="/",T=w!=null&&(w===v||!s&&w.startsWith(v)&&w.charAt(v.length)==="/"),S={isActive:E,isPending:T,isTransitioning:y},A=E?n:void 0,C;typeof a=="function"?C=a(S):C=[a,E?"active":null,T?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let k=typeof o=="function"?o(S):o;return R.createElement(Rs,k5({},d,{"aria-current":A,className:C,ref:r,style:k,to:l,viewTransition:u}),typeof c=="function"?c(S):c)});var V6;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(V6||(V6={}));var gY;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(gY||(gY={}));function p4e(e){let t=R.useContext(JO);return t||Ss(!1),t}function m4e(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:s,viewTransition:o}=t===void 0?{}:t,l=ix(),u=rp(),c=tN(e,{relative:s});return R.useCallback(d=>{if(i4e(d,r)){d.preventDefault();let f=n!==void 0?n:C5(u)===C5(c);l(e,{replace:f,state:i,preventScrollReset:a,relative:s,viewTransition:o})}},[u,l,c,n,i,r,e,a,s,o])}function g4e(e,t){t===void 0&&(t={});let r=R.useContext(l4e);r==null&&Ss(!1);let{basename:n}=p4e(V6.useViewTransitionState),i=tN(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=zb(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=zb(r.nextLocation.pathname,n)||r.nextLocation.pathname;return P5(i.pathname,s)!=null||P5(i.pathname,a)!=null}var H6=function(e,t){return H6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},H6(e,t)};function xfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");H6(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Fd=function(){return Fd=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Fd.apply(this,arguments)};function d0(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Efe(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function Tfe(e,t){return function(r,n){t(r,n,e)}}function Sfe(e,t,r,n,i,a){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var o=n.kind,l=o==="getter"?"get":o==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,c=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d,f=!1,h=r.length-1;h>=0;h--){var p={};for(var m in n)p[m]=m==="access"?{}:n[m];for(var m in n.access)p.access[m]=n.access[m];p.addInitializer=function(y){if(f)throw new TypeError("Cannot add initializer
vendor: 5,684 bytes, line 453
453s after decoration has completed");a.push(s(y||null))};var _=(0,r[h])(o==="accessor"?{get:c.get,set:c.set}:c[l],p);if(o==="accessor"){if(_===void 0)continue;if(_===null||typeof _!="object")throw new TypeError("Object expected");(d=s(_.get))&&(c.get=d),(d=s(_.set))&&(c.set=d),(d=s(_.init))&&i.unshift(d)}else(d=s(_))&&(o==="field"?i.unshift(d):c[l]=d)}u&&Object.defineProperty(u,n.name,c),f=!0}function Afe(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function Cfe(e){return typeof e=="symbol"?e:"".concat(e)}function Pfe(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Mfe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Gr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(c){try{u(n.next(c))}catch(d){s(d)}}function l(c){try{u(n.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((n=n.apply(e,t||[])).next())})}function kfe(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var rN=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};function Ofe(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&rN(t,e,r)}function O5(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xz(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function Nfe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Xz(arguments[t]));return e}function Ife(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)n[i]=a[s];return n}function Qz(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;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 Ub(e){return this instanceof Ub?(this.v=e,this):new Ub(e)}function Dfe(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(p){return Promise.resolve(p).then(h,d)}}function o(h,p){n[h]&&(i[h]=function(m){return new Promise(function(_,y){a.push([h,m,_,y])>1||l(h,m)})},p&&(i[h]=p(i[h])))}function l(h,p){try{u(n[h](p))}catch(m){f(a[0][3],m)}}function u(h){h.value instanceof Ub?Promise.resolve(h.value.v).then(c,d):f(a[0][2],h)}function c(h){l("next",h)}function d(h){l("throw",h)}function f(h,p){h(p),a.shift(),a.length&&l(a[0][0],a[0][1])}}function Lfe(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,a){t[i]=e[i]?function(s){return(r=!r)?{value:Ub(e[i](s)),done:!1}:a?a(s):s}:a}}function jfe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof O5=="function"?O5(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,l){s=e[a](s),i(o,l,s.done,s.value)})}}function i(a,s,o,l){Promise.resolve(l).then(function(u){a({value:u,done:o})},s)}}function Rfe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var y4e=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},G6=function(e){return G6=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},G6(e)};
vendor: 2,882 bytes, line 453
453function $fe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=G6(e),n=0;n<r.length;n++)r[n]!=="default"&&rN(t,e,r[n]);return y4e(t,e),t}function Ffe(e){return e&&e.__esModule?e:{default:e}}function Bfe(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function zfe(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function Ufe(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Wfe(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var v4e=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function Vfe(e){function t(a){e.error=e.hasError?new v4e(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var r,n=0;function i(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(i,function(s){return t(s),i()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function Hfe(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,a,s){return n?t?".jsx":".js":i&&(!a||!s)?r:i+a+"."+s.toLowerCase()+"js"}):e}const _4e={__extends:xfe,__assign:Fd,__rest:d0,__decorate:Efe,__param:Tfe,__esDecorate:Sfe,__runInitializers:Afe,__propKey:Cfe,__setFunctionName:Pfe,__metadata:Mfe,__awaiter:Gr,__generator:kfe,__createBinding:rN,__exportStar:Ofe,__values:O5,__read:Xz,__spread:Nfe,__spreadArrays:Ife,__spreadArray:Qz,__await:Ub,__asyncGenerator:Dfe,__asyncDelegator:Lfe,__asyncValues:jfe,__makeTemplateOb
453ject:Rfe,__importStar:$fe,__importDefault:Ffe,__classPrivateFieldGet:Bfe,__classPrivateFieldSet:zfe,__classPrivateFieldIn:Ufe,__addDisposableResource:Wfe,__disposeResources:Vfe,__rewriteRelativeImportExtension:Hfe},b4e=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Wfe,get __assign(){return Fd},__asyncDelegator:Lfe,__asyncGenerator:Dfe,__asyncValues:jfe,__await:Ub,__awaiter:Gr,__classPrivateFieldGet:Bfe,__classPrivateFieldIn:Ufe,__classPrivateFieldSet:zfe,__createBinding:rN,__decorate:Efe,__disposeResources:Vfe,__esDecorate:Sfe,__exportStar:Ofe,__extends:xfe,__generator:kfe,__importDefault:Ffe,__importStar:$fe,__makeTemplateObject:Rfe,__metadata:Mfe,__param:Tfe,__propKey:Cfe,__read:Xz,__rest:d0,__rewriteRelativeImportExtension:Hfe,__runInitializers:Afe,__setFunctionName:Pfe,__spread:Nfe,__spreadArray:Qz,__spreadArrays:Ife,__values:O5,default:_4e},Symbol.toStringTag,{value:"Module"})),w4e="modulepreload",x4e=function(e){return"/"+e},yY={},Wp=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=x4e(l),l in yY)return;yY[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":w4e,u||(d.as="script"),d.crossOrigin="",d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),u)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},E4e=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>Wp(async()=>{const{default:n}=await Promise.resolve().then(()=>n_);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)};class Zz extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class vY extends Zz{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class _Y extends Zz{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class bY extends Zz{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var q6;(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"})(q6||(q6={}));class T4e{constructor(t,{headers:r={},customFetch:n,region:i=q6.Any}={}){this.url=t,this.headers=r,this.region=i,this.fetch=E4e(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Gr(this,arguments,void 0,function*(r,n={}){var i;try{const{headers:a,method:s,body:o,signal:l}=n;let u={},{region:c}=n;c||(c=this.region);const d=new URL(`${this.url}/${r}`);c&&c!=="any"&&(u["x-region"]=c,d.searchParams.set("forceFunctionRegion",c));let f;o&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(u["Content-Type"]="application/octet-stream",f=o):typeof o=="string"?(u["Content-Type"]="text/plain",f=o):typeof FormData<"u"&&o instanceof FormData?f=o:(u["Content-Type"]="application/json",f=JSON.stringify(o)):f=o;const h=yield this.fetch(d.toString(),{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},u),this.headers),a),body:f,signal:l}).catch(y=>{throw y.name==="AbortError"?y:new vY(y)}),p=h.headers.get("x-relay-error");if(p&&p==="true")throw new _Y(h);if(!h.ok)throw new bY(h);let m=((i=h.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),_;return m==="application/json"?_=yield h.json():m==="application/octet-stream"||m==="application/pdf"?_=yield h.blob():m==="text/event-stream"?_=h:m==="multipart/form-data"?_=yield h.formData():_=yield h.text(),{data:_,error:null,response:h}}catch(a){return a instanceof Error&&a.name==="AbortError"?{data:null,error:new vY(a)}:{data:null,error:a,response:a instanceof bY||a instanceof _Y?a.context:void 0}}})}}var wu={};const ax=AB(b4e);var AP={},CP={},PP={},MP={},kP={},S4e=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Wb=S4e();const A4e=Wb.fetch,Gfe=Wb.fetch.bind(Wb),qfe=Wb.Headers,C4e=Wb.Request,P4e=Wb.Response,n_=Object.freeze(Object.defineProperty({__proto__:null,Headers:qfe,Request:C4e,Response:P4e,default:Gfe,fetch:A4e},Symbol.toStringTag,{value:"Module"})),M4e=AB(n_);var OP={},wY;function Kfe(){if(wY)return OP;
453wY=1,Object.defineProperty(OP,"__esModule",{value:!0});class e extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.code=r.code}}return OP.default=e,OP}var xY;function Yfe(){if(xY)return kP;xY=1,Object.defineProperty(kP,"__esModule",{value:!0});const e=ax,t=e.__importDefault(M4e),r=e.__importDefault(Kfe());class n{constructor(a){var s,o;this.shouldThrowOnError=!1,this.method=a.method,this.url=a.url,this.headers=new Headers(a.headers),this.schema=a.schema,this.body=a.body,this.shouldThrowOnError=(s=a.shouldThrowOnError)!==null&&s!==void 0?s:!1,this.signal=a.signal,this.isMaybeSingle=(o=a.isMaybeSingle)!==null&&o!==void 0?o:!1,a.fetch?this.fetch=a.fetch:typeof fetch>"u"?this.fetch=t.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(a,s){return this.headers=new Headers(this.headers),this.headers.set(a,s),this}then(a,s){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 o=this.fetch;let l=o(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async u=>{var c,d,f,h;let p=null,m=null,_=null,y=u.status,v=u.statusText;if(u.ok){if(this.method!=="HEAD"){const E=await u.text();E===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((c=this.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?m=E:m=JSON.parse(E))}const w=(d=this.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),x=(f=u.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");w&&x&&x.length>1&&(_=parseInt(x[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(m)&&(m.length>1?(p={code:"PGRST116",details:`Results contain ${m.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},m=null,_=null,y=406,v="Not Acceptable"):m.length===1?m=m[0]:m=null)}else{const w=await u.text();try{p=JSON.parse(w),Array.isArray(p)&&u.status===404&&(m=[],p=null,y=200,v="OK")}catch{u.status===404&&w===""?(y=204,v="No Content"):p={message:w}}if(p&&this.isMaybeSingle&&(!((h=p==null?void 0:p.details)===null||h===void 0)&&h.includes("0 rows"))&&(p=null,y=200,v="OK"),p&&this.shouldThrowOnError)throw new r.default(p)}return{error:p,data:m,count:_,status:y,statusText:v}});return this.shouldThrowOnError||(l=l.catch(u=>{var c,d,f;return{error:{message:`${(c=u==null?void 0:u.name)!==null&&c!==void 0?c:"FetchError"}: ${u==null?void 0:u.message}`,details:`${(d=u==null?void 0:u.stack)!==null&&d!==void 0?d:""}`,hint:"",code:`${(f=u==null?void 0:u.code)!==null&&f!==void 0?f:""}`},data:null,count:null,status:0,statusText:""}})),l.then(a,s)}returns(){return this}overrideTypes(){return this}}return kP.default=n,kP}var EY;function Xfe(){if(EY)return MP;
453EY=1,Object.defineProperty(MP,"__esModule",{value:!0});const t=ax.__importDefault(Yfe());class r extends t.default{select(i){let a=!1;const s=(i??"*").split("").map(o=>/\s/.test(o)&&!a?"":(o==='"'&&(a=!a),o)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(i,{ascending:a=!0,nullsFirst:s,foreignTable:o,referencedTable:l=o}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${i}.${a?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(i,{foreignTable:a,referencedTable:s=a}={}){const o=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${i}`),this}range(i,a,{foreignTable:s,referencedTable:o=s}={}){const l=typeof o>"u"?"offset":`${o}.offset`,u=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(l,`${i}`),this.url.searchParams.set(u,`${a-i+1}`),this}abortSignal(i){return this.signal=i,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}explain({analyze:i=!1,verbose:a=!1,settings:s=!1,buffers:o=!1,wal:l=!1,format:u="text"}={}){var c;const d=[i?"analyze":null,a?"verbose":null,s?"settings":null,o?"buffers":null,l?"wal":null].filter(Boolean).join("|"),f=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${f}"; options=${d};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(i){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${i}`),this}}return MP.default=r,MP}var TY;function Jz(){if(TY)return PP;TY=1,Object.defineProperty(PP,"__esModule",{value:!0});const t=ax.__importDefault(Xfe()),r=new RegExp("[,()]");class n extends t.default{eq(a,s){return this.url.searchParams.append(a,`eq.${s}`),this}neq(a,s){return this.url.searchParams.append(a,`neq.${s}`),this}gt(a,s){return this.url.searchParams.append(a,`gt.${s}`),this}gte(a,s){return this.url.searchParams.append(a,`gte.${s}`),this}lt(a,s){return this.url.searchParams.append(a,`lt.${s}`),this}lte(a,s){return this.url.searchParams.append(a,`lte.${s}`),this}like(a,s){return this.url.searchParams.append(a,`like.${s}`),this}likeAllOf(a,s){return this.url.searchParams.append(a,`like(all).{${s.join(",")}}`),this}likeAnyOf(a,s){return this.url.searchParams.append(a,`like(any).{${s.join(",")}}`),this}ilike(a,s){return this.url.searchParams.append(a,`ilike.${s}`),this}ilikeAllOf(a,s){return this.url.searchParams.append(a,`ilike(all).{${s.join(",")}}`),this}ilikeAnyOf(a,s){return this.url.searchParams.append(a,`ilike(any).{${s.join(",")}}`),this}is(a,s){return this.url.searchParams.append(a,`is.${s}`),this}in(a,s){const o=Array.from(new Set(s)).map(l=>typeof l=="string"&&r.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(a,`in.(${o})`),this}contains(a,s){return typeof s=="string"?this.url.searchParams.append(a,`cs.${s}`):Array.isArray(s)?this.url.searchParams.append(a,`cs.{${s.join(",")}}`):this.url.searchParams.append(a,`cs.${JSON.stringify(s)}`),this}containedBy(a,s){return typeof s=="string"?this.url.searchParams.append(a,`cd.${s}`):Array.isArray(s)?this.url.searchParams.append(a,`cd.{${s.join(",")}}`):this.url.searchParams.append(a,`cd.${JSON.stringify(s)}`),this}rangeGt(a,s){return this.url.searchParams.append(a,`sr.${s}`),this}rangeGte(a,s){return this.url.searchParams.append(a,`nxl.${s}`),this}rangeLt(a,s){return this.url.searchParams.append(a,`sl.${s}`),this}rangeLte(a,s){return this.url.searchParams.append(a,`nxr.${s}`),this}rangeAdjacent(a,s){return this.url.searchParams.append(a,`adj.${s}`),this}overlaps(a,s){return typeof s=="string"?this.url.searchParams.append(a,`ov.${s}`):this.url.searchParams.append(a,`ov.{${s.join(",")}}`),this}textSearch(a,s,{config:o,type:l}={}){let u="";l==="plain"?u="pl":l==="phrase"?u="ph":l==="websearch"&&(u="w");const c=o===void 0?"":`(${o})`;return this.url.searchParams.append(a,`${u}fts${c}.${s}`),this}
453match(a){return Object.entries(a).forEach(([s,o])=>{this.url.searchParams.append(s,`eq.${o}`)}),this}not(a,s,o){return this.url.searchParams.append(a,`not.${s}.${o}`),this}or(a,{foreignTable:s,referencedTable:o=s}={}){const l=o?`${o}.or`:"or";return this.url.searchParams.append(l,`(${a})`),this}filter(a,s,o){return this.url.searchParams.append(a,`${s}.${o}`),this}}return PP.default=n,PP}var SY;function Qfe(){if(SY)return CP;SY=1,Object.defineProperty(CP,"__esModule",{value:!0});const t=ax.__importDefault(Jz());class r{constructor(i,{headers:a={},schema:s,fetch:o}){this.url=i,this.headers=new Headers(a),this.schema=s,this.fetch=o}select(i,a){const{head:s=!1,count:o}=a??{},l=s?"HEAD":"GET";let u=!1;const c=(i??"*").split("").map(d=>/\s/.test(d)&&!u?"":(d==='"'&&(u=!u),d)).join("");return this.url.searchParams.set("select",c),o&&this.headers.append("Prefer",`count=${o}`),new t.default({method:l,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(i,{count:a,defaultToNull:s=!0}={}){var o;const l="POST";if(a&&this.headers.append("Prefer",`count=${a}`),s||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const u=i.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);this.url.searchParams.set("columns",c.join(","))}}return new t.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}upsert(i,{onConflict:a,ignoreDuplicates:s=!1,count:o,defaultToNull:l=!0}={}){var u;const c="POST";if(this.headers.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),a!==void 0&&this.url.searchParams.set("on_conflict",a),o&&this.headers.append("Prefer",`count=${o}`),l||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const d=i.reduce((f,h)=>f.concat(Object.keys(h)),[]);if(d.length>0){const f=[...new Set(d)].map(h=>`"${h}"`);this.url.searchParams.set("columns",f.join(","))}}return new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}update(i,{count:a}={}){var s;const o="PATCH";return a&&this.headers.append("Prefer",`count=${a}`),new t.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}delete({count:i}={}){var a;const s="DELETE";return i&&this.headers.append("Prefer",`count=${i}`),new t.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}}return CP.default=r,CP}var AY;function k4e(){if(AY)return AP;AY=1,Object.defineProperty(AP,"__esModule",{value:!0});const e=ax,t=e.__importDefault(Qfe()),r=e.__importDefault(Jz());class n{constructor(a,{headers:s={},schema:o,fetch:l}={}){this.url=a,this.headers=new Headers(s),this.schemaName=o,this.fetch=l}from(a){const s=new URL(`${this.url}/${a}`);return new t.default(s,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(a){return new n(this.url,{headers:this.headers,schema:a,fetch:this.fetch})}rpc(a,s={},{head:o=!1,get:l=!1,count:u}={}){var c;let d;const f=new URL(`${this.url}/rpc/${a}`);let h;o||l?(d=o?"HEAD":"GET",Object.entries(s).filter(([m,_])=>_!==void 0).map(([m,_])=>[m,Array.isArray(_)?`{${_.join(",")}}`:`${_}`]).forEach(([m,_])=>{f.searchParams.append(m,_)})):(d="POST",h=s);const p=new Headers(this.headers);return u&&p.set("Prefer",`count=${u}`),new r.default({method:d,url:f,headers:p,schema:this.schemaName,body:h,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}}return AP.default=n,AP}Object.defineProperty(wu,"__esModule",{value:!0});var Zfe=wu.PostgrestError=lhe=wu.PostgrestBuilder=she=wu.PostgrestTransformBuilder=ihe=wu.PostgrestFilterBuilder=rhe=wu.PostgrestQueryBuilder=ehe=wu.PostgrestClient=void 0;const sx=ax,Jfe=sx.__importDefault(k4e());var ehe=wu.PostgrestClient=Jfe.default;const the=sx.__importDefault(Qfe());var rhe=wu.PostgrestQueryBuilder=the.default;const nhe=sx.__importDefault(Jz());var ihe=wu.PostgrestFilterBuilder=nhe.default;const ahe=sx.__importDefault(Xfe());var she=wu.PostgrestTransformBuilder=ahe.default;
453const ohe=sx.__importDefault(Yfe());var lhe=wu.PostgrestBuilder=ohe.default;const uhe=sx.__importDefault(Kfe());Zfe=wu.PostgrestError=uhe.default;var che=wu.default={PostgrestClient:Jfe.default,PostgrestQueryBuilder:the.default,PostgrestFilterBuilder:nhe.default,PostgrestTransformBuilder:ahe.default,PostgrestBuilder:ohe.default,PostgrestError:uhe.default};const O4e=fle({__proto__:null,get PostgrestBuilder(){return lhe},get PostgrestClient(){return ehe},get PostgrestError(){return Zfe},get PostgrestFilterBuilder(){return ihe},get PostgrestQueryBuilder(){return rhe},get PostgrestTransformBuilder(){return she},default:che},[wu]),{PostgrestClient:N4e,PostgrestQueryBuilder:o5t,PostgrestFilterBuilder:l5t,PostgrestTransformBuilder:u5t,PostgrestBuilder:c5t,PostgrestError:d5t}=che||O4e;class I4e{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."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,i=parseInt(n.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 454import ws from "ws" 455new 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+=` 456 457Suggested 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 D4e="2.77.0",L4e=`realtime-js/${D4e}`,j4e="1.0.0",K6=1e4,R4e=1e3,$4e=100;var VE;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(VE||(VE={}));var ko;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(ko||(ko={}));var Lf;(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"})(Lf||(Lf={}));var Y6;(function(e){e.websocket="websocket"})(Y6||(Y6={}));var wy;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(wy||(wy={}));class F4e{constructor(){this.HEADER_LENGTH=1}decode(t,r){return t.constructor===ArrayBuffer?r(this._binaryDecode(t)):r(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const r=new DataView(t),n=new TextDecoder;return this._decodeBroadcast(t,r,n)}_decodeBroadcast(t,r,n){const i=r.getUint8(1),a=r.getUint8(2);let s=this.HEADER_LENGTH+2;const o=n.decode(t.slice(s,s+i));s=s+i;const l=n.decode(t.slice(s,s+a));s=s+a;const u=JSON.parse(n.decode(t.slice(s,t.byteLength)));return{ref:null,topic:o,event:l,payload:u}}}class dhe{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 ka;(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"})(ka||(ka={}));const CY=(e,t,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((a,s)=>(a[s]=B4e(s,e,t,i),a),{}):{}},B4e=(e,t,r,n)=>{const i=t.find(o=>o.name===e),a=i==null?void 0:i.type,s=r[e];return a&&!n.includes(a)?fhe(a,s):X6(s)},fhe=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return V4e(t,r)}switch(e){case ka.bool:return z4e(t);case ka.float4:case ka.float8:case ka.int2:case ka.int4:case ka.int8:case ka.numeric:case ka.oid:return U4e(t);case ka.json:case ka.jsonb:return W4e(t);case ka.timestamp:return H4e(t);case ka.abstime:case ka.date:case ka.daterange:case ka.int4range:case ka.int8range:case ka.money:case ka.reltime:case ka.text:case ka.time:case ka.timestamptz:case ka.timetz:case ka.tsrange:case ka.tstzrange:return X6(t);default:return X6(t)}},X6=e=>e,z4e=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},U4e=e=>{if(typeof e=="string"){const t=parseFloat(e);
457if(!Number.isNaN(t))return t}return e},W4e=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},V4e=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let a;const s=e.slice(1,r);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(o=>fhe(t,o))}return e},H4e=e=>typeof e=="string"?e.replace(" ","T"):e,hhe=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 rD{constructor(t,r,n={},i=K6){this.channel=t,this.event=r,this.payload=n,this.timeout=i,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 PY;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(PY||(PY={}));class HE{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,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=HE.syncState(this.state,i,a,s),this.pendingDiffs.forEach(l=>{this.state=HE.syncDiff(this.state,l,a,s)}),this.pendingDiffs=[],o()}),this.channel._on(n.diff,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=HE.syncDiff(this.state,i,a,s),o())}),this.onJoin((i,a,s)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:s})}),this.onLeave((i,a,s)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,i){const a=this.cloneDeep(t),s=this.transformState(r),o={},l={};return this.map(a,(u,c)=>{s[u]||(l[u]=c)}),this.map(s,(u,c)=>{const d=a[u];if(d){const f=c.map(_=>_.presence_ref),h=d.map(_=>_.presence_ref),p=c.filter(_=>h.indexOf(_.presence_ref)<0),m=d.filter(_=>f.indexOf(_.presence_ref)<0);p.length>0&&(o[u]=p),m.length>0&&(l[u]=m)}else o[u]=c}),this.syncDiff(a,{joins:o,leaves:l},n,i)}static syncDiff(t,r,n,i){const{joins:a,leaves:s}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),i||(i=()=>{}),this.map(a,(o,l)=>{var u;const c=(u=t[o])!==null&&u!==void 0?u:[];if(t[o]=this.cloneDeep(l),c.length>0){const d=t[o].map(h=>h.presence_ref),f=c.filter(h=>d.indexOf(h.presence_ref)<0);t[o].unshift(...f)}n(o,c,l)}),this.map(s,(o,l)=>{let u=t[o];if(!u)return;const c=l.map(d=>d.presence_ref);u=u.filter(d=>c.indexOf(d.presence_ref)<0),t[o]=u,i(o,u,l),u.length===0&&delete t[o]}),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 i=t[n];return"metas"in i?r[n]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):r[n]=i,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 MY;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(MY||(MY={}));var GE;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(GE||(GE={}));var Ep;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ep||(Ep={}));class e7{constructor(t,r={config:{}},n){var i,a;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=ko.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 rD(this,Lf.join,this.params,this.timeout),this.rejoinTimer=new dhe(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=ko.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=ko.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=ko.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=ko.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=ko.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Lf.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new HE(this),this.broadcastEndpointURL=hhe(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.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,i,a;if(this.socket.isConnected()||this.socket.connect(),this.state==ko.closed){const{config:{broadcast:s,presence:o,private:l}}=this.params,u=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&i!==void 0?i:[],c=!!this.bindings[GE.PRESENCE]&&this.bindings[GE.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,d={},f={broadcast:s,presence:Object.assign(Object.assign({},o),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t(Ep.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t(Ep.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var p;if(this.socket.setAuth(),h===void 0){t==null||t(Ep.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,_=(p=m==null?void 0:m.length)!==null&&p!==void 0?p:0,y=[];for(let v=0;v<_;v++){const b=m[v],{filter:{event:w,schema:x,table:E,filter:T}}=b,S=h&&h[v];if(S&&S.event===w&&S.schema===x&&S.table===E&&S.filter===T)y.push(Object.assign(Object.assign({},b),{id:S.id}));else{this.unsubscribe(),this.state=ko.errored,t==null||t(Ep.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(Ep.SUBSCRIBED);return}}).receive("error",h=>{this.state=ko.errored,t==null||t(Ep.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Ep.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===ko.joined&&t===GE.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var i;const a=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const s={method:"POST",headers:{Authorization:a,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,s,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(o.status===202)return{success:!0};let l=o.statusText;
457try{const u=await o.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,i;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:s}=t,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,o,l;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(s=this.params)===null||s===void 0?void 0:s.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.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=ko.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Lf.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(i=>{n=new rD(this,Lf.leave,{},t),n.receive("ok",()=>{r(),i("ok")}).receive("timeout",()=>{r(),i("timed out")}).receive("error",()=>{i("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=ko.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),s=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),s}_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 i=new rD(this,t,r,n);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>$4e){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 i,a;const s=t.toLocaleLowerCase(),{close:o,error:l,leave:u,join:c}=Lf;if(n&&[o,l,u,c].indexOf(s)>=0&&n!==this._joinRef())return;let f=this._onMessage(s,r,n);if(r&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var p,m,_;return((p=h.filter)===null||p===void 0?void 0:p.event)==="*"||((_=(m=h.filter)===null||m===void 0?void 0:m.event)===null||_===void 0?void 0:_.toLocaleLowerCase())===s}).map(h=>h.callback(f,n)):(a=this.bindings[s])===null||a===void 0||a.filter(h=>{var p,m,_,y,v,b;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in h){const w=h.id,x=(p=h.filter)===null||p===void 0?void 0:p.event;return w&&((m=r.ids)===null||m===void 0?void 0:m.includes(w))&&(x==="*"||(x==null?void 0:x.toLocaleLowerCase())===((_=r.data)===null||_===void 0?void 0:_.type.toLocaleLowerCase()))}else{const w=(v=(y=h==null?void 0:h.filter)===null||y===void 0?void 0:y.event)===null||v===void 0?void 0:v.toLocaleLowerCase();return w==="*"||w===((b=r==null?void 0:r.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===s}).map(h=>{if(typeof f=="object"&&"ids"in f){const p=f.data,{schema:m,table:_,commit_timestamp:y,type:v,errors:b}=p;f=Object.assign(Object.assign({},{schema:m,table:_,commit_timestamp:y,eventType:v,new:{},old:{},errors:b}),this._getPayloadRecords(p))}h.callback(f,n)})}_isClosed(){return this.state===ko.closed}_isJoined(){return this.state===ko.joined}_isJoining(){return this.state===ko.joining}_isLeaving(){return this.state===ko.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const i=t.toLocaleLowerCase(),a={type:i,filter:r,callback:n};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===n&&e7.isEqual(i.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}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Lf.close,{},t)}_onError(t){this._on(Lf.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ko.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=CY(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=CY(t.columns,t.old_record)),r}}const nD=()=>{},NP={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},G4e=[1e3,2e3,5e3,1e4],q4e=1e4,K4e=` 458 addEventListener("message", (e) => { 459 if (e.data.event === "start") { 460 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 461 } 462 });`;class Y4e{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=K6,this.transport=null,this.heartbeatIntervalMs=NP.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=nD,this.ref=0,this.reconnectTimer=null,this.logger=nD,this.conn=null,this.sendBuffer=[],this.serializer
462=new F4e,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=i=>{let a;return i?a=i:typeof fetch>"u"?a=(...s)=>Wp(async()=>{const{default:o}=await Promise.resolve().then(()=>n_);return{default:o}},void 0).then(({default:o})=>o(...s)).catch(o=>{throw new Error(`Failed to load @supabase/node-fetch: ${o.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):a=fetch,(...s)=>a(...s)},!(!((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}/${Y6.websocket}`,this.httpEndpoint=hhe(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._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=I4e.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 463 464To use Realtime in Node.js, you need to provide a WebSocket implementation: 465 466Option 1: Use Node.js 22+ which has native WebSocket support 467Option 2: Install and provide the "ws" package: 468 469 npm install ws 470 471 import ws from "ws" 472 const client = new RealtimeClient(url, { 473 ...options, 474 transport: ws 475 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:j4e}))}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")},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 VE.connecting:return wy.Connecting;case VE.open:return wy.Open;case VE.closing:return wy.Closing;default:return wy.Closed}}isConnected(){return this.connectionState()===wy.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new e7(`realtime:${t}`,r,this);return this.channels.push(a),a}}push(t){const{topic:r,event:n,payload:i,ref:a}=t,s=()=>{this.encode(t,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${r} ${n} (${a})`,i),this.isConnected()?s():this.sendBuffer.push(s)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}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.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(R4e,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
475heduleTimeout()},NP.HEARTBEAT_TIMEOUT_FALLBACK);return}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")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:i,payload:a,ref:s}=r,o=s?`(${s})`:"",l=a.status||"";this.log("receive",`${l} ${n} ${i} ${o}`.trim(),a),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(i,a,s)),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))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),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.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_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
475heduleTimeout(),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(Lf.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",i=new URLSearchParams(r);return`${t}${n}${i}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([K4e],{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;t?r=t:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const i={access_token:r,version:L4e};r&&n.updateJoinPayload(i),n.joinedOnce&&n._isJoined()&&n._push(Lf.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){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(i){this.log("error",`error in ${t} callback`,i)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new dhe(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},NP.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,i,a,s,o,l,u,c;if(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:K6,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:NP.HEARTBEAT_INTERVAL,this.worker=(a=t==null?void 0:t.worker)!==null&&a!==void 0?a:!1,this.accessToken=(s=t==null?void 0:t.accessToken)!==null&&s!==void 0?s:null,this.heartbeatCallback=(o=t==null?void 0:t.heartbeatCallback)!==null&&o!==void 0?o:nD,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=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:d=>G4e[d-1]||q4e,this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(d,f)=>f(JSON.stringify(d)),this.decode=(c=t==null?void 0:t.decode)!==null&&c!==void 0?c:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}
475class t7 extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function ys(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class X4e extends t7{constructor(t,r,n){super(t),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Q6 extends t7{constructor(t,r){super(t),this.name="StorageUnknownError",this.originalError=r}}const r7=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>Wp(async()=>{const{default:n}=await Promise.resolve().then(()=>n_);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},Q4e=()=>Gr(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Wp(()=>Promise.resolve().then(()=>n_),void 0)).Response:Response}),Z6=e=>{if(Array.isArray(e))return e.map(r=>Z6(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[i]=Z6(n)}),t},Z4e=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)},iD=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),J4e=(e,t,r)=>Gr(void 0,void 0,void 0,function*(){const n=yield Q4e();e instanceof n&&!(r!=null&&r.noResolveJson)?e.json().then(i=>{const a=e.status||500,s=(i==null?void 0:i.statusCode)||a+"";t(new X4e(iD(i),a,s))}).catch(i=>{t(new Q6(iD(i),i))}):t(new Q6(iD(e),e))}),eDe=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?i:(Z4e(n)?(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,t!=null&&t.duplex&&(i.duplex=t.duplex),Object.assign(Object.assign({},i),r))};function RA(e,t,r,n,i,a){return Gr(this,void 0,void 0,function*(){return new Promise((s,o)=>{e(r,eDe(t,n,i,a)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>J4e(l,o,n))})})}function eS(e,t,r,n){return Gr(this,void 0,void 0,function*(){return RA(e,"GET",t,r,n)})}function Of(e,t,r,n,i){return Gr(this,void 0,void 0,function*(){return RA(e,"POST",t,n,i,r)})}function J6(e,t,r,n,i){return Gr(this,void 0,void 0,function*(){return RA(e,"PUT",t,n,i,r)})}function tDe(e,t,r,n){return Gr(this,void 0,void 0,function*(){return RA(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function n7(e,t,r,n,i){return Gr(this,void 0,void 0,function*(){return RA(e,"DELETE",t,n,i,r)})}class rDe{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r}then(t,r){return this.execute().then(t,r)}execute(){return Gr(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(ys(t))return{data:null,error:t};throw t}})}}var phe;class nDe{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r,this[phe]="BlobDownloadBuilder",this.promise=null}asStream(){return new rDe(this.downloadFn,this.shouldThrowOnError)}then(t,r){return this.getPromise().then(t,r)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return Gr(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(ys(t))return{data:null,error:t};throw t}})}}phe=Symbol.toStringTag;const iDe={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},kY={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class aDe{constructor(t,r={},n,i){this.shouldThrowOnError=!1,this.url=t,this.headers=r,this.bucketId=n,this.fetch=r7(i)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,r,n,i){return Gr(this,void 0,void 0,function*(){try{let a;const s=Object.assign(Object.assign({},kY),i);let o=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(s.upsert)});const l=s.metadata;typeof Blob<"u"&&n instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),l&&a.append("metadata",this.encodeMetadata(l)),a.append("",n)):typeof FormData<"u"&&n instanceof FormData?(a=n,a.append("cacheControl",s.cacheControl),l&&a.append("metadata",this.encodeMetadata(l))):(a=n,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType,l&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),i!=null&&i.headers&&(o=Object.assign(Object.assign({},o),i.headers));const u=this._removeEmptyFolders(r),c=this._getFinalPath(u),d=yield(t=="PUT"?J6:Of)(this.fetch,`${this.url}/object/${c}`,a,Object.assign({headers:o},s!=null&&s.duplex?{duplex:s.duplex}:{}));return{data:{path:u,id:d.Id,fullPath:d.Key},error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(ys(a))return{data:null,error:a};throw a}})}upload(t,r,n){return Gr(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,r,n)})}uploadToSignedUrl(t,r,n,i){return Gr(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(t),s=this._getFinalPath(a),o=new URL(this.url+`/object/upload/sign/${s}`);o.searchParams.set("token",r);try{let l;const u=Object.assign({upsert:kY.upsert},i),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const d=yield J6(this.fetch,o.toString(),l,{headers:c});return{data:{path:a,fullPath:d.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(ys(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,r){return Gr(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const i=Object.assign({},this.headers);r!=null&&r.upsert&&(i["x-upsert"]="true");const a=yield Of(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:i}),s=new URL(this.url+a.url),o=s.searchParams.get("token");if(!o)throw new t7("No token returned by API");return{data:{signedUrl:s.toString(),path:t,token:o},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ys(n))return{data:null,error:n};throw n}})}update(t,r,n){return Gr(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,r,n)})}move(t,r,n){return Gr(this,void 0,void 0,function*(){try{return{data:yield Of(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ys(i))return{data:null,error:i};throw i}})}copy(t,r,n){return Gr(this,void 0,void 0,function*(){try{return{data:{path:(yield Of(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ys(i))return{data:null,error:i};throw i}})}createSignedUrl(t,r,n){return Gr(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),a=yield Of(this.fetch,`${this.url}/object/sign/${i}
475`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const s=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${s}`)},{data:a,error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ys(i))return{data:null,error:i};throw i}})}createSignedUrls(t,r,n){return Gr(this,void 0,void 0,function*(){try{const i=yield Of(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:t},{headers:this.headers}),a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${a}`):null})),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ys(i))return{data:null,error:i};throw i}})}download(t,r){const i=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),s=a?`?${a}`:"",o=this._getFinalPath(t),l=()=>eS(this.fetch,`${this.url}/${i}/${o}${s}`,{headers:this.headers,noResolveJson:!0});return new nDe(l,this.shouldThrowOnError)}info(t){return Gr(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{const n=yield eS(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:Z6(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ys(n))return{data:null,error:n};throw n}})}exists(t){return Gr(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{return yield tDe(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ys(n)&&n instanceof Q6){const i=n.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:n}}throw n}})}getPublicUrl(t,r){const n=this._getFinalPath(t),i=[],a=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";a!==""&&i.push(a);const o=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});l!==""&&i.push(l);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${u}`)}}}remove(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield n7(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}list(t,r,n){return Gr(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},iDe),r),{prefix:t||""});return{data:yield Of(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},n),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ys(i))return{data:null,error:i};throw i}})}listV2(t,r){return Gr(this,void 0,void 0,function*(){try{const n=Object.assign({},t);return{data:yield Of(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ys(n))return{data:null,error:n};throw n}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const r=[];return t.width&&r.push(`width=${t.width}`),t.height&&r.push(`height=${t.height}`),t.resize&&r.push(`resize=${t.resize}`),t.format&&r.push(`format=${t.format}`),t.quality&&r.push(`quality=${t.quality}`),r.join("&")}}const mhe="2.77.0",ghe={"X-Client-Info":`storage-js/${mhe}`};class sDe{constructor(t,r={},n,i){this.shouldThrowOnError=!1;const a=new URL(t);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase.")),this.url=a.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},ghe),r),this.fetch=r7(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(t){return Gr(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(t);return{data:yield eS(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}getBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield eS(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}createBucket(t){return Gr(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield Of(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ys(i))return{data:null,error:i};throw i}})}updateBucket(t,r){return Gr(this,void 0,void 0,function*(){try{return{data:yield J6(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ys(n))return{data:null,error:n};throw n}})}emptyBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield Of(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield n7(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(t){const r={};return t&&("limit"in t&&(r.limit=String(t.limit)),"offset"in t&&(r.offset=String(t.offset)),t.search&&(r.search=t.search),t.sortColumn&&(r.sortColumn=t.sortColumn),t.sortOrder&&(r.sortOrder=t.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}class oDe{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},ghe),r),this.fetch=r7(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield Of(this.fetch,`${this.url}/bucket`,{name:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}listBuckets(t){return Gr(this,void 0,void 0,function*(){try{const r=new
475URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),i=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield eS(this.fetch,i,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield n7(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ys(r))return{data:null,error:r};throw r}})}}const i7={"X-Client-Info":`storage-js/${mhe}`,"Content-Type":"application/json"};class yhe extends Error{constructor(t){super(t),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function $c(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}class aD extends yhe{constructor(t,r,n){super(t),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class lDe extends yhe{constructor(t,r){super(t),this.name="StorageVectorsUnknownError",this.originalError=r}}var OY;(function(e){e.InternalError="InternalError",e.S3VectorConflictException="S3VectorConflictException",e.S3VectorNotFoundException="S3VectorNotFoundException",e.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",e.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",e.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(OY||(OY={}));const a7=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>Wp(async()=>{const{default:n}=await Promise.resolve().then(()=>n_);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},uDe=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)},NY=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),cDe=(e,t,r)=>Gr(void 0,void 0,void 0,function*(){if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const i=e.status||500,a=e;if(typeof a.json=="function")a.json().then(s=>{const o=(s==null?void 0:s.statusCode)||(s==null?void 0:s.code)||i+"";t(new aD(NY(s),i,o))}).catch(()=>{const s=i+"",o=a.statusText||`HTTP ${i} error`;t(new aD(o,i,s))});else{const s=i+"",o=a.statusText||`HTTP ${i} error`;t(new aD(o,i,s))}}else t(new lDe(NY(e),e))}),dDe=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(uDe(n)?(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,Object.assign(Object.assign({},i),r)):i};function fDe(e,t,r,n,i,a){return Gr(this,void 0,void 0,function*(){return new Promise((s,o)=>{e(r,dDe(t,n,i,a)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const u=l.headers.get("content-type");return!u||!u.includes("application/json")?{}:l.json()}).then(l=>s(l)).catch(l=>cDe(l,o,n))})})}function Fc(e,t,r,n,i){return Gr(this,void 0,void 0,function*(){return fDe(e,"POST",t,n,i,r)})}class hDe{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},i7),r),this.fetch=a7(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(t){return Gr(this,void 0,void 0,function*(){try{return{data:(yield Fc(this.fetch,`${this.url}/CreateIndex`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}getIndex(t,r){return Gr(this,void 0,void 0,function*(){try{return{data:yield Fc(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if($c(n))return{data:null,error:n};throw n}})}listIndexes(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield Fc(this.fetch,`${this.url}/ListIndexes`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}deleteIndex(t,r){return Gr(this,void 0,void 0,function*(){try{return{data:(yield Fc(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if($c(n))return{data:null,error:n};throw n}})}}class pDe{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},i7),r),this.fetch=a7(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(t){return Gr(this,void 0,void 0,function*(){try{if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield Fc(this.fetch,`${this.url}/PutVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}getVectors(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield Fc(this.fetch,`${this.url}/GetVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}listVectors(t){return Gr(this,void 0,void 0,function*(){try{if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
475if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return{data:yield Fc(this.fetch,`${this.url}/ListVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}queryVectors(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield Fc(this.fetch,`${this.url}/QueryVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}deleteVectors(t){return Gr(this,void 0,void 0,function*(){try{if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield Fc(this.fetch,`${this.url}/DeleteVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}}class mDe{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},i7),r),this.fetch=a7(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:(yield Fc(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}getBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:yield Fc(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}listBuckets(){return Gr(this,arguments,void 0,function*(t={}){try{return{data:yield Fc(this.fetch,`${this.url}/ListVectorBuckets`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Gr(this,void 0,void 0,function*(){try{return{data:(yield Fc(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if($c(r))return{data:null,error:r};throw r}})}}class gDe extends mDe{constructor(t,r={}){super(t,r.headers||{},r.fetch)}from(t){return new yDe(this.url,this.headers,t,this.fetch)}}class yDe extends hDe{constructor(t,r,n,i){super(t,r,i),this.vectorBucketName=n}createIndex(t){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return Gr(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const t=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return Gr(this,arguments,void 0,function*(r={}){return t.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(t){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return Gr(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,t)})}deleteIndex(t){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return Gr(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,t)})}index(t){return new vDe(this.url,this.headers,this.vectorBucketName,t,this.fetch)}}class vDe extends pDe{constructor(t,r,n,i,a){super(t,r,a),this.vectorBucketName=n,this.indexName=i}putVectors(t){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return Gr(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(t){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return Gr(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const t=Object.create(null,{listVectors:{get:()=>super.listVectors}});return Gr(this,arguments,void 0,function*(r={}){return t.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(t){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return Gr(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(t){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return Gr(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}
475class _De extends sDe{constructor(t,r={},n,i){super(t,r,n,i)}from(t){return new aDe(this.url,this.headers,t,this.fetch)}get vectors(){return new gDe(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new oDe(this.url+"/iceberg",this.headers,this.fetch)}}const bDe="2.77.0";let lE="";typeof Deno<"u"?lE="deno":typeof document<"u"?lE="web":typeof navigator<"u"&&navigator.product==="ReactNative"?lE="react-native":lE="node";const wDe={"X-Client-Info":`supabase-js-${lE}/${bDe}`},xDe={headers:wDe},EDe={schema:"public"},TDe={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},SDe={},ADe=e=>{let t;return e?t=e:typeof fetch>"u"?t=Gfe:t=fetch,(...r)=>t(...r)},CDe=()=>typeof Headers>"u"?qfe:Headers,PDe=(e,t,r)=>{const n=ADe(r),i=CDe();return async(a,s)=>{var o;const l=(o=await t())!==null&&o!==void 0?o:e;let u=new i(s==null?void 0:s.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(a,Object.assign(Object.assign({},s),{headers:u}))}};function MDe(e){return e.endsWith("/")?e:e+"/"}function kDe(e,t){var r,n;const{db:i,auth:a,realtime:s,global:o}=e,{db:l,auth:u,realtime:c,global:d}=t,f={db:Object.assign(Object.assign({},l),i),auth:Object.assign(Object.assign({},u),a),realtime:Object.assign(Object.assign({},c),s),storage:{},global:Object.assign(Object.assign(Object.assign({},d),o),{headers:Object.assign(Object.assign({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=o==null?void 0:o.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function ODe(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(MDe(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const vhe="2.77.0",u1=30*1e3,e$=3,sD=e$*u1,NDe="http://localhost:9999",IDe="supabase.auth.token",DDe={"X-Client-Info":`gotrue-js/${vhe}`},t$="X-Supabase-Api-Version",_he={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},LDe=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,jDe=10*60*1e3;class tS extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function rn(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class RDe extends tS{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function $De(e){return rn(e)&&e.name==="AuthApiError"}class xy extends tS{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class f0 extends tS{constructor(t,r,n,i){super(t,n,i),this.name=r,this.status=n}}class Um extends f0{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function FDe(e){return rn(e)&&e.name==="AuthSessionMissingError"}class $_ extends f0{constructor(){super("Auth session or user missing","AuthInvalidToken
475ResponseError",500,void 0)}}class IP extends f0{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class DP extends f0{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 BDe(e){return rn(e)&&e.name==="AuthImplicitGrantRedirectError"}class IY extends f0{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 r$ extends f0{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function oD(e){return rn(e)&&e.name==="AuthRetryableFetchError"}class DY extends f0{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class n$ extends f0{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const N5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),LY=` 476\r=`.split(""),zDe=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<LY.length;t+=1)e[LY[t].charCodeAt(0)]=-2;for(let t=0;t<N5.length;t+=1)e[N5[t].charCodeAt(0)]=t;return e})();function jY(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(N5[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(N5[n]),t.queuedBits-=6}}function bhe(e,t,r){const n=zDe[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 RY(e){const t=[],r=s=>{t.push(String.fromCodePoint(s))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=s=>{VDe(s,n,r)};for(let s=0;s<e.length;s+=1)bhe(e.charCodeAt(s),i,a);return t.join("")}function UDe(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 WDe(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}UDe(n,t)}}function VDe(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 tb(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)bhe(e.charCodeAt(i),r,n);return new Uint8Array(t)}function HDe(e){const t=[];return WDe(e,r=>t.push(r)),new Uint8Array(t)}function ky(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};return e.forEach(i=>jY(i,r,n)),jY(null,r,n),t.join("")}function GDe(e){return Math.round(Date.now()/1e3)+e}function qDe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const Ac=()=>typeof window<"u"&&typeof document<"u",Q0={tested:!1,writable:!1},whe=()=>{if(!Ac())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Q0.tested)return Q0.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Q0.tested=!0,Q0.writable=!0}catch{Q0.tested=!0,Q0.writable=!1}return Q0.writable};function KDe(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{t[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{t[i]=n}),t}const xhe=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>Wp(async()=>{const{default:n}=await Promise.resolve().then(()=>n_);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},YDe=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",c1=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Z0=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Im=async(e,t)=>{await e.removeItem(t)};
476class nN{constructor(){this.promise=new nN.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}nN.promiseConstructor=Promise;function lD(e){const t=e.split(".");if(t.length!==3)throw new n$("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!LDe.test(t[n]))throw new n$("JWT not in base64url format");return{header:JSON.parse(RY(t[0])),payload:JSON.parse(RY(t[1])),signature:tb(t[2]),raw:{header:t[0],payload:t[1]}}}async function XDe(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function QDe(e,t){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await e(a);if(!t(a,null,s)){n(s);return}}catch(s){if(!t(a,s)){i(s);return}}})()})}function ZDe(e){return("0"+e.toString(16)).substr(-2)}function JDe(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(t),Array.from(t,ZDe).join("")}async function eLe(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function tLe(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 eLe(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function F_(e,t,r=!1){const n=JDe();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await c1(e,`${t}-code-verifier`,i);const a=await tLe(n);return[a,n===a?"plain":"s256"]}const rLe=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function nLe(e){const t=e.headers.get(t$);if(!t||!t.match(rLe))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function iLe(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 aLe(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 sLe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function B_(e){if(!sLe.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function uD(){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 $Y(e){return JSON.parse(JSON.stringify(e))}const dy=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),oLe=[502,503,504];async function FY(e){var t;if(!YDe(e))throw new r$(dy(e),0);if(oLe.includes(e.status))throw new r$(dy(e),e.status);let r;try{r=await e.json()}catch(a){throw new xy(dy(a),a)}let n;const i=nLe(e);if(i&&i.getTime()>=_he["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 DY(dy(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Um}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,s)=>a&&typeof s=="string",!0))throw new DY(dy(r),e.status,r.weak_password.reasons);throw new RDe(dy(r),e.status||500,n)}const lLe=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function Mn(e,t,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[t$]||(a[t$]=_he["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const s=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(s.redirect_to=n.redirectTo);const o=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await uLe(e,t,r+o,{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(l):{data:Object.assign({},l),error:null}}async function uLe(e,t,r,n,i,a){const s=lLe(t,n,i,a);let o;try{o=await e(r,Object.assign({},s))}catch(l){throw console.error(l),new r$(dy(l),0)}if(o.ok||await FY(o),n!=null&&n.noResolveJson)return o;try{return await o.json()}catch(l){await FY(l)}}function Cf(e){var t;let r=null;fLe(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=GDe(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function BY(e){const t=Cf(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 eg(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function cLe(e){return{data:e,error:null}}function dLe(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=e,s=d0(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},l=Object.assign({},s);return{data:{properties:o,user:l},error:null}}function zY(e){return e}function fLe(e){return e.access_token&&e.refresh_token&&e.expires_in}const cD=["global","local","others"];class hLe{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=xhe(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),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}
vendor: 4,560 bytes, line 476
476async signOut(t,r=cD[0]){if(cD.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${cD.join(", ")}`);try{return await Mn(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(rn(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await Mn(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:eg})}catch(n){if(rn(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=d0(t,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await Mn(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:dLe,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(rn(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await Mn(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:eg})}catch(r){if(rn(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,i,a,s,o,l;try{const u={nextPage:null,lastPage:0,total:0},c=await Mn(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=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:zY});if(c.error)throw c.error;const d=await c.json(),f=(s=c.headers.get("x-total-count"))!==null&&s!==void 0?s:0,h=(l=(o=c.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(p=>{const m=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(p.split(";")[1].split("=")[1]);u[`${_}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(rn(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){B_(t);try{return await Mn(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:eg})}catch(r){if(rn(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){B_(t);try{return await Mn(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:eg})}catch(n){if(rn(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){B_(t);try{return await Mn(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:eg})}catch(n){if(rn(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){B_(t.userId);try{const{data:r,error:n}=await Mn(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(rn(r))return{data:null,error:r};throw r}}async _deleteFactor(t){B_(t.userId),B_(t.id);try{return{data:await Mn(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(rn(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,i,a,s,o,l;try{const u={nextPage:null,lastPage:0,total:0},c=await Mn(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=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:zY});if(c.error)throw c.error;const d=await c.json(),f=(s=c.headers.get("x-total-count"))!==null&&s!==void 0?s:0,h=(l=(o=c.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(p=>{const m=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(p.split(";")[1].split("=")[1]);u[`${_}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(rn(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await Mn(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(rn(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await Mn(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(rn(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await Mn(this.fetch,"DELET
476E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(rn(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await Mn(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(rn(r))return{data:null,error:r};throw r}}}function UY(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const z_={debug:!!(globalThis&&whe()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Ehe extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class pLe extends Ehe{}async function mLe(e,t,r){z_.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),z_.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 i=>{if(i){z_.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{z_.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw z_.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new pLe(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(z_.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 gLe(){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 The(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function yLe(e){return parseInt(e,16)}function vLe(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function _Le(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:s,notBefore:o,requestId:l,resources:u,scheme:c,uri:d,version:f}=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(s&&s.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${s}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 477`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=The(e.address),p=c?`${c}://${n}`:n,m=e.statement?`${e.statement} 478`:"",_=`${p} wants you to sign in with your Ethereum account: 479${h} 480 481${m}`;let y=`URI: ${d} 482Version: ${f} 483Chain ID: ${r}${s?` 484Nonce: ${s}`:""} 485Issued At: ${a.toISOString()}`;if(i&&(y+=` 486Expiration Time: ${i.toISOString()}`),o&&(y+=` 487Not Before: ${o.toISOString()}`),l&&(y+=` 488Request ID: ${l}`),u){let v=` 489Resources:`;for(const b of u){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);v+=` 490- ${b}`}y+=v}return`${_} 491${y}`}
491class lo extends Error{constructor({message:t,code:r,cause:n,name:i}){var a;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}}class I5 extends lo{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function bLe({error:e,options:t}){var r,n,i;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 lo({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 lo({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 lo({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new lo({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 lo({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new lo({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new lo({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new lo({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 s=window.location.hostname;if(She(s)){if(a.rp.id!==s)return new lo({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new lo({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 lo({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 lo({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 lo({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function wLe({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 lo({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new lo({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(She(n)){if(r.rpId!==n)return new lo({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new lo({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new lo({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 lo({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class xLe{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 ELe=new xLe;function TLe(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,i=d0(e,["challenge","user","excludeCredentials"]),a=tb(t).buffer,s=Object.assign(Object.assign({},r),{id:tb(r.id).buffer}),o=Object.assign(Object.assign({},i),{challenge:a,user:s});if(n&&n.length>0){o.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];o.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:tb(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function SLe(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=d0(e,["challenge","allowCredentials"]),i=tb(t).buffer,a=Object.assign(Object.assign({}
491,n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let s=0;s<r.length;s++){const o=r[s];a.allowCredentials[s]=Object.assign(Object.assign({},o),{id:tb(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return a}function ALe(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:ky(new Uint8Array(e.response.attestationObject)),clientDataJSON:ky(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function CLe(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ky(new Uint8Array(i.authenticatorData)),clientDataJSON:ky(new Uint8Array(i.clientDataJSON)),signature:ky(new Uint8Array(i.signature)),userHandle:i.userHandle?ky(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function She(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function WY(){var e,t;return!!(Ac()&&"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 PLe(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new I5("Browser returned unexpected credential type",t)}:{data:null,error:new I5("Empty credential response",t)}}catch(t){return{data:null,error:bLe({error:t,options:e})}}}async function MLe(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new I5("Browser returned unexpected credential type",t)}:{data:null,error:new I5("Empty credential response",t)}}catch(t){return{data:null,error:wLe({error:t,options:e})}}}const kLe={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"none"},OLe={userVerification:"preferred",hints:["security-key"]};function D5(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of e)if(i)for(const a in i){const s=i[a];if(s!==void 0)if(Array.isArray(s))n[a]=s;else if(r(s))n[a]=s;else if(t(s)){const o=n[a];t(o)?n[a]=D5(o,s):n[a]=D5(s)}else n[a]=s}return n}function NLe(e,t){return D5(kLe,e,t||{})}function ILe(e,t){return D5(OLe,e,t||{})}class DLe{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:i},a){try{const{data:s,error:o}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!s)return{data:null,error:o};const l=i??ELe.createNewAbortSignal();if(s.webauthn.type==="create"){const{user:u}=s.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(s.webauthn.type){case"create":{const u=NLe(s.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:c,error:d}=await PLe({publicKey:u,signal:l});return c?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:c}},error:null}:{data:null,error:d}}case"request":{const u=ILe(s.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:c,error:d}=await MLe(Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:u,signal:l}));return c?{data:{factorId:t,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:c}},error:null}:{data:null,error:d}}}}catch(s){return rn(s)?{data:null,error:s}:{data:null,error:new xy("Unexpected error in challenge",s)}}}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:i}},a){if(!r)return{data:null,error:new tS("rpId is required for WebAuthn authentication")};try{if(!WY())return{data:null,error:new xy("Browser does not support WebAuthn",null)};const{data:s,error:o}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!s)return{data:null,error:o};const{webauthn:l}=s;return this._verify({factorId:t,challengeId:s.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(s){return rn(s)?{data:null,error:s}:{data:null,error:new xy("Unexpected error in authenticate",s)}}}async _register({friendlyName:t,rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i},a){if(!r)return{data:null,error:new tS("rpId is required for WebAuthn registration")};try{if(!WY())return{data:null,error:new xy("Browser does not support WebAuthn",null)};const{data:s,error:o}=await this._enroll({friendlyName:t});if(!s)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:o};const{data:l,error:u}=await this._challenge({factorId:s.id,friendlyName:s.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return l?this._verify({factorId:s.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(s){return rn(s)?{data:null,error:s}:{data:null,error:new xy("Unexpected error in register",s)}}}}gLe();const LLe={url:NDe,storageKey:IDe,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:DDe,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function VY(e,t,r){return await r()}const U_={};class rS{get jwks(){var t,r;return(r=(t=U_[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){U_[this.storageKey]=Object.assign(Object.assign({},U_[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=U_[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){U_[this.storageKey]=Object.assign(Object.assign({},U_[this.storageKey]),{cachedAt:t})}constructor(t){var r,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=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,this.instanceID=rS.nextInstanceID,rS.nextInstanceID+=1,this.instanceID>0&&Ac()&&console.warn("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.");const i=Object.assign(Object.assign({},LLe),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new hLe({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=xhe(i.fetch),this.lock=i.lock||VY,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:Ac()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=mLe:this.lock=VY,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 DLe(this)},this.persistSession?(i.storage?this.storage=i.storage:whe()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=UY(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=UY(this.memoryStorage)),Ac()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${vhe}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const r=KDe(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),Ac()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),BDe(a)){const l=(t=a.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:a}}return await this._removeSession(),{error:a}}const{session:s,redirectType:o}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",o),await this._saveSession(s),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return rn(r)?{error:r}:{error:new xy("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,i;try{const a=await Mn(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:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Cf}),{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(rn(a))return{data:{user:null,session:null},error:a};throw a}}async signUp(t){var r,n,i;try{let a;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,p=null;this.flowType==="pkce"&&([h,p]=await F_(this.storage,this.storageKey)),a=await Mn(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:p},xform:Cf})}else if("phone"in t){const{phone:c,password:d,options:f}=t;a=await Mn(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Cf})}else throw new IP("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(rn(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(t){try{let r;if("email"in t){const{email:a,password:s,options:o}=t;r=await Mn(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:BY})}else if("phone"in t){const{phone:a,password:s,options:o}=t;r=await Mn(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:BY})}else throw new IP("You must provide either an email or phone number and a password");const{data:n,error:i}=r;return i?{data:{user:null,session:null},error:i}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new $_}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(rn(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(t){var r,n,i,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:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.o
491ptions)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,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,i,a,s,o,l,u,c,d,f;let h,p;if("message"in t)h=t.message,p=t.signature;else{const{chain:m,wallet:_,statement:y,options:v}=t;let b;if(Ac())if(typeof _=="object")b=_;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")b=A.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 _!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=_}const w=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href),x=await b.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!x||x.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=The(x[0]);let T=(n=v==null?void 0:v.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!T){const A=await b.request({method:"eth_chainId"});T=yLe(A)}const S={domain:w.host,address:E,statement:y,uri:w.href,version:"1",chainId:T,nonce:(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(s=(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&s!==void 0?s:new Date,expirationTime:(o=v==null?void 0:v.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=_Le(S),p=await b.request({method:"personal_sign",params:[vLe(h),E]})}try{const{data:m,error:_}=await Mn(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:p},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Cf});if(_)throw _;return!m||!m.session||!m.user?{data:{user:null,session:null},error:new $_}:(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),{data:Object.assign({},m),error:_})}catch(m){if(rn(m))return{data:{user:null,session:null},error:m};throw m}}async signInWithSolana(t){var r,n,i,a,s,o,l,u,c,d,f,h;let p,m;if("message"in t)p=t.message,m=t.signature;else{const{chain:_,wallet:y,statement:v,options:b}=t;let w;if(Ac())if(typeof y=="object")w=y;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))w=E.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 y!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=y}const x=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in w&&w.signIn){const E=await w.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:x.host,uri:x.href}),v?{statement:v}:null));let T;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")T=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)T=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in T&&"signature"in T&&(typeof T.signedMessage=="string"||T.signedMessage instanceof Uint8Array)&&T.signature instanceof Uint8Array)p=typeof T.signedMessage=="string"?T.signedMessage:new TextDecoder().decode(T.signedMessage),m=T.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in w)||typeof w.signMessage!="function"||!("publicKey"in w)||typeof w!="object"||!w.publicKey||!("toBase58"in w.publicKey)||typeof w.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");p=[`${x.host} wants you to sign in with your Solana account:`,w.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${x.href}`,`Issued At: ${(i=(n=b==null?void 0:b.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=b==null?void 0:b.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((s=b==null?void 0:b.signInWithSolana)===null||s===void 0)&&s.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((u=b==null?void 0:b.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((d=(c=b==null?void 0:b.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...b.signInWithSolana.resources.map(T=>`- ${T}`)]:[]].join(` 492`);const E=await w.signMessage(new TextEncoder().encode(p),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:_,error:y}=await Mn(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:ky(m)},!((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:Cf});if(y)throw y;return!_||!_.session||!_.user?{data:{user:null,session:null},error:new $_}:(_.session&&(await this._saveSession(_.session),await this._notifyAllSubscribers("SIGNED_IN",_.session)),{data:Object.assign({},_),error:y})}catch(_){if(rn(_))return{data:{user:null,session:null},error:_};throw _}}async _exchangeCodeForSession(t){const r=await Z0(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{const{data:a,error:s}=await Mn(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Cf});if(await Im(this.storage,`${this.storageKey}-code-verifier`),s)throw s;return!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new $_}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}catch(a){if(rn(a))return{data:{user:null,session:null,redirectType:null},error:a};throw a}}async signInWithIdToken(t){try{const{options:r,provider:n,token:i,access_token:a,nonce:s}=t,o=await Mn(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Cf}),{data:l,error:u}=o;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new $_}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(r){if(rn(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(t){var r,n,i,a,s;try{if("email"in t){const{email:o,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await F_(this.storage,this.storageKey));const{error:d}=await Mn(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:o,options:l}=t,{data:u,error:c}=await Mn(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new IP("You must provide either an email or phone number.")}catch(o){if(rn(o))return{data:{user:null,session:null},error:o};throw o}}async verifyOtp(t){var r,n;try{let i,a;"options"in t&&(i=(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:s,error:o}=await Mn(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Cf});if(o)throw o;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,u=s.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(rn(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var r,n,i;try{let a=null,s=null;return this.flowType==="pkce"&&([a,s]=await F_(this.storage,this.storageKey)),await Mn(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}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:s}),headers:this.headers,xform:cLe})}catch(a){if(rn(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,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 Um;const{error:i}=await Mn(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(rn(t))return{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:i,options:a}=t,{error:s}=await Mn(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in t){const{phone:n,type:i,options:a}=t,{data:s,error:o}=await Mn(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:o}}throw new IP("You must provide either an email or phone number and a type")}catch(r){if(rn(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,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(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}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 i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.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 Z0(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
492id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<sD:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const s=await Z0(this.userStorage,this.storageKey+"-user");s!=null&&s.user?t.user=s.user:t.user=uD()}if(this.storage.isServer&&t.user){let s=this.suppressGetSessionWarning;t=new Proxy(t,{get:(l,u,c)=>(!s&&u==="user"&&(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."),s=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,u,c))})}return{data:{session:t},error:null}}const{data:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{session:null},error:a}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await Mn(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:eg}):await this._useSession(async r=>{var n,i,a;const{data:s,error:o}=r;if(o)throw o;return!(!((n=s.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Um}:await Mn(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:eg})})}catch(r){if(rn(r))return FDe(r)&&(await this._removeSession(),await Im(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Um;const s=i.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await F_(this.storage,this.storageKey));const{data:u,error:c}=await Mn(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:s.access_token,xform:eg});if(c)throw c;return s.user=u.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(n){if(rn(n))return{data:{user:null},error:n};throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Um;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:s}=lD(t.access_token);if(s.exp&&(n=s.exp,i=n<=r),i){const{data:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!o)return{data:{user:null,session:null},error:null};a=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)throw l;a={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(r){if(rn(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:s,error:o}=r;if(o)throw o;t=(n=s.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Um;const{data:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{user:null,session:null},error:a}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(rn(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(t,r){try{if(!Ac())throw new DP("No browser detected.");
492if(t.error||t.error_description||t.error_code)throw new DP(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 IY("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new DP("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 IY("No code detected.");const{data:v,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:a,refresh_token:s,expires_in:o,expires_at:l,token_type:u}=t;if(!a||!o||!s||!u)throw new DP("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(o);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=u1&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const p=f-d;c-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,f,c):c-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,f,c);const{data:m,error:_}=await this._getUser(a);if(_)throw _;const y={provider_token:n,provider_refresh_token:i,access_token:a,expires_in:d,expires_at:f,refresh_token:s,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:y,redirectType:t.type},error:null}}catch(n){if(rn(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Z0(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{error:a};const s=(n=i.session)===null||n===void 0?void 0:n.access_token;if(s){const{error:o}=await this.admin.signOut(s,t);if(o&&!($De(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return t!=="others"&&(await this._removeSession(),await Im(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const r=qDe(),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(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:s}=r;if(s)throw s;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((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),console.error(a)}})}async resetPasswordForEmail(t,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await F_(this.storage,this.storageKey,!0));try{return await Mn(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(rn(a))return{data:null,error:a};throw a}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(r){if(rn(r))return{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:i}=await this._useSession(async a=>{var s,o,l,u,c;const{data:d,error:f}=a;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Mn(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return Ac()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),{data:{provider:t.provider,url:n==null?void 0:n.url},error:null}}catch(n){if(rn(n))return{data:{provider:t.provider,url:null},error:n};throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:s,provider:o,token:l,access_token:u,nonce:c}=t,d=await Mn(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:o,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Cf}),{data:f,error:h}=d;return h?{data:{user:null,session:null},error:h}:!f||!f.session||!f.user?{data:{user:null,session:null},error:new $_}:(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),{data:f,error:h})}catch(i){if(rn(i))return{data:{user:null,session:null},error:i};throw i}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)throw s;
492return await Mn(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(rn(r))return{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 QDe(async i=>(i>0&&await XDe(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await Mn(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Cf})),(i,a)=>{const s=200*Math.pow(2,i);return a&&oD(a)&&Date.now()+s-n<u1})}catch(n){if(this._debug(r,"error",n),rn(n))return{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),Ac()&&!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 i=await Z0(this.storage,this.storageKey);if(i&&this.userStorage){let s=await Z0(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!s&&(s={user:i.user},await c1(this.userStorage,this.storageKey+"-user",s)),i.user=(t=s==null?void 0:s.user)!==null&&t!==void 0?t:uD()}else if(i&&!i.user&&!i.user){const s=await Z0(this.storage,this.storageKey+"-user");s&&(s!=null&&s.user)?(i.user=s.user,await Im(this.storage,this.storageKey+"-user"),await c1(this.storage,this.storageKey,i)):i.user=uD()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<sD;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${sD}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:s}=await this._callRefreshToken(i.refresh_token);s&&(console.error(s),oD(s)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:s,error:o}=await this._getUser(i.access_token);!o&&(s!=null&&s.user)?(i.user=s.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(s){console.error("Error getting user data:",s),this._debug(n,"error getting user data, skipping SIGNED_IN notification",s)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Um;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new nN;const{data:a,error:s}=await this._refreshAccessToken(t);if(s)throw s;if(!a.session)throw new Um;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const o={data:a.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(a){if(this._debug(i,"error",a),rn(a)){const s={data:null,error:a};return oD(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(s),s}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,r,n=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const a=[],s=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,r)}catch(l){a.push(l)}});if(await Promise.all(s),a.length>0){for(let o=0;o<a.length;o+=1)console.error(a[o]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await c1(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=$Y(i);await c1(this.storage,this.storageKey,a)}else{const i=$Y(r);await c1(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),await Im(this.storage,this.storageKey),await Im(this.storage,this.storageKey+"-code-verifier"),await Im(this.storage,this.storageKey+"-user"),this.userStorage&&await Im(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ac()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
492catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),u1);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}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 i=Math.floor((n.expires_at*1e3-t)/u1);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${u1}ms, refresh threshold is ${e$} ticks`),i<=e$&&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 Ehe)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ac()||!(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(-1,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 i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,s]=await F_(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(o.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?{data:null,error:a}:await Mn(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(rn(r))return{data:null,error:r};throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)return{data:null,error:s};const o=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await Mn(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return u?{data:null,error:u}:(t.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(r){if(rn(r))return{data:null,error:r};throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{data:null,error:a};const s=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?ALe(t.webauthn.credential_response):CLe(t.webauthn.credential_response)})}:{code:t.code}),{data:o,error:l}=await Mn(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:s,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return l?{data:null,error:l}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:l})})}catch(r){if(rn(r))return{data:null,error:r};throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{data:null,error:a};const s=await Mn(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(s.error)return s;const{data:o}=s;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:TLe(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:SLe(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(rn(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?{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 i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var r,n;const{data:{session:i},error:a}=t;if(a)return{data:null,error:a};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:s}=lD(i.access_token);let o=null;s.aal&&(o=s.aal);let l=o;((n=(r=i.user.factors)===null||r===void 0?void 0:r.filter(d=>d.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(l="aal2");const c=s.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(o=>o.kid===t);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(o=>o.kid===t),n&&this.jwks_cached_at+jDe>i)return n;const{data:a,error:s}=await Mn(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(o=>o.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:p}
492=await this.getSession();if(p||!h.session)return{data:null,error:p};n=h.session.access_token}const{header:i,payload:a,signature:s,raw:{header:o,payload:l}}=lD(n);r!=null&&r.allowExpired||iLe(a.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:a,header:i,signature:s},error:null}}const c=aLe(i.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,s,HDe(`${o}.${l}`)))throw new n$("Invalid JWT signature");return{data:{claims:a,header:i,signature:s},error:null}}catch(n){if(rn(n))return{data:null,error:n};throw n}}}rS.nextInstanceID=0;const jLe=rS;class RLe extends jLe{constructor(t){super(t)}}class $Le{constructor(t,r,n){var i,a,s;this.supabaseUrl=t,this.supabaseKey=r;const o=ODe(t);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const l=`sb-${o.hostname.split(".")[0]}-auth-token`,u={db:EDe,realtime:SDe,auth:Object.assign(Object.assign({},TDe),{storageKey:l}),global:xDe},c=kDe(n??{},u);this.storageKey=(i=c.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},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`)}})):this.auth=this._initSupabaseAuthClient((s=c.auth)!==null&&s!==void 0?s:{},this.headers,c.global.fetch),this.fetch=PDe(r,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.rest=new N4e(new URL("rest/v1",o).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new _De(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new T4e(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,r,n)}channel(t,r={config:{}}){return this.realtime.channel(t,r)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(t=n.session)===null||t===void 0?void 0:t.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,storageKey:s,flowType:o,lock:l,debug:u},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new RLe({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),c),storageKey:s,autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,flowType:o,lock:l,debug:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new Y4e(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(t,r,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const FLe=(e,t,r)=>new $Le(e,t,r);function BLe(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}BLe()&&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 N
492ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function zLe(){var _,y;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(v=>e===v||e.endsWith("."+v)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",i=r?((_=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:_[1])??((y=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:y[1]):void 0,a=window.parent&&window.parent!==window;if(!i||!a)return localStorage;const s=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),o=s?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=l&&o.test(l)?[l]:s?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],c="lovable-preview-auth:result",d=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(v,b,w)=>new Promise(x=>{const E=f();let T=!1,S;const A=M=>{T||(T=!0,clearTimeout(S),window.removeEventListener("message",C),x(M))},C=M=>{if(u.indexOf(M.origin)<0)return;const D=M.data;D&&D.type===c&&D.requestId===E&&A(D)};window.addEventListener("message",C);const k={type:v,requestId:E,projectId:i,key:b};w!==void 0&&(k.value=w);for(const M of u)window.parent.postMessage(k,M);S=setTimeout(()=>A(null),d)});let p=!0;const m=250;return{getItem:async v=>{let b=await h("lovable-preview-auth:get",v);return!b&&p&&(await new Promise(w=>setTimeout(w,m)),b=await h("lovable-preview-auth:get",v)),p=!1,b&&b.ok&&typeof b.value=="string"?b.value===""?(localStorage.removeItem(v),null):b.value:localStorage.getItem(v)},setItem:(v,b)=>(localStorage.setItem(v,b),h("lovable-preview-auth:set",v,b).then(()=>{})),removeItem:v=>(localStorage.removeItem(v),h("lovable-preview-auth:remove",v).then(()=>{}))}}const ULe="https://omxupfqaewgxofufqoqy.supabase.co",WLe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9teHVwZnFhZXdneG9mdWZxb3F5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjE3NTM2NjQsImV4cCI6MjA3NzMyOTY2NH0.N3jYniFLW-HxQyfTDU2K1t49x9pWjTMHm9_-IZ4IFrA",nn=FLe(ULe,WLe,{auth:{storage:zLe(),persistSession:!0,autoRefreshToken:!0}}),Ahe=R.createContext(void 0),VLe=({children:e})=>{const[t,r]=R.useState(!1),[n,i]=R.useState(!0),a=ix(),s=async()=>{try{const{data:{session:l}}=await nn.auth.getSession();if(!l){r(!1),i(!1);return}const{data:u,error:c}=await nn.from("user_roles").select("role").eq("user_id",l.user.id).eq("role","admin").maybeSingle();c?(console.error("Error checking admin status:",c),r(!1)):r(!!u)}catch(l){console.error("Error in checkAdminStatus:",l),r(!1)}finally{i(!1)}},o=async()=>{await nn.auth.signOut(),r(!1),a("/")};return R.useEffect(()=>{s();const{data:{subscription:l}}=nn.auth.onAuthStateChange(()=>{s()});return()=>l.unsubscribe()},[]),g.jsx(Ahe.Provider,{value:{isAdmin:t,isLoading:n,checkAdminStatus:s,logout:o},children:e})},i_=()=>{const e=R.useContext(Ahe);if(e===void 0)throw new Error("useAdmin must be used within an AdminProvider");return e},W_=({children:e})=>{const{isAdmin:t,isLoading:r}=i_();return r?g.jsx("div",{className:"min-h-screen flex items-center justify-center",children:g.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}):t?g.jsx(g.Fragment,{children:e}):g.jsx(e4e,{to:"/admin/login",replace:!0})},nS=kA("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors 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",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),gr=R.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const s=n?Ice:"button";return g.jsx(s,{className:Xt(nS({variant:t,size:r,className:e})),ref:a,...i})});gr.displayName="Button";var HLe=R.createContext(void 0);function $A(e){const t=R.useContext(HLe);return e||t||"ltr"}function s7(e){const t=R.useRef({value:e,previous:e});return R.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var a_="NavigationMenu",[o7,Che,GLe]=Yw(a_),[i$,qLe,KLe]=Yw(a_),[l7,f5t]=Ou(a_,[GLe,KLe]),[YLe,tf]=l7(a_),[XLe,QLe]=l7(a_),Phe=R.forwardRef((e,t)=>
vendor: 2,465 bytes, line 492
492{const{__scopeNavigationMenu:r,value:n,onValueChange:i,defaultValue:a,delayDuration:s=200,skipDelayDuration:o=300,orientation:l="horizontal",dir:u,...c}=e,[d,f]=R.useState(null),h=Gn(t,A=>f(A)),p=$A(u),m=R.useRef(0),_=R.useRef(0),y=R.useRef(0),[v,b]=R.useState(!0),[w,x]=rd({prop:n,onChange:A=>{const C=A!=="",k=o>0;C?(window.clearTimeout(y.current),k&&b(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>b(!0),o)),i==null||i(A)},defaultProp:a??"",caller:a_}),E=R.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>x(""),150)},[x]),T=R.useCallback(A=>{window.clearTimeout(_.current),x(A)},[x]),S=R.useCallback(A=>{w===A?window.clearTimeout(_.current):m.current=window.setTimeout(()=>{window.clearTimeout(_.current),x(A)},s)},[w,x,s]);return R.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(_.current),window.clearTimeout(y.current)},[]),g.jsx(Mhe,{scope:r,isRootMenu:!0,value:w,dir:p,orientation:l,rootNavigationMenu:d,onTriggerEnter:A=>{window.clearTimeout(m.current),v?S(A):T(A)},onTriggerLeave:()=>{window.clearTimeout(m.current),E()},onContentEnter:()=>window.clearTimeout(_.current),onContentLeave:E,onItemSelect:A=>{x(C=>C===A?"":A)},onItemDismiss:()=>x(""),children:g.jsx(Hr.nav,{"aria-label":"Main","data-orientation":l,dir:p,...c,ref:h})})});Phe.displayName=a_;var a$="NavigationMenuSub",ZLe=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",...o}=e,l=tf(a$,r),[u,c]=rd({prop:n,onChange:i,defaultProp:a??"",caller:a$});return g.jsx(Mhe,{scope:r,isRootMenu:!1,value:u,dir:l.dir,orientation:s,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:d=>c(d),onItemSelect:d=>c(d),onItemDismiss:()=>c(""),children:g.jsx(Hr.div,{"data-orientation":s,...o,ref:t})})});ZLe.displayName=a$;var Mhe=e=>{const{scope:t,isRootMenu:r,rootNavigationMenu:n,dir:i,orientation:a,children:s,value:o,onItemSelect:l,onItemDismiss:u,onTriggerEnter:c,onTriggerLeave:d,onContentEnter:f,onContentLeave:h}=e,[p,m]=R.useState(null),[_,y]=R.useState(new Map),[v,b]=R.useState(null);return g.jsx(YLe,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:o,previousValue:s7(o),baseId:Yc(),dir:i,orientation:a,viewport:p,onViewportChange:m,indicatorTrack:v,onIndicatorTrackChange:b,onTriggerEnter:jo(c),onTriggerLeave:jo(d),onContentEnter:jo(f),onContentLeave:jo(h),onItemSelect:jo(l),onItemDismiss:jo(u),onViewportContentChange:R.useCallback((w,x)=>{y(E=>
vendor: 4,105 bytes, line 492
492(E.set(w,x),new Map(E)))},[]),onViewportContentRemove:R.useCallback(w=>{y(x=>x.has(w)?(x.delete(w),new Map(x)):x)},[]),children:g.jsx(o7.Provider,{scope:t,children:g.jsx(XLe,{scope:t,items:_,children:s})})})},khe="NavigationMenuList",Ohe=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,i=tf(khe,r),a=g.jsx(Hr.ul,{"data-orientation":i.orientation,...n,ref:t});return g.jsx(Hr.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange,children:g.jsx(o7.Slot,{scope:r,children:i.isRootMenu?g.jsx(zhe,{asChild:!0,children:a}):a})})});Ohe.displayName=khe;var Nhe="NavigationMenuItem",[JLe,Ihe]=l7(Nhe),Dhe=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,...i}=e,a=Yc(),s=n||a||"LEGACY_REACT_AUTO_VALUE",o=R.useRef(null),l=R.useRef(null),u=R.useRef(null),c=R.useRef(()=>{}),d=R.useRef(!1),f=R.useCallback((p="start")=>{if(o.current){c.current();const m=o$(o.current);m.length&&d7(p==="start"?m:m.reverse())}},[]),h=R.useCallback(()=>{if(o.current){const p=o$(o.current);p.length&&(c.current=sje(p))}},[]);return g.jsx(JLe,{scope:r,value:s,triggerRef:l,contentRef:o,focusProxyRef:u,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:h,onContentFocusOutside:h,children:g.jsx(Hr.li,{...i,ref:t})})});Dhe.displayName=Nhe;var s$="NavigationMenuTrigger",Lhe=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,disabled:n,...i}=e,a=tf(s$,e.__scopeNavigationMenu),s=Ihe(s$,e.__scopeNavigationMenu),o=R.useRef(null),l=Gn(o,s.triggerRef,t),u=Whe(a.baseId,s.value),c=Vhe(a.baseId,s.value),d=R.useRef(!1),f=R.useRef(!1),h=s.value===a.value;return g.jsxs(g.Fragment,{children:[g.jsx(o7.ItemSlot,{scope:r,value:s.value,children:g.jsx(Uhe,{asChild:!0,children:g.jsx(Hr.button,{id:u,disabled:n,"data-disabled":n?"":void 0,"data-state":f7(h),"aria-expanded":h,"aria-controls":c,...i,ref:l,onPointerEnter:_r(e.onPointerEnter,()=>{f.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:_r(e.onPointerMove,L5(()=>{n||f.current||s.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(s.value),d.current=!0)})),onPointerLeave:_r(e.onPointerLeave,L5(()=>{n||(a.onTriggerLeave(),d.current=!1)})),onClick:_r(e.onClick,()=>{a.onItemSelect(s.value),f.current=h}),onKeyDown:_r(e.onKeyDown,p=>{const _={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];h&&p.key===_&&(s.onEntryKeyDown(),p.preventDefault())})})})}),h&&g.jsxs(g.Fragment,{children:[g.jsx(Bce,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:p=>{const m=s.contentRef.current,_=p.relatedTarget,y=_===o.current,v=m==null?void 0:m.contains(_);(y||!v)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&g.jsx("span",{"aria-owns":c})]})]})});Lhe.displayName=s$;var eje="NavigationMenuLink",HY="navigationMenu.linkSelect",jhe=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,active:n,onSelect:i,...a}=e;return g.jsx(Uhe,{asChild:!0,children:g.jsx(Hr.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...a,ref:t,onClick:_r(e.onClick,s=>{const o=s.target,l=new CustomEvent(HY,{bubbles:!0,cancelable:!0});if(o.addEventListener(HY,u=>i==null?void 0:i(u),{once:!0}),d5(o,l),!l.defaultPrevented&&!s.metaKey){const u=new CustomEvent(dk,{bubbles:!0,cancelable:!0});d5(o,u)}},{checkForDefaultPrevented:!1})})})});jhe.displayName=eje;var u7="NavigationMenuIndicator",Rhe=R.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=tf(u7,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?xz.createPortal(g.jsx(cc,{present:r||a,children:g.jsx(tje,{...n,ref:t})}),i.indicatorTrack):null});Rhe.displayName=u7;var tje=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,i=tf(u7,r),a=Che(r),[s,o]=R.useState(null),[l,u]=R.useState(null),c=i.orientation==="horizontal",d=!!i.value;R.useEffect(()=>{var m;const p=(m=a().find(_=>_.value===i.value))==null?void 0:m.ref.current;p&&o(p)},[a,i.value]);const f=()=>{s&&u({size:c?s.offsetWidth:s.offsetHeight,offset:c?s.offsetLeft:s.offsetTop})};return l$(s,f),l$(i.indicatorTrack,f),l?g.jsx(Hr.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":i.orientation,...n,ref:t,style:{position:"absolute",...c?{left
492:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...n.style}}):null}),Vb="NavigationMenuContent",$he=R.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=tf(Vb,e.__scopeNavigationMenu),a=Ihe(Vb,e.__scopeNavigationMenu),s=Gn(a.contentRef,t),o=a.value===i.value,l={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...n};return i.viewport?g.jsx(rje,{forceMount:r,...l,ref:s}):g.jsx(cc,{present:r||o,children:g.jsx(Fhe,{"data-state":f7(o),...l,ref:s,onPointerEnter:_r(e.onPointerEnter,i.onContentEnter),onPointerLeave:_r(e.onPointerLeave,L5(i.onContentLeave)),style:{pointerEvents:!o&&i.isRootMenu?"none":void 0,...l.style}})})});$he.displayName=Vb;var rje=R.forwardRef((e,t)=>{const r=tf(Vb,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:i}=r;return Xs(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Xs(()=>()=>i(e.value),[e.value,i]),null}),dk="navigationMenu.rootContentDismiss",Fhe=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,value:n,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:o,onContentFocusOutside:l,...u}=e,c=tf(Vb,r),d=R.useRef(null),f=Gn(d,t),h=Whe(c.baseId,n),p=Vhe(c.baseId,n),m=Che(r),_=R.useRef(null),{onItemDismiss:y}=c;R.useEffect(()=>{const b=d.current;if(c.isRootMenu&&b){const w=()=>{var x;y(),o(),b.contains(document.activeElement)&&((x=i.current)==null||x.focus())};return b.addEventListener(dk,w),()=>b.removeEventListener(dk,w)}},[c.isRootMenu,e.value,i,y,o]);const v=R.useMemo(()=>{const w=m().map(C=>C.value);c.dir==="rtl"&&w.reverse();const x=w.indexOf(c.value),E=w.indexOf(c.previousValue),T=n===c.value,S=E===w.indexOf(n);if(!T&&!S)return _.current;const A=(()=>{if(x!==E){if(T&&E!==-1)return x>E?"from-end":"from-start";if(S&&x!==-1)return x>E?"to-start":"to-end"}return null})();return _.current=A,A},[c.previousValue,c.value,c.dir,m,n]);return g.jsx(zhe,{asChild:!0,children:g.jsx(e_,{id:p,"aria-labelledby":h,"data-motion":v,"data-orientation":c.orientation,...u,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{var w;const b=new Event(dk,{bubbles:!0,cancelable:!0});(w=d.current)==null||w.dispatchEvent(b)},onFocusOutside:_r(e.onFocusOutside,b=>{var x;l();const w=b.target;(x=c.rootNavigationMenu)!=null&&x.contains(w)&&b.preventDefault()}),onPointerDownOutside:_r(e.onPointerDownOutside,b=>{var T;const w=b.target,x=m().some(S=>{var A;return(A=S.ref.current)==null?void 0:A.contains(w)}),E=c.isRootMenu&&((T=c.viewport)==null?void 0:T.contains(w));(x||E||!c.isRootMenu)&&b.preventDefault()}),onKeyDown:_r(e.onKeyDown,b=>{var E;const w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){const T=o$(b.currentTarget),S=document.activeElement,A=T.findIndex(M=>M===S),k=b.shiftKey?T.slice(0,A).reverse():T.slice(A+1,T.length);d7(k)?b.preventDefault():(E=a.current)==null||E.focus()}}),onEscapeKeyDown:_r(e.onEscapeKeyDown,b=>{s.current=!0})})})}),c7="NavigationMenuViewport",Bhe=R.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=!!tf(c7,e.__scopeNavigationMenu).value;return g.jsx(cc,{present:r||a,children:g.jsx(nje,{...n,ref:t})})});Bhe.displayName=c7;var nje=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,children:n,...i}=e,a=tf(c7,r),s=Gn(t,a.onViewportChange),o=QLe(Vb,e.__scopeNavigationMenu),[l,u]=R.useState(null),[c,d]=R.useState(null),f=l?(l==null?void 0:l.width)+"px":void 0,h=l?(l==null?void 0:l.height)+"px":void 0,p=!!a.value,m=p?a.value:a.previousValue;return l$(c,()=>{c&&u({width:c.offsetWidth,height:c.offsetHeight})}),g.jsx(Hr.div,{"data-state":f7(p),"data-orientation":a.orientation,...i,ref:s,style:{pointerEvents:!p&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":h,...i.style},onPointerEnter:_r(e.onPointerEnter,a.onContentEnter),onPointerLeave:_r(e.onPointerLeave,L5(a.onContentLeave)),children:Array.from(o.items).map(([y,{ref:v,forceMount:b,...w}])=>{const x=m===y;return g.jsx(cc,{present:b||x,children:g.jsx(Fhe,{...w,ref:Tz(v,E=>{x&&E&&d(E)})})},y)})})}),ije="FocusGroup",zhe=R.forwardRef((e,t)=>
492{const{__scopeNavigationMenu:r,...n}=e,i=tf(ije,r);return g.jsx(i$.Provider,{scope:r,children:g.jsx(i$.Slot,{scope:r,children:g.jsx(Hr.div,{dir:i.dir,...n,ref:t})})})}),GY=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],aje="FocusGroupItem",Uhe=R.forwardRef((e,t)=>{const{__scopeNavigationMenu:r,...n}=e,i=qLe(r),a=tf(aje,r);return g.jsx(i$.ItemSlot,{scope:r,children:g.jsx(Hr.button,{...n,ref:t,onKeyDown:_r(e.onKeyDown,s=>{if(["Home","End",...GY].includes(s.key)){let l=i().map(d=>d.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&l.reverse(),GY.includes(s.key)){const d=l.indexOf(s.currentTarget);l=l.slice(d+1)}setTimeout(()=>d7(l)),s.preventDefault()}})})})});function o$(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function d7(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}function sje(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const r=t.dataset.tabindex;t.setAttribute("tabindex",r)})}}function l$(e,t){const r=jo(t);Xs(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}function f7(e){return e?"open":"closed"}function Whe(e,t){return`${e}-trigger-${t}`}function Vhe(e,t){return`${e}-content-${t}`}function L5(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Hhe=Phe,Ghe=Ohe,oje=Dhe,qhe=Lhe,lje=jhe,Khe=Rhe,Yhe=$he,Xhe=Bhe;const Qhe=R.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(Hhe,{ref:n,className:Xt("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,g.jsx(tpe,{})]}));Qhe.displayName=Hhe.displayName;const Zhe=R.forwardRef(({className:e,...t},r)=>g.jsx(Ghe,{ref:r,className:Xt("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Zhe.displayName=Ghe.displayName;const uje=oje,cje=kA("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Jhe=R.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(qhe,{ref:n,className:Xt(cje(),"group",e),...r,children:[t," ",g.jsx(OA,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Jhe.displayName=qhe.displayName;const epe=R.forwardRef(({className:e,...t},r)=>g.jsx(Yhe,{ref:r,className:Xt("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));epe.displayName=Yhe.displayName;const dje=lje,tpe=R.forwardRef(({className:e,...t},r)=>g.jsx("div",{className:Xt("absolute left-0 top-full flex justify-center"),children:g.jsx(Xhe,{className:Xt("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:r,...t})}));tpe.displayName=Xhe.displayName;const fje=R.forwardRef(({className:e,...t},r)=>g.jsx(Khe,{ref:r,className:Xt("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:g.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));
vendor: 5,028 bytes, line 492
492fje.displayName=Khe.displayName;var iN="Collapsible",[hje,rpe]=Ou(iN),[pje,h7]=hje(iN),npe=R.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:a,onOpenChange:s,...o}=e,[l,u]=rd({prop:n,defaultProp:i??!1,onChange:s,caller:iN});return g.jsx(pje,{scope:r,disabled:a,contentId:Yc(),open:l,onOpenToggle:R.useCallback(()=>u(c=>!c),[u]),children:g.jsx(Hr.div,{"data-state":y7(l),"data-disabled":a?"":void 0,...o,ref:t})})});npe.displayName=iN;var ipe="CollapsibleTrigger",p7=R.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,i=h7(ipe,r);return g.jsx(Hr.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":y7(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:_r(e.onClick,i.onOpenToggle)})});p7.displayName=ipe;var m7="CollapsibleContent",g7=R.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=h7(m7,e.__scopeCollapsible);return g.jsx(cc,{present:r||i.open,children:({present:a})=>g.jsx(mje,{...n,ref:t,present:a})})});g7.displayName=m7;var mje=R.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:i,...a}=e,s=h7(m7,r),[o,l]=R.useState(n),u=R.useRef(null),c=Gn(t,u),d=R.useRef(0),f=d.current,h=R.useRef(0),p=h.current,m=s.open||o,_=R.useRef(m),y=R.useRef(void 0);return R.useEffect(()=>{const v=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(v)},[]),Xs(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();d.current=b.height,h.current=b.width,_.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),l(n)}},[s.open,n]),g.jsx(Hr.div,{"data-state":y7(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:m&&i})});function y7(e){return e?"open":"closed"}var ape=npe,gje=p7,yje=g7;const vje=ape,_je=p7,bje=g7,u$="/assets/logo-DDA9oDk4.jpg",po=({language:e,onLanguageToggle:t})=>{const[r,n]=R.useState(!1),a={en:[{label:"Home",href:"/",isRoute:!0},{label:"Incentives",href:"/incentives",isRoute:!0},{label:"Available Properties",href:"/available-properties",isRoute:!0},{label:"EcoTourism",href:"/community/ecotourism",isRoute:!0,children:[{label:"Overview",href:"/community/ecotourism",isRoute:!0},{label:"Business Empowerment",href:"/community/business-empowerment",isRoute:!0}]},{label:"Visit Alamo",href:"/visit-alamo",isRoute:!0,children:[{label:"Overview",href:"/visit-alamo",isRoute:!0},{label:"RV Parks",href:"/community/rv-parks",isRoute:!0},{label:"Where to Stay",href:"/visit-alamo/where-to-stay",isRoute:!0},{label:"Blog",href:"/visit-alamo/blog",isRoute:!0}]},{label:"Board",href:"/board",isRoute:!0},{label:"Board Meetings",href:"/board-meetings",isRoute:!0},{label:"Community",href:"/community",isRoute:!0,children:[{label:"Overview",href:"/community",isRoute:!0},{label:"Schools",href:"/community/schools",isRoute:!0},{label:"Affordable Living",href:"/community/affordable-living",isRoute:!0},{label:"Santa Ana Wildlife Refuge",href:"/community/santa-ana-refuge",isRoute:!0},{label:"Shop Local Biz",href:"/community/shop-local-biz",isRoute:!0},{label:"T-Shirt Program",href:"/community/tshirt-program",isRoute:!0}]},{label:"Contact",href:"#contact",isRoute:!1}],es:[{label:"Inicio",href:"/",isRoute:!0},{label:"Incentivos",href:"/incentives",isRoute:!0},{label:"Propiedades Disponibles",href:"/available-properties",isRoute:!0},{label:"Ecoturismo",href:"/community/ecotourism",isRoute:!0,children:[{label:"Resumen",href:"/community/ecotourism",isRoute:!0},{label:"Empoderamiento Empresarial",href:"/community/business-empowerment",isRoute:!0}]},{label:"Visita Alamo",href:"/visit-alamo",isRoute:!0,children:[{label:"Resumen",href:"/visit-alamo",isRoute:!0},{label:"Parques de RV",href:"/community/rv-parks",isRoute:!0},{label:"Dónde Hospedarse",href:"/visit-alamo/where-to-stay",isRoute:!0},{label:"Blog",href:"/visit-alamo/blog",isRoute:!0}]},{label:"Junta",href:"/board",isRoute:!0},{label:"Reuniones de la Junta",href:"/board-meetings",isRoute:!0},{label:"Comunidad",href:"/community",isRoute:!0,children:[{label:"Resumen",href:"/community",isRoute:!0},{label:"Escuelas",href:"/community/schools",isRoute:!0},{label:"Vida Asequible",href:"/community/affordable-living",isRoute:!0},{label:"Refugio de Vida Silvestre Santa Ana",href:"/community/santa-ana-refuge",isRoute:!0},{label:"Compre Negocios Locales",href:"/community/shop-local-biz",isRoute:!0},{label:"Programa de Camisetas",href:"/community/tshirt-program",isRoute:!0}]},{label:"Contacto",href:"#contact",isRoute:!1}]}[e],s=a.slice(0,5),o=a.slice(5),l=u=>u.children?g.jsx(Qhe,{children:g.jsx(Zhe,{children:g.jsxs(uje,{children:[g.jsx(Rs,{to:u.href,children:g.jsx(Jhe,{className:"px-3 py-2 text-sm font-medium text-foreground
492/80 hover:text-foreground hover:bg-muted",children:u.label})}),g.jsx(epe,{className:"left-0",children:g.jsx("ul",{className:"grid w-[200px] gap-1 p-2 bg-background border border-border shadow-lg rounded-md",children:u.children.map(c=>g.jsx("li",{children:g.jsx(dje,{asChild:!0,children:g.jsx(Rs,{to:c.href,className:"block px-3 py-2 text-sm rounded-md hover:bg-muted transition-colors",children:c.label})})},c.label))})})]})})},u.label):u.isRoute?g.jsx(Rs,{to:u.href,className:"px-3 py-2 text-sm font-medium text-foreground/80 hover:text-foreground hover:bg-muted rounded-lg transition-all duration-200",children:u.label},u.label):g.jsx("a",{href:u.href,className:"px-3 py-2 text-sm font-medium text-foreground/80 hover:text-foreground hover:bg-muted rounded-lg transition-all duration-200",children:u.label},u.label);return g.jsx("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-sm border-b border-border shadow-soft",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"flex items-center justify-between h-16 md:h-24 gap-2",children:[g.jsx("div",{className:"hidden md:flex items-center space-x-1 flex-1",children:s.map(l)}),g.jsx("div",{className:"flex items-center min-w-0 flex-1 md:flex-none justify-start md:justify-center",children:g.jsx(Rs,{to:"/",className:"min-w-0",children:g.jsx("img",{src:u$,alt:"Alamo EDC Logo",className:"h-11 sm:h-14 md:h-20 w-auto max-w-full object-contain"})})}),g.jsxs("div",{className:"hidden md:flex items-center space-x-1 flex-1 justify-end",children:[o.map(l),g.jsxs("div",{className:"ml-2 flex items-center bg-muted rounded-full p-1",children:[g.jsx("button",{onClick:e==="en"?void 0:t,className:`px-3 py-1 text-sm font-medium rounded-full transition-all ${e==="en"?"bg-primary text-primary-foreground":"text-foreground/60 hover:text-foreground"}`,children:"EN"}),g.jsx("button",{onClick:e==="es"?void 0:t,className:`px-3 py-1 text-sm font-medium rounded-full transition-all ${e==="es"?"bg-primary text-primary-foreground":"text-foreground/60 hover:text-foreground"}`,children:"ES"})]})]}),g.jsxs("div",{className:"md:hidden flex items-center space-x-2",children:[g.jsxs("div",{className:"flex items-center bg-muted rounded-full p-1",children:[g.jsx("button",{onClick:e==="en"?void 0:t,className:`px-2 py-1 text-xs font-medium rounded-full transition-all ${e==="en"?"bg-primary text-primary-foreground":"text-foreground/60 hover:text-foreground"}`,children:"EN"}),g.jsx("button",{onClick:e==="es"?void 0:t,className:`px-2 py-1 text-xs font-medium rounded-full transition-all ${e==="es"?"bg-primary text-primary-foreground":"text-foreground/60 hover:text-foreground"}`,children:"ES"})]}),g.jsx(gr,{variant:"ghost",size:"icon",onClick:()=>n(!r),"aria-label":"Toggle menu",children:r?g.jsx(Xg,{className:"h-6 w-6"}):g.jsx(S5e,{className:"h-6 w-6"})})]})]}),r&&g.jsx("div",{className:"md:hidden py-2 pb-4 animate-fade-in max-h-[calc(100dvh-4rem)] overflow-y-auto overscroll-contain border-t border-border",children:a.map(u=>g.jsx("div",{children:u.children?g.jsxs(vje,{children:[g.jsxs(_je,{className:"flex items-center justify-between w-full px-4 py-3 text-base font-medium text-foreground/80 hover:text-foreground hover:bg-muted rounded-lg transition-all duration-200",children:[u.label,g.jsx(OA,{className:"h-4 w-4"})]}),g.jsx(bje,{children:u.children.map(c=>g.jsx(Rs,{to:c.href,className:"block pl-8 pr-4 py-2 text-sm text-foreground/80 hover:text-foreground hover:bg-muted rounded-lg transition-all duration-200",onClick:()=>n(!1),children:c.label},c.label))})]}):u.isRoute?g.jsx(Rs,{to:u.href,className:"block px-4 py-3 text-base font-medium text-foreground/80 hover:text-foreground hover:bg-muted rounded-lg transition-all duration-200",onClick:()=>n(!1),children:u.label}):g.jsx("a",{href:u.href,className:"block px-4 py-3 text-base font-medium text-foreground/80 hover:text-foreground hover:bg-muted rounded-lg transition-all duration-200",onClick:()=>n(!1),children:u.label})},u.label))})]})})};function wje(e){return Object.prototype.toString.call(e)==="[object Object]"}function qY(e){return wje(e)||Array.isArray(e)}function xje(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function v7(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:r.every(s=>{const o=e[s],l=t[s];return typeof o=="function"?`${o}`==`${l}`:!qY(o)||!qY(l)?o===l:v7(o,l)})}function KY(e){return e.concat().sort((t,r)=>t.name>
vendor: 7,391 bytes, line 492
492r.name?1:-1).map(t=>t.options)}function Eje(e,t){if(e.length!==t.length)return!1;const r=KY(e),n=KY(t);return r.every((i,a)=>{const s=n[a];return v7(i,s)})}function _7(e){return typeof e=="number"}function c$(e){return typeof e=="string"}function aN(e){return typeof e=="boolean"}function YY(e){return Object.prototype.toString.call(e)==="[object Object]"}function xs(e){return Math.abs(e)}function b7(e){return Math.sign(e)}function qE(e,t){return xs(e-t)}function Tje(e,t){if(e===0||t===0||xs(e)<=xs(t))return 0;const r=qE(xs(e),xs(t));return xs(r/e)}function Sje(e){return Math.round(e*100)/100}function iS(e){return aS(e).map(Number)}function qf(e){return e[FA(e)]}function FA(e){return Math.max(0,e.length-1)}function w7(e,t){return t===FA(e)}function XY(e,t=0){return Array.from(Array(e),(r,n)=>t+n)}function aS(e){return Object.keys(e)}function spe(e,t){return[e,t].reduce((r,n)=>(aS(n).forEach(i=>{const a=r[i],s=n[i],o=YY(a)&&YY(s);r[i]=o?spe(a,s):s}),r),{})}function d$(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Aje(e,t){const r={start:n,center:i,end:a};function n(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function s(l,u){return c$(e)?r[e](l):e(t,l,u)}return{measure:s}}function sS(){let e=[];function t(i,a,s,o={passive:!0}){let l;if("addEventListener"in i)i.addEventListener(a,s,o),l=()=>i.removeEventListener(a,s,o);else{const u=i;u.addListener(s),l=()=>u.removeListener(s)}return e.push(l),n}function r(){e=e.filter(i=>i())}const n={add:t,clear:r};return n}function Cje(e,t,r,n){const i=sS(),a=1e3/60;let s=null,o=0,l=0;function u(){i.add(e,"visibilitychange",()=>{e.hidden&&p()})}function c(){h(),i.clear()}function d(_){if(!l)return;s||(s=_,r(),r());const y=_-s;for(s=_,o+=y;o>=a;)r(),o-=a;const v=o/a;n(v),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),s=null,o=0,l=0}function p(){s=null,o=0}return{init:u,destroy:c,start:f,stop:h,update:r,render:n}}function Pje(e,t){const r=t==="rtl",n=e==="y",i=n?"y":"x",a=n?"x":"y",s=!n&&r?-1:1,o=c(),l=d();function u(p){const{height:m,width:_}=p;return n?m:_}function c(){return n?"top":r?"right":"left"}function d(){return n?"bottom":r?"left":"right"}function f(p){return p*s}return{scroll:i,cross:a,startEdge:o,endEdge:l,measureSize:u,direction:f}}function Mv(e=0,t=0){const r=xs(e-t);function n(u){return u<e}function i(u){return u>t}function a(u){return n(u)||i(u)}function s(u){return a(u)?n(u)?e:t:u}function o(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:s,reachedAny:a,reachedMax:i,reachedMin:n,removeOffset:o}}function ope(e,t,r){const{constrain:n}=Mv(0,e),i=e+1;let a=s(t);function s(f){return r?xs((i+f)%i):n(f)}function o(){return a}function l(f){return a=s(f),d}function u(f){return c().set(o()+f)}function c(){return ope(e,o(),r)}const d={get:o,set:l,add:u,clone:c};return d}function Mje(e,t,r,n,i,a,s,o,l,u,c,d,f,h,p,m,_,y,v){const{cross:b,direction:w}=e,x=["INPUT","SELECT","TEXTAREA"],E={passive:!1},T=sS(),S=sS(),A=Mv(50,225).constrain(h.measure(20)),C={mouse:300,touch:400},k={mouse:500,touch:600},M=p?43:25;let D=!1,$=0,V=0,U=!1,B=!1,z=!1,q=!1;function L(H){if(!v)return;function fe(ne){(aN(v)||v(H,ne))&&ee(ne)}const Se=t;T.add(Se,"dragstart",ne=>ne.preventDefault(),E).add(Se,"touchmove",()=>{},E).add(Se,"touchend",()=>{}).add(Se,"touchstart",fe).add(Se,"mousedown",fe).add(Se,"touchcancel",Te).add(Se,"contextmenu",Te).add(Se,"click",be,!0)}function K(){T.clear(),S.clear()}function O(){const H=q?r:t;S.add(H,"touchmove",le,E).add(H,"touchend",Te).add(H,"mousemove",le,E).add(H,"mouseup",Te)}function N(H){const fe=H.nodeName||"";return x.includes(fe)}function X(){return(p?k:C)[q?"mouse":"touch"]}function ie(H,fe){const Se=d.add(b7(H)*-1),ne=c.byDistance(H,!p).distance;return p||xs(H)<A?ne:_&&fe?ne*.5:c.byIndex(Se.get(),0).distance}function ee(H){const fe=d$(H,n);q=fe,z=p&&fe&&!H.buttons&&D,D=qE(i.get(),s.get())>=2,!(fe&&H.button!==0)&&(N(H.target)||(U=!0,a.pointerDown(H),u.useFriction(0).useDuration(0),i.set(s),O(),$=a.readPoint(H),V=a.readPoint(H,b),f.emit("pointerDown")))}function le(H){if(!d$(H,n)&&H.touches.length>=2)return Te(H);const Se=a.readPoint(H),ne=a.readPoint(H,b),$e=qE(Se,$),me=qE(ne,V);if(!B&&!q&&(!H.cancelable||(B=$e>me,!B)))return Te(H);const Ue=a.pointerMove(H);$e>m&&(z=!0),u.useFriction(.3).useDuration(.75),o.start(),i.add(w(Ue)),H.preventDefault()}function Te(H){const Se=c.byDistance(0,!1).index!==d.get(),ne=a.pointerUp(H)*X(),$e=ie(w(ne),Se),me=Tje(ne,$e),Ue=M-10*me,ke=y+me/50;B=!1,U=!1,S.clear(),u.useDuration(Ue).useFriction(ke),l.distance($e,!p),q=!1,f.emit("pointerUp")}function be(H){z&&(H.stopPropagation(),H.preventDefault(),z=!1)}function we(){return U}return{init:L,destroy:K,pointerDown:we}}function kje(e,t){let n,i;function a(d){return d.timeStamp}function s(d,f){const p=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(d$(d,t)?d:d.touches[0])[p]}function o(d){return n=d,i=d,s(d)}function l(d){const f=s(d)-s(i),h=a(d)-a(n)>170;return i=d,h&&(n=d),f}function u(d){if(!n||!i)return 0;const f=s(i)-s(n),h=a(d)-a(n),p=a(d)-a(i)>170,m=f/h;return h&&!p&&xs(m)>.1?m:0}return{pointerDown:o,pointerMove:l,pointerUp:u,readPoint:s}}function Oje(){function e(r){const{offsetTop:n,offsetLeft:i,offsetWidth:a,offsetHeight:s}=r;return{top:n,right:i+a,bottom:n+s,left:i,width:a,height:s}}return{measure:e}}function Nje(e){function t(n){return e*(n/100)}return{measure:t}}function Ije(e,t,r,n,i,a,s){const o=[e].concat(n);let l,u,c=[],d=!1;function f(_){return i.measureSize(s.measure(_))}function h(_){if(!a)return;u=f(e),c=n.map(f);function y(v){for(const b of v){if(d)return;const w=b.target===e,x=n.indexOf(b.target),E=w?u:c[x],T=f(w?e:n[x]);if(xs(T-E)>=.5){_.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(aN(a)||a(_,v))&&y(v)}),r.requestAnimationFrame(()=>{o.forEach(v=>l.observe(v))})}function p(){d=!0,l&&l.disconnect()}return{init:h,destroy:p}}function Dje(e,t,r,n,i,a){let s=0,o=0,l=i,u=a,c=e.get(),d=0;function f(){const E=n.get()-e.get(),T=!l;let S=0;return T?(s=0,r.set(n),e.set(n),S=E):(r.set(e),s+=E/l,s*=u,c+=s,e.add(s),S=c-d),o=b7(S),d=c,x}function h(){const E=n.get()-t.get();return xs(E)<.001}function p(){return l}function m(){return o}function _(){return s}function y(){return b(i)}function v(){return w(a)}function b(E){return l=E,x}function w(E){return u=E,x}const x={direction:m,duration:p,velocity:_,seek:f,settled:h,useBaseFriction:v,useBaseDuration:y,useFriction:w,useDuration:b};return x}function Lje(e,t,r,n,i){const a=i.measure(10),s=i.measure(50),o=Mv(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const p=e.reachedMin(t.get())?"min":"max",m=xs(e[p]-t.get()),_=r.get()-t.get(),y=o.constrain(m/s);r.subtract(_*y),!h&&xs(_)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function jje(e,t,r,n,i){const a=Mv(-t+e,0),s=d(),o=c(),l=f();function u(p,m){return qE(p,m)<=1}function c(){const p=s[0],m=qf(s),_=s.lastIndexOf(p),y=s.indexOf(m)+1;return Mv(_,y)}function d(){return r.map((p,m)=>{const{min:_,max:y}=a,v=a.constrain(p),b=!m,w=w7(r,m);return b?y:w||u(_,v)?_:u(y,v)?y:v}).map(p=>parseFloat(p.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(n==="keepSnaps")return s;const{min:p,max:m}=o;return s.slice(p,m)}
vendor: 11,433 bytes, line 492
492return{snapsContained:l,scrollContainLimit:o}}function Rje(e,t,r){const n=t[0],i=r?n-e:qf(t);return{limit:Mv(i,n)}}function $je(e,t,r,n){const a=t.min+.1,s=t.max+.1,{reachedMin:o,reachedMax:l}=Mv(a,s);function u(f){return f===1?l(r.get()):f===-1?o(r.get()):!1}function c(f){if(!u(f))return;const h=e*(f*-1);n.forEach(p=>p.add(h))}return{loop:c}}function Fje(e){const{max:t,length:r}=e;function n(a){const s=a-t;return r?s/-r:0}return{get:n}}function Bje(e,t,r,n,i){const{startEdge:a,endEdge:s}=e,{groupSlides:o}=i,l=d().map(t.measure),u=f(),c=h();function d(){return o(n).map(m=>qf(m)[s]-m[0][a]).map(xs)}function f(){return n.map(m=>r[a]-m[a]).map(m=>-xs(m))}function h(){return o(u).map(m=>m[0]).map((m,_)=>m+l[_])}return{snaps:u,snapsAligned:c}}function zje(e,t,r,n,i,a){const{groupSlides:s}=i,{min:o,max:l}=n,u=c();function c(){const f=s(a),h=!e||t==="keepSnaps";return r.length===1?[a]:h?f:f.slice(o,l).map((p,m,_)=>{const y=!m,v=w7(_,m);if(y){const b=qf(_[0])+1;return XY(b)}if(v){const b=FA(a)-qf(_)[0]+1;return XY(b,qf(_)[0])}return p})}return{slideRegistry:u}}function Uje(e,t,r,n,i){const{reachedAny:a,removeOffset:s,constrain:o}=n;function l(p){return p.concat().sort((m,_)=>xs(m)-xs(_))[0]}function u(p){const m=e?s(p):o(p),_=t.map((v,b)=>({diff:c(v-m,0),index:b})).sort((v,b)=>xs(v.diff)-xs(b.diff)),{index:y}=_[0];return{index:y,distance:m}}function c(p,m){const _=[p,p+r,p-r];if(!e)return p;if(!m)return l(_);const y=_.filter(v=>b7(v)===m);return y.length?l(y):qf(_)-r}function d(p,m){const _=t[p]-i.get(),y=c(_,m);return{index:p,distance:y}}function f(p,m){const _=i.get()+p,{index:y,distance:v}=u(_),b=!e&&a(_);if(!m||b)return{index:y,distance:p};const w=t[y]-v,x=p+c(w,0);return{index:y,distance:x}}return{byDistance:f,byIndex:d,shortcut:c}}function Wje(e,t,r,n,i,a,s){function o(d){const f=d.distance,h=d.index!==t.get();a.add(f),f&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(r.set(t.get()),t.set(d.index),s.emit("select"))}function l(d,f){const h=i.byDistance(d,f);o(h)}function u(d,f){const h=t.clone().set(d),p=i.byIndex(h.get(),f);o(p)}return{distance:l,index:u}}function Vje(e,t,r,n,i,a,s,o){const l={passive:!0,capture:!0};let u=0;function c(h){if(!o)return;function p(m){if(new Date().getTime()-u>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;const v=r.findIndex(b=>b.includes(m));_7(v)&&(i.useDuration(0),n.index(v,0),s.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((m,_)=>{a.add(m,"focus",y=>{(aN(o)||o(h,y))&&p(_)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function uE(e){let t=e;function r(){return t}function n(l){t=s(l)}function i(l){t+=s(l)}function a(l){t-=s(l)}function s(l){return _7(l)?l:l.get()}return{get:r,set:n,add:i,subtract:a}}function lpe(e,t){const r=e.scroll==="x"?s:o,n=t.style;let i=null,a=!1;function s(f){return`translate3d(${f}px,0px,0px)`}function o(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(a)return;const h=Sje(e.direction(f));h!==i&&(n.transform=r(h),i=h)}function u(f){a=!f}function c(){a||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function Hje(e,t,r,n,i,a,s,o,l){const c=iS(i),d=iS(i).reverse(),f=y().concat(v());function h(T,S){return T.reduce((A,C)=>A-i[C],S)}function p(T,S){return T.reduce((A,C)=>h(A,S)>0?A.concat([C]):A,[])}function m(T){return a.map((S,A)=>({start:S-n[A]+.5+T,end:S+t-.5+T}))}function _(T,S,A){const C=m(S);return T.map(k=>{const M=A?0:-r,D=A?r:0,$=A?"end":"start",V=C[k][$];return{index:k,loopPoint:V,slideLocation:uE(-1),translate:lpe(e,l[k]),target:()=>o.get()>V?M:D}})}function y(){const T=s[0],S=p(d,T);return _(S,r,!1)}function v(){const T=t-s[0]-1,S=p(c,T);return _(S,-r,!0)}function b(){return f.every(({index:T})=>{const S=c.filter(A=>A!==T);return h(S,t)<=.1})}function w(){f.forEach(T=>{const{target:S,translate:A,slideLocation:C}=T,k=S();k!==C.get()&&(A.to(k),C.set(k))})}function x(){f.forEach(T=>T.translate.clear())}return{canLoop:b,clear:x,loop:w,loopPoints:f}}function Gje(e,t,r){let n,i=!1;function a(l){if(!r)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{i||(aN(r)||r(l,c))&&u(c)}),n.observe(e,{childList:!0})}function s(){n&&n.disconnect(),i=!0}return{init:a,destroy:s}}function qje(e,t,r,n){const i={};let a=null,s=null,o,l=!1;function u(){o=new IntersectionObserver(p=>{l||(p.forEach(m=>{const _=t.indexOf(m.target);i[_]=m}),a=null,s=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(p=>o.observe(p))}function c(){o&&o.disconnect(),l=!0}function d(p){return aS(i).reduce((m,_)=>{const y=parseInt(_),{isIntersecting:v}=i[y];return(p&&v||!p&&!v)&&m.push(y),m},[])}function f(p=!0){if(p&&a)return a;if(!p&&s)return s;const m=d(p);return p&&(a=m),p||(s=m),m}return{init:u,destroy:c,get:f}}function Kje(e,t,r,n,i,a){const{measureSize:s,startEdge:o,endEdge:l}=e,u=r[0]&&i,c=p(),d=m(),f=r.map(s),h=_();function p(){if(!u)return 0;const v=r[0];return xs(t[o]-v[o])}function m(){if(!u)return 0;const v=a.getComputedStyle(qf(n));return parseFloat(v.getPropertyValue(`margin-${l}`))}function _(){return r.map((v,b,w)=>{const x=!b,E=w7(w,b);return x?f[b]+c:E?f[b]+d:w[b+1][o]-v[o]}).map(xs)}return{slideSizes:f,slideSizesWithGaps:h,startGap:c,endGap:d}}function Yje(e,t,r,n,i,a,s,o,l){const{startEdge:u,endEdge:c,direction:d}=e,f=_7(r);function h(y,v){return iS(y).filter(b=>b%v===0).map(b=>y.slice(b,b+v))}function p(y){return y.length?iS(y).reduce((v,b,w)=>{const x=qf(v)||0,E=x===0,T=b===FA(y),S=i[u]-a[x][u],A=i[u]-a[b][c],C=!n&&E?d(s):0,k=!n&&T?d(o):0,M=xs(A-k-(S+C));return w&&M>t+l&&v.push(b),T&&v.push(y.length),v},[]).map((v,b,w)=>{const x=Math.max(w[b-1]||0);return y.slice(x,v)}):[]}function m(y){return f?h(y,r):p(y)}return{groupSlides:m}}function Xje(e,t,r,n,i,a,s){const{align:o,axis:l,direction:u,startIndex:c,loop:d,duration:f,dragFree:h,dragThreshold:p,inViewThreshold:m,slidesToScroll:_,skipSnaps:y,containScroll:v,watchResize:b,watchSlides:w,watchDrag:x,watchFocus:E}=a,T=2,S=Oje(),A=S.measure(t),C=r.map(S.measure),k=Pje(l,u),M=k.measureSize(A),D=Nje(M),$=Aje(o,M),V=!d&&!!v,U=d||!!v,{slideSizes:B,slideSizesWithGaps:z,startGap:q,endGap:L}=Kje(k,A,C,r,U,i),K=Yje(k,M,_,d,A,C,q,L,T),{snaps:O,snapsAligned:N}=Bje(k,$,A,C,K),X=-qf(O)+qf(z),{snapsContained:ie,scrollContainLimit:ee}=jje(M,X,N,v,T),le=V?ie:N,{limit:Te}=Rje(X,le,d),be=ope(FA(le),c,d),we=be.clone(),ae=iS(r),H=({dragHandler:mt,scrollBody:gt,scrollBounds:$t,options:{loop:kt}})=>{kt||$t.constrain(mt.pointerDown()),gt.seek()},fe=({scrollBody:mt,translate:gt,location:$t,offsetLocation:kt,previousLocation:Zt,scrollLooper:fr,slideLooper:yr,dragHandler:Kt,animation:pr,eventHandler:Ot,scrollBounds:Ir,options:{loop:cn}},kr)=>{const rr=mt.settled(),Ut=!Ir.shouldConstrain(),wr=cn?rr:rr&&Ut,Ar=wr&&!Kt.pointerDown();Ar&&pr.stop();const Jt=$t.get()*kr+Zt.get()*(1-kr);kt.set(Jt),cn&&(fr.loop(mt.direction()),yr.loop()),gt.to(kt.get()),Ar&&Ot.emit("settle"),wr||Ot.emit("scroll")},Se=Cje(n,i,()=>H(Xe),mt=>fe(Xe,mt)),ne=.68,$e=le[be.get()],me=uE($e),Ue=uE($e),ke=uE($e),ce=uE($e),ve=Dje(me,ke,Ue,ce,f,ne),Re=Uje(d,le,X,Te,ce),De=Wje(Se,be,we,ve,Re,ce,s),tt=Fje(Te),Ge=sS(),Ie=qje(t,r,s,m),{slideRegistry:He}=zje(V,v,le,ee,K,ae),Ke=Vje(e,r,He,De,ve,Ge,s,E),Xe={ownerDocument:n,ownerWindow:i,eventHandler:s,containerRect:A,slideRects:C,animation:Se,axis:k,dragHandler:Mje(k,e,n,i,ce,kje(k,i),me,Se,De,ve,Re,be,s,D,h,p,y,ne,x),eventStore:Ge,percentOfView:D,index:be,indexPrevious:we,limit:Te,location:me,offsetLocation:ke,previousLocation:Ue,options:a,resizeHandler:Ije(t,s,i,r,k,b,S),scrollBody:ve,scrollBounds:Lje(Te,ke,ce,ve,D),scrollLooper:$je(X,Te,ke,[me,ke,Ue,ce]),scrollProgress:tt,scrollSnapList:le.map(tt.get),scrollSnaps:le,scrollTarget:Re,scrollTo:De,slideLooper:Hje(k,M,X,B,z,O,le,ke,r),slideFocus:Ke,slidesHandler:Gje(t,s,w),slidesInView:Ie,slideIndexes:ae,slideRegistry:He,slidesToScroll:K,target:ce,translate:lpe(k,t)};return Xe}function Qje(){let e={},t;function r(u){t=u}function n(u){return e[u]||[]}function i(u){return n(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=n(u).concat([c]),l}function s(u,c){return e[u]=n(u).filter(d=>d!==c),l}function o(){e={}}const l={init:r,emit:i,off:s,on:a,clear:o};return l}const Zje={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Jje(e){function t(a,s){return spe(a,s||{})}function r(a){const s=a.breakpoints||{},o=aS(s).filter(l=>e.matchMedia(l).matches).map(l=>s[l]).reduce((l,u)=>t(l,u),{});return t(a,o)}function n(a){return a.map(s=>aS(s.breakpoints||{})).reduce((s,o)=>s.concat(o),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function eRe(e){let t=[];function r(a,s){return t=s.filter(({options:o})=>e.optionsAtMedia(o).active!==!1),t.forEach(o=>o.init(a,e)),s.reduce((o,l)=>Object.assign(o,{[l.name]:l}),{})}function n(){t=t.filter(a=>a.destroy())}return{init:r,destroy:n}}function j5(e,t,r){const n=e.ownerDocument,i=n.defaultView,a=Jje(i),s=eRe(a),o=sS(),l=Qje(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:h,emit:p}=l,m=k;let _=!1,y,v=u(Zje,j5.globalOptions),b=u(v),w=[],x,E,T;function S(){const{container:ae,slides:H}=b;E=(c$(ae)?e.querySelector(ae):ae)||e.children[0];const Se=c$(H)?E.querySelectorAll(H):H;T=[].slice.call(Se||E.children)}function A(ae){const H=Xje(e,E,T,n,i,ae,l);if(ae.loop&&!H.slideLooper.canLoop()){const fe=Object.assign({},ae,{loop:!1});return A(fe)}return H}function C(ae,H){_||(v=u(v,ae),b=c(v),w=H||w,S(),y=A(b),d([v,...w.map(({options:fe})=>fe)]).forEach(fe=>o.add(fe,"change",k)),b.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(we),y.eventHandler.init(we),y.resizeHandler.init(we),y.slidesHandler.init(we),y.options.loop&&y.slideLooper.loop(),E.offsetParent&&T.length&&y.dragHandler.init(we),x=s.init(we,w)))}function k(ae,H){const fe=K();M(),C(u({startIndex:fe},ae),H),l.emit("reInit")}function M(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),s.destroy(),o.clear()}function D(){_||(_=!0,o.clear(),M(),l.emit("destroy"),l.clear())}function $(ae,H,fe){!b.active||_||(y.scrollBody.useBaseFriction().useDuration(H===!0?0:b.duration),y.scrollTo.index(ae,fe||0))}function V(ae){const H=y.index.add(1).get();$(H,ae,-1)}function U(ae){const H=y.index.add(-1).get();$(H,ae,1)}function B(){return y.index.add(1).get()!==K()}function z(){return y.index.add(-1).get()!==K()}function q(){return y.scrollSnapList}function L(){return y.scrollProgress.get(y.offsetLocation.get())}function K(){return y.index.get()}function O(){return y.indexPrevious.get()}function N(){return y.slidesInView.get()}function X(){return y.slidesInView.get(!1)}function ie(){return x}function ee(){return y}function le(){return e}function Te(){return E}function be(){return T}const we={canScrollNext:B,canScrollPrev:z,containerNode:Te,internalEngine:ee,destroy:D,off:h,on:f,emit:p,plugins:ie,previousScrollSnap:O,reInit:m,rootNode:le,scrollNext:V,scrollPrev:U,scrollProgress:L,scrollSnapList:q,scrollTo:$,selectedScrollSnap:K,slideNo
vendor: 4,253 bytes, line 492
492des:be,slidesInView:N,slidesNotInView:X};return C(t,r),setTimeout(()=>l.emit("init"),0),we}j5.globalOptions=void 0;function sN(e={},t=[]){const r=R.useRef(e),n=R.useRef(t),[i,a]=R.useState(),[s,o]=R.useState(),l=R.useCallback(()=>{i&&i.reInit(r.current,n.current)},[i]);return R.useEffect(()=>{v7(r.current,e)||(r.current=e,l())},[e,l]),R.useEffect(()=>{Eje(n.current,t)||(n.current=t,l())},[t,l]),R.useEffect(()=>{if(xje()&&s){j5.globalOptions=sN.globalOptions;const u=j5(s,r.current,n.current);return a(u),()=>u.destroy()}else a(void 0)},[s,a]),[o,i]}sN.globalOptions=void 0;const tRe={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function rRe(e,t){const r=e.scrollSnapList();return typeof t=="number"?r.map(()=>t):t(r,e)}function nRe(e,t){const r=e.rootNode();return t&&t(r)||r}function x7(e={}){let t,r,n,i,a=null,s=0,o=!1,l=!1,u=!1,c=!1;function d($,V){r=$;const{mergeOptions:U,optionsAtMedia:B}=V,z=U(tRe,x7.globalOptions),q=U(z,e);if(t=B(q),r.scrollSnapList().length<=1)return;c=t.jump,n=!1,i=rRe(r,t.delay);const{eventStore:L,ownerDocument:K}=r.internalEngine(),O=!!r.internalEngine().options.watchDrag,N=nRe(r,t.rootNode);L.add(K,"visibilitychange",y),O&&r.on("pointerDown",b),O&&!t.stopOnInteraction&&r.on("pointerUp",w),t.stopOnMouseEnter&&L.add(N,"mouseenter",x),t.stopOnMouseEnter&&!t.stopOnInteraction&&L.add(N,"mouseleave",E),t.stopOnFocusIn&&r.on("slideFocusStart",_),t.stopOnFocusIn&&!t.stopOnInteraction&&L.add(r.containerNode(),"focusout",m),t.playOnInit&&m()}function f(){r.off("pointerDown",b).off("pointerUp",w).off("slideFocusStart",_),_(),n=!0,o=!1}function h(){const{ownerWindow:$}=r.internalEngine();$.clearTimeout(s),s=$.setTimeout(k,i[r.selectedScrollSnap()]),a=new Date().getTime(),r.emit("autoplay:timerset")}function p(){const{ownerWindow:$}=r.internalEngine();$.clearTimeout(s),s=0,a=null,r.emit("autoplay:timerstopped")}function m(){if(!n){if(v()){u=!0;return}o||r.emit("autoplay:play"),h(),o=!0}}function _(){n||(o&&r.emit("autoplay:stop"),p(),o=!1)}function y(){if(v())return u=o,_();u&&m()}function v(){const{ownerDocument:$}=r.internalEngine();return $.visibilityState==="hidden"}function b(){l||_()}function w(){l||m()}function x(){l=!0,_()}function E(){l=!1,m()}function T($){typeof $<"u"&&(c=$),m()}function S(){o&&_()}function A(){o&&m()}function C(){return o}function k(){const{index:$}=r.internalEngine(),V=$.clone().add(1).get(),U=r.scrollSnapList().length-1,B=t.stopOnLastSnap&&V===U;if(r.canScrollNext()?r.scrollNext(c):r.scrollTo(0,c),r.emit("autoplay:select"),B)return _();m()}function M(){if(!a)return null;const $=i[r.selectedScrollSnap()],V=new Date().getTime()-a;return $-V}return{name:"autoplay",options:e,init:d,destroy:f,play:T,stop:S,reset:A,isPlaying:C,timeUntilNext:M}}x7.globalOptions=void 0;const iRe="/assets/historic-church-BM1_sdJf.jpg",aRe="/assets/ecotourism-bridge-DNkaOWvu.jpg",sRe="/assets/watermelon-pageant-CefYNvKZ.jpg",oRe="/assets/watermelon-crowd-BIwo4rNV.jpg",lRe="/assets/alamo-austin-exterior-4c3L2pe5.webp",uRe="/assets/alamo-austin-chamber-a93plowE.webp",cRe="/assets/alamo-capitol-stairs-1-BbwSLpCm.png",dRe="/assets/alamo-capitol-stairs-2-DGU9BzsZ.png",dD=[{image:lRe,alt:"Alamo Day at Texas Capitol",position:"top"},{image:uRe,alt:"Alamo Delegation in Capitol Chamber",position:"top"},{image:cRe,alt:"Alamo Delegation on Capitol Stairs",position:"top",scale:"scale-[0.85] origin-bottom"},{image:dRe,alt:"Alamo Delegation Group Photo",position:"top",scale:"scale-[0.85] origin-bottom"},{image:sRe,alt:"Watermelon Festival Pageant",position:"top"},{image:oRe,alt:"Watermelon Festival Crowd",position:"top"},{image:iRe,alt:"Historic Alamo Church",position:"top"},{image:aRe,alt:"Ecotourism Nature Bridge",position:"top"}],fRe=({language:e})=>{const[t,r]=R.useState(0),n=x7({delay:5e3,stopOnInteraction:!1,stopOnMouseEnter:!0}),[i,a]=sN({loop:!0,duration:30},[n]),o={en:{headline:"Supporting Local Business Growth in Alamo",subheadline:"Helping entrepreneurs turn dreams into reality through programs, grants, and resources.",ctaPrimary:"Explore Programs"},es:{headline:"Apoyando el Crecimiento de Negocios Locales en Alamo",subheadline:"Ayudando a emprendedores a convert
492ir sueños en realidad a través de programas, subvenciones y recursos.",ctaPrimary:"Explorar Programas"}}[e],l=R.useCallback(()=>{a&&a.scrollPrev()},[a]),u=R.useCallback(()=>{a&&a.scrollNext()},[a]),c=R.useCallback(f=>{a&&a.scrollTo(f)},[a]),d=R.useCallback(()=>{a&&r(a.selectedScrollSnap())},[a]);return R.useEffect(()=>{if(a)return d(),a.on("select",d),()=>{a.off("select",d)}},[a,d]),g.jsxs("section",{className:"relative min-h-[62vh] sm:min-h-[70vh] md:min-h-[85vh] flex items-end overflow-hidden pt-16 md:pt-0",children:[g.jsx("div",{className:"absolute inset-0 z-0",ref:i,children:g.jsx("div",{className:"flex h-full",children:dD.map((f,h)=>g.jsx("div",{className:"flex-[0_0_100%] min-w-0 relative h-full",children:g.jsx("img",{src:f.image,alt:f.alt,loading:h===0?"eager":"lazy",className:`w-full h-full object-cover object-center ${f.position==="center"?"md:object-center":f.position==="bottom"?"md:object-bottom":"md:object-top"} ${f.scale?`md:${f.scale}`:""}`})},h))})}),g.jsx("button",{onClick:l,className:"hidden md:flex items-center justify-center absolute left-4 md:left-8 top-1/2 -translate-y-1/2 z-20 h-11 w-11 rounded-full bg-white/10 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 transition-all opacity-70 hover:opacity-100","aria-label":"Previous slide",children:g.jsx(ude,{className:"h-6 w-6"})}),g.jsx("button",{onClick:u,className:"hidden md:flex items-center justify-center absolute right-4 md:right-8 top-1/2 -translate-y-1/2 z-20 h-11 w-11 rounded-full bg-white/10 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 transition-all opacity-70 hover:opacity-100","aria-label":"Next slide",children:g.jsx(Pz,{className:"h-6 w-6"})}),g.jsx("div",{className:"absolute bottom-28 left-1/2 -translate-x-1/2 z-20 hidden md:flex gap-2",children:dD.map((f,h)=>g.jsx("button",{onClick:()=>c(h),className:`w-2.5 h-2.5 rounded-full transition-all ${h===t?"bg-white scale-110":"bg-white/40 hover:bg-white/60"}`,"aria-label":`Go to slide ${h+1}`},h))}),g.jsxs("div",{className:"relative z-10 w-full mb-0",children:[g.jsx("div",{className:"md:hidden flex justify-center gap-3 pb-3",children:dD.map((f,h)=>g.jsx("button",{onClick:()=>c(h),className:"p-2 -m-1","aria-label":`Go to slide ${h+1}`,children:g.jsx("span",{className:`block w-2 h-2 rounded-full transition-all ${h===t?"bg-white scale-125":"bg-white/50"}`})},h))}),g.jsx("div",{className:"bg-black/50 backdrop-blur-sm py-4 md:py-5 px-4",children:g.jsxs("div",{className:"container mx-auto flex flex-col md:flex-row md:items-center md:justify-between gap-3 md:gap-4",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold text-white mb-1 animate-fade-in-up leading-tight [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%),_0_0_20px_rgb(0_0_0_/_60%)]",children:o.headline}),g.jsx("p",{className:"text-sm sm:text-base md:text-lg text-white/90 animate-fade-in-up [animation-delay:200ms] [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%),_0_0_12px_rgb(0_0_0_/_50%)]",children:o.subheadline})]}),g.jsx("div",{className:"shrink-0 animate-fade-in-up [animation-delay:400ms]",children:g.jsx(gr,{size:"lg",variant:"secondary",className:"w-full md:w-auto text-base font-semibold px-8 shadow-large",asChild:!0,children:g.jsxs(Rs,{to:"/incentives",children:[o.ctaPrimary,g.jsx(t_,{className:"ml-2 h-5 w-5"})]})})})]})})]})]})},hRe=({language:e})=>{const r={en:{title:"About Alamo EDC",description:"Fostering a thriving economy and supporting local businesses in Alamo."},es:{title:"Acerca de Alamo EDC",description:"Fomentando una economÃa próspera y apoyando a los negocios locales en Alamo."}}[e];return g.jsx("section",{id:"about",className:"py-10 md:py-16 bg-background",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"max-w-3xl mx-auto",children:g.jsx("div",{className:"paper-card rounded-xl p-8 md:p-12 shadow-medium animate-fade-in",children:g.jsxs("div",{className:"flex flex-col md:flex-row gap-8 items-center",children:[g.jsx("div",{className:"w-full md:w-1/3 flex-shrink-0",children:g.jsx("div",{className:"rounded-lg overflow-hidden shadow-soft",children:g.jsx("img",{alt:"Alamo EDC Team",className:"w-full h-auto object-cover",src:"/lovable-uploads/73fcbee2-22e4-49f9-ac54-78b87136848b.jpg"})})}),g.jsxs("div",{className:"flex-1 text-center md:text-left",children:[g.jsx("h2",{className:"text-2xl md:text-2xl md:text-3xl font-bold text-foreground mb-4",children:r.title}),g.jsx("p",{className:"text-base md:text-lg text-muted-foreground leading-relaxed",children:r.description})]})]})})})})})},pRe=({language:e})=>{const r={en:{programs:[{title:"Alamo's Mayor Small Business Start-Up Grant",description:"New Business Support",color:"bg-program-blue"},{title:"Alamo Small New Business Grant Program",description:"Apply Today",color:"bg-program-green"},{title:"Alamo Revolving Loan Fund Program",description:"Low-Interest Business Loans",color:"bg-program-tan"},{title:"Alamo Small Business Equipment Grant",description:"Equipment Support",color:"bg-program-orange"},{title:"Legacy Business Appreciation Program",description:"10+ Years in Business",color:"bg-program-blue"}]},es:{programs:[{title:"Subvención de Inicio del Alcalde de Alamo",description:"Apoyo a Nuevos Negocios",color:"bg-program-blue"},{title:"Programa de Subvención para Pequeños Negocios Nuevos de Alamo",description:"Aplique Hoy",color:"bg-program-green"},{title:"Programa de Fondo Rotatorio de Préstamos de Alamo",description:"Préstamos de Bajo Interés",color:"bg-program-tan"},{title:"Subvención de Equipo para Pequeños Negocios de Alamo",description:"Apoyo de Equipo",color:"bg-program-orange"},{title:"Programa de Apreciación de Negocios de Legado",description:"Más de 10 Añ
492os en Operación",color:"bg-program-blue"}]}}[e];return g.jsx("section",{id:"incentives",className:"py-10 md:py-16 bg-background",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-6",children:r.programs.map((n,i)=>g.jsxs("div",{className:"rounded-xl overflow-hidden shadow-medium hover:shadow-large transition-all duration-300 hover:-translate-y-1 animate-fade-in-up",style:{animationDelay:`${i*100}ms`},children:[g.jsx("div",{className:`${n.color} py-4 px-6`,children:g.jsx("h3",{className:"text-lg md:text-xl font-bold text-white text-center",children:n.title})}),g.jsx("div",{className:"bg-card py-6 px-6 text-center",children:g.jsx(gr,{variant:"outline",className:"w-full border-2 hover:bg-muted",asChild:!0,children:g.jsxs(Rs,{to:"/incentives",children:[n.description,g.jsx(t_,{className:"ml-2 h-4 w-4"})]})})})]},i))})})})},un=R.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:Xt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));un.displayName="Card";const zi=R.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:Xt("flex flex-col space-y-1.5 p-6",e),...t}));zi.displayName="CardHeader";const Ui=R.forwardRef(({className:e,...t},r)=>g.jsx("h3",{ref:r,className:Xt("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ui.displayName="CardTitle";const ho=R.forwardRef(({className:e,...t},r)=>g.jsx("p",{ref:r,className:Xt("text-sm text-muted-foreground",e),...t}));ho.displayName="CardDescription";const kn=R.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:Xt("p-6 pt-0",e),...t}));kn.displayName="CardContent";const mRe=R.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:Xt("flex items-center p-6 pt-0",e),...t}));mRe.displayName="CardFooter";const gRe=({language:e})=>{const r={en:{title:"Sales Tax Permit Review Checklist",description:"Download our official checklist to verify sales tax permit validity, business information, and required documentation for Alamo EDC incentive programs.",button:"Download Checklist"},es:{title:"Lista de Verificación del Permiso de Impuesto sobre Ventas",description:"Descargue nuestra lista de verificación oficial para validar la vigencia del permiso de impuesto sobre ventas, información del negocio y documentación requerida para los programas de incentivos de Alamo EDC.",button:"Descargar Lista de Verificación"}}[e];return g.jsx("section",{className:"py-10 md:py-16 bg-background",children:g.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:g.jsx(un,{className:"border-l-4 border-primary bg-primary/5 hover:shadow-large transition-all duration-300",children:g.jsx(kn,{className:"p-6 md:p-8",children:g.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[g.jsx("div",{className:"flex-shrink-0 w-16 h-16 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:g.jsx(g5e,{className:"h-8 w-8"})}),g.jsxs("div",{className:"flex-1",children:[g.jsx("h2",{className:"text-2xl md:text-2xl md:text-3xl font-bold mb-2",children:r.title}),g.jsx("p",{className:"text-muted-foreground text-lg",children:r.description})]}),g.jsx(gr,{asChild:!0,size:"lg",className:"flex-shrink-0",children:g.jsxs("a",{href:"/documents/Sales_Tax_Permit_Checklist.pdf",download:!0,className:"flex items-center gap-2",children:[g.jsx(Xw,{className:"h-5 w-5"}),r.button]})})]})})})})})},yRe="/assets/la-familia-bakery-BGDJh8HB.png",vRe=({language:e})=>{const r={en:{label:"Featured Local Business",tagline:"A local favorite for delicious pastries and treats. Proudly serving Alamo!",cta:"Learn More"},es:{label:"Negocio Local Destacado",tagline:"Un favorito local por sus deliciosos pasteles y dulces. ¡Sirviendo orgullosamente a Alamo!",cta:"Más Información"}}[e];return g.jsxs("section",{className:"relative py-24 overflow-hidden",children:[g.jsxs("div",{className:"absolute inset-0 z-0",children:[g.jsx("img",{src:yRe,alt:"La Familia Bakery",className:"w-full h-full object-cover"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/80 to-primary/40"})]}),g.jsx("div",{className:"relative z-10 container mx-auto px-4",children:g.jsxs("div",{className:"max-w-xl animate-fade-in",children:[g.jsx("span",{className:"inline-block text-sm font-semibold text-accent uppercase tracking-wider mb-4",children:r.label}),g.jsx("p",{className:"text-xl md:text-2xl text-white/90 mb-8 leading-relaxed",children:r.tagline}),g.jsx(gr,{variant:"secondary",size:"lg",className:"font-semibold",asChild:!0,children:g.jsxs(Rs,{to:"/community/shop-local-biz",children:[r.cta,g.jsx(t_,{className:"ml-2 h-5 w-5"})]})})]})})]})},_Re=({language:e})=>{const r={en:{headline:"Have a Business Idea?",subheadline:"Start Your Journey with Alamo EDC Today!",cta:"Apply for Assistance"},es:{headline:"¿Tienes una Idea de Negocio?",subheadline:"¡Comienza Tu Camino con Alamo EDC Hoy!",cta:"Solicitar Asistencia"}}[e];return g.jsx("section",{className:"wood-texture py-10 md:py-16",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsxs("div",{className:"text-center animate-fade-in",children:[g.jsx("h2",{className:"text-2xl md:text-2xl md:text-3xl font-bold text-white mb-2",children:r.headline}),g.jsx("p",{className:"text-xl md:text-2xl text-white/90 mb-8",children:r.subheadline}),g.jsx(gr,{size:"lg",variant:"secondary",className:"font-semibold px-8",asChild:!0,children:g.jsxs(Rs,{to:"/incentives",children:[r.cta,g.jsx(t_,{className:"ml-2 h-5 w-5"})]})})]})})})};var BA=e=>e.type==="checkbox",Oy=e=>e instanceof Date,_u=e=>e==null;const upe=e=>typeof e=="object";var Ys=e=>!_u(e)&&!Array.isArray(e)&&upe(e)&&!Oy(e),cpe=e=>Ys(e)&&e.target?BA(e.target)?e.target.checked:e.target.value:e,bRe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dpe=(e,t)=>e.has(bRe(t)),wRe=e=>{const t=e.constructor&&e.constructor.prototype;return Ys(t)&&t.hasOwnProperty("isPrototypeOf")},E7=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Oo(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(E7&&(e instanceof Blob||n))&&(r||Ys(e)))if(t=r?[]:{},!r&&!wRe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Oo(e[i]));else return e;return t}var oN=e=>/^\w*$/.test(e),zs=e=>e===void 0,T7=e=>Array.isArray(e)?e.filter(Boolean):[],S7=e=>T7(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mr=(e,t,r)=>{if(!t||!Ys(e))return r;const n=(oN(t)?[t]:S7(t)).reduce((i,a)=>_u(i)?i:i[a],e);return zs(n)||n===e?zs(e[t])?r:e[t]:n},Ic=e=>typeof e=="boolean",Ji=(e,t,r)=>{let n=-1;const i=oN(t)?[t]:S7(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const u=e[o];
492l=Ys(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const R5={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ff={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pp={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},A7=_e.createContext(null);A7.displayName="HookFormContext";const lN=()=>_e.useContext(A7),xRe=e=>{const{children:t,...r}=e;return _e.createElement(A7.Provider,{value:r},t)};var fpe=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==Ff.all&&(t._proxyFormState[s]=!n||Ff.all),r&&(r[s]=!0),e[s]}});return i};const C7=typeof window<"u"?_e.useLayoutEffect:_e.useEffect;function ERe(e){const t=lN(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=_e.useState(r._formState),l=_e.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return C7(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:u=>{!n&&o({...r._formState,...u})}}),[i,n,a]),_e.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),_e.useMemo(()=>fpe(s,r,l.current,!1),[s,r])}var Nh=e=>typeof e=="string",hpe=(e,t,r,n,i)=>Nh(e)?(n&&t.watch.add(e),mr(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),mr(r,a))):(n&&(t.watchAll=!0),r),f$=e=>_u(e)||!upe(e);function Np(e,t,r=new WeakSet){if(f$(e)||f$(t))return e===t;if(Oy(e)&&Oy(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const s=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const o=t[a];if(Oy(s)&&Oy(o)||Ys(s)&&Ys(o)||Array.isArray(s)&&Array.isArray(o)?!Np(s,o,r):s!==o)return!1}}return!0}function TRe(e){const t=lN(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s,compute:o}=e||{},l=_e.useRef(i),u=_e.useRef(o),c=_e.useRef(void 0);u.current=o;const d=_e.useMemo(()=>r._getWatch(n,l.current),[r,n]),[f,h]=_e.useState(u.current?u.current(d):d);return C7(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:p=>{if(!a){const m=hpe(n,r._names,p.values||r._formValues,!1,l.current);if(u.current){const _=u.current(m);Np(_,c.current)||(h(_),c.current=_)}else h(m)}}}),[r,a,n,s]),_e.useEffect(()=>r._removeUnmounted()),f}function SRe(e){const t=lN(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a,defaultValue:s}=e,o=dpe(i._names.array,r),l=_e.useMemo(()=>mr(i._formValues,r,mr(i._defaultValues,r,s)),[i,r,s]),u=TRe({control:i,name:r,defaultValue:l,exact:!0}),c=ERe({control:i,name:r,exact:!0}),d=_e.useRef(e),f=_e.useRef(i.register(r,{...e.rules,value:u,...Ic(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const h=_e.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!mr(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!mr(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!mr(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!mr(c.validatingFields,r)},error:{enumerable:!0,get:()=>mr(c.errors,r)}}),[c,r]),p=_e.useCallback(v=>f.current.onChange({target:{value:cpe(v),name:r}
492,type:R5.CHANGE}),[r]),m=_e.useCallback(()=>f.current.onBlur({target:{value:mr(i._formValues,r),name:r},type:R5.BLUR}),[r,i._formValues]),_=_e.useCallback(v=>{const b=mr(i._fields,r);b&&v&&(b._f.ref={focus:()=>v.focus&&v.focus(),select:()=>v.select&&v.select(),setCustomValidity:w=>v.setCustomValidity(w),reportValidity:()=>v.reportValidity()})},[i._fields,r]),y=_e.useMemo(()=>({name:r,value:u,...Ic(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:p,onBlur:m,ref:_}),[r,n,c.disabled,p,m,_,u]);return _e.useEffect(()=>{const v=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...Ic(d.current.disabled)?{disabled:d.current.disabled}:{}});const b=(w,x)=>{const E=mr(i._fields,w);E&&E._f&&(E._f.mount=x)};if(b(r,!0),v){const w=Oo(mr(i._options.defaultValues,r));Ji(i._defaultValues,r,w),zs(mr(i._formValues,r))&&Ji(i._formValues,r,w)}return!o&&i.register(r),()=>{(o?v&&!i._state.action:v)?i.unregister(r):b(r,!1)}},[r,i,o,a]),_e.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),_e.useMemo(()=>({field:y,formState:c,fieldState:h}),[y,c,h])}const ARe=e=>e.render(SRe(e));var ppe=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},KE=e=>Array.isArray(e)?e:[e],QY=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},Wu=e=>Ys(e)&&!Object.keys(e).length,P7=e=>e.type==="file",Bf=e=>typeof e=="function",$5=e=>{if(!E7)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},mpe=e=>e.type==="select-multiple",M7=e=>e.type==="radio",CRe=e=>M7(e)||BA(e),fD=e=>$5(e)&&e.isConnected;function PRe(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;
vendor: 9,947 bytes, line 492
492)e=zs(e)?n++:e[t[n++]];return e}function MRe(e){for(const t in e)if(e.hasOwnProperty(t)&&!zs(e[t]))return!1;return!0}function ao(e,t){const r=Array.isArray(t)?t:oN(t)?[t]:S7(t),n=r.length===1?e:PRe(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Ys(n)&&Wu(n)||Array.isArray(n)&&MRe(n))&&ao(e,r.slice(0,-1)),e}var gpe=e=>{for(const t in e)if(Bf(e[t]))return!0;return!1};function F5(e,t={}){const r=Array.isArray(e);if(Ys(e)||r)for(const n in e)Array.isArray(e[n])||Ys(e[n])&&!gpe(e[n])?(t[n]=Array.isArray(e[n])?[]:{},F5(e[n],t[n])):_u(e[n])||(t[n]=!0);return t}function ype(e,t,r){const n=Array.isArray(e);if(Ys(e)||n)for(const i in e)Array.isArray(e[i])||Ys(e[i])&&!gpe(e[i])?zs(t)||f$(r[i])?r[i]=Array.isArray(e[i])?F5(e[i],[]):{...F5(e[i])}:ype(e[i],_u(t)?{}:t[i],r[i]):r[i]=!Np(e[i],t[i]);return r}var x2=(e,t)=>ype(e,t,F5(t));const ZY={value:!1,isValid:!1},JY={value:!0,isValid:!0};var vpe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!zs(e[0].attributes.value)?zs(e[0].value)||e[0].value===""?JY:{value:e[0].value,isValid:!0}:JY:ZY}return ZY},_pe=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>zs(e)?e:t?e===""?NaN:e&&+e:r&&Nh(e)?new Date(e):n?n(e):e;const eX={isValid:!1,value:null};var bpe=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,eX):eX;function tX(e){const t=e.ref;return P7(t)?t.files:M7(t)?bpe(e.refs).value:mpe(t)?[...t.selectedOptions].map(({value:r})=>r):BA(t)?vpe(e.refs).value:_pe(zs(t.value)?e.ref.value:t.value,e)}var kRe=(e,t,r,n)=>{const i={};for(const a of e){const s=mr(t,a);s&&Ji(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},B5=e=>e instanceof RegExp,E2=e=>zs(e)?e:B5(e)?e.source:Ys(e)?B5(e.value)?e.value.source:e.value:e,rX=e=>({isOnSubmit:!e||e===Ff.onSubmit,isOnBlur:e===Ff.onBlur,isOnChange:e===Ff.onChange,isOnAll:e===Ff.all,isOnTouch:e===Ff.onTouched});const nX="AsyncFunction";var ORe=e=>!!e&&!!e.validate&&!!(Bf(e.validate)&&e.validate.constructor.name===nX||Ys(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===nX)),NRe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),iX=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const YE=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=mr(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(YE(o,t))break}else if(Ys(o)&&YE(o,t))break}}};function aX(e,t,r){const n=mr(e,r);if(n||oN(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=mr(t,a),o=mr(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var IRe=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return Wu(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||Ff.all))},DRe=(e,t,r)=>!e||!t||e===t||KE(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),LRe=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,jRe=(e,t)=>!T7(mr(e,t)).length&&ao(e,t),RRe=(e,t,r)=>{const n=KE(mr(e,r));return Ji(n,"root",t[r]),Ji(e,r,n),e},fk=e=>Nh(e);function sX(e,t,r="validate"){if(fk(e)||Array.isArray(e)&&e.every(fk)||Ic(e)&&!e)return{type:r,message:fk(e)?e:"",ref:t}}var V_=e=>Ys(e)&&!B5(e)?e:{value:e,message:""},oX=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:u,minLength:c,min:d,max:f,pattern:h,validate:p,name:m,valueAsNumber:_,mount:y}=e._f,v=mr(r,m);if(!y||t.has(m))return{};const b=o?o[0]:s,w=M=>{i&&b.reportValidity&&(b.setCustomValidity(Ic(M)?"":M||""),b.reportValidity())},x={},E=M7(s),T=BA(s),S=E||T,A=(_||P7(s))&&zs(s.value)&&zs(v)||$5(s)&&s.value===""||v===""||Array.isArray(v)&&!v.length,C=ppe.bind(null,m,n,x),k=(M,D,$,V=pp.maxLength,U=pp.minLength)=>{const B=M?D:$;x[m]={type:M?V:U,message:B,ref:s,...C(M?V:U,B)}};if(a?!Array.isArray(v)||!v.length:l&&(!S&&(A||_u(v))||Ic(v)&&!v||T&&!vpe(o).isValid||E&&!bpe(o).isValid)){const{value:M,message:D}=fk(l)?{value:!!l,message:l}:V_(l);if(M&&(x[m]={type:pp.required,message:D,ref:b,...C(pp.required,D)},!n))return w(D),x}if(!A&&(!_u(d)||!_u(f))){let M,D;const $=V_(f),V=V_(d);if(!_u(v)&&!isNaN(v)){const U=s.valueAsNumber||v&&+v;_u($.value)||(M=U>$.value),_u(V.value)||(D=U<V.value)}else{const U=s.valueAsDate||new Date(v),B=L=>new Date(new Date().toDateString()+" "+L),z=s.type=="time",q=s.type=="week";Nh($.value)&&v&&(M=z?B(v)>B($.value):q?v>$.value:U>new Date($.value)),Nh(V.value)&&v&&(D=z?B(v)<B(V.value):q?v<V.value:U<new Date(V.value))}if((M||D)&&(k(!!M,$.message,V.message,pp.max,pp.min),!n))return w(x[m].message),x}if((u||c)&&!A&&(Nh(v)||a&&Array.isArray(v))){const M=V_(u),D=V_(c),$=!_u(M.value)&&v.length>+M.value,V=!_u(D.value)&&v.length<+D.value;if(($||V)&&(k($,M.message,D.message),!n))return w(x[m].message),x}if(h&&!A&&Nh(v)){const{value:M,message:D}=V_(h);if(B5(M)&&!v.match(M)&&(x[m]={type:pp.pattern,message:D,ref:s,...C(pp.pattern,D)},!n))return w(D),x}if(p){if(Bf(p)){const M=await p(v,r),D=sX(M,b);if(D&&(x[m]={...D,...C(pp.validate,D.message)},!n))return w(D.message),x}else if(Ys(p)){let M={};for(const D in p){if(!Wu(M)&&!n)break;const $=sX(await p[D](v,r),b,D);$&&(M={...$,...C(D,$.message)},w($.message),n&&(x[m]=M))}if(!Wu(M)&&(x[m]={ref:b,...M},!n))return x}}return w(!0),x};const $Re={mode:Ff.onSubmit,reValidateMode:Ff.onChange,shouldFocusError:!0};function FRe(e={}){let t={...$Re,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Bf(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=Ys(t.defaultValues)||Ys(t.values)?Oo(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Oo(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...c};const f={array:QY(),state:QY()},h=t.criteriaMode===Ff.all,p=ce=>ve=>{clearTimeout(u),u=setTimeout(ce,ve)},m=async ce=>{if(!t.disabled&&(c.isValid||d.isValid||ce)){const ve=t.resolver?Wu((await T()).errors):await A(n,!0);ve!==r.isValid&&f.state.next({isValid:ve})}},_=(ce,ve)=>{!t.disabled&&(c.isValidating||c.validatingFields||d.isValidating||d.validatingFields)&&((ce||Array.from(o.mount)).forEach(Re=>{Re&&(ve?Ji(r.validatingFields,Re,ve):ao(r.validatingFields,Re))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Wu(r.validatingFields)}))},y=(ce,ve=[],Re,De,tt=!0,Ge=!0)=>{if(De&&Re&&!t.disabled){if(s.action=!0,Ge&&Array.isArray(mr(n,ce))){const Ie=Re(mr(n,ce),De.argA,De.argB);tt&&Ji(n,ce,Ie)}if(Ge&&Array.isArray(mr(r.errors,ce))){const Ie=Re(mr(r.errors,ce),De.argA,De.argB);tt&&Ji(r.errors,ce,Ie),jRe(r.errors,ce)}if((c.touchedFields||d.touchedFields)&&Ge&&Array.isArray(mr(r.touchedFields,ce))){const Ie=Re(mr(r.touchedFields,ce),De.argA,De.argB);tt&&Ji(r.touchedFields,ce,Ie)}(c.dirtyFields||d.dirtyFields)&&(r.dirtyFields=x2(i,a)),f.state.next({name:ce,isDirty:k(ce,ve),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ji(a,ce,ve)},v=(ce,ve)=>{Ji(r.errors,ce,ve),f.state.next({errors:r.errors})},b=ce=>{r.errors=ce,f.state.next({errors:r.errors,isValid:!1})},w=(ce,ve,Re,De)=>{const tt=mr(n,ce);if(tt){const Ge=mr(a,ce,zs(Re)?mr(i,ce):Re);zs(Ge)||De&&De.defaultChecked||ve?Ji(a,ce,ve?Ge:tX(tt._f)):$(ce,Ge),s.mount&&m()}},x=(ce,ve,Re,De,tt)=>{let Ge=!1,Ie=!1;const He={name:ce};if(!t.disabled){if(!Re||De){(c.isDirty||d.isDirty)&&(Ie=r.isDirty,r.isDirty=He.isDirty=k(),Ge=Ie!==He.isDirty);const Ke=Np(mr(i,ce),ve);Ie=!!mr(r.dirtyFields,ce),Ke?ao(r.dirtyFields,ce):Ji(r.dirtyFields,ce,!0),He.dirtyFields=r.dirtyFields,Ge=Ge||(c.dirtyFields||d.dirtyFields)&&Ie!==!Ke}if(Re){const Ke=mr(r.touchedFields,ce);Ke||(Ji(r.touchedFields,ce,Re),He.touchedFields=r.touchedFields,Ge=Ge||(c.touchedFields||d.touchedFields)&&Ke!==Re)}Ge&&tt&&f.state.next(He)}return Ge?He:{}},E=(ce,ve,Re,De)=>{const tt=mr(r.errors,ce),Ge=(c.isValid||d.isValid)&&Ic(ve)&&r.isValid!==ve;if(t.delayError&&Re?(l=p(()=>v(ce,Re)),l(t.delayError)):(clearTimeout(u),l=null,Re?Ji(r.errors,ce,Re):ao(r.errors,ce)),(Re?!Np(tt,Re):tt)||!Wu(De)||Ge){const Ie={...De,...Ge&&Ic(ve)?{isValid:ve}:{},errors:r.errors,name:ce};r={...r,...Ie},f.state.next(Ie)}},T=async ce=>{_(ce,!0);const ve=await t.resolver(a,t.context,kRe(ce||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return _(ce),ve},S=async ce=>{const{errors:ve}=await T(ce);if(ce)for(const Re of ce){const De=mr(ve,Re);De?Ji(r.errors,Re,De):ao(r.errors,Re)}else r.errors=ve;return ve},A=async(ce,ve,Re={valid:!0})=>{for(const De in ce){const tt=ce[De];if(tt){const{_f:Ge,...Ie}=tt;if(Ge){const He=o.array.has(Ge.name),Ke=tt._f&&ORe(tt._f);Ke&&c.validatingFields&&_([De],!0);const Xe=await oX(tt,o.disabled,a,h,t.shouldUseNativeValidation&&!ve,He);if(Ke&&c.validatingFields&&_([De]),Xe[Ge.name]&&(Re.valid=!1,ve))break;!ve&&(mr(Xe,Ge.name)?He?RRe(r.errors,Xe,Ge.name):Ji(r.errors,Ge.name,Xe[Ge.name]):ao(r.errors,Ge.name))}!Wu(Ie)&&await A(Ie,ve,Re)}}return Re.valid},C=()=>{for(const ce of o.unMount){const ve=mr(n,ce);ve&&(ve._f.refs?ve._f.refs.every(Re=>!fD(Re)):!fD(ve._f.ref))&&le(ce)}o.unMount=new Set},k=(ce,ve)=>!t.disabled&&(ce&&ve&&Ji(a,ce,ve),!Np(L(),i)),M=(ce,ve,Re)=>hpe(ce,o,{...s.mount?a:zs(ve)?i:Nh(ce)?{[ce]:ve}:ve},Re,ve),D=ce=>T7(mr(s.mount?a:i,ce,t.shouldUnregister?mr(i,ce,[]):[])),$=(ce,ve,Re={})=>{const De=mr(n,ce);let tt=ve;if(De){const Ge=De._f;Ge&&(!Ge.disabled&&Ji(a,ce,_pe(ve,Ge)),tt=$5(Ge.ref)&&_u(ve)?"":ve,mpe(Ge.ref)?[...Ge.ref.options].forEac
vendor: 9,563 bytes, line 492
492h(Ie=>Ie.selected=tt.includes(Ie.value)):Ge.refs?BA(Ge.ref)?Ge.refs.forEach(Ie=>{(!Ie.defaultChecked||!Ie.disabled)&&(Array.isArray(tt)?Ie.checked=!!tt.find(He=>He===Ie.value):Ie.checked=tt===Ie.value||!!tt)}):Ge.refs.forEach(Ie=>Ie.checked=Ie.value===tt):P7(Ge.ref)?Ge.ref.value="":(Ge.ref.value=tt,Ge.ref.type||f.state.next({name:ce,values:Oo(a)})))}(Re.shouldDirty||Re.shouldTouch)&&x(ce,tt,Re.shouldTouch,Re.shouldDirty,!0),Re.shouldValidate&&q(ce)},V=(ce,ve,Re)=>{for(const De in ve){if(!ve.hasOwnProperty(De))return;const tt=ve[De],Ge=ce+"."+De,Ie=mr(n,Ge);(o.array.has(ce)||Ys(tt)||Ie&&!Ie._f)&&!Oy(tt)?V(Ge,tt,Re):$(Ge,tt,Re)}},U=(ce,ve,Re={})=>{const De=mr(n,ce),tt=o.array.has(ce),Ge=Oo(ve);Ji(a,ce,Ge),tt?(f.array.next({name:ce,values:Oo(a)}),(c.isDirty||c.dirtyFields||d.isDirty||d.dirtyFields)&&Re.shouldDirty&&f.state.next({name:ce,dirtyFields:x2(i,a),isDirty:k(ce,Ge)})):De&&!De._f&&!_u(Ge)?V(ce,Ge,Re):$(ce,Ge,Re),iX(ce,o)&&f.state.next({...r,name:ce}),f.state.next({name:s.mount?ce:void 0,values:Oo(a)})},B=async ce=>{s.mount=!0;const ve=ce.target;let Re=ve.name,De=!0;const tt=mr(n,Re),Ge=Ke=>{De=Number.isNaN(Ke)||Oy(Ke)&&isNaN(Ke.getTime())||Np(Ke,mr(a,Re,Ke))},Ie=rX(t.mode),He=rX(t.reValidateMode);if(tt){let Ke,Xe;const mt=ve.type?tX(tt._f):cpe(ce),gt=ce.type===R5.BLUR||ce.type===R5.FOCUS_OUT,$t=!NRe(tt._f)&&!t.resolver&&!mr(r.errors,Re)&&!tt._f.deps||LRe(gt,mr(r.touchedFields,Re),r.isSubmitted,He,Ie),kt=iX(Re,o,gt);Ji(a,Re,mt),gt?(tt._f.onBlur&&tt._f.onBlur(ce),l&&l(0)):tt._f.onChange&&tt._f.onChange(ce);const Zt=x(Re,mt,gt),fr=!Wu(Zt)||kt;if(!gt&&f.state.next({name:Re,type:ce.type,values:Oo(a)}),$t)return(c.isValid||d.isValid)&&(t.mode==="onBlur"?gt&&m():gt||m()),fr&&f.state.next({name:Re,...kt?{}:Zt});if(!gt&&kt&&f.state.next({...r}),t.resolver){const{errors:yr}=await T([Re]);if(Ge(mt),De){const Kt=aX(r.errors,n,Re),pr=aX(yr,n,Kt.name||Re);Ke=pr.error,Re=pr.name,Xe=Wu(yr)}}else _([Re],!0),Ke=(await oX(tt,o.disabled,a,h,t.shouldUseNativeValidation))[Re],_([Re]),Ge(mt),De&&(Ke?Xe=!1:(c.isValid||d.isValid)&&(Xe=await A(n,!0)));De&&(tt._f.deps&&q(tt._f.deps),E(Re,Xe,Ke,Zt))}},z=(ce,ve)=>{if(mr(r.errors,ve)&&ce.focus)return ce.focus(),1},q=async(ce,ve={})=>{let Re,De;const tt=KE(ce);if(t.resolver){const Ge=await S(zs(ce)?ce:tt);Re=Wu(Ge),De=ce?!tt.some(Ie=>mr(Ge,Ie)):Re}else ce?(De=(await Promise.all(tt.map(async Ge=>{const Ie=mr(n,Ge);return await A(Ie&&Ie._f?{[Ge]:Ie}:Ie)}))).every(Boolean),!(!De&&!r.isValid)&&m()):De=Re=await A(n);return f.state.next({...!Nh(ce)||(c.isValid||d.isValid)&&Re!==r.isValid?{}:{name:ce},...t.resolver||!ce?{isValid:Re}:{},errors:r.errors}),ve.shouldFocus&&!De&&YE(n,z,ce?tt:o.mount),De},L=ce=>{const ve={...s.mount?a:i};return zs(ce)?ve:Nh(ce)?mr(ve,ce):ce.map(Re=>mr(ve,Re))},K=(ce,ve)=>({invalid:!!mr((ve||r).errors,ce),isDirty:!!mr((ve||r).dirtyFields,ce),error:mr((ve||r).errors,ce),isValidating:!!mr(r.validatingFields,ce),isTouched:!!mr((ve||r).touchedFields,ce)}),O=ce=>{ce&&KE(ce).forEach(ve=>ao(r.errors,ve)),f.state.next({errors:ce?r.errors:{}})},N=(ce,ve,Re)=>{const De=(mr(n,ce,{_f:{}})._f||{}).ref,tt=mr(r.errors,ce)||{},{ref:Ge,message:Ie,type:He,...Ke}=tt;Ji(r.errors,ce,{...Ke,...ve,ref:De}),f.state.next({name:ce,errors:r.errors,isValid:!1}),Re&&Re.shouldFocus&&De&&De.focus&&De.focus()},X=(ce,ve)=>Bf(ce)?f.state.subscribe({next:Re=>"values"in Re&&ce(M(void 0,ve),Re)}):M(ce,ve,!0),ie=ce=>f.state.subscribe({next:ve=>{DRe(ce.name,ve.name,ce.exact)&&IRe(ve,ce.formState||c,me,ce.reRenderRoot)&&ce.callback({values:{...a},...r,...ve,defaultValues:i})}}).unsubscribe,ee=ce=>(s.mount=!0,d={...d,...ce.formState},ie({...ce,formState:d})),le=(ce,ve={})=>{for(const Re of ce?KE(ce):o.mount)o.mount.delete(Re),o.array.delete(Re),ve.keepValue||(ao(n,Re),ao(a,Re)),!ve.keepError&&ao(r.errors,Re),!ve.keepDirty&&ao(r.dirtyFields,Re),!ve.keepTouched&&ao(r.touchedFields,Re),!ve.keepIsValidating&&ao(r.validatingFields,Re),!t.shouldUnregister&&!ve.keepDefaultValue&&ao(i,Re);f.state.next({values:Oo(a)}),f.state.next({...r,...ve.keepDirty?{isDirty:k()}:{}}),!ve.keepIsValid&&m()},Te=({disabled:ce,name:ve})=>{(Ic(ce)&&s.mount||ce||o.disabled.has(ve))&&(ce?o.disabled.add(ve):o.disabled.delete(ve))},be=(ce,ve={})=>{let Re=mr(n,ce);const De=Ic(ve.disabled)||Ic(t.disabled);return Ji(n,ce,{...Re||{},_f:{...Re&&Re._f?Re._f:{ref:{name:ce}},name:ce,mount:!0,...ve}}),o.mount.add(ce),Re?Te({disabled:Ic(ve.disabled)?ve.disabled:t.disabled,name:ce}):w(ce,!0,ve.value),{...De?{disabled:ve.disabled||t.disabled}:{},...t.progressive?{required:!!ve.required,min:E2(ve.min),max:E2(ve.max),minLength:E2(ve.minLength),maxLength:E2(ve.maxLength),pattern:E2(ve.pattern)}:{},name:ce,onChange:B,onBlur:B,ref:tt=>{if(tt){be(ce,ve),Re=mr(n,ce);const Ge=zs(tt.value)&&tt.querySelectorAll&&tt.querySelectorAll("input,select,textarea")[0]||tt,Ie=CRe(Ge),He=Re._f.refs||[];if(Ie?He.find(Ke=>Ke===Ge):Ge===Re._f.ref)return;Ji(n,ce,{_f:{...Re._f,...Ie?{refs:[...He.filter(fD),Ge,...Array.isArray(mr(i,ce))?[{}]:[]],ref:{type:Ge.type,name:ce}}:{ref:Ge}}}),w(ce,!1,void 0,Ge)}else Re=mr(n,ce,{}),Re._f&&(Re._f.mount=!1),(t.shouldUnregister||ve.shouldUnregister)&&!(dpe(o.array,ce)&&s.action)&&o.unMount.add(ce)}}},we=()=>t.shouldFocusError&&YE(n,z,o.mount),ae=ce=>{Ic(ce)&&(f.state.next({disabled:ce}),YE(n,(ve,Re)=>{const De=mr(n,Re);De&&(ve.disabled=De._f.disabled||ce,Array.isArray(De._f.refs)&&De._f.refs.forEach(tt=>{tt.disabled=De._f.disabled||ce}))},0,!1))},H=(ce,ve)=>async Re=>{let De;Re&&(Re.preventDefault&&Re.preventDefault(),Re.persist&&Re.persist());let tt=Oo(a);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Ge,values:Ie}=await T();r.errors=Ge,tt=Oo(Ie)}else await A(n);if(o.disabled.size)for(const Ge of o.disabled)ao(tt,Ge);if(ao(r.errors,"root"),Wu(r.errors)){f.state.next({errors:{}});try{await ce(tt,Re)}catch(Ge){De=Ge}}else ve&&await ve({...r.errors},Re),we(),setTimeout(we);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Wu(r.errors)&&!De,submitCount:r.submitCount+1,errors:r.errors}),De)throw De},fe=(ce,ve={})=>{mr(n,ce)&&(zs(ve.defaultValue)?U(ce,Oo(mr(i,ce))):(U(ce,ve.defaultValue),Ji(i,ce,Oo(ve.defaultValue))),ve.keepTouched||ao(r.touchedFields,ce),ve.keepDirty||(ao(r.dirtyFields,ce),r.isDirty=ve.defaultValue?k(ce,Oo(mr(i,ce))):k()),ve.keepError||(ao(r.errors,ce),c.isValid&&m()),f.state.next({...r}))},Se=(ce,ve={})=>{const Re=ce?Oo(ce):i,De=Oo(Re),tt=Wu(ce),Ge=tt?i:De;if(ve.keepDefaultValues||(i=Re),!ve.keepValues){if(ve.keepDirtyValues){const Ie=new Set([...o.mount,...Object.keys(x2(i,a))]);for(const He of Array.from(Ie))mr(r.dirtyFields,He)?Ji(Ge,He,mr(a,He)):U(He,mr(Ge,He))}else{if(E7&&zs(ce))for(const Ie of o.mount){const He=mr(n,Ie);if(He&&He._f){const Ke=Array.isArray(He._f.refs)?He._f.refs[0]:He._f.ref;if($5(Ke)){const Xe=Ke.closest("form");if(Xe){Xe.reset();break}}}}if(ve.keepFieldsRef)for(const Ie of o.mount)U(Ie,mr(Ge,Ie));else n={}}a=t.shouldUnregister?ve.keepDefaultValues?Oo(i):{}:Oo(Ge),f.array.next({values:{...Ge}}),f.state.next({values:{...Ge}})}o={mount:ve.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!ve.keepIsValid||!!ve.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:ve.keepSubmitCount?r.submitCount:0,isDirty:tt?!1:ve.keepDirty?r.isDirty:!!(ve.keepDefaultValues&&!Np(ce,i)),isSubmitted:ve.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:tt?{}:ve.keepDirtyValues?ve.keepDefaultValues&&a?x2(i,a):r.dirtyFields:ve.keepDefaultValues&&ce?x2(i,ce):ve.keepDirty?r.dirtyFields:{},touchedFields:ve.keepTouched?r.touchedFields:{},errors:ve.keepErrors?r.errors:{},isSubmitSuccessful:ve.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ne=(ce,ve)=>Se(Bf(ce)?ce(a):ce,ve),$e=(ce,ve={})=>{const Re=mr(n,ce),De=Re&&Re._f;if(De){const tt=De.refs?De.refs[0]:De.ref;tt.focus&&(tt.focus(),ve.shouldSelect&&Bf(tt.select)&&tt.select())}},me=ce=>{r={...r,...ce}},ke={control:{register:be,unregister:le,getFieldState:K,handleSubmit:H,setError:N,_subscribe:ie,_runSchema:T,_focusError:we,_getWatch:M,_getDirty:k,_setValid:m,_setFieldArray:y,_setDisabledField:Te,_setErrors:b,_getFieldArray:D,_reset:Se,_resetDefaultValues:()=>Bf(t.defaultValues)&&t.defaultValues().then(ce=>{ne(ce,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:C,_disableForm:ae,_subjects:f,_proxyFormState:c,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(ce){s=ce},get _defaultValues(){return i},get _names(){return o},set _names(ce){o=ce},get _formState(){return r},get _options(){return t},set _options(ce){t={...t,...ce}}},subscribe:ee,trigger:q,register:be,handleSubmit:H,watch:X,setValue:U,getValues:L,reset:ne,resetField:fe,clearErrors:O,unregister:le,setError:N,setFocus:$e,getFieldState:K};return{...ke,formControl:ke}}function BRe(e={}){const t=_e.useRef(void 0),r=_e.useRef(void 0),[n,i]=_e.useState({isDirty:!1,isValidating:!1,isLoading:Bf(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Bf(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Bf(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=FRe(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,C7(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}
vendor: 4,326 bytes, line 492
492),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),_e.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),_e.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),_e.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),_e.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),_e.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),_e.useEffect(()=>{e.values&&!Np(e.values,r.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),_e.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=fpe(n,a),t.current}const lX=(e,t,r)=>{if(e&&"reportValidity"in e){const n=mr(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},wpe=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?lX(n.ref,r,e):n.refs&&n.refs.forEach(i=>lX(i,r,e))}},zRe=(e,t)=>{t.shouldUseNativeValidation&&wpe(e,t);const r={};for(const n in e){const i=mr(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(URe(t.names||Object.keys(e),n)){const s=Object.assign({},mr(r,n));Ji(s,"root",a),Ji(r,n,s)}else Ji(r,n,a)}return r},URe=(e,t)=>e.some(r=>r.startsWith(t+"."));var WRe=function(e,t){for(var r={};e.length;){var n=e[0],i=n.code,a=n.message,s=n.path.join(".");if(!r[s])if("unionErrors"in n){var o=n.unionErrors[0].errors[0];r[s]={message:o.message,type:o.code}}else r[s]={message:a,type:i};if("unionErrors"in n&&n.unionErrors.forEach(function(c){return c.errors.forEach(function(d){return e.push(d)})}),t){var l=r[s].types,u=l&&l[n.code];r[s]=ppe(s,t,r,i,u?[].concat(u,n.message):n.message)}e.shift()}return r},VRe=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return a.shouldUseNativeValidation&&wpe({},a),{errors:{},values:r.raw?n:u}})}catch(u){return o(u)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(s))return{values:{},errors:zRe(WRe(s.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw s}))}catch(s){return Promise.reject(s)}}},Di;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(const s of i)if(a(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Di||(Di={}));var uX;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(uX||(uX={}));const Vr=Di.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xm=e=>{switch(typeof e){case"undefined":return Vr.undefined;case"string":return Vr.string;case"number":return Number.isNaN(e)?Vr.nan:Vr.number;case"boolean":return Vr.boolean;case"function":return Vr.function;case"bigint":return Vr.bigint;case"symbol":return Vr.symbol;case"object":return Array.isArray(e)?Vr.array:e===null?Vr.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Vr.promise:typeof Map<"u"&&e instanceof Map?Vr.map:typeof Set<"u"&&e instanceof Set?Vr.set:typeof Date<"u"&&e instanceof Date?Vr.date:Vr.object;default:return Vr.unknown}}
vendor: 5,957 bytes, line 492
492,tr=Di.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 nm 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:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let o=n,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(s))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return i(this),n}static assert(t){if(!(t instanceof nm))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Di.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];r[a]=r[a]||[],r[a].push(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}nm.create=e=>new nm(e);const h$=(e,t)=>{let r;switch(e.code){case tr.invalid_type:e.received===Vr.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case tr.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Di.jsonStringifyReplacer)}`;break;case tr.unrecognized_keys:r=`Unrecognized key(s) in object: ${Di.joinValues(e.keys,", ")}`;break;case tr.invalid_union:r="Invalid input";break;case tr.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Di.joinValues(e.options)}`;break;case tr.invalid_enum_value:r=`Invalid enum value. Expected ${Di.joinValues(e.options)}, received '${e.received}'`;break;case tr.invalid_arguments:r="Invalid function arguments";break;case tr.invalid_return_type:r="Invalid function return type";break;case tr.invalid_date:r="Invalid date";break;case tr.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}"`:Di.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case tr.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 tr.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 tr.custom:r="Invalid input";break;case tr.invalid_intersection_types:r="Intersection results could not be merged";break;case tr.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case tr.not_finite:r="Number must be finite";break;default:r=t.defaultError,Di.assertNever(e)}return{message:r}};let HRe=h$;function GRe(){return HRe}const qRe=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)o=u(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function Sr(e,t){const r=GRe(),n=qRe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===h$?void 0:h$].filter(i=>!!i)});e.common.issues.push(n)}class nd{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 i of r){if(i.status==="aborted")return On;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r){const a=await i.key,s=await i.value;n.push({key:a,value:s})}return nd.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return On;a.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[a.value]=s.value)}return{status:t.value,value:n}}}
vendor: 5,964 bytes, line 492
492const On=Object.freeze({status:"aborted"}),cE=e=>({status:"dirty",value:e}),rf=e=>({status:"valid",value:e}),cX=e=>e.status==="aborted",dX=e=>e.status==="dirty",Hb=e=>e.status==="valid",z5=e=>typeof Promise<"u"&&e instanceof Promise;var Kr;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Kr||(Kr={}));class Jg{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}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 fX=(e,t)=>{if(Hb(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 nm(e.common.issues);return this._error=r,this._error}}};function Zn(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=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:i}:{errorMap:(s,o)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??n??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??r??o.defaultError}},description:i}}class ki{get description(){return this._def.description}_getType(t){return Xm(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Xm(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new nd,ctx:{common:t.parent.common,data:t.data,parsedType:Xm(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(z5(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:Xm(t)},i=this._parseSync({data:t,path:n.path,parent:n});return fX(n,i)}"~validate"(t){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xm(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:r});return Hb(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(i=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(a=>Hb(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:Xm(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(z5(i)?i:Promise.resolve(i));return fX(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const s=t(i),o=()=>a.addIssue({code:tr.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new qb({schema:this,typeName:Nn.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 Fg.create(this,this._def)}nullable(){return Kb.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Uh.create(this)}promise(){return H5.create(this,this._def)}or(t){return W5.create([this,t],this._def)}and(t){return V5.create(this,t,this._def)}transform(t){return new qb({...Zn(this._def),schema:this,typeName:Nn.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new g$({...Zn(this._def),innerType:this,defaultValue:r,typeName:Nn.ZodDefault})}brand(){return new g6e({typeName:Nn.ZodBranded,type:this,...Zn(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new y$({...Zn(this._def),innerType:this,catchValue:r,typeName:Nn.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return k7.create(this,t)}readonly(){return v$.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const KRe=/^c[^\s-]{8,}
vendor: 6,898 bytes, line 492
492$/i,YRe=/^[0-9a-z]+$/,XRe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,QRe=/^[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,ZRe=/^[a-z0-9_-]{21}$/i,JRe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,e6e=/^[-+]?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)?)??$/,t6e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,r6e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let hD;const n6e=/^(?:(?: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])$/,i6e=/^(?:(?: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])$/,a6e=/^(([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]))$/,s6e=/^(([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])$/,o6e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,l6e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xpe="((\\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])))",u6e=new RegExp(`^${xpe}$`);function Epe(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 c6e(e){return new RegExp(`^${Epe(e)}$`)}function d6e(e){let t=`${xpe}T${Epe(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 f6e(e,t){return!!((t==="v4"||!t)&&n6e.test(e)||(t==="v6"||!t)&&a6e.test(e))}function h6e(e,t){if(!JRe.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,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function p6e(e,t){return!!((t==="v4"||!t)&&i6e.test(e)||(t==="v6"||!t)&&s6e.test(e))}class gg extends ki{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Vr.string){const a=this._getOrReturnCtx(t);return Sr(a,{code:tr.invalid_type,expected:Vr.string,received:a.parsedType}),On}const n=new nd;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.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&&(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const s=t.data.length>a.value,o=t.data.length<a.value;(s||o)&&(i=this._getOrReturnCtx(t,i),s?Sr(i,{code:tr.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&Sr(i,{code:tr.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")t6e.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"email",code:tr.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")hD||(hD=new RegExp(r6e,"u")),hD.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"emoji",code:tr.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")QRe.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"uuid",code:tr.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")ZRe.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"nanoid",code:tr.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")KRe.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"cuid",code:tr.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")YRe.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"cuid2",code:tr.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")XRe.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"ulid",code:tr.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Sr(i,{validation:"url",code:tr.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"regex",code:tr.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)||(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.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)||(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?d6e(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?u6e.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.invalid_string,validation:"date",message:a.message}
vendor: 4,183 bytes, line 492
492),n.dirty()):a.kind==="time"?c6e(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?e6e.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"duration",code:tr.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?f6e(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"ip",code:tr.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?h6e(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"jwt",code:tr.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?p6e(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"cidr",code:tr.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?o6e.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"base64",code:tr.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?l6e.test(t.data)||(i=this._getOrReturnCtx(t,i),Sr(i,{validation:"base64url",code:tr.invalid_string,message:a.message}),n.dirty()):Di.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:tr.invalid_string,...Kr.errToObj(n)})}_addCheck(t){return new gg({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Kr.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Kr.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Kr.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Kr.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Kr.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Kr.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Kr.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Kr.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Kr.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Kr.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Kr.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Kr.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Kr.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,...Kr.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,...Kr.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Kr.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Kr.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Kr.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Kr.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Kr.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Kr.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Kr.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Kr.errToObj(r)})}nonempty(t){return this.min(1,Kr.errToObj(t))}trim(){return new gg({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gg({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gg({...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")}
vendor: 4,284 bytes, line 492
492get 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}}gg.create=e=>new gg({checks:[],typeName:Nn.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Zn(e)});function m6e(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}class oS extends ki{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)!==Vr.number){const a=this._getOrReturnCtx(t);return Sr(a,{code:tr.invalid_type,expected:Vr.number,received:a.parsedType}),On}let n;const i=new nd;for(const a of this._def.checks)a.kind==="int"?Di.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Sr(n,{code:tr.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),Sr(n,{code:tr.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),Sr(n,{code:tr.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?m6e(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),Sr(n,{code:tr.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Sr(n,{code:tr.not_finite,message:a.message}),i.dirty()):Di.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Kr.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Kr.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Kr.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Kr.toString(r))}setLimit(t,r,n,i){return new oS({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Kr.toString(i)}]})}_addCheck(t){return new oS({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Kr.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Kr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Kr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Kr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Kr.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Kr.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Kr.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Kr.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Kr.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"&&Di.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: 6,034 bytes, line 492
492}oS.create=e=>new oS({checks:[],typeName:Nn.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Zn(e)});class lS extends ki{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)!==Vr.bigint)return this._getInvalidInput(t);let n;const i=new nd;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),Sr(n,{code:tr.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),Sr(n,{code:tr.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Sr(n,{code:tr.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):Di.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return Sr(r,{code:tr.invalid_type,expected:Vr.bigint,received:r.parsedType}),On}gte(t,r){return this.setLimit("min",t,!0,Kr.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Kr.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Kr.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Kr.toString(r))}setLimit(t,r,n,i){return new lS({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Kr.toString(i)}]})}_addCheck(t){return new lS({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Kr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Kr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Kr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Kr.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Kr.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}}lS.create=e=>new lS({checks:[],typeName:Nn.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Zn(e)});class hX extends ki{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Vr.boolean){const n=this._getOrReturnCtx(t);return Sr(n,{code:tr.invalid_type,expected:Vr.boolean,received:n.parsedType}),On}return rf(t.data)}}hX.create=e=>new hX({typeName:Nn.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Zn(e)});class U5 extends ki{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Vr.date){const a=this._getOrReturnCtx(t);return Sr(a,{code:tr.invalid_type,expected:Vr.date,received:a.parsedType}),On}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Sr(a,{code:tr.invalid_date}),On}const n=new nd;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),Sr(i,{code:tr.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Di.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new U5({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Kr.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Kr.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}}U5.create=e=>new U5({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Nn.ZodDate,...Zn(e)});class pX extends ki{_parse(t){if(this._getType(t)!==Vr.symbol){const n=this._getOrReturnCtx(t);return Sr(n,{code:tr.invalid_type,expected:Vr.symbol,received:n.parsedType}),On}return rf(t.data)}}pX.create=e=>new pX({typeName:Nn.ZodSymbol,...Zn(e)});class mX extends ki{_parse(t){if(this._getType(t)!==Vr.undefined){const n=this._getOrReturnCtx(t);return Sr(n,{code:tr.invalid_type,expected:Vr.undefined,received:n.parsedType}),On}return rf(t.data)}}mX.create=e=>new mX({typeName:Nn.ZodUndefined,...Zn(e)});class gX extends ki{_parse(t){if(this._getType(t)!==Vr.null){const n=this._getOrReturnCtx(t);return Sr(n,{code:tr.invalid_type,expected:Vr.null,received:n.parsedType}),On}return rf(t.data)}}gX.create=e=>new gX({typeName:Nn.ZodNull,...Zn(e)});class yX extends ki{constructor(){super(...arguments),this._any=!0}_parse(t){return rf(t.data)}}yX.create=e=>new yX({typeName:Nn.ZodAny,...Zn(e)});class vX extends ki{constructor(){super(...arguments),this._unknown=!0}_parse(t){return rf(t.data)}}vX.create=e=>new vX({typeName:Nn.ZodUnknown,...Zn(e)});class e0 extends ki{_parse(t){const r=this._getOrReturnCtx(t);return Sr(r,{code:tr.invalid_type,expected:Vr.never,received:r.parsedType}),On}}e0.create=e=>new e0({typeName:Nn.ZodNever,...Zn(e)});class _X extends ki{_parse(t){if(this._getType(t)!==Vr.undefined){const n=this._getOrReturnCtx(t);return Sr(n,{code:tr.invalid_type,expected:Vr.void,received:n.parsedType}),On}return rf(t.data)}}_X.create=e=>new _X({typeName:Nn.ZodVoid,...Zn(e)});class Uh extends ki{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==Vr.array)return Sr(r,{code:tr.invalid_type,expected:Vr.array,received:r.parsedType}),On;if(i.exactLength!==null){const s=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(s||o)&&(Sr(r,{code:s?tr.too_big:tr.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?
vendor: 4,550 bytes, line 492
492i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(Sr(r,{code:tr.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(Sr(r,{code:tr.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,o)=>i.type._parseAsync(new Jg(r,s,r.path,o)))).then(s=>nd.mergeArray(n,s));const a=[...r.data].map((s,o)=>i.type._parseSync(new Jg(r,s,r.path,o)));return nd.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new Uh({...this._def,minLength:{value:t,message:Kr.toString(r)}})}max(t,r){return new Uh({...this._def,maxLength:{value:t,message:Kr.toString(r)}})}length(t,r){return new Uh({...this._def,exactLength:{value:t,message:Kr.toString(r)}})}nonempty(t){return this.min(1,t)}}Uh.create=(e,t)=>new Uh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Nn.ZodArray,...Zn(t)});function d1(e){if(e instanceof Ds){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Fg.create(d1(n))}return new Ds({...e._def,shape:()=>t})}else return e instanceof Uh?new Uh({...e._def,type:d1(e.element)}):e instanceof Fg?Fg.create(d1(e.unwrap())):e instanceof Kb?Kb.create(d1(e.unwrap())):e instanceof kv?kv.create(e.items.map(t=>d1(t))):e}class Ds extends ki{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=Di.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==Vr.object){const u=this._getOrReturnCtx(t);return Sr(u,{code:tr.invalid_type,expected:Vr.object,received:u.parsedType}),On}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof e0&&this._def.unknownKeys==="strip"))for(const u in i.data)s.includes(u)||o.push(u);const l=[];for(const u of s){const c=a[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Jg(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof e0){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")o.length>0&&(Sr(i,{code:tr.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of o){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Jg(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>nd.mergeObjectSync(n,u)):nd.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Kr.errToObj,new Ds({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,s;const i=((s=(a=this._def).errorMap)==null?void 0:s.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Kr.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new Ds({...this._def,unknownKeys:"strip"})}passthrough(){return new Ds({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ds({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ds({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Nn.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Ds({...this._def,catchall:t})}pick(t){const r={};for(const n of Di.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Ds({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Di.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new Ds({...this._def,shape:()=>r})}deepPartial(){return d1(this)}partial(t){const r={};for(const n of Di.objectKeys(this.shape)){const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new Ds({...this._def,shape:()=>r})}required(t){const r={};for(const n of Di.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Fg;)a=a._def.innerType;r[n]=a}return new Ds({...this._def,shape:()=>r})}keyof(){return Tpe(Di.objectKeys(this.shape))}}Ds.create=(e,t)=>
vendor: 5,780 bytes, line 492
492new Ds({shape:()=>e,unknownKeys:"strip",catchall:e0.create(),typeName:Nn.ZodObject,...Zn(t)});Ds.strictCreate=(e,t)=>new Ds({shape:()=>e,unknownKeys:"strict",catchall:e0.create(),typeName:Nn.ZodObject,...Zn(t)});Ds.lazycreate=(e,t)=>new Ds({shape:e,unknownKeys:"strip",catchall:e0.create(),typeName:Nn.ZodObject,...Zn(t)});class W5 extends ki{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function i(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(o=>new nm(o.ctx.common.issues));return Sr(r,{code:tr.invalid_union,unionErrors:s}),On}if(r.common.async)return Promise.all(n.map(async a=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let a;const s=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(l=>new nm(l));return Sr(r,{code:tr.invalid_union,unionErrors:o}),On}}get options(){return this._def.options}}W5.create=(e,t)=>new W5({options:e,typeName:Nn.ZodUnion,...Zn(t)});function p$(e,t){const r=Xm(e),n=Xm(t);if(e===t)return{valid:!0,data:e};if(r===Vr.object&&n===Vr.object){const i=Di.objectKeys(t),a=Di.objectKeys(e).filter(o=>i.indexOf(o)!==-1),s={...e,...t};for(const o of a){const l=p$(e[o],t[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(r===Vr.array&&n===Vr.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const s=e[a],o=t[a],l=p$(s,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===Vr.date&&n===Vr.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class V5 extends ki{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,s)=>{if(cX(a)||cX(s))return On;const o=p$(a.value,s.value);return o.valid?((dX(a)||dX(s))&&r.dirty(),{status:r.value,value:o.data}):(Sr(n,{code:tr.invalid_intersection_types}),On)};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,s])=>i(a,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}V5.create=(e,t,r)=>new V5({left:e,right:t,typeName:Nn.ZodIntersection,...Zn(r)});class kv extends ki{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Vr.array)return Sr(n,{code:tr.invalid_type,expected:Vr.array,received:n.parsedType}),On;if(n.data.length<this._def.items.length)return Sr(n,{code:tr.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),On;!this._def.rest&&n.data.length>this._def.items.length&&(Sr(n,{code:tr.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Jg(n,s,n.path,o)):null}).filter(s=>!!s);return n.common.async?Promise.all(a).then(s=>nd.mergeArray(r,s)):nd.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new kv({...this._def,rest:t})}}kv.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new kv({items:e,typeName:Nn.ZodTuple,rest:null,...Zn(t)})};class bX extends ki{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!==Vr.map)return Sr(n,{code:tr.invalid_type,expected:Vr.map,received:n.parsedType}),On;const i=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map(([o,l],u)=>({key:i._parse(new Jg(n,o,n.path,[u,"key"])),value:a._parse(new Jg(n,l,n.path,[u,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return On;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(u.value,c.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const l of s){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return On;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(u.value,c.value)}return{status:r.value,value:o}}}}bX.create=(e,t,r)=>new bX({valueType:t,keyType:e,typeName:Nn.ZodMap,...Zn(r)});class uS extends ki{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Vr.set)return Sr(n,{code:tr.invalid_type,expected:Vr.set,received:n.parsedType}),On;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(Sr(n,{code:tr.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(Sr(n,{code:tr.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function s(l){const u=new Set;for(const c of l){if(c.status==="aborted")return On;c.status==="dirty"&&r.dirty(),u.add(c.value)}return{status:r.value,value:u}}const o=[...n.data.values()].map((l,u)=>a._parse(new Jg(n,l,n.path,u)));return n.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(t,r){return new uS({...this._def,minSize:{value:t,message:Kr.toString(r)}})}max(t,r){return new uS({...this._def,maxSize:{value:t,message:Kr.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}uS.create=(e,t)=>
vendor: 5,023 bytes, line 492
492new uS({valueType:e,minSize:null,maxSize:null,typeName:Nn.ZodSet,...Zn(t)});class wX extends ki{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})}}wX.create=(e,t)=>new wX({getter:e,typeName:Nn.ZodLazy,...Zn(t)});class m$ extends ki{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Sr(r,{received:r.data,code:tr.invalid_literal,expected:this._def.value}),On}return{status:"valid",value:t.data}}get value(){return this._def.value}}m$.create=(e,t)=>new m$({value:e,typeName:Nn.ZodLiteral,...Zn(t)});function Tpe(e,t){return new Gb({values:e,typeName:Nn.ZodEnum,...Zn(t)})}class Gb extends ki{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Sr(r,{expected:Di.joinValues(n),received:r.parsedType,code:tr.invalid_type}),On}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 Sr(r,{received:r.data,code:tr.invalid_enum_value,options:n}),On}return rf(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 Gb.create(t,{...this._def,...r})}exclude(t,r=this._def){return Gb.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Gb.create=Tpe;class xX extends ki{_parse(t){const r=Di.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Vr.string&&n.parsedType!==Vr.number){const i=Di.objectValues(r);return Sr(n,{expected:Di.joinValues(i),received:n.parsedType,code:tr.invalid_type}),On}if(this._cache||(this._cache=new Set(Di.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=Di.objectValues(r);return Sr(n,{received:n.data,code:tr.invalid_enum_value,options:i}),On}return rf(t.data)}get enum(){return this._def.values}}xX.create=(e,t)=>new xX({values:e,typeName:Nn.ZodNativeEnum,...Zn(t)});class H5 extends ki{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Vr.promise&&r.common.async===!1)return Sr(r,{code:tr.invalid_type,expected:Vr.promise,received:r.parsedType}),On;const n=r.parsedType===Vr.promise?r.data:Promise.resolve(r.data);return rf(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}H5.create=(e,t)=>new H5({type:e,typeName:Nn.ZodPromise,...Zn(t)});class qb extends ki{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Nn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:s=>{Sr(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const s=i.transform(n.data,a);if(n.common.async)return Promise.resolve(s).then(async o=>{if(r.value==="aborted")return On;const l=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return l.status==="aborted"?On:l.status==="dirty"||r.value==="dirty"?cE(l.value):l});{if(r.value==="aborted")return On;const o=this._def.schema._parseSync({data:s,path:n.path,parent:n});return o.status==="aborted"?On:o.status==="dirty"||r.value==="dirty"?cE(o.value):o}}if(i.type==="refinement"){const s=o=>{const l=i.refinement(o,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?On:(o.status==="dirty"&&r.dirty(),s(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?On:(o.status==="dirty"&&r.dirty(),s(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Hb(s))return On;const o=i.transform(s.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>Hb(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:r.value,value:o})):On);Di.assertNever(i)}}qb.create=(e,t,r)=>new qb({schema:e,typeName:Nn.ZodEffects,effect:t,...Zn(r)});qb.createWithPreprocess=(e,t,r)=>new qb({schema:t,effect:{type:"preprocess",transform:e},typeName:Nn.ZodEffects,...Zn(r)});class Fg extends ki{_parse(t){return this._getType(t)===Vr.undefined?rf(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Fg.create=(e,t)=>
vendor: 4,399 bytes, line 492
492new Fg({innerType:e,typeName:Nn.ZodOptional,...Zn(t)});class Kb extends ki{_parse(t){return this._getType(t)===Vr.null?rf(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kb.create=(e,t)=>new Kb({innerType:e,typeName:Nn.ZodNullable,...Zn(t)});class g$ extends ki{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Vr.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}g$.create=(e,t)=>new g$({innerType:e,typeName:Nn.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Zn(t)});class y$ extends ki{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return z5(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new nm(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new nm(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}y$.create=(e,t)=>new y$({innerType:e,typeName:Nn.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Zn(t)});class EX extends ki{_parse(t){if(this._getType(t)!==Vr.nan){const n=this._getOrReturnCtx(t);return Sr(n,{code:tr.invalid_type,expected:Vr.nan,received:n.parsedType}),On}return{status:"valid",value:t.data}}}EX.create=e=>new EX({typeName:Nn.ZodNaN,...Zn(e)});class g6e extends ki{_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 k7 extends ki{_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"?On:a.status==="dirty"?(r.dirty(),cE(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?On:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new k7({in:t,out:r,typeName:Nn.ZodPipeline})}}class v$ extends ki{_parse(t){const r=this._def.innerType._parse(t),n=i=>(Hb(i)&&(i.value=Object.freeze(i.value)),i);return z5(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}v$.create=(e,t)=>new v$({innerType:e,typeName:Nn.ZodReadonly,...Zn(t)});Ds.lazycreate;var Nn;(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"})(Nn||(Nn={}));const LP=gg.create;e0.create;Uh.create;const y6e=Ds.create;Ds.strictCreate;W5.create;V5.create;kv.create;const v6e=m$.create;Gb.create;H5.create;Fg.create;Kb.create;const Ya=R.forwardRef(({className:e,type:t,...r},n)=>g.jsx("input",{type:t,className:Xt("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}));Ya.displayName="Input";const yg=R.forwardRef(({className:e,...t},r)=>g.jsx("textarea",{className:Xt("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
492ing-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}));yg.displayName="Textarea";var _6e="Label",Spe=R.forwardRef((e,t)=>g.jsx(Hr.label,{...e,ref:t,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Spe.displayName=_6e;var Ape=Spe;const b6e=kA("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),vs=R.forwardRef(({className:e,...t},r)=>g.jsx(Ape,{ref:r,className:Xt(b6e(),e),...t}));vs.displayName=Ape.displayName;const w6e=xRe,Cpe=R.createContext({}),jP=({...e})=>g.jsx(Cpe.Provider,{value:{name:e.name},children:g.jsx(ARe,{...e})}),uN=()=>{const e=R.useContext(Cpe),t=R.useContext(Ppe),{getFieldState:r,formState:n}=lN(),i=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},Ppe=R.createContext({}),dE=R.forwardRef(({className:e,...t},r)=>{const n=R.useId();return g.jsx(Ppe.Provider,{value:{id:n},children:g.jsx("div",{ref:r,className:Xt("space-y-2",e),...t})})});dE.displayName="FormItem";const fE=R.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:i}=uN();return g.jsx(vs,{ref:r,className:Xt(n&&"text-destructive",e),htmlFor:i,...t})});fE.displayName="FormLabel";const hE=R.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:i,formMessageId:a}=uN();return g.jsx(Ice,{ref:t,id:n,"aria-describedby":r?`${i} ${a}`:`${i}`,"aria-invalid":!!r,...e})});hE.displayName="FormControl";const x6e=R.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=uN();return g.jsx("p",{ref:r,id:n,className:Xt("text-sm text-muted-foreground",e),...t})});x6e.displayName="FormDescription";const pE=R.forwardRef(({className:e,children:t,...r},n)=>{const{error:i,formMessageId:a}=uN(),s=i?String(i==null?void 0:i.message):t;return s?g.jsx("p",{ref:n,id:a,className:Xt("text-sm font-medium text-destructive",e),...r,children:s}):null});pE.displayName="FormMessage";const E6e=y6e({name:LP().trim().min(1,"Name is required").max(100,"Name must be less than 100 characters"),email:LP().trim().email("Invalid email address").max(255,"Email must be less than 255 characters"),phone:LP().trim().max(20,"Phone must be less than 20 characters").optional().or(v6e("")),message:LP().trim().min(1,"Message is required").max(2e3,"Message must be less than 2000 characters")}),T6e=({language:e})=>{const[t,r]=R.useState(!1),{toast:n}=Kw(),a={en:{title:"Contact Us",subtitle:"Have questions about our programs or services? We'd love to hear from you.",nameLabel:"Name",namePlaceholder:"Your full name",emailLabel:"Email",emailPlaceholder:"[email protected]",phoneLabel:"Phone (optional)",phonePlaceholder:"(956) 555-1234",messageLabel:"Message",messagePlaceholder:"How can we help you?",submitButton:"Send Message",submitting:"Sending...",successTitle:"Message Sent!",successMessage:"Thank you for contacting us. We'll get back to you soon.",errorTitle:"Error",errorMessage:"Failed to send message. Please try again or email us directly.",contactInfo:"Contact Information",addressLabel:"Address",address:"715 US Business 83, Alamo, TX 78516",phoneNumber:"(956) 787-6622",emailAddress:"[email protected]"},es:{title:"Contáctenos",subtitle:"¿Tiene preguntas sobre nuestros programas o servicios? Nos encantarÃa saber de usted.",nameLabel:"Nombre",namePlaceholder:"Su nombre completo",emailLabel:"Correo electrónico",emailPlaceholder:"[email protected]",phoneLabel:"Teléfono (opcional)",phonePlaceholder:"(956) 555-1234",messageLabel:"Mensaje",messagePlaceholder:"¿Cómo podemos ayudarle?",submitButton:"Enviar Mensaje",submitting:"Enviando...",successTitle:"¡Mensaje Enviado!",successMessage:"Gracias por contactarnos. Nos comunicaremos con usted pronto.",errorTitle:"Error",errorMessage:"No se pudo enviar el mensaje. Intente de nuevo o envÃenos un correo directamente.",contactInfo:"Información de Contacto",addressLabel:"Dirección",address:"715 US Business 83, Alamo, TX 78516",phoneNumber:"(956) 787-6622",emailAddress:"[email protected]"}}
492[e],s=BRe({resolver:VRe(E6e),defaultValues:{name:"",email:"",phone:"",message:""}}),o=async l=>{r(!0);try{const{error:u}=await nn.functions.invoke("send-contact-email",{body:l});if(u)throw u;n({title:a.successTitle,description:a.successMessage}),s.reset()}catch(u){console.error("Error sending message:",u),n({title:a.errorTitle,description:a.errorMessage,variant:"destructive"})}finally{r(!1)}};return g.jsx("section",{id:"contact",className:"py-12 md:py-20 bg-muted/30",children:g.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[g.jsxs("div",{className:"text-center mb-8 md:mb-12",children:[g.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-foreground mb-4",children:a.title}),g.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:a.subtitle})]}),g.jsxs("div",{className:"grid md:grid-cols-2 gap-12",children:[g.jsx("div",{className:"bg-card rounded-xl shadow-lg p-8",children:g.jsx(w6e,{...s,children:g.jsxs("form",{onSubmit:s.handleSubmit(o),className:"space-y-6",children:[g.jsx(jP,{control:s.control,name:"name",render:({field:l})=>g.jsxs(dE,{children:[g.jsx(fE,{children:a.nameLabel}),g.jsx(hE,{children:g.jsx(Ya,{placeholder:a.namePlaceholder,...l})}),g.jsx(pE,{})]})}),g.jsx(jP,{control:s.control,name:"email",render:({field:l})=>g.jsxs(dE,{children:[g.jsx(fE,{children:a.emailLabel}),g.jsx(hE,{children:g.jsx(Ya,{type:"email",placeholder:a.emailPlaceholder,...l})}),g.jsx(pE,{})]})}),g.jsx(jP,{control:s.control,name:"phone",render:({field:l})=>g.jsxs(dE,{children:[g.jsx(fE,{children:a.phoneLabel}),g.jsx(hE,{children:g.jsx(Ya,{type:"tel",placeholder:a.phonePlaceholder,...l})}),g.jsx(pE,{})]})}),g.jsx(jP,{control:s.control,name:"message",render:({field:l})=>g.jsxs(dE,{children:[g.jsx(fE,{children:a.messageLabel}),g.jsx(hE,{children:g.jsx(yg,{placeholder:a.messagePlaceholder,className:"min-h-[120px] resize-none",...l})}),g.jsx(pE,{})]})}),g.jsx(gr,{type:"submit",className:"w-full",disabled:t,children:t?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),a.submitting]}):g.jsxs(g.Fragment,{children:[g.jsx(M5e,{className:"mr-2 h-4 w-4"}),a.submitButton]})})]})})}),g.jsxs("div",{className:"flex flex-col justify-center",children:[g.jsx("h3",{className:"text-2xl font-semibold text-foreground mb-8",children:a.contactInfo}),g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:g.jsx(Yh,{className:"h-6 w-6 text-primary"})}),g.jsxs("div",{children:[g.jsx("p",{className:"font-medium text-foreground",children:a.addressLabel}),g.jsx("p",{className:"text-muted-foreground",children:a.address})]})]}),g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:g.jsx(c0,{className:"h-6 w-6 text-primary"})}),g.jsxs("div",{children:[g.jsx("p",{className:"font-medium text-foreground",children:e==="en"?"Phone":"Teléfono"}),g.jsx("a",{href:`tel:${a.phoneNumber.replace(/[^\d]/g,"")}`,className:"text-muted-foreground hover:text-primary transition-colors",children:a.phoneNumber})]})]}),g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:g.jsx(IA,{className:"h-6 w-6 text-primary"})}),g.jsxs("div",{children:[g.jsx("p",{className:"font-medium text-foreground",children:e==="en"?"Email":"Correo"}),g.jsx("a",{href:`mailto:${a.emailAddress}`,className:"text-muted-foreground hover:text-primary transition-colors",children:a.emailAddress})]})]})]})]})]})]})})},mo=({language:e})=>{const r={en:{quickLinks:"Quick Links",links:[{label:"Home",href:"/"},{label:"About Us",href:"#about"},{label:"Programs",href:"/incentives"},{label:"Business Directory",href:"/community/shop-local-biz"},{label:"Contact",href:"#contact"}],contact:"Contact Us",followUs:"Follow Us",copyright:"Alamo Economic Development Corporation. All rights reserved."},es:{quickLinks:"Enlaces Rápidos",links:[{label:"Inicio",href:"/"},{label:"Acerca de Nosotros",href:"#about"},{label:"Programas",href:"/incentives"},{label:"Directorio de Negocios",href:"/community/shop-local-biz"},{label:"Contacto",href:"#contact"}],contact:"Contáctenos",followUs:"SÃguenos",copyright:"Corporación de Desarrollo Económico de Alamo. Todos los derechos reservados."}}[e];return g.jsx("footer",{className:"wood-texture text-white py-12",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mb-8",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-bold mb-4 text-white",children:r.quickLinks}),g.jsx("ul",{className:"space-y-2",children:r.links.map(n=>g.jsx("li",{children:n.href.startsWith("/")?g.jsx(Rs,{to:n.href,className:"text-sm text-white/80 hover:text-secondary transition-colors",children:n.label}):g.jsx("a",{href:n.href,className:"text-sm text-white/80 hover:text-secondary transition-colors",children:n.label})},n.label))})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-bold mb-4 text-white",children:r.contact}),g.jsxs("ul",{className:"space-y-3",children:[g.jsxs("li",{className:"flex items-start space-x-3",children:[g.jsx(Yh,{className:"h-5 w-5 text-secondary mt-0.5 flex-shrink-0"}),g.jsxs("span",{className:"text-sm text-white/80",children:["Alamo EDC",g.jsx("br",{}),"715 US Business 83",g.jsx("br",{}),"Alamo, TX 78516"]})]}),g.jsxs("li",{className:"flex items-center space-x-3",children:[g.jsx(c0,{className:"h-5 w-5 text-secondary flex-shrink-0"}),g.jsx("a",{href:"tel:9567876622",className:"text-sm text-white/80 hover:text-secondary transition-colors",children:"(956) 787-6622"})]}),g.jsxs("li",{className:"flex items-center space-x-3",children:[g.jsx(IA,{className:"h-5 w-5 text-secondary flex-shrink-0"}),g.jsx("a",{href:"mailto:[email protected]",className:"text-sm text-white/80 hover:text-secondary transition-colors",children:"[email protected]"})]})]})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-bold mb-4 text-white",children:r.followUs}),g.jsx("div",{className:"flex space-x-4",children:g.jsx("a",{href:"https://www.facebook.com/AlamoEDC/",target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 rounded-full bg-blue-600 hover:bg-blue-700 flex items-center justify-center transition-colors","aria-label":"Facebook",children:g.jsx(v5e,{className:"h-5 w-5 text-white"})})})]})]}),g.jsxs("div",{className:"pt-8 border-t border-white/20",children:[g.jsxs("p",{className:"text-center text-sm text-white/60",children:["© ",new Date().getFullYear()," ",r.copyright]}),g.jsxs("p",{className:"text-center text-xs text-white/50 mt-2",children:["Powered by"," ",g.jsx("a",{href:"https://www.bossleveltech.com",target:"_blank",rel:"noopener noreferrer",className:"text-secondary hover:text-secondary/80 transition-colors",children:"Boss Level Tech"})," ⢠",g.jsx(Rs,{to:"/admin/login",className:"text-white/50 hover:text-secondary/80 transition-colors",children:e==="en"?"Admin":"Administrador"})]})]})]})})},S6e=()=>{const[e,t]=R.useState("en"),r=()=>{t(n=>n==="en"?"es":"en")};return g.jsxs("div",{className:"min-h-screen",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsxs("main",{children:[g.jsx(fRe,{language:e}),g.jsx(hRe,{language:e}),g.jsx(pRe,{language:e}),g.jsx(gRe,{language:e}),g.jsx(vRe,{language:e}),g.jsx(_Re,{language:e}),g.jsx(T6e,{language:e})]}),g.jsx(mo,{language:e})]})},A6e="/assets/criselda-moncayo-CKHIcNg-.png",C6e="/assets/gabriela-hernandez-GuEtBPiE.jpg",P6e="/assets/leslie-beaz-DN7nCmni.jpg",M6e="/assets/alberto-rodriguez-BOXcYWT2.jpg",k6e="/assets/alonzo-garza-iii-Cip8Pd_M.jpg",O6e="/assets/isauro-trevino-o6eSfiYI.jpg",N6e
492="/assets/jose-garza-EEpKThPS.jpeg",I6e="/assets/karen-mcginnis-CUYu_a3K.png",D6e=()=>{const[e,t]=R.useState("en"),r=()=>{t(s=>s==="en"?"es":"en")},n={en:{title:"Meet the Alamo EDC Board and Staff",description:"The Alamo Economic Development Corporation (EDC) Board of Directors and Staff is a dynamic group of local business and community leaders dedicated to attracting new businesses, supporting economic growth, and positioning Alamo as the birding and ecotourism capital of South Texas.",boardTitle:"Alamo Economic Development Corporation Board of Directors"},es:{title:"Conozca la Junta y el Personal de Alamo EDC",description:"La Junta Directiva y el Personal de la Corporación de Desarrollo Económico (EDC) de Alamo es un grupo dinámico de lÃderes empresariales y comunitarios locales dedicados a atraer nuevos negocios, apoyar el crecimiento económico y posicionar a Alamo como la capital de observación de aves y ecoturismo del sur de Texas.",boardTitle:"Junta Directiva de la Corporación de Desarrollo Económico de Alamo"}},i=[{name:"Raul Medina",title:"Treasurer",titleEs:"Tesorero"},{name:"Criselda Moncayo",title:"President",titleEs:"Presidenta",photo:A6e},{name:"Alberto Rodriguez",title:"Vice President",titleEs:"Vicepresidente",photo:M6e},{name:"Alonzo Garza III",title:"Secretary",titleEs:"Secretario",photo:k6e},{name:"Jose Garza",title:"Director",titleEs:"Director",photo:N6e},{name:"Ricardo Salazar",title:"Director",titleEs:"Director"},{name:"Gabriela Hernandez",title:"Director",titleEs:"Directora",photo:C6e},{name:"Isauro Trevino",title:"Executive Director",titleEs:"Director Ejecutivo",photo:O6e},{name:"Leslie Beaz",title:"Executive Assistant",titleEs:"Asistente Ejecutiva",photo:P6e},{name:"Karen McGinnis",title:"Clerk",titleEs:"Secretaria",photo:I6e}],a=n[e];return g.jsxs("div",{className:"min-h-screen",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsx("main",{className:"pt-16 md:pt-20",children:g.jsx("section",{className:"py-10 md:py-16 px-4",children:g.jsxs("div",{className:"container mx-auto max-w-6xl",children:[g.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-center mb-6",children:a.title}),g.jsx("p",{className:"text-base md:text-lg text-center text-muted-foreground mb-8 md:mb-12 max-w-4xl mx-auto",children:a.description}),g.jsx("h2",{className:"text-2xl md:text-2xl md:text-3xl font-bold text-center mb-10",children:a.boardTitle}),g.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:i.map(s=>g.jsx(un,{className:"hover-scale overflow-hidden",children:g.jsx(kn,{className:"p-0",children:g.jsxs("div",{className:"flex flex-row items-stretch",children:[g.jsxs("div",{className:"flex-1 p-4 sm:p-6 flex flex-col justify-center min-w-0",children:[g.jsx("h3",{className:"text-lg sm:text-2xl font-bold mb-1 break-words",children:s.name}),g.jsx("p",{className:"text-muted-foreground",children:e==="en"?s.title:s.titleEs})]}),s.photo?g.jsx("div",{className:"w-28 sm:w-40 h-auto min-h-[140px] sm:min-h-[160px] shrink-0",children:g.jsx("img",{src:s.photo,alt:s.name,className:"w-full h-full object-cover"})}):g.jsx("div",{className:"w-28 sm:w-40 min-h-[140px] sm:min-h-[160px] shrink-0 bg-primary/10 flex items-center justify-center",children:g.jsx("span",{className:"text-2xl md:text-3xl font-bold text-primary",children:s.name.split(" ").map(o=>o[0]).join("")})})]})})},s.name))})]})})}),g.jsx(mo,{language:e})]})},L6e=()=>{const[e,t]=R.useState("en"),r=()=>{t(s=>s==="en"?"es":"en")},n={en:{title:"Welcome to the City of Alamo Incentive Programs",intro:"The City of Alamo is proud to offer a variety of incentive programs designed to support and encourage the growth and success of our community. These programs are tailored to meet the needs of our residents and businesses, providing valuable resources and financial benefits.",explore:"We invite you to explore the incentives we offer, which are designed to foster economic development, enhance community services, and improve the quality of life for all Alamo residents. Whether you're a business owner looking to expand, a new resident, or someone interested in contributing to the prosperity of our community, our incentive programs are here to supp
492ort you.",instructions:"Please fill out the necessary forms for the incentive programs you're interested in and bring them into our office for processing. Our staff is ready to assist you with any questions you may have and guide you through the application process.",requirementsTitle:"Minimum Requirements",requirementsIntro:"In order for an applicant to qualify:",requirements:["Business must be located within the city of Alamo limits","Business will only be awarded if it generates sales tax","Submit a complete application to the AEDC"],downloads:"Available Programs",officeTitle:"Office Address",officeAddress:"715 US Business 83, Alamo, TX 78516",closing:"We look forward to working with you and seeing the positive impact your participation will have on the City of Alamo. Together, we can achieve great things for our community.",downloadButton:"Download"},es:{title:"Bienvenido a los Programas de Incentivos de la Ciudad de Alamo",intro:"La Ciudad de Alamo se enorgullece de ofrecer una variedad de programas de incentivos diseñados para apoyar y fomentar el crecimiento y el éxito de nuestra comunidad. Estos programas están diseñados para satisfacer las necesidades de nuestros residentes y empresas, proporcionando recursos valiosos y beneficios financieros.",explore:"Le invitamos a explorar los incentivos que ofrecemos, que están diseñados para fomentar el desarrollo económico, mejorar los servicios comunitarios y mejorar la calidad de vida de todos los residentes de Alamo. Ya sea que sea un propietario de un negocio que busca expandirse, un nuevo residente o alguien interesado en contribuir a la prosperidad de nuestra comunidad, nuestros programas de incentivos están aquà para apoyarlo.",instructions:"Complete los formularios necesarios para los programas de incentivos que le interesen y tráigalos a nuestra oficina para su procesamiento. Nuestro personal está listo para ayudarlo con cualquier pregunta que pueda tener y guiarlo a través del proceso de solicitud.",requirementsTitle:"Requisitos MÃnimos",requirementsIntro:"Para que un solicitante califique:",requirements:["El negocio debe estar ubicado dentro de los lÃmites de la ciudad de Alamo","El negocio solo recibirá el premio si genera impuesto sobre las ventas","Enviar una solicitud completa al AEDC"],downloads:"Programas Disponibles",officeTitle:"Dirección de la Oficina",officeAddress:"715 US Business 83, Alamo, TX 78516",closing:"Esperamos trabajar con usted y ver el impacto positivo que su participación tendrá en la Ciudad de Alamo. Juntos, podemos lograr grandes cosas para nuestra comunidad.",downloadButton:"Descargar"}},i=[{titleEn:"Alamo EDC Incentives Guide",titleEs:"GuÃa de Incentivos EDC de Alamo",descriptionEn:"Comprehensive guide covering EDC project types, approval process, and application requirements for business development incentives.",descriptionEs:"GuÃa completa que cubre tipos de proyectos EDC, proceso de aprobación y requisitos de solicitud para incentivos de desarrollo empresarial.",file:"/documents/Alamo_EDC_Incentives_Guide_2024.pdf"},{titleEn:"Alamo Revolving Loan Fund Program",titleEs:"Programa de Fondo Rotatorio de Préstamos de Alamo",descriptionEn:"Small business loans from $10,000 to $150,000 at 4-10% interest for working capital, equipment, property purchase, and business expansion.",descriptionEs:"Préstamos para pequeñas empresas de $10,000 a $150,000 al 4-10% de interés para capital de trabajo, equipo, compra de propiedad y expansión empresarial.",file:"/documents/Alamo_Revolving_Loan_Fund_Program_2026.pdf"},{titleEn:"Alamo Small New Business Grant Program",titleEs:"Programa de Subvención para Pequeños Negocios Nuevos de Alamo",descriptionEn:"50% reimbursement grant up to $7,500 for storefront improvements, signage, repairs & renovations, and limited equipment purchases.",descriptionEs:"Subvención de reembolso del 50% hasta $7,500 para mejoras de fachada, señalización, reparaciones y renovaciones, y compras limitadas de equipo.",file:"/documents/Alamo_Small_New_Business_Grant_Program_2026.pdf"},{titleEn:"Alamo's Mayor Small Business Start-Up Grant",titleEs:"Subvención de Inicio del Alcalde de Alamo",descriptionEn:"Up to $15,000 in grant funding for new start-up businesses, focusing on job creation, innovation, facility improvements, and community enhancement.",descriptionEs:"Hasta $15,000 en f
492inanciamiento de subvención para nuevas empresas de inicio, enfocándose en creación de empleo, innovación, mejoras de instalaciones y mejora comunitaria.",file:"/documents/Alamos_Mayor_Small_Business_Start_Up_Grant_2026.pdf"},{titleEn:"Alamo Small Business Equipment Grant",titleEs:"Subvención de Equipo para Pequeños Negocios de Alamo",descriptionEn:"Grant program to support small businesses with equipment purchases to enhance operations and growth.",descriptionEs:"Programa de subvención para apoyar a pequeñas empresas con compras de equipo para mejorar operaciones y crecimiento.",file:"/documents/Alamo_Small_Business_Equipment_Grant_2026.pdf"},{titleEn:"Legacy Business Appreciation Program",titleEs:"Programa de Apreciación de Negocios de Legado",descriptionEn:"Recognition program honoring Alamo businesses with 10+ years in operation. Complete the form and return it to the Alamo EDC office to be recognized as a Legacy Business.",descriptionEs:"Programa de reconocimiento que honra a los negocios de Alamo con más de 10 años de operación. Complete el formulario y entréguelo en la oficina del EDC de Alamo para ser reconocido como Negocio de Legado.",file:"/documents/Legacy_Business_Appreciation_Program_2026.pdf"}],a=n[e];return g.jsxs("div",{className:"min-h-screen",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsx("main",{className:"pt-16 md:pt-20",children:g.jsx("section",{className:"py-10 md:py-16 px-4",children:g.jsxs("div",{className:"container mx-auto max-w-4xl",children:[g.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-center mb-8",children:a.title}),g.jsxs("div",{className:"space-y-6 text-lg text-muted-foreground mb-8 md:mb-12",children:[g.jsx("p",{children:a.intro}),g.jsx("p",{children:a.explore}),g.jsx("p",{className:"font-medium",children:a.instructions})]}),g.jsxs(un,{className:"mb-8 md:mb-12 border-primary/20",children:[g.jsx(zi,{children:g.jsx(Ui,{className:"text-2xl",children:a.requirementsTitle})}),g.jsxs(kn,{children:[g.jsx("p",{className:"text-lg font-medium mb-4",children:a.requirementsIntro}),g.jsx("ul",{className:"space-y-3",children:a.requirements.map((s,o)=>g.jsxs("li",{className:"flex items-start gap-3",children:[g.jsx("span",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary/10 text-primary flex items-center justify-center font-bold",children:o+1}),g.jsx("span",{className:"text-lg pt-1",children:s})]},o))})]})]}),g.jsxs("div",{className:"mb-8 md:mb-12",children:[g.jsx("h2",{className:"text-2xl font-bold mb-6",children:a.downloads}),g.jsx("div",{className:"grid gap-4",children:i.map((s,o)=>{const l=[{border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{border:"border-l-4 border-accent",cardBg:"bg-accent/20"}],u=l[o%l.length];return g.jsx(un,{className:`hover-scale ${u.border} ${u.cardBg}`,children:g.jsx(kn,{className:"p-6",children:g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:e==="en"?s.titleEn:s.titleEs}),g.jsx("p",{className:"text-muted-foreground",children:e==="en"?s.descriptionEn:s.descriptionEs})]}),g.jsx(gr,{asChild:!0,className:"flex-shrink-0",children:g.jsxs("a",{href:s.file,download:!0,className:"flex items-center gap-2",children:[g.jsx(Xw,{className:"h-4 w-4"}),a.downloadButton]})})]})})},o)})})]}),g.jsxs(un,{className:"mb-8",children:[g.jsx(zi,{children:g.jsxs(Ui,{className:"flex items-center gap-2",children:[g.jsx(Yh,{className:"h-5 w-5 text-primary"}),a.officeTitle]})}),g.jsx(kn,{children:g.jsx("p",{className:"text-lg",children:a.officeAddress})})]}),g.jsx("p",{className:"text-center text-lg text-muted-foreground italic",children:a.closing})]})})}),g.jsx(mo,{language:e})]})};function Tp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mpe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}/*! 493 * GSAP 3.15.0 494 * https://gsap.com 495 * 496 * @license Copyright 2008-2026, GreenSock. All rights reserved. 497 * Subject to the terms at https://gsap.com/standard-license 498 * @author: Jack Doyle, [email protected] 499*/var Qc={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},cS={duration:.5,overwrite:!1,delay:0},O7,bl,as,Vd=1e8,wa=1/Vd,_$=Math.PI*2,j6e=_$/4,R6e=0,kpe=Math.sqrt,$6e=Math.cos,F6e=Math.sin,il=function(t){return typeof t=="string"},$s=function(t){return typeof t=="function"},im=function(t){return typeof t=="number"},N7=function(t){return typeof t>"u"},Qh=function(t){return typeof t=="object"},ic=function(t){return t!==!1},I7=function(){return typeof window<"u"},RP=function(t){return $s(t)||il(t)},Ope=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Yl=Array.isArray,B6e=/random\([^)]+\)/g,z6e=/,\s*/g,TX=/(?:-?\.?\d|\.)+/gi,Npe=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,N1=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,pD=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Ipe=/[+-]=-?[.\d]+/,U6e=/[^,'"\[\]\s]+/gi,W6e=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ws,wh,b$,D7,id={},G5={}
vendor: 7,061 bytes, line 499
499,Dpe,Lpe=function(t){return(G5=Yb(t,id))&&uc},L7=function(t,r){return console.warn("Invalid property",t,"set to",r,"Missing plugin? gsap.registerPlugin()")},dS=function(t,r){return!r&&console.warn(t)},jpe=function(t,r){return t&&(id[t]=r)&&G5&&(G5[t]=r)||id},fS=function(){return 0},V6e={suppressEvents:!0,isStart:!0,kill:!1},hk={suppressEvents:!0,kill:!1},H6e={suppressEvents:!0},j7={},Bg=[],w$={},Rpe,Dc={},mD={},SX=30,pk=[],R7="",$7=function(t){var r=t[0],n,i;if(Qh(r)||$s(r)||(t=[t]),!(n=(r._gsap||{}).harness)){for(i=pk.length;i--&&!pk[i].targetTest(r););n=pk[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new ame(t[i],n)))||t.splice(i,1);return t},sv=function(t){return t._gsap||$7(Hd(t))[0]._gsap},$pe=function(t,r,n){return(n=t[r])&&$s(n)?t[r]():N7(n)&&t.getAttribute&&t.getAttribute(r)||n},ac=function(t,r){return(t=t.split(",")).forEach(r)||t},Us=function(t){return Math.round(t*1e5)/1e5||0},_s=function(t){return Math.round(t*1e7)/1e7||0},rb=function(t,r){var n=r.charAt(0),i=parseFloat(r.substr(2));return t=parseFloat(t),n==="+"?t+i:n==="-"?t-i:n==="*"?t*i:t/i},G6e=function(t,r){for(var n=r.length,i=0;t.indexOf(r[i])<0&&++i<n;);return i<n},q5=function(){var t=Bg.length,r=Bg.slice(0),n,i;for(w$={},Bg.length=0,n=0;n<t;n++)i=r[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},F7=function(t){return!!(t._initted||t._startAt||t.add)},Fpe=function(t,r,n,i){Bg.length&&!bl&&q5(),t.render(r,n,!!(bl&&r<0&&F7(t))),Bg.length&&!bl&&q5()},Bpe=function(t){var r=parseFloat(t);return(r||r===0)&&(t+"").match(U6e).length<2?r:il(t)?t.trim():t},zpe=function(t){return t},ad=function(t,r){for(var n in r)n in t||(t[n]=r[n]);return t},q6e=function(t){return function(r,n){for(var i in n)i in r||i==="duration"&&t||i==="ease"||(r[i]=n[i])}},Yb=function(t,r){for(var n in r)t[n]=r[n];return t},AX=function e(t,r){for(var n in r)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(t[n]=Qh(r[n])?e(t[n]||(t[n]={}),r[n]):r[n]);return t},K5=function(t,r){var n={},i;for(i in t)i in r||(n[i]=t[i]);return n},XE=function(t){var r=t.parent||ws,n=t.keyframes?q6e(Yl(t.keyframes)):ad;if(ic(t.inherit))for(;r;)n(t,r.vars.defaults),r=r.parent||r._dp;return t},K6e=function(t,r){for(var n=t.length,i=n===r.length;i&&n--&&t[n]===r[n];);return n<0},Upe=function(t,r,n,i,a){var s=t[i],o;if(a)for(o=r[a];s&&s[a]>o;)s=s._prev;return s?(r._next=s._next,s._next=r):(r._next=t[n],t[n]=r),r._next?r._next._prev=r:t[i]=r,r._prev=s,r.parent=r._dp=t,r},cN=function(t,r,n,i){n===void 0&&(n="_first"),i===void 0&&(i="_last");var a=r._prev,s=r._next;a?a._next=s:t[n]===r&&(t[n]=s),s?s._prev=a:t[i]===r&&(t[i]=a),r._next=r._prev=r.parent=null},t0=function(t,r){t.parent&&(!r||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},ov=function(t,r){if(t&&(!r||r._end>t._dur||r._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},Y6e=function(t){for(var r=t.parent;r&&r.parent;)r._dirty=1,r.totalDuration(),r=r.parent;return t},x$=function(t,r,n,i){return t._startAt&&(bl?t._startAt.revert(hk):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(r,!0,i))},X6e=function e(t){return!t||t._ts&&e(t.parent)},CX=function(t){return t._repeat?Xb(t._tTime,t=t.duration()+t._rDelay)*t:0},Xb=function(t,r){var n=Math.floor(t=_s(t/r));return t&&n===t?n-1:n},Y5=function(t,r){return(t-r._start)*r._ts+(r._ts>=0?0:r._dirty?r.totalDuration():r._tDur)},dN=function(t){return t._end=_s(t._start+(t._tDur/Math.abs(t._ts||t._rts||wa)||0))},fN=function(t,r){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=_s(n._time-(t._ts>0?r/t._ts:((t._dirty?t.totalDuration():t._tDur)-r)/-t._ts)),dN(t),n._dirty||ov(n,t)),t},Wpe=function(t,r){var n;if((r._time||!r._dur&&r._initted||r._start<t._time&&(r._dur||!r.add))&&(n=Y5(t.rawTime(),r),(!r._dur||zA(0,r.totalDuration(),n)-r._tTime>wa)&&r.render(n,!0)),ov(t,r)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-wa}},Mh=function(t,r,n,i){return r.parent&&t0(r),r._start=_s((im(n)?n:n||t!==ws?Pd(t,n,r):t._time)+r._delay),r._end=_s(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Upe(t,r,"_first","_last",t._sort?"_start":0),E$(r)||(t._recent=r),i||Wpe(t,r),t._ts<0&&fN(t,t._tTime),t},Vpe=function(t,r){return(id.ScrollTrigger||L7("scrollTrigger",r))&&id.ScrollTrigger.create(r,t)},Hpe=function(t,r,n,i,a){if(z7(t,r,a),!t._initted)return 1;if(!n&&t._pt&&!bl&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Rpe!==Bc.frame)return Bg.push(t),t._lazy=[a,i],1},Q6e=function e(t){var r=t.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||e(r))},E$=function(t){var r=t.data;return r==="isFromStart"||r==="isStart"},Z6e=function(t,r,n,i){var a=t.ratio,s=r<0||!r&&(!t._start&&Q6e(t)&&!(!t._initted&&E$(t))||(t._ts<0||t._dp._ts<0)&&!E$(t))?0:1,o=t._rDelay,l=0,u,c,d;if(o&&t._repeat&&(l=zA(0,t._tDur,r),c=Xb(l,o),t._yoyo&&c&1&&(s=1-s),c!==Xb(t._tTime,o)&&(a=1-s,t.vars.repeatRefresh&&t._initted&&t.invalidate())),s!==a||bl||i||t._zTime===wa||!r&&t._zTime){if(!t._initted&&Hpe(t,r,i,n,l))return;for(d=t._zTime,t._zTime=r||(n?wa:0),n||(n=r&&!d),t.ratio=s,t._from&&(s=1-s),t._time=0,t._tTime=l,u=t._pt;u;)u.r(s,u.d),u=u._next;r<0&&x$(t,r,n,!0),t._onUpdate&&!n&&Vc(t,"onUpdate"),l&&t._repeat&&!n&&t.parent&&Vc(t,"onRepeat"),(r>=t._tDur||r<0)&&t.ratio===s&&(s&&t0(t,1),!n&&!bl&&(Vc(t,s?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=r)},J6e=function(t,r,n){var i;if(n>r)for(i=t._first;i&&i._start<=n;){if(i.data==="isPause"&&i._start>r)return i;i=i._next}else for(i=t._last;i&&i._start>=n;){if(i.data==="isPause"&&i._start<r)return i;i=i._prev}},Qb=function(t,r,n,i){var a=t._repeat,s=_s(r)||0,o=t._tTime/t._tDur;return o&&!i&&(t._time*=s/t._dur),t._dur=s,t._tDur=a?a<0?1e10:_s(s*(a+1)+t._rDelay*a):s,o>0&&!i&&fN(t,t._tTime=t._tDur*o),t.parent&&dN(t),n||ov(t.parent,t),t},PX=function(t){return t instanceof Yu?ov(t):Qb(t,t._dur)},e$e={_start:0,endTime:fS,totalDuration:fS},Pd=function e(t,r,n){var i=t.labels,a=t._recent||e$e,s=t.duration()>=Vd?a.endTime(!1):t._dur,o,l,u;return il(r)&&(isNaN(r)||r in i)?(l=r.charAt(0),u=r.substr(-1)==="%",o=r.indexOf("="),l==="<"||l===">"?(o>=0&&(r=r.replace(/=/,"")),(l==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(r.substr(1))||0)*(u?(o<0?a:n).totalDuration()/100:1)):o<0?(r in i||(i[r]=s),i[r]):(l=parseFloat(r.charAt(o-1)+r.substr(o+1)),u&&n&&(l=l/100*(Yl(n)?n[0]:n).totalDuration()),o>1?e(t,r.substr(0,o-1),n)+l:s+l)):r==null?s:+r},QE=function(t,r,n){var i=im(r[1]),a=(i?2:1)+(t<2?0:1),s=r[a],o,l;if(i&&(s.duration=r[1]),s.parent=n,t){for(o=s,l=n;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=ic(l.vars.inherit)&&l.parent;s.immediateRender=ic(o.immediateRender),t<2?s.runBackwards=1:s.startAt=r[a-1]}return new co(r[0],s,r[a+1])},h0=function(t,r){return t||t===0?r(t):r},zA=function(t,r,n){return n<t?t:n>r?r:n},Gl=function(t,r){return!il(t)||!(r=W6e.exec(t))?"":r[1]},t$e=function(t,r,n){return h0(n,function(i){return zA(t,r,i)})},T$=[].slice,Gpe=function(t,r){return t&&Qh(t)&&"length"in t&&(!r&&!t.length||t.length-1
vendor: 4,774 bytes, line 499
499in t&&Qh(t[0]))&&!t.nodeType&&t!==wh},r$e=function(t,r,n){return n===void 0&&(n=[]),t.forEach(function(i){var a;return il(i)&&!r||Gpe(i,1)?(a=n).push.apply(a,Hd(i)):n.push(i)})||n},Hd=function(t,r,n){return as&&!r&&as.selector?as.selector(t):il(t)&&!n&&(b$||!Zb())?T$.call((r||D7).querySelectorAll(t),0):Yl(t)?r$e(t,n):Gpe(t)?T$.call(t,0):t?[t]:[]},S$=function(t){return t=Hd(t)[0]||dS("Invalid scope")||{},function(r){var n=t.current||t.nativeElement||t;return Hd(r,n.querySelectorAll?n:n===t?dS("Invalid scope")||D7.createElement("div"):t)}},qpe=function(t){return t.sort(function(){return .5-Math.random()})},Kpe=function(t){if($s(t))return t;var r=Qh(t)?t:{each:t},n=lv(r.ease),i=r.from||0,a=parseFloat(r.base)||0,s={},o=i>0&&i<1,l=isNaN(i)||o,u=r.axis,c=i,d=i;return il(i)?c=d={center:.5,edges:.5,end:1}[i]||0:!o&&l&&(c=i[0],d=i[1]),function(f,h,p){var m=(p||r).length,_=s[m],y,v,b,w,x,E,T,S,A;if(!_){if(A=r.grid==="auto"?0:(r.grid||[1,Vd])[1],!A){for(T=-Vd;T<(T=p[A++].getBoundingClientRect().left)&&A<m;);A<m&&A--}for(_=s[m]=[],y=l?Math.min(A,m)*c-.5:i%A,v=A===Vd?0:l?m*d/A-.5:i/A|0,T=0,S=Vd,E=0;E<m;E++)b=E%A-y,w=v-(E/A|0),_[E]=x=u?Math.abs(u==="y"?w:b):kpe(b*b+w*w),x>T&&(T=x),x<S&&(S=x);i==="random"&&qpe(_),_.max=T-S,_.min=S,_.v=m=(parseFloat(r.amount)||parseFloat(r.each)*(A>m?m-1:u?u==="y"?m/A:A:Math.max(A,m/A))||0)*(i==="edges"?-1:1),_.b=m<0?a-m:a,_.u=Gl(r.amount||r.each)||0,n=n&&m<0?m$e(n):n}return m=(_[f]-_.min)/_.max||0,_s(_.b+(n?n(m):m)*_.v)+_.u}},A$=function(t){var r=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=_s(Math.round(parseFloat(n)/t)*t*r);return(i-i%1)/r+(im(n)?0:Gl(n))}},Ype=function(t,r){var n=Yl(t),i,a;return!n&&Qh(t)&&(i=n=t.radius||Vd,t.values?(t=Hd(t.values),(a=!im(t[0]))&&(i*=i)):t=A$(t.increment)),h0(r,n?$s(t)?function(s){return a=t(s),Math.abs(a-s)<=i?a:s}:function(s){for(var o=parseFloat(a?s.x:s),l=parseFloat(a?s.y:0),u=Vd,c=0,d=t.length,f,h;d--;)a?(f=t[d].x-o,h=t[d].y-l,f=f*f+h*h):f=Math.abs(t[d]-o),f<u&&(u=f,c=d);return c=!i||u<=i?t[c]:s,a||c===s||im(s)?c:c+Gl(s)}:A$(t))},Xpe=function(t,r,n,i){return h0(Yl(t)?!r:n===!0?!!(n=0):!i,function(){return Yl(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(i=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(r-t+n*.99))/n)*n*i)/i})},n$e=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(i){return r.reduce(function(a,s){return s(a)},i)}},i$e=function(t,r){return function(n){return t(parseFloat(n))+(r||Gl(n))}},a$e=function(t,r,n){return Zpe(t,r,0,1,n)},Qpe=function(t,r,n){return h0(n,function(i){return t[~~r(i)]})},s$e=function e(t,r,n){var i=r-t;return Yl(t)?Qpe(t,e(0,t.length),r):h0(n,function(a){return(i+(a-t)%i)%i+t})},o$e=function e(t,r,n){var i=r-t,a=i*2;return Yl(t)?Qpe(t,e(0,t.length-1),r):h0(n,function(s){return s=(a+(s-t)%a)%a||0,t+(s>i?a-s:s)})},hS=function(t){return t.replace(B6e,function(r){var n=r.indexOf("[")+1,i=r.substring(n||7,n?r.indexOf("]"):r.length-1).split(z6e);return Xpe(n?i:+i[0],n?0:+i[1],+i[2]||1e-5)})},Zpe=function(t,r,n,i,a){var s=r-t,o=i-n;return h0(a,function(l){return n+((l-t)/s*o||0)})},l$e=function e(t,r,n,i){var a=isNaN(t+r)?0:function(h){return(1-h)*t+h*r};if(!a){var s=il(t),o={},l,u,c,d,f;if(n===!0&&(i=1)&&(n=null),s)t={p:t},r={p:r};else if(Yl(t)&&!Yl(r)){for(c=[],d=t.length,f=d-2,u=1;u<d;u++)c.push(e(t[u-1],t[u]));d--,a=function(p){p*=d;var m=Math.min(f,~~p);return c[m](p-m)},n=r}else i||(t=Yb(Yl(t)?[]:{},t));if(!c){for(l in r)B7.call(o,t,l,"get",r[l]);a=function(p){return V7(p,o)||(s?t.p:t)}}}return h0(n,a)},MX=function(t,r,n){var i=t.labels,a=Vd,s,o,l;for(s in i)o=i[s]-r,o<0==!!n&&o&&a>(o=Math.abs(o))&&(l=s,a=o);return l},Vc=function(t,r,n){var i=t.vars,a=i[r],s=as,o=t._ctx,l,u,c;if(a)return l=i[r+"Params"],u=i.callbackScope||t,n&&Bg.length&&q5(),o&&(as=o),c=l?a.apply(u,l):a.call(u),as=s,c},mE=function(t){return t0(t),t.scrollTrigger&&t.scrollTrigger.kill(!!bl),t.progress()<1&&Vc(t,"onInterrupt"),t},I1,Jpe=[],eme=function(t){if(t)if(t=!t.name&&t.default||t,I7()||t.headless){var r=t.name,n=$s(t),i=r&&!n&&t.init?function(){this._props=[]}:t,a={init:fS,render:V7,add:B7,kill:S$e,modifier:T$e,rawVars:0},s={targetTest:0,get:0,getSetter:W7,aliases:{},register:0};if(Zb(),t!==i){if(Dc[r])return;ad(i,ad(K5(t,a),s)),Yb(i.prototype,Yb(a,K5(t,s))),Dc[i.prop=r]=i,t.targetTest&&(pk.push(i),j7[r]=1),r=(r==="css"?"CSS":r.charAt(0).toUpperCase()+r.substr(1))+"Plugin"}jpe(r,i),t.register&&t.register(uc,i,sc)}else Jpe.push(t)},va=255,gE={aqua:[0,va,va],lime:[0,va,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,va],navy:[0,0,128],white:[va,va,va],olive:[128,128,0],yellow:[va,va,0],orange:[va,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[va,0,0],pink:[va,
vendor: 5,909 bytes, line 499
499192,203],cyan:[0,va,va],transparent:[va,va,va,0]},gD=function(t,r,n){return t+=t<0?1:t>1?-1:0,(t*6<1?r+(n-r)*t*6:t<.5?n:t*3<2?r+(n-r)*(2/3-t)*6:r)*va+.5|0},tme=function(t,r,n){var i=t?im(t)?[t>>16,t>>8&va,t&va]:0:gE.black,a,s,o,l,u,c,d,f,h,p;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),gE[t])i=gE[t];else if(t.charAt(0)==="#"){if(t.length<6&&(a=t.charAt(1),s=t.charAt(2),o=t.charAt(3),t="#"+a+a+s+s+o+o+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&va,i&va,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&va,t&va]}else if(t.substr(0,3)==="hsl"){if(i=p=t.match(TX),!r)l=+i[0]%360/360,u=+i[1]/100,c=+i[2]/100,s=c<=.5?c*(u+1):c+u-c*u,a=c*2-s,i.length>3&&(i[3]*=1),i[0]=gD(l+1/3,a,s),i[1]=gD(l,a,s),i[2]=gD(l-1/3,a,s);else if(~t.indexOf("="))return i=t.match(Npe),n&&i.length<4&&(i[3]=1),i}else i=t.match(TX)||gE.transparent;i=i.map(Number)}return r&&!p&&(a=i[0]/va,s=i[1]/va,o=i[2]/va,d=Math.max(a,s,o),f=Math.min(a,s,o),c=(d+f)/2,d===f?l=u=0:(h=d-f,u=c>.5?h/(2-d-f):h/(d+f),l=d===a?(s-o)/h+(s<o?6:0):d===s?(o-a)/h+2:(a-s)/h+4,l*=60),i[0]=~~(l+.5),i[1]=~~(u*100+.5),i[2]=~~(c*100+.5)),n&&i.length<4&&(i[3]=1),i},rme=function(t){var r=[],n=[],i=-1;return t.split(zg).forEach(function(a){var s=a.match(N1)||[];r.push.apply(r,s),n.push(i+=s.length+1)}),r.c=n,r},kX=function(t,r,n){var i="",a=(t+i).match(zg),s=r?"hsla(":"rgba(",o=0,l,u,c,d;if(!a)return t;if(a=a.map(function(f){return(f=tme(f,r,1))&&s+(r?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),n&&(c=rme(t),l=n.c,l.join(i)!==c.c.join(i)))for(u=t.replace(zg,"1").split(N1),d=u.length-1;o<d;o++)i+=u[o]+(~l.indexOf(o)?a.shift()||s+"0,0,0,0)":(c.length?c:a.length?a:n).shift());if(!u)for(u=t.split(zg),d=u.length-1;o<d;o++)i+=u[o]+a[o];return i+u[d]},zg=function(){var e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in gE)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),u$e=/hsl[a]?\(/,nme=function(t){var r=t.join(" "),n;if(zg.lastIndex=0,zg.test(r))return n=u$e.test(r),t[1]=kX(t[1],n),t[0]=kX(t[0],n,rme(t[1])),!0},pS,Bc=function(){var e=Date.now,t=500,r=33,n=e(),i=n,a=1e3/240,s=a,o=[],l,u,c,d,f,h,p=function m(_){var y=e()-i,v=_===!0,b,w,x,E;if((y>t||y<0)&&(n+=y-r),i+=y,x=i-n,b=x-s,(b>0||v)&&(E=++d.frame,f=x-d.time*1e3,d.time=x=x/1e3,s+=b+(b>=a?4:a-b),w=1),v||(l=u(m)),w)for(h=0;h<o.length;h++)o[h](x,f,E,_)};return d={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(_){return f/(1e3/(_||60))},wake:function(){Dpe&&(!b$&&I7()&&(wh=b$=window,D7=wh.document||{},id.gsap=uc,(wh.gsapVersions||(wh.gsapVersions=[])).push(uc.version),Lpe(G5||wh.GreenSockGlobals||!wh.gsap&&wh||{}),Jpe.forEach(eme)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),u=c||function(_){return setTimeout(_,s-d.time*1e3+1|0)},pS=1,p(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),pS=0,u=fS},lagSmoothing:function(_,y){t=_||1/0,r=Math.min(y||33,t)},fps:function(_){a=1e3/(_||240),s=d.time*1e3+a},add:function(_,y,v){var b=y?function(w,x,E,T){_(w,x,E,T),d.remove(b)}:_;return d.remove(_),o[v?"unshift":"push"](b),Zb(),b},remove:function(_,y){~(y=o.indexOf(_))&&o.splice(y,1)&&h>=y&&h--},_listeners:o},d}(),Zb=function(){return!pS&&Bc.wake()},pi={},c$e=/^[\d.\-M][\d.\-,\s]/,d$e=/["']/g,f$e=function(t){for(var r={},n=t.substr(1,t.length-3).split(":"),i=n[0],a=1,s=n.length,o,l,u;a<s;a++)l=n[a],o=a!==s-1?l.lastIndexOf(","):l.length,u=l.substr(0,o),r[i]=isNaN(u)?u.replace(d$e,"").trim():+u,i=l.substr(o+1).trim();return r},h$e=function(t){var r=t.indexOf("(")+1,n=t.indexOf(")"),i=t.indexOf("(",r);return t.substring(r,~i&&i<n?t.indexOf(")",n+1):n)},p$e=function(t){var r=(t+"").split("("),n=pi[r[0]];return n&&r.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[f$e(r[1])]:h$e(t).split(",").map(Bpe)):pi._CE&&c$e.test(t)?pi._CE("",t):n},m$e=function(t){return function(r){return 1-t(1-r)}},lv=function(t,r){return t&&($s(t)?t:pi[t]||p$e(t))||r},s_=function(t,r,n,i){n===void 0&&(n=function(l){return 1-r(1-l)}),i===void 0&&(i=function(l){return l<.5?r(l*2)/2:1-r((1-l)*2)/2});var a={easeIn:r,easeOut:n,easeInOut:i},s;return ac(t,function(o){pi[o]=id[o]=a,pi[s=o.toLowerCase()]=n;for(var l in a)pi[s+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=pi[o+"."+l]=a[l]}),a},ime=function(t){return function(r){return r<.5?(1-t(1-r*2))/2:.5+t((r-.5)*2)/2}},yD=function e(t,r,n){var i=r>=1?r:1,a=(n||(t?.3:.45))/(r<1?r:1),s=a/_$*(Math.asin(1/i)||0),o=function(c){return c===1?1:i*Math.pow(2,-10*c)*F6e((c-s)*a)+1},l=t==="out"?o:t==="in"?function(u){return 1-o(1-u)}:ime(o);return a=_$/a,l.config=function(u,c){return e(t,u,c)},l},vD=function e(t,r){r===void 0&&(r=1.70158);var n=function(s){return s?--s*s*((r+1)*s+r)+1:0},i=t==="out"?n:t==="in"?function(a){return 1-n(1-a)}:ime(n);return i.config=function(a){return e(t,a)},i};ac("Linear,Quad,Cubic,Quart,Quint,Strong",function(e,t){var r=t<5?t+1:t;s_(e+",Power"+(r-1),t?function(n){return Math.pow(n,r)}:function(n){return n},function(n){return 1-Math.pow(1-n,r)},function(n){return n<.5?Math.pow(n*2,r)/2:1-Math.pow((1-n)*2,r)/2})});pi.Linear.easeNone=pi.none=pi.Linear.easeIn;s_("Elastic",yD("in"),yD("out"),yD());(function(e,t){var r=1/t,n=2*r,i=2.5*r,a=function(o){return o<r?e*o*o:o<n?e*Math.pow(o-1.5/t,2)+.75:o<i?e*(o-=2.25/t)*o+.9375:e*Math.pow(o-2.625/t,2)+.984375};s_("Bounce",function(s){return 1-a(1-s)},a)})(7.5625,2.75);s_("Expo",function(e){return Math.pow(2,10*(e-1))*e+e*e*e*e*e*e*(1-e)});s_("Circ",function(e){return-(kpe(1-e*e)-1)});s_("Sine",function(e){return e===1?1:-$6e(e*j6e)+1});s_("Back",vD("in"),vD("out"),vD());pi.SteppedEase=pi.steps=id.SteppedEase={config:function(t,r){t===void 0&&(t=1);var n=1/t,i=t+(r?0:1),a=r?1:0,s=1-wa;return function(o){return((i*zA(0,s,o)|0)+a)*n}}};cS.ease=pi["quad.out"];ac("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(e){return R7+=e+","+e+"Params,"});
vendor: 22,814 bytes, line 499
499var ame=function(t,r){this.id=R6e++,t._gsap=this,this.target=t,this.harness=r,this.get=r?r.get:$pe,this.set=r?r.getSetter:W7},mS=function(){function e(r){this.vars=r,this._delay=+r.delay||0,(this._repeat=r.repeat===1/0?-2:r.repeat||0)&&(this._rDelay=r.repeatDelay||0,this._yoyo=!!r.yoyo||!!r.yoyoEase),this._ts=1,Qb(this,+r.duration,1,1),this.data=r.data,as&&(this._ctx=as,as.data.push(this)),pS||Bc.wake()}var t=e.prototype;return t.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},t.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},t.totalDuration=function(n){return arguments.length?(this._dirty=0,Qb(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(n,i){if(Zb(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(fN(this,n),!a._dp||a.parent||Wpe(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&Mh(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===wa||!this._initted&&this._dur&&n||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Fpe(this,n,i)),this},t.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+CX(this))%(this._dur+this._rDelay)||(n?this._dur:0),i):this._time},t.totalProgress=function(n,i){return arguments.length?this.totalTime(this.totalDuration()*n,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(n,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+CX(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(n,i){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*a,i):this._repeat?Xb(this._tTime,a)+1:1},t.timeScale=function(n,i){if(!arguments.length)return this._rts===-wa?0:this._rts;if(this._rts===n)return this;var a=this.parent&&this._ts?Y5(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-wa?0:this._rts,this.totalTime(zA(-Math.abs(this._delay),this.totalDuration(),a),i!==!1),dN(this),Y6e(this)},t.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Zb(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==wa&&(this._tTime-=wa)))),this):this._ps},t.startTime=function(n){if(arguments.length){this._start=_s(n);var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Mh(i,this,this._start-this._delay),this}return this._start},t.endTime=function(n){return this._start+(ic(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(n){var i=this.parent||this._dp;return i?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Y5(i.rawTime(n),this):this._tTime:this._tTime},t.revert=function(n){n===void 0&&(n=H6e);var i=bl;return bl=n,F7(this)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),bl=i,this},t.globalTime=function(n){for(var i=this,a=arguments.length?n:i.rawTime();i;)a=i._start+a/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(n):a},t.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,PX(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,PX(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},t.seek=function(n,i){return this.totalTime(Pd(this,n),ic(i))},t.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,ic(i)),this._dur||(this._zTime=-wa),this},t.play=function(n,i){return n!=null&&this.seek(n,i),this.reversed(!1).paused(!1)},t.reverse=function(n,i){return n!=null&&this.seek(n||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(n,i){return n!=null&&this.seek(n,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-wa:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-wa,this},t.isActive=function(){var n=this.parent||this._dp,i=this._start,a;return!!(!n||this._ts&&this._initted&&n.isActive()&&(a=n.rawTime(!0))>=i&&a<this.endTime(!0)-wa)},t.eventCallback=function(n,i,a){var s=this.vars;return arguments.length>1?(i?(s[n]=i,a&&(s[n+"Params"]=a),n==="onUpdate"&&(this._onUpdate=i)):delete s[n],this):s[n]},t.then=function(n){var i=this,a=i._prom;return new Promise(function(s){var o=$s(n)?n:zpe,l=function(){var c=i.then;i.then=null,a&&a(),$s(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?l():i._prom=l})},t.kill=function(){mE(this)},e}();ad(mS.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-wa,_prom:0,_ps:!1,_rts:1});var Yu=function(e){Mpe(t,e);function t(n,i){var a;return n===void 0&&(n={}),a=e.call(this,n)||this,a.labels={},a.smoothChildTiming=!!n.smoothChildTiming,a.autoRemoveChildren=!!n.autoRemoveChildren,a._sort=ic(n.sortChildren),ws&&Mh(n.parent||ws,Tp(a),i),n.reversed&&a.reverse(),n.paused&&a.paused(!0),n.scrollTrigger&&Vpe(Tp(a),n.scrollTrigger),a}var r=t.prototype;return r.to=function(i,a,s){return QE(0,arguments,this),this},r.from=function(i,a,s){return QE(1,arguments,this),this},r.fromTo=function(i,a,s,o){return QE(2,arguments,this),this},r.set=function(i,a,s){return a.duration=0,a.parent=this,XE(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new co(i,a,Pd(this,s),1),this},r.call=function(i,a,s){return Mh(this,co.delayedCall(0,i,a),s)},r.staggerTo=function(i,a,s,o,l,u,c){return s.duration=a,s.stagger=s.stagger||o,s.onComplete=u,s.onCompleteParams=c,s.parent=this,new co(i,s,Pd(this,l)),this},r.staggerFrom=function(i,a,s,o,l,u,c){return s.runBackwards=1,XE(s).immediateRender=ic(s.immediateRender),this.staggerTo(i,a,s,o,l,u,c)},r.staggerFromTo=function(i,a,s,o,l,u,c,d){return o.startAt=s,XE(o).immediateRender=ic(o.immediateRender),this.staggerTo(i,a,o,l,u,c,d)},r.render=function(i,a,s){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=i<=0?0:_s(i),d=this._zTime<0!=i<0&&(this._initted||!u),f,h,p,m,_,y,v,b,w,x,E,T;if(this!==ws&&c>l&&i>=0&&(c=l),c!==this._tTime||s||d){if(o!==this._time&&u&&(c+=this._time-o,i+=this._time-o),f=c,w=this._start,b=this._ts,y=!b,d&&(u||(o=this._zTime),(i||!a)&&(this._zTime=i)),this._repeat){if(E=this._yoyo,_=u+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(_*100+i,a,s);if(f=_s(c%_),c===l?(m=this._repeat,f=u):(x=_s(c/_),m=~~x,m&&m===x&&(f=u,m--),f>u&&(f=u)),x=Xb(this._tTime,_),!o&&this._tTime&&x!==m&&this._tTime-x*_-this._dur<=0&&(x=m),E&&m&1&&(f=u-f,T=1),m!==x&&!this._lock){var S=E&&x&1,A=S===(E&&m&1);if(m<x&&(S=!S),o=S?0:c%u?u:c,this._lock=1,this.render(o||(T?0:_s(m*_)),a,!u)._lock=0,this._tTime=c,!a&&this.parent&&Vc(this,"onRepeat"),this.vars.repeatRefresh&&!T&&(this.invalidate()._lock=1,x=m),o&&o!==this._time||y!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,A&&(this._lock=2,o=S?u:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!T&&this.invalidate()),this._lock=0,!this._ts&&!y)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=J6e(this,_s(o),_s(f)),v&&(c-=f-(f=v._start))),this._tTime=c,this._time=f,this._act=!!b,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,o=0),!o&&c&&u&&!a&&!x&&(Vc(this,"onStart"),this._tTime!==c))return this;if(f>=o&&i>=0)for(h=this._first;h;){if(p=h._next,(h._act||f>=h._start)&&h._ts&&v!==h){if(h.parent!==this)return this.render(i,a,s);if(h.render(h._ts>0?(f-h._start)*h._ts:(h._dirty?h.totalDuration():h._tDur)+(f-h._start)*h._ts,a,s),f!==this._time||!this._ts&&!y){v=0,p&&(c+=this._zTime=-wa);break}}h=p}else{h=this._last;for(var C=i<0?i:f;h;){if(p=h._prev,(h._act||C<=h._end)&&h._ts&&v!==h){if(h.parent!==this)return this.render(i,a,s);if(h.render(h._ts>0?(C-h._start)*h._ts:(h._dirty?h.totalDuration():h._tDur)+(C-h._start)*h._ts,a,s||bl&&F7(h)),f!==this._time||!this._ts&&!y){v=0,p&&(c+=this._zTime=C?-wa:wa);break}}h=p}}if(v&&!a&&(this.pause(),v.render(f>=o?0:-wa)._zTime=f>=o?1:-1,this._ts))return this._start=w,dN(this),this.render(i,a,s);this._onUpdate&&!a&&Vc(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(w===this._start||Math.abs(b)!==Math.abs(this._ts))&&(this._lock||((i||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&t0(this,1),!a&&!(i<0&&!o)&&(c||o||!l)&&(Vc(this,c===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(i,a){var s=this;if(im(a)||(a=Pd(this,a,i)),!(i instanceof mS)){if(Yl(i))return i.forEach(function(o){return s.add(o,a)}),this;if(il(i))return this.addLabel(i,a);if($s(i))i=co.delayedCall(0,i);else return this}return this!==i?Mh(this,i,a):this},r.getChildren=function(i,a,s,o){i===void 0&&(i=!0),a===void 0&&(a=!0),s===void 0&&(s=!0),o===void 0&&(o=-Vd);for(var l=[],u=this._first;u;)u._start>=o&&(u instanceof co?a&&l.push(u):(s&&l.push(u),i&&l.push.apply(l,u.getChildren(!0,a,s)))),u=u._next;return l},r.getById=function(i){for(var a=this.getChildren(1,1,1),s=a.length;s--;)if(a[s].vars.id===i)return a[s]},r.remove=function(i){return il(i)?this.removeLabel(i):$s(i)?this.killTweensOf(i):(i.parent===this&&cN(this,i),i===this._recent&&(this._recent=this._last),ov(this))},r.totalTime=function(i,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_s(Bc.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),e.prototype.totalTime.call(this,i,a),this._forcing=0,this):this._tTime},r.addLabel=function(i,a){return this.labels[i]=Pd(this,a),this},r.removeLabel=function(i){return delete this.labels[i],this},r.addPause=function(i,a,s){var o=co.delayedCall(0,a||fS,s);return o.data="isPause",this._hasPause=1,Mh(this,o,Pd(this,i))},r.removePause=function(i){var a=this._first;for(i=Pd(this,i);a;)a._start===i&&a.data==="isPause"&&t0(a),a=a._next},r.killTweensOf=function(i,a,s){for(var o=this.getTweensOf(i,s),l=o.length;l--;)vg!==o[l]&&o[l].kill(i,a);return this},r.getTweensOf=function(i,a){for(var s=[],o=Hd(i),l=this._first,u=im(a),c;l;)l instanceof co?G6e(l._targets,o)&&(u?(!vg||l._initted&&l._ts)&&l.globalTime(0)<=a&&l.globalTime(l.totalDuration())>a:!a||l.isActive())&&s.push(l):(c=l.getTweensOf(o,a)).length&&s.push.apply(s,c),l=l._next;return s},r.tweenTo=function(i,a){a=a||{};var s=this,o=Pd(s,i),l=a,u=l.startAt,c=l.onStart,d=l.onStartParams,f=l.immediateRender,h,p=co.to(s,ad({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale())||wa,onStart:function(){if(s.pause(),!h){var _=a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale());p._dur!==_&&Qb(p,_,0,1).render(p._time,!0,!0),h=1}c&&c.apply(p,d||[])}},a));return f?p.render(0):p},r.tweenFromTo=function(i,a,s){return this.tweenTo(a,ad({startAt:{time:Pd(this,i)}},s))},r.recent=function(){return this._recent},r.nextLabel=function(i){return i===void 0&&(i=this._time),MX(this,Pd(this,i))},r.previousLabel=function(i){return i===void 0&&(i=this._time),MX(this,Pd(this,i),1)},r.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+wa)},r.shiftChildren=function(i,a,s){s===void 0&&(s=0);var o=this._first,l=this.labels,u;for(i=_s(i);o;)o._start>=s&&(o._start+=i,o._end+=i),o=o._next;if(a)for(u in l)l[u]>=s&&(l[u]+=i);return ov(this)},r.invalidate=function(i){var a=this._first;for(this._lock=0;a;)a.invalidate(i),a=a._next;return e.prototype.invalidate.call(this,i)},r.clear=function(i){i===void 0&&(i=!0);for(var a=this._first,s;a;)s=a._next,this.remove(a),a=s;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),ov(this)},r.totalDuration=function(i){var a=0,s=this,o=s._last,l=Vd,u,c,d;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-i:i));if(s._dirty){for(d=s.parent;o;)u=o._prev,o._dirty&&o.totalDuration(),c=o._start,c>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,Mh(s,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(a-=c,(!d&&!s._dp||d&&d.smoothChildTiming)&&(s._start+=_s(c/s._ts),s._time-=c,s._tTime-=c),s.shiftChildren(-c,!1,-1/0),l=0),o._end>a&&o._ts&&(a=o._end),o=u;Qb(s,s===ws&&s._time>a?s._time:a,1,1),s._dirty=0}return s._tDur},t.updateRoot=function(i){if(ws._ts&&(Fpe(ws,Y5(i,ws)),Rpe=Bc.frame),Bc.frame>=SX){SX+=Qc.autoSleep||120;var a=ws._first;if((!a||!a._ts)&&Qc.autoSleep&&Bc._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||Bc.sleep()}}},t}(mS);ad(Yu.prototype,{_lock:0,_hasPause:0,_forcing:0});var g$e=function(t,r,n,i,a,s,o){var l=new sc(this._pt,t,r,0,1,dme,null,a),u=0,c=0,d,f,h,p,m,_,y,v;for(l.b=n,l.e=i,n+="",i+="",(y=~i.indexOf("random("))&&(i=hS(i)),s&&(v=[n,i],s(v,t,r),n=v[0],i=v[1]),f=n.match(pD)||[];d=pD.exec(i);)p=d[0],m=i.substring(u,d.index),h?h=(h+1)%5:m.substr(-5)==="rgba("&&(h=1),p!==f[c++]&&(_=parseFloat(f[c-1])||0,l._pt={_next:l._pt,p:m||c===1?m:",",s:_,c:p.charAt(1)==="="?rb(_,p)-_:parseFloat(p)-_,m:h&&h<4?Math.round:0},u=pD.lastIndex);return l.c=u<i.length?i.substring(u,i.length):"",l.fp=o,(Ipe.test(i)||y)&&(l.e=0),this._pt=l,l},B7=function(t,r,n,i,a,s,o,l,u,c){$s(i)&&(i=i(a||0,t,s));var d=t[r],f=n!=="get"?n:$s(d)?u?t[r.indexOf("set")||!$s(t["get"+r.substr(3)])?r:"get"+r.substr(3)](u):t[r]():d,h=$s(d)?u?w$e:ume:U7,p;if(il(i)&&(~i.indexOf("random(")&&(i=hS(i)),i.charAt(1)==="="&&(p=rb(f,i)+(Gl(f)||0),(p||p===0)&&(i=p))),!c||f!==i||C$)return!isNaN(f*i)&&i!==""?(p=new sc(this._pt,t,r,+f||0,i-(f||0),typeof d=="boolean"?E$e:cme,0,h),u&&(p.fp=u),o&&p.modifier(o,this,t),this._pt=p):(!d&&!(r in t)&&L7(r,i),g$e.call(this,t,r,f,i,h,l||Qc.stringFilter,u))},y$e=function(t,r,n,i,a){if($s(t)&&(t=ZE(t,a,r,n,i)),!Qh(t)||t.style&&t.nodeType||Yl(t)||Ope(t))return il(t)?ZE(t,a,r,n,i):t;var s={},o;for(o in t)s[o]=ZE(t[o],a,r,n,i);return s},sme=function(t,r,n,i,a,s){var o,l,u,c;if(Dc[t]&&(o=new Dc[t]).init(a,o.rawVars?r[t]:y$e(r[t],i,a,s,n),n,i,s)!==!1&&(n._pt=l=new sc(n._pt,a,t,0,1,o.render,o,0,o.priority),n!==I1))for(u=n._ptLookup[n._targets.indexOf(a)],c=o._props.length;c--;)u[o._props[c]]=l;return o},vg,C$,z7=function e(t,r,n){var i=t.vars,a=i.ease,s=i.startAt,o=i.immediateRender,l=i.lazy,u=i.onUpdate,c=i.runBackwards,d=i.yoyoEase,f=i.keyframes,h=i.autoRevert,p=t._dur,m=t._startAt,_=t._targets,y=t.parent,v=y&&y.data==="nested"?y.vars.targets:_,b=t._overwrite==="auto"&&!O7,w=t.timeline,x=i.easeReverse||d,E,T,S,A,C,k,M,D,$,V,U,B,z;if(w&&(!f||!a)&&(a="none"),t._ease=lv(a,cS.ease),t._rEase=x&&(lv(x)||t._ease),t._from=!w&&!!i.runBackwards,t._from&&(t.ratio=1),!w||f&&!i.stagger){if(D=_[0]?sv(_[0]).harness:0,B=D&&i[D.prop],E=K5(i,j7),m&&(m._zTime<0&&m.progress(1),r<0&&c&&o&&!h?m.render(-1,!0):m.revert(c&&p?hk:V6e),m._lazy=0),s){if(t0(t._startAt=co.set(_,ad({data:"isStart",overwrite:!1,parent:y,immediateRender:!0,lazy:!m&&ic(l),startAt:null,delay:0,onUpdate:u&&function(){return Vc(t,"onUpdate")},stagger:0},s))),t._startAt._dp=0,t._startAt._sat=t,r<0&&(bl||!o&&!h)&&t._startAt.revert(hk),o&&p&&r<=0&&n<=0){r&&(t._zTime=r);return}}else if(c&&p&&!m){if(r&&(o=!1),S=ad({overwrite:!1,data:"isFromStart",lazy:o&&!m&&ic(l),immediateRender:o,stagger:0,parent:y},E),B&&(S[D.prop]=B),t0(t._startAt=co.set(_,S)),t._startAt._dp=0,t._startAt._sat=t,r<0&&(bl?t._startAt.revert(hk):t._startAt.render(-1,!0)),t._zTime=r,!o)e(t._startAt,wa,wa);else if(!r)return}for(t._pt=t._ptCache=0,l=p&&ic(l)||l&&!p,T=0;T<_.length;T++){if(C=_[T],M=C._gsap||$7(_)[T]._gsap,t._ptLookup[T]=V={},w$[M.id]&&Bg.length&&q5(),U=v===_?T:v.indexOf(C),D&&($=new D).init(C,B||E,t,U,v)!==!1&&(t._pt=A=new sc(t._pt,C,$.name,0,1,$.render,$,0,$.priority),$._props.forEach(function(q){V[q]=A}),$.priority&&(k=1)),!D||B)for(S in E)Dc[S]&&($=sme(S,E,t,U,C,v))?$.priority&&(k=1):V[S]=A=B7.call(t,C,S,"get",E[S],U,v,0,i.stringFilter);t._op&&t._op[T]&&t.kill(C,t._op[T]),b&&t._pt&&(vg=t,ws.killTweensOf(C,V,t.globalTime(r)),z=!t.parent,vg=0),t._pt&&l&&(w$[M.id]=1)}k&&fme(t),t._onInit&&t._onInit(t)}t._onUpdate=u,t._initted=(!t._op||t._pt)&&!z,f&&r<=0&&w.render(Vd,!0,!0)},v$e=function(t,r,n,i,a,s,o,l){var u=(t._pt&&t._ptCache||(t._ptCache={}))[r],c,d,f,h;if(!u)for(u=t._ptCache[r]=[],f=t._ptLookup,h=t._targets.length;h--;){if(c=f[h][r],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==r&&c.fp!==r;)c=c._next;if(!c)return C$=1,t.vars[r]="+=0",z7(t,o),C$=0,l?dS(r+" not eligible for reset. Try splitting into individual properties"):1;u.push(c)}for(h=u.length;h--;)d=u[h],c=d._pt||d,c.s=(i||i===0)&&!a?i:c.s+(i||0)+s*c.c,c.c=n-c.s,d.e&&(d.e=Us(n)+Gl(d.e)),d.b&&(d.b=c.s+Gl(d.b))},_$e=function(t,r){var n=t[0]?sv(t[0]).harness:0,i=n&&n.aliases,a,s,o,l;if(!i)return r;a=Yb({},r);for(s in i)if(s in a)for(l=i[s].split(","),o=l.length;o--;)a[l[o]]=a[s];return a},b$e=function(t,r,n,i){var a=r.ease||i||"power1.inOut",s,o;if(Yl(r))o=n[t]||(n[t]=[]),r.forEach(function(l,u){return o.push({t:u/(r.length-1)*100,v:l,e:a})});else for(s in r)o=n[s]||(n[s]=[]),s==="ease"||o.push({t:parseFloat(t),v:r[s],e:a})},ZE=function(t,r,n,i,a){return $s(t)?t.call(r,n,i,a):il(t)&&~t.indexOf("random(")?hS(t):t},ome=R7+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",lme={};ac(ome+",id,stagger,delay,duration,paused,scrollTrigger",function(e){return lme[e]=1});var co=function(e){Mpe(t,e);function t(n,i,a,s){var o;typeof i=="number"&&(a.duration=i,i=a,a=null),o=e.call(this,s?i:XE(i))||this;var l=o.vars,u=l.duration,c=l.delay,d=l.immediateRender,f=l.stagger,h=l.overwrite,p=l.keyframes,m=l.defaults,_=l.scrollTrigger,y=i.parent||ws,v=(Yl(n)||Ope(n)?im(n[0]):"length"in i)?[n]:Hd(n),b,w,x,E,T,S,A,C;if(o._targets=v.length?$7(v):dS("GSAP target "+n+" not found. https://gsap.com",!Qc.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=h,p||f||RP(u)||RP(c)){i=o.vars;var k=i.easeReverse||i.yoyoEase;if(b=o.timeline=new Yu({data:"nested",defaults:m||{},targets:y&&y.data==="nested"?y.vars.targets:v}),b.kill(),b.parent=b._dp=Tp(o),b._start=0,f||RP(u)||RP(c)){if(E=v.length,A=f&&Kpe(f),Qh(f))for(T in f)~ome.indexOf(T)&&(C||(C={}),C[T]=f[T]);for(w=0;w<E;w++)x=K5(i,lme),x.stagger=0,k&&(x.easeReverse=k),C&&Yb(x,C),S=v[w],x.duration=+ZE(u,Tp(o),w,S,v),x.delay=(+ZE(c,Tp(o),w,S,v)||0)-o._delay,!f&&E===1&&x.delay&&(o._delay=c=x.delay,o._start+=c,x.delay=0),b.to(S,x,A?A(w,S,v):0),b._ease=pi.none;b.duration()?u=c=0:o.timeline=0}else if(p){XE(ad(b.vars.defaults,{ease:"none"})),b._ease=lv(p.ease||i.ease||"none");var M=0,D,$,V;if(Yl(p))p.forEach(function(U){return b.to(v,U,">")}),b.duration();else{x={};for(T in p)T==="ease"||T==="easeEach"||b$e(T,p[T],x,p.easeEach);for(T in x)for(D=x[T].sort(function(U,B){return U.t-B.t}),M=0,w=0;w<D.length;w++)$=D[w],V={ease:$.e,duration:($.t-(w?D[w-1].t:0))/100*u},V[T]=$.v,b.to(v,V,M),M+=V.duration;b.duration()<u&&b.to({},{duration:u-b.duration()})}}u||o.duration(u=b.duration())}else o.timeline=0;return h===!0&&!O7&&(vg=Tp(o),ws.killTweensOf(v),vg=0),Mh(y,Tp(o),a),i.reversed&&o.reverse(),i.paused&&o.paused(!0),(d||!u&&!p&&o._start===_s(y._time)&&ic(d)&&X6e(Tp(o))&&y.data!=="nested")&&(o._tTime=-wa,o.render(Math.max(0,-c)||0)),_&&Vpe(Tp(o),_),o}var r=t.prototype;return r.render=function(i,a,s){var o=this._time,l=this._tDur,u=this._dur,c=i<0,d=i>l-wa&&!c?l:i<wa?0:i,f,h,p,m,_,y,v,b;if(!u)Z6e(this,i,a,s);else if(d!==this._tTime||!i||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(f=d,b=this.timeline,this._repeat){if(m=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(m*100+i,a,s);if(f=_s(d%m),d===l?(p=this._repeat,f=u):(_=_s(d/m),p=~~_,p&&p===_?(f=u,p--):f>u&&(f=u)),y=this._yoyo&&p&1,y&&(f=u-f),_=Xb(this._tTime,m),f===o&&!s&&this._initted&&p===_)return this._tTime=d,this;p!==_&&this.vars.repeatRefresh&&!y&&!this._lock&&f!==m&&this._initted&&(this._lock=s=1,this.render(_s(m*p),!0).invalidate()._lock=0)}if(!this._initted){if(Hpe(this,c?i:f,s,a,d))return this._tTime=0,this;if(o!==this._time&&!(s&&this.vars.repeatRefresh&&p!==_))return this;if(u!==this._dur)return this.render(i,a,s)}if(this._rEase){var w=f<o;if(w!==this._inv){var x=w?o:u-o;this._inv=w,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=o,this._invRecip=x?(w?-1:1)/x:0,this._invScale=w?-this.ratio:1-this.ratio,this._invEase=w?this._rEase:this._ease}this.ratio=v=this._invRatio+this._invScale*this._invEase((f-this._invTime)*this._invRecip)}else this.ratio=v=this._ease(f/u);if(this._from&&(this.ratio=v=1-v),this._tTime=d,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),!o&&d&&!a&&!_&&(Vc(this,"onStart"),this._tTime!==d))return this;for(h=this._pt;h;)h.r(v,h.d),h=h._next;b&&b.render(i<0?i:b._dur*b._ease(f/this._dur),a,s)||this._startAt&&(this._zTime=i),this._onUpdate&&!a&&(c&&x$(this,i,a,s),Vc(this,"onUpdate")),this._repeat&&p!==_&&this.vars.onRepeat&&!a&&this.parent&&Vc(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(c&&!this._onUpdate&&x$(this,i,!0,!0),(i||!u)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&t0(this,1),!a&&!(c&&!o)&&(d||o||y)&&(Vc(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom()))}return this},r.targets=function(){return this._targets},r.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),e.prototype.invalidate.call(this,i)},r.resetTo=function(i,a,s,o,l){pS||Bc.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||z7(this,u),c=this._ease(u/this._dur),v$e(this,i,a,s,o,c,u,l)?this.resetTo(i,a,s,o,1):(fN(this,0),this.parent||Upe(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(i,a){if(a===void 0&&(a="all"),!i&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?mE(this):this.scrollTrigger&&this.scrollTrigger.kill(!!bl),this;if(this.timeline){var s=this.timeline.totalDuration();
vendor: 5,805 bytes, line 499
499return this.timeline.killTweensOf(i,a,vg&&vg.vars.overwrite!==!0)._first||mE(this),this.parent&&s!==this.timeline.totalDuration()&&Qb(this,this._dur*this.timeline._tDur/s,0,1),this}var o=this._targets,l=i?Hd(i):o,u=this._ptLookup,c=this._pt,d,f,h,p,m,_,y;if((!a||a==="all")&&K6e(o,l))return a==="all"&&(this._pt=0),mE(this);for(d=this._op=this._op||[],a!=="all"&&(il(a)&&(m={},ac(a,function(v){return m[v]=1}),a=m),a=_$e(o,a)),y=o.length;y--;)if(~l.indexOf(o[y])){f=u[y],a==="all"?(d[y]=a,p=f,h={}):(h=d[y]=d[y]||{},p=a);for(m in p)_=f&&f[m],_&&((!("kill"in _.d)||_.d.kill(m)===!0)&&cN(this,_,"_pt"),delete f[m]),h!=="all"&&(h[m]=1)}return this._initted&&!this._pt&&c&&mE(this),this},t.to=function(i,a){return new t(i,a,arguments[2])},t.from=function(i,a){return QE(1,arguments)},t.delayedCall=function(i,a,s,o){return new t(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:a,onReverseComplete:a,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:o})},t.fromTo=function(i,a,s){return QE(2,arguments)},t.set=function(i,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new t(i,a)},t.killTweensOf=function(i,a,s){return ws.killTweensOf(i,a,s)},t}(mS);ad(co.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ac("staggerTo,staggerFrom,staggerFromTo",function(e){co[e]=function(){var t=new Yu,r=T$.call(arguments,0);return r.splice(e==="staggerFromTo"?5:4,0,0),t[e].apply(t,r)}});var U7=function(t,r,n){return t[r]=n},ume=function(t,r,n){return t[r](n)},w$e=function(t,r,n,i){return t[r](i.fp,n)},x$e=function(t,r,n){return t.setAttribute(r,n)},W7=function(t,r){return $s(t[r])?ume:N7(t[r])&&t.setAttribute?x$e:U7},cme=function(t,r){return r.set(r.t,r.p,Math.round((r.s+r.c*t)*1e6)/1e6,r)},E$e=function(t,r){return r.set(r.t,r.p,!!(r.s+r.c*t),r)},dme=function(t,r){var n=r._pt,i="";if(!t&&r.b)i=r.b;else if(t===1&&r.e)i=r.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*t):Math.round((n.s+n.c*t)*1e4)/1e4)+i,n=n._next;i+=r.c}r.set(r.t,r.p,i,r)},V7=function(t,r){for(var n=r._pt;n;)n.r(t,n.d),n=n._next},T$e=function(t,r,n,i){for(var a=this._pt,s;a;)s=a._next,a.p===i&&a.modifier(t,r,n),a=s},S$e=function(t){for(var r=this._pt,n,i;r;)i=r._next,r.p===t&&!r.op||r.op===t?cN(this,r,"_pt"):r.dep||(n=1),r=i;return!n},A$e=function(t,r,n,i){i.mSet(t,r,i.m.call(i.tween,n,i.mt),i)},fme=function(t){for(var r=t._pt,n,i,a,s;r;){for(n=r._next,i=a;i&&i.pr>r.pr;)i=i._next;(r._prev=i?i._prev:s)?r._prev._next=r:a=r,(r._next=i)?i._prev=r:s=r,r=n}t._pt=a},sc=function(){function e(r,n,i,a,s,o,l,u,c){this.t=n,this.s=a,this.c=s,this.p=i,this.r=o||cme,this.d=l||this,this.set=u||U7,this.pr=c||0,this._next=r,r&&(r._prev=this)}var t=e.prototype;return t.modifier=function(n,i,a){this.mSet=this.mSet||this.set,this.set=A$e,this.m=n,this.mt=a,this.tween=i},e}();ac(R7+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(e){return j7[e]=1});id.TweenMax=id.TweenLite=co;id.TimelineLite=id.TimelineMax=Yu;ws=new Yu({sortChildren:!1,defaults:cS,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Qc.stringFilter=nme;var uv=[],mk={},C$e=[],OX=0,P$e=0,_D=function(t){return(mk[t]||C$e).map(function(r){return r()})},P$=function(){var t=Date.now(),r=[];t-OX>2&&(_D("matchMediaInit"),uv.forEach(function(n){var i=n.queries,a=n.conditions,s,o,l,u;for(o in i)s=wh.matchMedia(i[o]).matches,s&&(l=1),s!==a[o]&&(a[o]=s,u=1);u&&(n.revert(),l&&r.push(n))}),_D("matchMediaRevert"),r.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),OX=t,_D("matchMedia"))},hme=function(){function e(r,n){this.selector=n&&S$(n),this.data=[],this._r=[],this.isReverted=!1,this.id=P$e++,r&&this.add(r)}var t=e.prototype;return t.add=function(n,i,a){$s(n)&&(a=i,i=n,n=$s);var s=this,o=function(){var u=as,c=s.selector,d;return u&&u!==s&&u.data.push(s),a&&(s.selector=S$(a)),as=s,d=i.apply(s,arguments),$s(d)&&s._r.push(d),as=u,s.selector=c,s.isReverted=!1,d};return s.last=o,n===$s?o(s,function(l){return s.add(null,l)}):n?s[n]=o:o},t.ignore=function(n){var i=as;as=null,n(this),as=i},t.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof e?n.push.apply(n,i.getTweens()):i instanceof co&&!(i.parent&&i.parent.data==="nested")&&n.push(i)}),n},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(n,i){var a=this;if(n?function(){for(var o=a.getTweens(),l=a.data.length,u;l--;)u=a.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return o.splice(o.indexOf(c),1)}));for(o.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,d){return d.g-c.g||-1/0}).forEach(function(c){return c.t.revert(n)}),l=a.data.length;l--;)u=a.data[l],u instanceof Yu?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof co)&&u.revert&&u.revert(n);a._r.forEach(function(c){return c(n,a)}),a.isReverted=!0}():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),i)for(var s=uv.length;s--;)uv[s].id===this.id&&uv.splice(s,1)},t.revert=function(n){this.kill(n||{})},e}(),M$e=function(){function e(r){this.contexts=[],this.scope=r,as&&as.data.push(this)}var t=e.prototype;return t.add=function(n,i,a){Qh(n)||(n={matches:n});var s=new hme(0,a||this.scope),o=s.conditions={},l,u,c;as&&!s.selector&&(s.selector=as.selector),this.contexts.push(s),i=s.add("onMatch",i),s.queries=n;for(u in n)u==="all"?c=1:(l=wh.matchMedia(n[u]),l&&(uv.indexOf(s)<0&&uv.push(s),(o[u]=l.matches)&&(c=1),l.addListener?l.addListener(P$):l.addEventListener("change",P$)));return c&&i(s,function(d){return s.add(null,d)}),this},t.revert=function(n){this.kill(n||{})}
vendor: 6,458 bytes, lines 499-506
499,t.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},e}(),X5={registerPlugin:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];r.forEach(function(i){return eme(i)})},timeline:function(t){return new Yu(t)},getTweensOf:function(t,r){return ws.getTweensOf(t,r)},getProperty:function(t,r,n,i){il(t)&&(t=Hd(t)[0]);var a=sv(t||{}).get,s=n?zpe:Bpe;return n==="native"&&(n=""),t&&(r?s((Dc[r]&&Dc[r].get||a)(t,r,n,i)):function(o,l,u){return s((Dc[o]&&Dc[o].get||a)(t,o,l,u))})},quickSetter:function(t,r,n){if(t=Hd(t),t.length>1){var i=t.map(function(c){return uc.quickSetter(c,r,n)}),a=i.length;return function(c){for(var d=a;d--;)i[d](c)}}t=t[0]||{};var s=Dc[r],o=sv(t),l=o.harness&&(o.harness.aliases||{})[r]||r,u=s?function(c){var d=new s;I1._pt=0,d.init(t,n?c+n:c,I1,0,[t]),d.render(1,d),I1._pt&&V7(1,I1)}:o.set(t,l);return s?u:function(c){return u(t,l,n?c+n:c,o,1)}},quickTo:function(t,r,n){var i,a=uc.to(t,ad((i={},i[r]="+=0.1",i.paused=!0,i.stagger=0,i),n||{})),s=function(l,u,c){return a.resetTo(r,l,u,c)};return s.tween=a,s},isTweening:function(t){return ws.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=lv(t.ease,cS.ease)),AX(cS,t||{})},config:function(t){return AX(Qc,t||{})},registerEffect:function(t){var r=t.name,n=t.effect,i=t.plugins,a=t.defaults,s=t.extendTimeline;(i||"").split(",").forEach(function(o){return o&&!Dc[o]&&!id[o]&&dS(r+" effect requires "+o+" plugin.")}),mD[r]=function(o,l,u){return n(Hd(o),ad(l||{},a),u)},s&&(Yu.prototype[r]=function(o,l,u){return this.add(mD[r](o,Qh(l)?l:(u=l)&&{},this),u)})},registerEase:function(t,r){pi[t]=lv(r)},parseEase:function(t,r){return arguments.length?lv(t,r):pi},getById:function(t){return ws.getById(t)},exportRoot:function(t,r){t===void 0&&(t={});var n=new Yu(t),i,a;for(n.smoothChildTiming=ic(t.smoothChildTiming),ws.remove(n),n._dp=0,n._time=n._tTime=ws._time,i=ws._first;i;)a=i._next,(r||!(!i._dur&&i instanceof co&&i.vars.onComplete===i._targets[0]))&&Mh(n,i,i._start-i._delay),i=a;return Mh(ws,n,0),n},context:function(t,r){return t?new hme(t,r):as},matchMedia:function(t){return new M$e(t)},matchMediaRefresh:function(){return uv.forEach(function(t){var r=t.conditions,n,i;for(i in r)r[i]&&(r[i]=!1,n=1);n&&t.revert()})||P$()},addEventListener:function(t,r){var n=mk[t]||(mk[t]=[]);~n.indexOf(r)||n.push(r)},removeEventListener:function(t,r){var n=mk[t],i=n&&n.indexOf(r);i>=0&&n.splice(i,1)},utils:{wrap:s$e,wrapYoyo:o$e,distribute:Kpe,random:Xpe,snap:Ype,normalize:a$e,getUnit:Gl,clamp:t$e,splitColor:tme,toArray:Hd,selector:S$,mapRange:Zpe,pipe:n$e,unitize:i$e,interpolate:l$e,shuffle:qpe},install:Lpe,effects:mD,ticker:Bc,updateRoot:Yu.updateRoot,plugins:Dc,globalTimeline:ws,core:{PropTween:sc,globals:jpe,Tween:co,Timeline:Yu,Animation:mS,getCache:sv,_removeLinkedListItem:cN,reverting:function(){return bl},context:function(t){return t&&as&&(as.data.push(t),t._ctx=as),as},suppressOverwrites:function(t){return O7=t}}};ac("to,from,fromTo,delayedCall,set,killTweensOf",function(e){return X5[e]=co[e]});Bc.add(Yu.updateRoot);I1=X5.to({},{duration:0});var k$e=function(t,r){for(var n=t._pt;n&&n.p!==r&&n.op!==r&&n.fp!==r;)n=n._next;return n},O$e=function(t,r){var n=t._targets,i,a,s;for(i in r)for(a=n.length;a--;)s=t._ptLookup[a][i],s&&(s=s.d)&&(s._pt&&(s=k$e(s,i)),s&&s.modifier&&s.modifier(r[i],t,n[a],i))},bD=function(t,r){return{name:t,headless:1,rawVars:1,init:function(i,a,s){s._onInit=function(o){var l,u;if(il(a)&&(l={},ac(a,function(c){return l[c]=1}),a=l),r){l={};for(u in a)l[u]=r(a[u]);a=l}O$e(o,a)}}}},uc=X5.registerPlugin({name:"attr",init:function(t,r,n,i,a){var s,o,l;this.tween=n;for(s in r)l=t.getAttribute(s)||"",o=this.add(t,"setAttribute",(l||0)+"",r[s],i,a,0,0,s),o.op=s,o.b=l,this._props.push(s)},render:function(t,r){for(var n=r._pt;n;)bl?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",headless:1,init:function(t,r){for(var n=r.length;n--;)this.add(t,n,t[n]||0,r[n],0,0,0,0,0,1)}},bD("roundProps",A$),bD("modifiers"),bD("snap",Ype))||X5;co.version=Yu.version=uc.version="3.15.0";Dpe=1;I7()&&Zb();pi.Power0;pi.Power1;pi.Power2;pi.Power3;pi.Power4;pi.Linear;pi.Quad;pi.Cubic;pi.Quart;pi.Quint;pi.Strong;pi.Elastic;pi.Back;pi.SteppedEase;pi.Bounce;pi.Sine;pi.Expo;pi.Circ;/*! 500 * CSSPlugin 3.15.0 501 * https://gsap.com 502 * 503 * Copyright 2008-2026, GreenSock. All rights reserved. 504 * Subject to the terms at https://gsap.com/standard-license 505 * @author: Jack Doyle, [email protected] 506*/var NX,_g,nb,H7,Ny,IX,G7,N$e=function(){return typeof window<"u"},am={},fy=180/Math.PI,ib=Math.PI/180,H_=Math.atan2,DX=1e8,q7=/([A-Z])/g,I$e=/(left|right|width|margin|padding|x)/i,D$e=/[\s,\(]\S/,Ih={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},M$=function(t,r){return r.set(r.t,r.p,Math.round((r.s+r.c*t)*1e4)/1e4+r.u,r)},L$e=function(t,r){return r.set(r.t,r.p,t===1?r.e:Math.round((r.s+r.c*t)*1e4)/1e4+r.u,r)},j$e=function(t,r){return r.set(r.t,r.p,t?Math.round((r.s+r.c*t)*1e4)/1e4+r.u:r.b,r)},R$e=function(t,r){return r.set(r.t,r.p,t===1?r.e:t?Math.round((r.s+r.c*t)*1e4)/1e4+r.u:r.b,r)},$$e=function(t,r){var n=r.s+r.c*t;r.set(r.t,r.p,~~(n+(n<0?-.5:.5))+r.u,r)},pme=function(t,r){return r.set(r.t,r.p,t?r.e:r.b,r)},mme=function(t,r){return r.set(r.t,r.p,t!==1?r.b:r.e,r)},F$e=function(t,r,n){return t.style[r]=n},B$e=function(t,r,n){return t.style.setProperty(r,n)},z$e=function(t,r,n){return t._gsap[r]=n},U$e=function(t,r,n){return t._gsap.scaleX=t._gsap.scaleY=n},W$e=function(t,r,n,i,a){var s=t._gsap;s.scaleX=s.scaleY=n,s.renderTransform(a,s)},V$e=function(t,r,n,i,a){var s=t._gsap;s[r]=n,s.renderTransform(a,s)},Es="transform",oc=Es+"Origin",H$e=function e(t,r){var n=this,i=this.target,a=i.style,s=i._gsap;if(t in am&&a){if(this.tfm=this.tfm||{},t!=="transform")t=Ih[t]||t,~t.indexOf(",")?t.split(",").forEach(function(o){return n.tfm[o]=Cp(i,o)}):this.tfm[t]=s.x?s[t]:Cp(i,t),t===oc&&(this.tfm.zOrigin=s.zOrigin);else return Ih.transform.split(",").forEach(function(o){return e.call(n,o,r)});if(this.props.indexOf(Es)>=0)return;s.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(oc,r,"")),t=Es}(a||r)&&this.props.push(t,r,a[t])},gme=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},G$e=function(){var t=this.props,r=this.target,n=r.style,i=r._gsap,a,s;for(a=0;a<t.length;a+=3)t[a+1]?t[a+1]===2?r[t[a]](t[a+2]):r[t[a]]=t[a+2]:t[a+2]?n[t[a]]=t[a+2]:n.removeProperty(t[a
vendor: 5,070 bytes, line 506
506].substr(0,2)==="--"?t[a]:t[a].replace(q7,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)i[s]=this.tfm[s];i.svg&&(i.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),a=G7(),(!a||!a.isStart)&&!n[Es]&&(gme(n),i.zOrigin&&n[oc]&&(n[oc]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},yme=function(t,r){var n={target:t,props:[],revert:G$e,save:H$e};return t._gsap||uc.core.getCache(t),r&&t.style&&t.nodeType&&r.split(",").forEach(function(i){return n.save(i)}),n},vme,k$=function(t,r){var n=_g.createElementNS?_g.createElementNS((r||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):_g.createElement(t);return n&&n.style?n:_g.createElement(t)},Hc=function e(t,r,n){var i=getComputedStyle(t);return i[r]||i.getPropertyValue(r.replace(q7,"-$1").toLowerCase())||i.getPropertyValue(r)||!n&&e(t,Jb(r)||r,1)||""},LX="O,Moz,ms,Ms,Webkit".split(","),Jb=function(t,r,n){var i=r||Ny,a=i.style,s=5;if(t in a&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);s--&&!(LX[s]+t in a););return s<0?null:(s===3?"ms":s>=0?LX[s]:"")+t},O$=function(){N$e()&&window.document&&(NX=window,_g=NX.document,nb=_g.documentElement,Ny=k$("div")||{style:{}},k$("div"),Es=Jb(Es),oc=Es+"Origin",Ny.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",vme=!!Jb("perspective"),G7=uc.core.reverting,H7=1)},jX=function(t){var r=t.ownerSVGElement,n=k$("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=t.cloneNode(!0),a;i.style.display="block",n.appendChild(i),nb.appendChild(n);try{a=i.getBBox()}catch{}return n.removeChild(i),nb.removeChild(n),a},RX=function(t,r){for(var n=r.length;n--;)if(t.hasAttribute(r[n]))return t.getAttribute(r[n])},_me=function(t){var r,n;try{r=t.getBBox()}catch{r=jX(t),n=1}return r&&(r.width||r.height)||n||(r=jX(t)),r&&!r.width&&!r.x&&!r.y?{x:+RX(t,["x","cx","x1"])||0,y:+RX(t,["y","cy","y1"])||0,width:0,height:0}:r},bme=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&_me(t))},r0=function(t,r){if(r){var n=t.style,i;r in am&&r!==oc&&(r=Es),n.removeProperty?(i=r.substr(0,2),(i==="ms"||r.substr(0,6)==="webkit")&&(r="-"+r),n.removeProperty(i==="--"?r:r.replace(q7,"-$1").toLowerCase())):n.removeAttribute(r)}},bg=function(t,r,n,i,a,s){var o=new sc(t._pt,r,n,0,1,s?mme:pme);return t._pt=o,o.b=i,o.e=a,t._props.push(n),o},$X={deg:1,rad:1,turn:1},q$e={grid:1,flex:1},n0=function e(t,r,n,i){var a=parseFloat(n)||0,s=(n+"").trim().substr((a+"").length)||"px",o=Ny.style,l=I$e.test(r),u=t.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),d=100,f=i==="px",h=i==="%",p,m,_,y;if(i===s||!a||$X[i]||$X[s])return a;if(s!=="px"&&!f&&(a=e(t,r,n,"px")),y=t.getCTM&&bme(t),(h||s==="%")&&(am[r]||~r.indexOf("adius")))return p=y?t.getBBox()[l?"width":"height"]:t[c],Us(h?a/p*d:a/100*p);if(o[l?"width":"height"]=d+(f?s:i),m=i!=="rem"&&~r.indexOf("adius")||i==="em"&&t.appendChild&&!u?t:t.parentNode,y&&(m=(t.ownerSVGElement||{}).parentNode),(!m||m===_g||!m.appendChild)&&(m=_g.body),_=m._gsap,_&&h&&_.width&&l&&_.time===Bc.time&&!_.uncache)return Us(a/_.width*d);if(h&&(r==="height"||r==="width")){var v=t.style[r];t.style[r]=d+i,p=t[c],v?t.style[r]=v:r0(t,r)}else(h||s==="%")&&!q$e[Hc(m,"display")]&&(o.position=Hc(t,"position")),m===t&&(o.position="static"),m.appendChild(Ny),p=Ny[c],m.removeChild(Ny),o.position="absolute";return l&&h&&(_=sv(m),_.time=Bc.time,_.width=m[c]),Us(f?p*a/d:p&&a?d/p*a:0)},Cp=function(t,r,n,i){var a;return H7||O$(),r in Ih&&r!=="transform"&&(r=Ih[r],~r.indexOf(",")&&(r=r.split(",")[0])),am[r]&&r!=="transform"?(a=yS(t,i),a=r!=="transformOrigin"?a[r]:a.svg?a.origin:Z5(Hc(t,oc))+" "+a.zOrigin+"px"):(a=t.style[r],(!a||a==="auto"||i||~(a+"").indexOf("calc("))&&(a=Q5[r]&&Q5[r](t,r,n)||Hc(t,r)||$pe(t,r)||(r==="opacity"?1:0))),n&&!~(a+"").trim().indexOf(" ")?n0(t,r,a,n)+n:a},K$e=function(t,r,n,i){if(!n||n==="none"){var a=Jb(r,t,1),s=a&&Hc(t,a,1);s&&s!==n?(r=a,n=s):r==="borderColor"&&(n=Hc(t,"borderTopColor"))}var o=new sc(this._pt,t.style,r,0,1,dme),l=0,u=0,c,d,f,h,p,m,_,y,v,b,w,x;if(o.b=n,o.e=i,n+="",i+="",i.substring(0,6)==="var(--"&&(i=Hc(t,i.substring(4,i.indexOf(")")))),i==="auto"&&(m=t.style[r],t.style[r]=i,i=Hc(t,r)||i,m?t.style[r]=m:r0(t,r)),c=[n,i],nme(c),n=c[0],i=c[1],f=n.match(N1)||[],x=i.match(N1)||[],x.length){for(;d=N1.exec(i);)_=d[0],v=i.substring(l,d.index),p?p=(p+1)%5:(v.substr(-5)==="rgba("||v.substr(-5)==="hsla(")&&(p=1),_!==(m=f[u++]||"")&&(h=parseFloat(m)||0,w=m.substr((h+"").length),_.charAt(1)==="="&&(_=rb(h,_)+w),y=parseFloat(_),b=_.substr((y+"").length),l=N1.lastIndex-b.length,b||(b=b||Qc.units[r]||w,l===i.length&&(i+=b,o.e+=b)),w!==b&&(h=n0(t,r,m,b)||0),o._pt={_next:o._pt,p:v||u===1?v:",",s:h,c:y-h,m:p&&p<4||r==="zIndex"?Math.round:0});o.c=l<i.length?i.substring(l,i.length):""}else o.r=r==="display"&&i==="none"?mme:pme;return Ipe.test(i)&&(o.e=0),this._pt=o,o},FX={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Y$e=function(t){var r=t.split(" "),n=r[0],i=r[1]||"50%";return(n==="top"||n==="bottom"||i==="left"||i==="right")&&(t=n,n=i,i=t),r[0]=FX[n]||n,r[1]=FX[i]||i,r.j
vendor: 5,376 bytes, line 506
506oin(" ")},X$e=function(t,r){if(r.tween&&r.tween._time===r.tween._dur){var n=r.t,i=n.style,a=r.u,s=n._gsap,o,l,u;if(a==="all"||a===!0)i.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)o=a[u],am[o]&&(l=1,o=o==="transformOrigin"?oc:Es),r0(n,o);l&&(r0(n,Es),s&&(s.svg&&n.removeAttribute("transform"),i.scale=i.rotate=i.translate="none",yS(n,1),s.uncache=1,gme(i)))}},Q5={clearProps:function(t,r,n,i,a){if(a.data!=="isFromStart"){var s=t._pt=new sc(t._pt,r,n,0,0,X$e);return s.u=i,s.pr=-10,s.tween=a,t._props.push(n),1}}},gS=[1,0,0,1,0,0],wme={},xme=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},BX=function(t){var r=Hc(t,Es);return xme(r)?gS:r.substr(7).match(Npe).map(Us)},K7=function(t,r){var n=t._gsap||sv(t),i=t.style,a=BX(t),s,o,l,u;return n.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?gS:a):(a===gS&&!t.offsetParent&&t!==nb&&!n.svg&&(l=i.display,i.display="block",s=t.parentNode,(!s||!t.offsetParent&&!t.getBoundingClientRect().width)&&(u=1,o=t.nextElementSibling,nb.appendChild(t)),a=BX(t),l?i.display=l:r0(t,"display"),u&&(o?s.insertBefore(t,o):s?s.appendChild(t):nb.removeChild(t))),r&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},N$=function(t,r,n,i,a,s){var o=t._gsap,l=a||K7(t,!0),u=o.xOrigin||0,c=o.yOrigin||0,d=o.xOffset||0,f=o.yOffset||0,h=l[0],p=l[1],m=l[2],_=l[3],y=l[4],v=l[5],b=r.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0,E,T,S,A;n?l!==gS&&(T=h*_-p*m)&&(S=w*(_/T)+x*(-m/T)+(m*v-_*y)/T,A=w*(-p/T)+x*(h/T)-(h*v-p*y)/T,w=S,x=A):(E=_me(t),w=E.x+(~b[0].indexOf("%")?w/100*E.width:w),x=E.y+(~(b[1]||b[0]).indexOf("%")?x/100*E.height:x)),i||i!==!1&&o.smooth?(y=w-u,v=x-c,o.xOffset=d+(y*h+v*m)-y,o.yOffset=f+(y*p+v*_)-v):o.xOffset=o.yOffset=0,o.xOrigin=w,o.yOrigin=x,o.smooth=!!i,o.origin=r,o.originIsAbsolute=!!n,t.style[oc]="0px 0px",s&&(bg(s,o,"xOrigin",u,w),bg(s,o,"yOrigin",c,x),bg(s,o,"xOffset",d,o.xOffset),bg(s,o,"yOffset",f,o.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)},yS=function(t,r){var n=t._gsap||new ame(t);if("x"in n&&!r&&!n.uncache)return n;var i=t.style,a=n.scaleX<0,s="px",o="deg",l=getComputedStyle(t),u=Hc(t,oc)||"0",c,d,f,h,p,m,_,y,v,b,w,x,E,T,S,A,C,k,M,D,$,V,U,B,z,q,L,K,O,N,X,ie;return c=d=f=m=_=y=v=b=w=0,h=p=1,n.svg=!!(t.getCTM&&bme(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Es]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Es]!=="none"?l[Es]:"")),i.scale=i.rotate=i.translate="none"),T=K7(t,n.svg),n.svg&&(n.uncache?(z=t.getBBox(),u=n.xOrigin-z.x+"px "+(n.yOrigin-z.y)+"px",B=""):B=!r&&t.getAttribute("data-svg-origin"),N$(t,B||u,!!B||n.originIsAbsolute,n.smooth!==!1,T)),x=n.xOrigin||0,E=n.yOrigin||0,T!==gS&&(k=T[0],M=T[1],D=T[2],$=T[3],c=V=T[4],d=U=T[5],T.length===6?(h=Math.sqrt(k*k+M*M),p=Math.sqrt($*$+D*D),m=k||M?H_(M,k)*fy:0,v=D||$?H_(D,$)*fy+m:0,v&&(p*=Math.abs(Math.cos(v*ib))),n.svg&&(c-=x-(x*k+E*D),d-=E-(x*M+E*$))):(ie=T[6],N=T[7],L=T[8],K=T[9],O=T[10],X=T[11],c=T[12],d=T[13],f=T[14],S=H_(ie,O),_=S*fy,S&&(A=Math.cos(-S),C=Math.sin(-S),B=V*A+L*C,z=U*A+K*C,q=ie*A+O*C,L=V*-C+L*A,K=U*-C+K*A,O=ie*-C+O*A,X=N*-C+X*A,V=B,U=z,ie=q),S=H_(-D,O),y=S*fy,S&&(A=Math.cos(-S),C=Math.sin(-S),B=k*A-L*C,z=M*A-K*C,q=D*A-O*C,X=$*C+X*A,k=B,M=z,D=q),S=H_(M,k),m=S*fy,S&&(A=Math.cos(S),C=Math.sin(S),B=k*A+M*C,z=V*A+U*C,M=M*A-k*C,U=U*A-V*C,k=B,V=z),_&&Math.abs(_)+Math.abs(m)>359.9&&(_=m=0,y=180-y),h=Us(Math.sqrt(k*k+M*M+D*D)),p=Us(Math.sqrt(U*U+ie*ie)),S=H_(V,U),v=Math.abs(S)>2e-4?S*fy:0,w=X?1/(X<0?-X:X):0),n.svg&&(B=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!xme(Hc(t,Es)),B&&t.setAttribute("transform",B))),Math.abs(v)>90&&Math.abs(v)<270&&(a?(h*=-1,v+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,v+=v<=0?180:-180)),r=r||n.uncache,n.x=c-((n.xPercent=c&&(!r&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+s,n.y=d-((n.yPercent=d&&(!r&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-d)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+s,n.z=f+s,n.scaleX=Us(h),n.scaleY=Us(p),n.rotation=Us(m)+o,n.rotationX=Us(_)+o,n.rotationY=Us(y)+o,n.skewX=v+o,n.skewY=b+o,n.transformPerspective=w+s,(n.zOrigin=parseFloat(u.split(" ")[2])||!r&&n.zOrigin||0)&&(i[oc]=Z5(u)),n.xOffset=n.yOffset=0,n.force3D=Qc.force3D,n.renderTransform=n.svg?Z$e:vme?Eme:Q$e,n.uncache=0,n},Z5=function(t){return(t=t.split(" "))[0]+" "+t[1]},wD=function(t,r,n){var i=Gl(r);return Us(parseFloat(r)+parseFloat(n0(t,"x",n+"px",i)))+i},Q$e=function(t,r){r.z="0px",r.rotationY=r.rotationX="0deg",r.force3D=0,Eme(t,r)},J0="0deg",T2="0px",ey=") ",Eme=function(t,r){var n=r||this,i=n.xPercent,a=n.yPercent,s=n.x,o=n.y,l=n.z,u=n.rotation,c=n.rotationY,d=n.rotationX,f=n.skewX,h=n.skewY,p=n.scaleX,m=n.scaleY,_=n.transformPerspective,y=n.force3D,v=n.target,b=n.zOrigin,w="",x=y==="auto"&&t&&t!==1||y===!0;if(b&&(d!==J0||c!==J0)){var E=parseFloat(c)*ib,T=Math.sin(E),S=Math.cos(E),A;E=parseFloat(d)*ib,A=Math.cos(E),s=wD(v,s,T*A*-b),o=wD(v,o,-Math.sin(E)*-b),l=wD(v,l,S*A*-b+b)}_!==T2&&(w+="perspective("+_+ey),(i||a)&&(w+="translate("+i+"%, "+a+"%) "),(x||s!==T2||o!==T2||l!==T2)&&(w+=l!==T2||x?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+ey
vendor: 5,779 bytes, line 506
506),u!==J0&&(w+="rotate("+u+ey),c!==J0&&(w+="rotateY("+c+ey),d!==J0&&(w+="rotateX("+d+ey),(f!==J0||h!==J0)&&(w+="skew("+f+", "+h+ey),(p!==1||m!==1)&&(w+="scale("+p+", "+m+ey),v.style[Es]=w||"translate(0, 0)"},Z$e=function(t,r){var n=r||this,i=n.xPercent,a=n.yPercent,s=n.x,o=n.y,l=n.rotation,u=n.skewX,c=n.skewY,d=n.scaleX,f=n.scaleY,h=n.target,p=n.xOrigin,m=n.yOrigin,_=n.xOffset,y=n.yOffset,v=n.forceCSS,b=parseFloat(s),w=parseFloat(o),x,E,T,S,A;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=ib,u*=ib,x=Math.cos(l)*d,E=Math.sin(l)*d,T=Math.sin(l-u)*-f,S=Math.cos(l-u)*f,u&&(c*=ib,A=Math.tan(u-c),A=Math.sqrt(1+A*A),T*=A,S*=A,c&&(A=Math.tan(c),A=Math.sqrt(1+A*A),x*=A,E*=A)),x=Us(x),E=Us(E),T=Us(T),S=Us(S)):(x=d,S=f,E=T=0),(b&&!~(s+"").indexOf("px")||w&&!~(o+"").indexOf("px"))&&(b=n0(h,"x",s,"px"),w=n0(h,"y",o,"px")),(p||m||_||y)&&(b=Us(b+p-(p*x+m*T)+_),w=Us(w+m-(p*E+m*S)+y)),(i||a)&&(A=h.getBBox(),b=Us(b+i/100*A.width),w=Us(w+a/100*A.height)),A="matrix("+x+","+E+","+T+","+S+","+b+","+w+")",h.setAttribute("transform",A),v&&(h.style[Es]=A)},J$e=function(t,r,n,i,a){var s=360,o=il(a),l=parseFloat(a)*(o&&~a.indexOf("rad")?fy:1),u=l-i,c=i+u+"deg",d,f;return o&&(d=a.split("_")[1],d==="short"&&(u%=s,u!==u%(s/2)&&(u+=u<0?s:-s)),d==="cw"&&u<0?u=(u+s*DX)%s-~~(u/s)*s:d==="ccw"&&u>0&&(u=(u-s*DX)%s-~~(u/s)*s)),t._pt=f=new sc(t._pt,r,n,i,u,L$e),f.e=c,f.u="deg",t._props.push(n),f},zX=function(t,r){for(var n in r)t[n]=r[n];return t},eFe=function(t,r,n){var i=zX({},n._gsap),a="perspective,force3D,transformOrigin,svgOrigin",s=n.style,o,l,u,c,d,f,h,p;i.svg?(u=n.getAttribute("transform"),n.setAttribute("transform",""),s[Es]=r,o=yS(n,1),r0(n,Es),n.setAttribute("transform",u)):(u=getComputedStyle(n)[Es],s[Es]=r,o=yS(n,1),s[Es]=u);for(l in am)u=i[l],c=o[l],u!==c&&a.indexOf(l)<0&&(h=Gl(u),p=Gl(c),d=h!==p?n0(n,l,u,p):parseFloat(u),f=parseFloat(c),t._pt=new sc(t._pt,o,l,d,f-d,M$),t._pt.u=p||0,t._props.push(l));zX(o,i)};ac("padding,margin,Width,Radius",function(e,t){var r="Top",n="Right",i="Bottom",a="Left",s=(t<3?[r,n,i,a]:[r+a,r+n,i+n,i+a]).map(function(o){return t<2?e+o:"border"+o+e});Q5[t>1?"border"+e:e]=function(o,l,u,c,d){var f,h;if(arguments.length<4)return f=s.map(function(p){return Cp(o,p,u)}),h=f.join(" "),h.split(f[0]).length===5?f[0]:h;f=(c+"").split(" "),h={},s.forEach(function(p,m){return h[p]=f[m]=f[m]||f[(m-1)/2|0]}),o.init(l,h,d)}});var Tme={name:"css",register:O$,targetTest:function(t){return t.style&&t.nodeType},init:function(t,r,n,i,a){var s=this._props,o=t.style,l=n.vars.startAt,u,c,d,f,h,p,m,_,y,v,b,w,x,E,T,S,A;H7||O$(),this.styles=this.styles||yme(t),S=this.styles.props,this.tween=n;for(m in r)if(m!=="autoRound"&&(c=r[m],!(Dc[m]&&sme(m,r,n,i,t,a)))){if(h=typeof c,p=Q5[m],h==="function"&&(c=c.call(n,i,t,a),h=typeof c),h==="string"&&~c.indexOf("random(")&&(c=hS(c)),p)p(this,t,m,c,n)&&(T=1);else if(m.substr(0,2)==="--")u=(getComputedStyle(t).getPropertyValue(m)+"").trim(),c+="",zg.lastIndex=0,zg.test(u)||(_=Gl(u),y=Gl(c),y?_!==y&&(u=n0(t,m,u,y)+y):_&&(c+=_)),this.add(o,"setProperty",u,c,i,a,0,0,m),s.push(m),S.push(m,0,o[m]);else if(h!=="undefined"){if(l&&m in l?(u=typeof l[m]=="function"?l[m].call(n,i,t,a):l[m],il(u)&&~u.indexOf("random(")&&(u=hS(u)),Gl(u+"")||u==="auto"||(u+=Qc.units[m]||Gl(Cp(t,m))||""),(u+"").charAt(1)==="="&&(u=Cp(t,m))):u=Cp(t,m),f=parseFloat(u),v=h==="string"&&c.charAt(1)==="="&&c.substr(0,2),v&&(c=c.substr(2)),d=parseFloat(c),m in Ih&&(m==="autoAlpha"&&(f===1&&Cp(t,"visibility")==="hidden"&&d&&(f=0),S.push("visibility",0,o.visibility),bg(this,o,"visibility",f?"inherit":"hidden",d?"inherit":"hidden",!d)),m!=="scale"&&m!=="transform"&&(m=Ih[m],~m.indexOf(",")&&(m=m.split(",")[0]))),b=m in am,b){if(this.styles.save(m),A=c,h==="string"&&c.substring(0,6)==="var(--"){if(c=Hc(t,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var C=t.style.perspective;t.style.perspective=c,c=Hc(t,"perspective"),C?t.style.perspective=C:r0(t,"perspective")}d=parseFloat(c)}if(w||(x=t._gsap,x.renderTransform&&!r.parseTransform||yS(t,r.parseTransform),E=r.smoothOrigin!==!1&&x.smooth,w=this._pt=new sc(this._pt,o,Es,0,1,x.renderTransform,x,0,-1),w.dep=1),m==="scale")this._pt=new sc(this._pt,x,"scaleY",x.scaleY,(v?rb(x.scaleY,v+d):d)-x.scaleY||0,M$),this._pt.u=0,s.push("scaleY",m),m+="X";else if(m==="transformOrigin"){S.push(oc,0,o[oc]),c=Y$e(c),x.svg?N$(t,c,0,E,0,this):(y=parseFloat(c.split(" ")[2])||0,y!==x.zOrigin&&bg(this,x,"zOrigin",x.zOrigin,y),bg(this,o,m,Z5(u),Z5(c)));continue}else if(m==="svgOrigin"){N$(t,c,1,E,0,this);continue}else if(m in wme){J$e(this,x,m,f,v?rb(f,v+c):c);continue}else if(m==="smoothOrigin"){bg(this,x,"smooth",x.smooth,c);continue}else if(m==="force3D"){x[m]=c;continue}else if(m==="transform"){eFe(this,c,t);continue}}else m in o||(m=Jb(m)||m);if(b||(d||d===0)&&(f||f===0)&&!D$e.test(c)&&m in o)_=(u+"").substr((f+"").length),d||(d=0),y=Gl(c)||(m in Qc.units?Qc.units[m]:_),_!==y&&(f=n0(t,m,u,y)),this._pt=new sc(this._pt,b?x:o,m,f,(v?rb(f,v+d):d)-f,!b&&(y==="px"||m==="zIndex")&&r.autoRound!==!1?$$e:M$),this._pt.u=y||0,b&&A!==c?(this._pt.b=u,this._pt.e=A,this._pt.r=R$e):_!==y&&y!=="%"&&(this._pt.b=u,this._pt.r=j$e);else if(m in o)K$e.call(this,t,m,u,v?v+c:c);else if(m in t)this.add(t,m,u||t[m],v?v+c:c,i,a);else if(m!=="parseTransform"){L7(m,c);continue}b||(m in o?S.push(m,0,o[m]):typeof t[m]=="function"?S.push(m,2,t[m]()):S.push(m,1,u||t[m])),s.push(m)}}T&&fme(this)},render:function(t,r){if(r.tween._time||!G7())for(var n=r._pt;n;)n.r(t,n.d),n=n._next;else r.styles.revert()},get:Cp,aliases:Ih,getSetter:function(t,r,n){var i=Ih[r];return i&&i.indexOf(",")<0&&(r=i),r in am&&r!==oc&&(t._gsap.x||Cp(t,"x"))?n&&IX===n?r==="scale"?U$e:z$e:(IX=n||{})&&(r==="scale"?W$e:V$e):t.style&&!N7(t.style[r])?F$e:~r.indexOf("-")?B$e:W7(t,r)}
vendor: 7,144 bytes, lines 506-513
506,core:{_removeProperty:r0,_getMatrix:K7}};uc.utils.checkPrefix=Jb;uc.core.getStyleSaver=yme;(function(e,t,r,n){var i=ac(e+","+t+","+r,function(a){am[a]=1});ac(t,function(a){Qc.units[a]="deg",wme[a]=1}),Ih[i[13]]=e+","+t,ac(n,function(a){var s=a.split(":");Ih[s[1]]=i[s[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ac("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){Qc.units[e]="px"});uc.registerPlugin(Tme);var Qu=uc.registerPlugin(Tme)||uc;Qu.core.Tween;function tFe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rFe(e,t,r){return t&&tFe(e.prototype,t),e}/*! 507 * Observer 3.15.0 508 * https://gsap.com 509 * 510 * @license Copyright 2008-2026, GreenSock. All rights reserved. 511 * Subject to the terms at https://gsap.com/standard-license 512 * @author: Jack Doyle, [email protected] 513*/var vl,gk,zc,wg,xg,ab,Sme,hy,sb,Ame,Fp,Pf,Cme,Pme=function(){return vl||typeof window<"u"&&(vl=window.gsap)&&vl.registerPlugin&&vl},Mme=1,D1=[],Xn=[],Wh=[],JE=Date.now,I$=function(t,r){return r},nFe=function(){var t=sb.core,r=t.bridge||{},n=t._scrollers,i=t._proxies;n.push.apply(n,Xn),i.push.apply(i,Wh),Xn=n,Wh=i,I$=function(s,o){return r[s](o)}},Ug=function(t,r){return~Wh.indexOf(t)&&Wh[Wh.indexOf(t)+1][r]},eT=function(t){return!!~Ame.indexOf(t)},du=function(t,r,n,i,a){return t.addEventListener(r,n,{passive:i!==!1,capture:!!a})},uu=function(t,r,n,i){return t.removeEventListener(r,n,!!i)},$P="scrollLeft",FP="scrollTop",D$=function(){return Fp&&Fp.isPressed||Xn.cache++},J5=function(t,r){var n=function i(a){if(a||a===0){Mme&&(zc.history.scrollRestoration="manual");var s=Fp&&Fp.isPressed;a=i.v=Math.round(a)||(Fp&&Fp.iOS?1:0),t(a),i.cacheID=Xn.cache,s&&I$("ss",a)}else(r||Xn.cache!==i.cacheID||I$("ref"))&&(i.cacheID=Xn.cache,i.v=t());return i.v+i.offset};return n.offset=0,t&&n},xu={s:$P,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:J5(function(e){return arguments.length?zc.scrollTo(e,Do.sc()):zc.pageXOffset||wg[$P]||xg[$P]||ab[$P]||0})},Do={s:FP,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:xu,sc:J5(function(e){return arguments.length?zc.scrollTo(xu.sc(),e):zc.pageYOffset||wg[FP]||xg[FP]||ab[FP]||0})},Hu=function(t,r){return(r&&r._ctx&&r._ctx.selector||vl.utils.toArray)(t)[0]||(typeof t=="string"&&vl.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},iFe=function(t,r){for(var n=r.length;n--;)if(r[n]===t||r[n].contains(t))return!0;return!1},i0=function(t,r){var n=r.s,i=r.sc;eT(t)&&(t=wg.scrollingElement||xg);var a=Xn.indexOf(t),s=i===Do.sc?1:2;!~a&&(a=Xn.push(t)-1),Xn[a+s]||du(t,"scroll",D$);var o=Xn[a+s],l=o||(Xn[a+s]=J5(Ug(t,n),!0)||(eT(t)?i:J5(function(u){return arguments.length?t[n]=u:t[n]})));return l.target=t,o||(l.smooth=vl.getProperty(t,"scrollBehavior")==="smooth"),l},L$=function(t,r,n){var i=t,a=t,s=JE(),o=s,l=r||50,u=Math.max(500,l*3),c=function(p,m){var _=JE();m||_-s>l?(a=i,i=p,o=s,s=_):n?i+=p:i=a+(p-a)/(_-o)*(s-o)},d=function(){a=i=n?0:i,o=s=0},f=function(p){var m=o,_=a,y=JE();return(p||p===0)&&p!==i&&c(p),s===o||y-o>u?0:(i+(n?_:-_))/((n?y:s)-m)*1e3};return{update:c,reset:d,getVelocity:f}},S2=function(t,r){return r&&!t._gsapAllow&&t.cancelable!==!1&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},UX=function(t){var r=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(r)>=Math.abs(n)?r:n},kme=function(){sb=vl.core.globals().ScrollTrigger,sb&&sb.core&&nFe()},Ome=function(t){return vl=t||Pme(),!gk&&vl&&typeof document<"u"&&document.body&&(zc=window,wg=document,xg=wg.documentElement,ab=wg.body,Ame=[zc,wg,xg,ab],vl.utils.clamp,Cme=vl.core.context||function(){},hy="onpointerenter"in ab?"pointer":"mouse",Sme=Ks.isTouch=zc.matchMedia&&zc.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in zc||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Pf=Ks.eventTypes=("ontouchstart"in xg?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in xg?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return Mme=0},500),gk=1),sb||kme(),gk};xu.op=Do;Xn.cache=0;var Ks=function(){function e(r){this.init(r)}var t=e.prototype;return t.init=function(n){gk||Ome(vl)||console.warn("Please gsap.registerPlugin(Observer)"),sb||kme();var i=n.tolerance,a=n.dragMinimum,s=n.type,o=n.target,l=n.lineHeight,u=n.debounce,c=n.preventDefault,d=n.onStop,f=n.onStopDelay,h=n.ignore,p=n.wheelSpeed,m=n.event,_=n.onDragStart,y=n.onDragEnd,v=n.onDrag,b=n.onPress,w=n.onRelease,x=n.onRight,E=n.onLeft,T=n.onUp,S=n.onDown,A=n.onChangeX,C=n.onChangeY,k=n.onChange,M=n.onToggleX,D=n.onToggleY,$=n.onHover,V=n.onHoverEnd,U=n.onMove,B=n.ignoreCheck,z=n.isNormalizer,q=n.onGestureStart,L=n.onGestureEnd,K=n.onWheel,O=n.onEnable,N=n.onDisable,X=n.onClick,ie=n.scrollSpeed,ee=n.capture,le=n.allowClicks,Te=n.lockAxis,be=n.onLockAxis;this.target=o=Hu(o)||xg,this.vars=n,h&&(h=vl.utils.toArray(h)),i=i||1e-9,a=a||0,p=p||1,ie=ie||1,s=s||"wheel,touch,pointer",u=u!==!1,l||(l=parseFloat(zc.getComputedStyle(ab).lineHeight)||22);var we,ae,H,fe,Se,ne,$e,me=this,Ue=0,ke=0,ce=n.passive||!c&&n.passive!==!1,ve=i0(o,xu),Re=i0(o,Do),De=ve(),tt=Re(),Ge=~s.indexOf("touch")&&!~s.indexOf("pointer")&&Pf[0]==="pointerdown",Ie=eT(o),He=o.ownerDocument||wg,Ke=[0,0,0],Xe=[0,0,0],mt=0,gt=function(){return mt=JE()},$t=function(Z,Pe){return(me.event=Z)&&h&&iFe(Z.target,h)||Pe&&Ge&&Z.pointerType!=="touch"||B&&B(Z,Pe)},kt=function(){me._vx.reset(),me._vy.reset(),ae.pause(),d&&d(me)},Zt=function(){var Z=me.deltaX=UX(Ke),Pe=me.deltaY=UX(Xe),ue=Math.abs(Z)>=i,Ee=Math.abs(Pe)>=i;k&&(ue||Ee)&&k(me,Z,Pe,Ke,Xe),ue&&(x&&me.deltaX>0&&x(me),E&&me.deltaX<0&&E(me),A&&A(me),M&&me.deltaX<0!=Ue<0&&M(me),Ue=me.deltaX,Ke[0]=Ke[1]=Ke[2]=0),Ee&&(S&&me.deltaY>0&&S(me),T&&me.deltaY<0&&T(me),C&&C(me),D&&me.deltaY<0!=ke<0&&D(me),ke=me.deltaY,Xe[0]=Xe[1]=Xe[2]=0),(fe||H)&&(U&&U(me),H&&(_&&H===1&&_(me),v&&v(me),H=0),fe=!1),ne&&!(ne=!1)&&be&&be(me),Se&&(K(me),Se=!1),we=0},fr=function(Z,Pe,ue){Ke[ue]+=Z,Xe[ue]+=Pe,me._vx.update(Z),me._vy.update(Pe),u?we||(we=requestAnimationFrame(Zt)):Zt()},yr=function(Z,Pe){Te&&!$e&&(me.axis=$e=Math.abs(Z)>Math.abs(Pe)?"x":"y",ne=!0),$e!=="y"&&(Ke[2]+=Z,me._vx.update(Z,!0)),$e!=="x"&&(Xe[2]+=Pe,me._vy.update(Pe,!0)),u?we||(we=requestAnimationFrame(Zt)):Zt()},Kt=function(Z){if(!$t(Z,1)){Z=S2(Z,c);var Pe=Z.clientX,ue=Z.clientY,Ee=Pe-me.x,Oe=ue-me.y,Ye=me.isDragging;me.x=Pe,me.y=ue,(Ye||(Ee||Oe)&&(Math.abs(me.startX-Pe)>=a||Math.abs(me.startY-ue)>=a))&&(H||(H=Ye?2:1),Ye||(me.isDragging=!0),yr(Ee,Oe))}},pr=me.onPress=function(Ht){$t(Ht,1)||Ht&&Ht.button||(me.axis=$e=null,ae.pause(),me.isPressed=!0,Ht=S2(Ht),Ue=ke=0,me.startX=me.x=Ht.clientX,me.startY=me.y=Ht.clientY,me._vx.reset(),me._vy.reset(),du(z?o:He,Pf[1],Kt,ce,!0),me.deltaX=me.deltaY=0,b&&b(me))}
vendor: 4,086 bytes, lines 513-520
513,Ot=me.onRelease=function(Ht){if(!$t(Ht,1)){uu(z?o:He,Pf[1],Kt,!0);var Z=!isNaN(me.y-me.startY),Pe=me.isDragging,ue=Pe&&(Math.abs(me.x-me.startX)>3||Math.abs(me.y-me.startY)>3),Ee=S2(Ht);!ue&&Z&&(me._vx.reset(),me._vy.reset(),c&&le&&vl.delayedCall(.08,function(){if(JE()-mt>300&&!Ht.defaultPrevented){if(Ht.target.click)Ht.target.click();else if(He.createEvent){var Oe=He.createEvent("MouseEvents");Oe.initMouseEvent("click",!0,!0,zc,1,Ee.screenX,Ee.screenY,Ee.clientX,Ee.clientY,!1,!1,!1,!1,0,null),Ht.target.dispatchEvent(Oe)}}})),me.isDragging=me.isGesturing=me.isPressed=!1,d&&Pe&&!z&&ae.restart(!0),H&&Zt(),y&&Pe&&y(me),w&&w(me,ue)}},Ir=function(Z){return Z.touches&&Z.touches.length>1&&(me.isGesturing=!0)&&q(Z,me.isDragging)},cn=function(){return(me.isGesturing=!1)||L(me)},kr=function(Z){if(!$t(Z)){var Pe=ve(),ue=Re();fr((Pe-De)*ie,(ue-tt)*ie,1),De=Pe,tt=ue,d&&ae.restart(!0)}},rr=function(Z){if(!$t(Z)){Z=S2(Z,c),K&&(Se=!0);var Pe=(Z.deltaMode===1?l:Z.deltaMode===2?zc.innerHeight:1)*p;fr(Z.deltaX*Pe,Z.deltaY*Pe,0),d&&!z&&ae.restart(!0)}},Ut=function(Z){if(!$t(Z)){var Pe=Z.clientX,ue=Z.clientY,Ee=Pe-me.x,Oe=ue-me.y;me.x=Pe,me.y=ue,fe=!0,d&&ae.restart(!0),(Ee||Oe)&&yr(Ee,Oe)}},wr=function(Z){me.event=Z,$(me)},Ar=function(Z){me.event=Z,V(me)},Jt=function(Z){return $t(Z)||S2(Z,c)&&X(me)};ae=me._dc=vl.delayedCall(f||.25,kt).pause(),me.deltaX=me.deltaY=0,me._vx=L$(0,50,!0),me._vy=L$(0,50,!0),me.scrollX=ve,me.scrollY=Re,me.isDragging=me.isGesturing=me.isPressed=!1,Cme(this),me.enable=function(Ht){return me.isEnabled||(du(Ie?He:o,"scroll",D$),s.indexOf("scroll")>=0&&du(Ie?He:o,"scroll",kr,ce,ee),s.indexOf("wheel")>=0&&du(o,"wheel",rr,ce,ee),(s.indexOf("touch")>=0&&Sme||s.indexOf("pointer")>=0)&&(du(o,Pf[0],pr,ce,ee),du(He,Pf[2],Ot),du(He,Pf[3],Ot),le&&du(o,"click",gt,!0,!0),X&&du(o,"click",Jt),q&&du(He,"gesturestart",Ir),L&&du(He,"gestureend",cn),$&&du(o,hy+"enter",wr),V&&du(o,hy+"leave",Ar),U&&du(o,hy+"move",Ut)),me.isEnabled=!0,me.isDragging=me.isGesturing=me.isPressed=fe=H=!1,me._vx.reset(),me._vy.reset(),De=ve(),tt=Re(),Ht&&Ht.type&&pr(Ht),O&&O(me)),me},me.disable=function(){me.isEnabled&&(D1.filter(function(Ht){return Ht!==me&&eT(Ht.target)}).length||uu(Ie?He:o,"scroll",D$),me.isPressed&&(me._vx.reset(),me._vy.reset(),uu(z?o:He,Pf[1],Kt,!0)),uu(Ie?He:o,"scroll",kr,ee),uu(o,"wheel",rr,ee),uu(o,Pf[0],pr,ee),uu(He,Pf[2],Ot),uu(He,Pf[3],Ot),uu(o,"click",gt,!0),uu(o,"click",Jt),uu(He,"gesturestart",Ir),uu(He,"gestureend",cn),uu(o,hy+"enter",wr),uu(o,hy+"leave",Ar),uu(o,hy+"move",Ut),me.isEnabled=me.isPressed=me.isDragging=!1,N&&N(me))},me.kill=me.revert=function(){me.disable();var Ht=D1.indexOf(me);Ht>=0&&D1.splice(Ht,1),Fp===me&&(Fp=0)},D1.push(me),z&&eT(o)&&(Fp=me),me.enable(m)},rFe(e,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),e}();Ks.version="3.15.0";Ks.create=function(e){return new Ks(e)};Ks.register=Ome;Ks.getAll=function(){return D1.slice()};Ks.getById=function(e){return D1.filter(function(t){return t.vars.id===e})[0]};Pme()&&vl.registerPlugin(Ks);/*! 514 * ScrollTrigger 3.15.0 515 * https://gsap.com 516 * 517 * @license Copyright 2008-2026, GreenSock. All rights reserved. 518 * Subject to the terms at https://gsap.com/standard-license 519 * @author: Jack Doyle, [email protected] 520*/var jr,f1,Yn,ea,jc,Gi,Y7,e3,vS,tT,yE,BP,Fl,hN,j$,gu,WX,VX,h1,Nme,xD,Ime,pu,R$,Dme,Lme,Wm,$$,X7,ob,Q7,rT,F$,ED,zP=1,Vl=Date.now,TD=Vl(),Kd=0,vE=0,HX=function(t,r,n){var i=Oc(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return n["_"+r+"Clamp"]=i,i?t.substr(6,t.length-7):t},GX=function(t,r){return r&&(!Oc(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},aFe=function e(){return vE&&requestAnimationFrame(e)},qX=function(){return hN=1},KX=function(){return hN=0},xh=function(t){return t},_E=function(t){return Math.round(t*1e5)/1e5||0},jme=function(){return typeof window<"u"},Rme=function(){return jr||jme()&&(jr=window.gsap)&&jr.registerPlugin&&jr},Ov=function(t){return!!~Y7.indexOf(t)},$me=function(t){return(t==="Height"?Q7:Yn["inner"+t])||jc["client"+t]||Gi["client"+t]}
vendor: 9,369 bytes, line 520
520,Fme=function(t){return Ug(t,"getBoundingClientRect")||(Ov(t)?function(){return wk.width=Yn.innerWidth,wk.height=Q7,wk}:function(){return Ip(t)})},sFe=function(t,r,n){var i=n.d,a=n.d2,s=n.a;return(s=Ug(t,"getBoundingClientRect"))?function(){return s()[i]}:function(){return(r?$me(a):t["client"+a])||0}},oFe=function(t,r){return!r||~Wh.indexOf(t)?Fme(t):function(){return wk}},Dh=function(t,r){var n=r.s,i=r.d2,a=r.d,s=r.a;return Math.max(0,(n="scroll"+i)&&(s=Ug(t,n))?s()-Fme(t)()[a]:Ov(t)?(jc[n]||Gi[n])-$me(i):t[n]-t["offset"+i])},UP=function(t,r){for(var n=0;n<h1.length;n+=3)(!r||~r.indexOf(h1[n+1]))&&t(h1[n],h1[n+1],h1[n+2])},Oc=function(t){return typeof t=="string"},ql=function(t){return typeof t=="function"},bE=function(t){return typeof t=="number"},py=function(t){return typeof t=="object"},A2=function(t,r,n){return t&&t.progress(r?0:1)&&n&&t.pause()},G_=function(t,r,n){if(t.enabled){var i=t._ctx?t._ctx.add(function(){return r(t,n)}):r(t,n);i&&i.totalTime&&(t.callbackAnimation=i)}},q_=Math.abs,Bme="left",zme="top",Z7="right",J7="bottom",cv="width",dv="height",nT="Right",iT="Left",aT="Top",sT="Bottom",uo="padding",Ld="margin",ew="Width",eU="Height",No="px",jd=function(t){return Yn.getComputedStyle(t.nodeType===Node.DOCUMENT_NODE?t.scrollingElement:t)},lFe=function(t){var r=jd(t).position;t.style.position=r==="absolute"||r==="fixed"?r:"relative"},YX=function(t,r){for(var n in r)n in t||(t[n]=r[n]);return t},Ip=function(t,r){var n=r&&jd(t)[j$]!=="matrix(1, 0, 0, 1, 0, 0)"&&jr.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=t.getBoundingClientRect?t.getBoundingClientRect():t.scrollingElement.getBoundingClientRect();return n&&n.progress(0).kill(),i},t3=function(t,r){var n=r.d2;return t["offset"+n]||t["client"+n]||0},Ume=function(t){var r=[],n=t.labels,i=t.duration(),a;for(a in n)r.push(n[a]/i);return r},uFe=function(t){return function(r){return jr.utils.snap(Ume(t),r)}},tU=function(t){var r=jr.utils.snap(t),n=Array.isArray(t)&&t.slice(0).sort(function(i,a){return i-a});return n?function(i,a,s){s===void 0&&(s=.001);var o;if(!a)return r(i);if(a>0){for(i-=s,o=0;o<n.length;o++)if(n[o]>=i)return n[o];return n[o-1]}else for(o=n.length,i+=s;o--;)if(n[o]<=i)return n[o];return n[0]}:function(i,a,s){s===void 0&&(s=.001);var o=r(i);return!a||Math.abs(o-i)<s||o-i<0==a<0?o:r(a<0?i-t:i+t)}},cFe=function(t){return function(r,n){return tU(Ume(t))(r,n.direction)}},WP=function(t,r,n,i){return n.split(",").forEach(function(a){return t(r,a,i)})},Xo=function(t,r,n,i,a){return t.addEventListener(r,n,{passive:!i,capture:!!a})},Yo=function(t,r,n,i){return t.removeEventListener(r,n,!!i)},VP=function(t,r,n){n=n&&n.wheelHandler,n&&(t(r,"wheel",n),t(r,"touchmove",n))},XX={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},HP={toggleActions:"play",anticipatePin:0},r3={top:0,left:0,center:.5,bottom:1,right:1},yk=function(t,r){if(Oc(t)){var n=t.indexOf("="),i=~n?+(t.charAt(n-1)+1)*parseFloat(t.substr(n+1)):0;~n&&(t.indexOf("%")>n&&(i*=r/100),t=t.substr(0,n-1)),t=i+(t in r3?r3[t]*r:~t.indexOf("%")?parseFloat(t)*r/100:parseFloat(t)||0)}return t},GP=function(t,r,n,i,a,s,o,l){var u=a.startColor,c=a.endColor,d=a.fontSize,f=a.indent,h=a.fontWeight,p=ea.createElement("div"),m=Ov(n)||Ug(n,"pinType")==="fixed",_=t.indexOf("scroller")!==-1,y=m?Gi:n.tagName==="IFRAME"?n.contentDocument.body:n,v=t.indexOf("start")!==-1,b=v?u:c,w="border-color:"+b+";font-size:"+d+";color:"+b+";font-weight:"+h+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return w+="position:"+((_||l)&&m?"fixed;":"absolute;"),(_||l||!m)&&(w+=(i===Do?Z7:J7)+":"+(s+parseFloat(f))+"px;"),o&&(w+="box-sizing:border-box;text-align:left;width:"+o.offsetWidth+"px;"),p._isStart=v,p.setAttribute("class","gsap-marker-"+t+(r?" marker-"+r:"")),p.style.cssText=w,p.innerText=r||r===0?t+"-"+r:t,y.children[0]?y.insertBefore(p,y.children[0]):y.appendChild(p),p._offset=p["offset"+i.op.d2],vk(p,0,i,v),p},vk=function(t,r,n,i){var a={display:"block"},s=n[i?"os2":"p2"],o=n[i?"p2":"os2"];t._isFlipped=i,a[n.a+"Percent"]=i?-100:0,a[n.a]=i?"1px":0,a["border"+s+ew]=1,a["border"+o+ew]=0,a[n.p]=r+"px",jr.set(t,a)},Hn=[],B$={},_S,QX=function(){return Vl()-Kd>34&&(_S||(_S=requestAnimationFrame(Vp)))},K_=function(){(!pu||!pu.isPressed||pu.startX>Gi.clientWidth)&&(Xn.cache++,pu?_S||(_S=requestAnimationFrame(Vp)):Vp(),Kd||Iv("scrollStart"),Kd=Vl())},SD=function(){Lme=Yn.innerWidth,Dme=Yn.innerHeight},wE=function(t){Xn.cache++,(t===!0||!Fl&&!Ime&&!ea.fullscreenElement&&!ea.webkitFullscreenElement&&(!R$||Lme!==Yn.innerWidth||Math.abs(Yn.innerHeight-Dme)>Yn.innerHeight*.25))&&e3.restart(!0)},Nv={},dFe=[],Wme=function e(){return Yo(ni,"scrollEnd",e)||Iy(!0)},Iv=function(t){return Nv[t]&&Nv[t].map(function(r){return r()})||dFe},Mc=[],Vme=function(t){for(var r=0;r<Mc.length;r+=5)(!t||Mc[r+4]&&Mc[r+4].query===t)&&(Mc[r].style.cssText=Mc[r+1],Mc[r].getBBox&&Mc[r].setAttribute("transform",Mc[r+2]||""),Mc[r+3].uncache=1)},Hme=function(){return Xn.forEach(function(t){return ql(t)&&++t.cacheID&&(t.rec=t())})},rU=function(t,r){var n;for(gu=0;gu<Hn.length;gu++)n=Hn[gu],n&&(!r||n._ctx===r)&&(t?n.kill(1):n.revert(!0,!0));rT=!0,r&&Vme(r),r||Iv("revert")},Gme=function(t,r){Xn.cache++,(r||!yu)&&Xn.forEach(function(n){return ql(n)&&n.cacheID++&&(n.rec=0)}),Oc(t)&&(Yn.history.scrollRestoration=X7=t)},yu,fv=0,ZX,fFe=function(){if(ZX!==fv){var t=ZX=fv;requestAnimationFrame(function(){return t===fv&&Iy(!0)})}},qme=function(){Gi.appendChild(ob),Q7=!pu&&ob.offsetHeight||Yn.innerHeight,Gi.removeChild(ob)},JX=function(t){return vS(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(r){return r.style.display=t?"none":"block"})},Iy=function(t,r){if(jc=ea.documentElement,Gi=ea.body,Y7=[Yn,ea,jc,Gi],Kd&&!t&&!rT){Xo(ni,"scrollEnd",Wme);return}qme(),yu=ni.isRefreshing=!0,rT||Hme();var n=Iv("refreshInit");Nme&&ni.sort(),r||rU(),Xn.forEach(function(i){ql(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),Hn.slice(0).forEach(function(i){return i.refresh()}),rT=!1,Hn.forEach(function(i){if(i._subPinOffset&&i.pin){var a=i.vars.horizontal?"offsetWidth":"offsetHeight",s=i.pin[a];i.revert(!0,1),i.adjustPinSpacing(i.pin[a]-s),i.refresh()}}),F$=1,JX(!0),Hn.forEach(function(i){var a=Dh(i.scroller,i._dir),s=i.vars.end==="max"||i._endClamp&&i.end>a,o=i._startClamp&&i.start>=a;(s||o)&&i.setPositions(o?a-1:i.start,s?Math.max(o?a:i.start+1,a):i.end,!0)}),JX(!1),F$=0,n.forEach(function(i){return i&&i.render&&i.render(-1)}),Xn.forEach(function(i){ql(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Gme(X7,1),e3.pause(),fv++,yu=2,Vp(2),Hn.forEach(function(i){return ql(i.vars.onRefresh)&&i.vars.onRefresh(i)}),yu=ni.isRefreshing=!1,Iv("refresh")},z$=0,_k=1,oT,Vp=function(t){if(t===2||!yu&&!rT){ni.isUpdating=!0,oT&&oT.update(0);var r=Hn.length,n=Vl(),i=n-TD>=50,a=r&&Hn[0].scroll();if(_k=z$>a?-1:1,yu||(z$=a),i&&(Kd&&!hN&&n-Kd>200&&(Kd=0,Iv("scrollEnd")),yE=TD,TD=n),_k<0){for(gu=r;gu-- >0;)Hn[gu]&&Hn[gu].update(0,i);_k=1}else for(gu=0;gu<r;gu++)Hn[gu]&&Hn[gu].update(0,i);ni.isUpdating=!1}_S=0},U$=[Bme,zme,J7,Z7,Ld+sT,Ld+nT,Ld+aT,Ld+iT,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],bk=U$.concat([cv,dv,"boxSizing","max"+ew,"max"+eU,"position",Ld,uo,uo+aT,uo+nT,uo+sT,uo+iT]),hFe=function(t,r,n){lb(n);var i=t._gsap;if(i.spacerIsNative)lb(i.spacerState);else if(t._gsap.swappedIn){var a=r.parentNode;a&&(a.insertBefore(t,r),a.removeChild(r))}t._gsap.swappedIn=!1},AD=function(t,r,n,i){if(!t._gsap.swappedIn){for(var a=U$.length,s=r.style,o=t.style,l;a--;)l=U$[a],s[l]=n[l];s.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(s.display="inline-block"),o[J7]=o[Z7]="auto",s.flexBasis=n.flexBasis||"auto",s.overflow="visible",s.boxSizing="border-box",s[cv]=t3(t,xu)+No,s[dv]=t3(t,Do)+No,s[uo]=o[Ld]=o[zme]=o[Bme]="0",lb(i),o[cv]=o["max"+ew]=n[cv],o[dv]=o["max"+eU]=n[dv],o[uo]=n[uo],t.parentNode!==r&&(t.parentNode.insertBefore(r,t),r.appendChild(t)),t._gsap.swappedIn=!0}},pFe=/([A-Z])/g,lb=function(t){if(t){var r=t.t.style,n=t.length,i=0,a,s;for((t.t._gsap||jr.core.getCache(t.t)).uncache=1;i<n;i+=2)s=t[i+1],a=t[i],s?r[a]=s:r[a]&&r.removeProperty(a.replace(pFe,"-$1").toLowerCase())}},qP=function(t){for(var r=bk.length,n=t.style,i=[],a=0;a<r;a++)i.push(bk[a],n[bk[a]]);return i.t=t,i},mFe=function(t,r,n){for(var i=[],a=t.length,s=n?8:0,o;s<a;s+=2)o=t[s],i.push(o,o in r?r[o]:t[s+1]);return i.t=t.t,i},wk={left:0,top:0},eQ=function(t,r,n,i,a,s,o,l,u,c,d,f,h,p){ql(t)&&(t=t(l)),Oc(t)&&t.substr(0,3)==="max"&&(t=f+(t.charAt(4)==="="?yk("0"+t.substr(3),n):0));var m=h?h.time():0,_,y,v;if(h&&h.seek(0),isNaN(t)||(t=+t),bE(t))h&&(t=jr.utils.mapRange(h.scrollTrigger.start,h.scrollTrigger.end,0,f,t)),o&&vk(o,n,i,!0);else{ql(r)&&(r=r(l));var b=(t||"0").split(" "),w,x,E,T;v=Hu(r,l)||Gi,w=Ip(v)||{},(!w||!w.left&&!w.top)&&jd(v).display==="none"&&(T=v.style.display,v.style.display="block",w=Ip(v),T?v.style.display=T:v.style.removeProperty("display")),x=yk(b[0],w[i.d]),E=yk(b[1]||"0",n),t=w[i.p]-u[i.p]-c+x+a-E,o&&vk(o,E,i,n-E<20||o._isStart&&E>20),n-=n-E}
vendor: 4,715 bytes, line 520
520if(p&&(l[p]=t||-.001,t<0&&(t=0)),s){var S=t+n,A=s._isStart;_="scroll"+i.d2,vk(s,S,i,A&&S>20||!A&&(d?Math.max(Gi[_],jc[_]):s.parentNode[_])<=S+1),d&&(u=Ip(o),d&&(s.style[i.op.p]=u[i.op.p]-i.op.m-s._offset+No))}return h&&v&&(_=Ip(v),h.seek(f),y=Ip(v),h._caScrollDist=_[i.p]-y[i.p],t=t/h._caScrollDist*f),h&&h.seek(m),h?t:Math.round(t)},gFe=/(webkit|moz|length|cssText|inset)/i,tQ=function(t,r,n,i){if(t.parentNode!==r){var a=t.style,s,o;if(r===Gi){t._stOrig=a.cssText,o=jd(t);for(s in o)!+s&&!gFe.test(s)&&o[s]&&typeof a[s]=="string"&&s!=="0"&&(a[s]=o[s]);a.top=n,a.left=i}else a.cssText=t._stOrig;jr.core.getCache(t).uncache=1,r.appendChild(t)}},Kme=function(t,r,n){var i=r,a=i;return function(s){var o=Math.round(t());return o!==i&&o!==a&&Math.abs(o-i)>3&&Math.abs(o-a)>3&&(s=o,n&&n()),a=i,i=Math.round(s),i}},KP=function(t,r,n){var i={};i[r.p]="+="+n,jr.set(t,i)},rQ=function(t,r){var n=i0(t,r),i="_scroll"+r.p2,a=function s(o,l,u,c,d){var f=s.tween,h=l.onComplete,p={};u=u||n();var m=Kme(n,u,function(){f.kill(),s.tween=0});return d=c&&d||0,c=c||o-u,f&&f.kill(),l[i]=o,l.inherit=!1,l.modifiers=p,p[i]=function(){return m(u+c*f.ratio+d*f.ratio*f.ratio)},l.onUpdate=function(){Xn.cache++,s.tween&&Vp()},l.onComplete=function(){s.tween=0,h&&h.call(f)},f=s.tween=jr.to(t,l),f};return t[i]=n,n.wheelHandler=function(){return a.tween&&a.tween.kill()&&(a.tween=0)},Xo(t,"wheel",n.wheelHandler),ni.isTouch&&Xo(t,"touchmove",n.wheelHandler),a},ni=function(){function e(r,n){f1||e.register(jr)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),$$(this),this.init(r,n)}var t=e.prototype;return t.init=function(n,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!vE){this.update=this.refresh=this.kill=xh;return}n=YX(Oc(n)||bE(n)||n.nodeType?{trigger:n}:n,HP);var a=n,s=a.onUpdate,o=a.toggleClass,l=a.id,u=a.onToggle,c=a.onRefresh,d=a.scrub,f=a.trigger,h=a.pin,p=a.pinSpacing,m=a.invalidateOnRefresh,_=a.anticipatePin,y=a.onScrubComplete,v=a.onSnapComplete,b=a.once,w=a.snap,x=a.pinReparent,E=a.pinSpacer,T=a.containerAnimation,S=a.fastScrollEnd,A=a.preventOverlaps,C=n.horizontal||n.containerAnimation&&n.horizontal!==!1?xu:Do,k=!d&&d!==0,M=Hu(n.scroller||Yn),D=jr.core.getCache(M),$=Ov(M),V=("pinType"in n?n.pinType:Ug(M,"pinType")||$&&"fixed")==="fixed",U=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],B=k&&n.toggleActions.split(" "),z="markers"in n?n.markers:HP.markers,q=$?0:parseFloat(jd(M)["border"+C.p2+ew])||0,L=this,K=n.onRefreshInit&&function(){return n.onRefreshInit(L)},O=sFe(M,$,C),N=oFe(M,$),X=0,ie=0,ee=0,le=i0(M,C),Te,be,we,ae,H,fe,Se,ne,$e,me,Ue,ke,ce,ve,Re,De,tt,Ge,Ie,He,Ke,Xe,mt,gt,$t,kt,Zt,fr,yr,Kt,pr,Ot,Ir,cn,kr,rr,Ut,wr,Ar;if(L._startClamp=L._endClamp=!1,L._dir=C,_*=45,L.scroller=M,L.scroll=T?T.time.bind(T):le,ae=le(),L.vars=n,i=i||n.animation,"refreshPriority"in n&&(Nme=1,n.refreshPriority===-9999&&(oT=L)),D.tweenScroll=D.tweenScroll||{top:rQ(M,Do),left:rQ(M,xu)},L.tweenTo=Te=D.tweenScroll[C.p],L.scrubDuration=function(ue){Ir=bE(ue)&&ue,Ir?Ot?Ot.duration(ue):Ot=jr.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:Ir,paused:!0,onComplete:function(){return y&&y(L)}}):(Ot&&Ot.progress(1).kill(),Ot=0)},i&&(i.vars.lazy=!1,i._initted&&!L.isReverted||i.vars.immediateRender!==!1&&n.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),L.animation=i.pause(),i.scrollTrigger=L,L.scrubDuration(d),Kt=0,l||(l=i.vars.id)),w&&((!py(w)||w.push)&&(w={snapTo:w}),"scrollBehavior"in Gi.style&&jr.set($?[Gi,jc]:M,{scrollBehavior:"auto"}),Xn.forEach(function(ue){return ql(ue)&&ue.target===($?ea.scrollingElement||jc:M)&&(ue.smooth=!1)}),we=ql(w.snapTo)?w.snapTo:w.snapTo==="labels"?uFe(i):w.snapTo==="labelsDirectional"?cFe(i):w.directional!==!1?function(ue,Ee){return tU(w.snapTo)(ue,Vl()-ie<500?0:Ee.direction)}:jr.utils.snap(w.snapTo),cn=w.duration||{min:.1,max:2},cn=py(cn)?tT(cn.min,cn.max):tT(cn,cn),kr=jr.delayedCall(w.delay||Ir/2||.1,function(){var ue=le(),Ee=Vl()-ie<500,Oe=Te.tween;if((Ee||Math.abs(L.getVelocity())<10)&&!Oe&&!hN&&X!==ue){var Ye=(ue-fe)/ve,ct=i&&!k?i.totalProgress():Ye,Ct=Ee?0:(ct-pr)/(Vl()-yE)*1e3||0,sr=jr.utils.clamp(-Ye,1-Ye,q_(Ct/2)*Ct/.185),ir=Ye+(w.inertia===!1?0:sr),or,It,cr=w,Qr=cr.onStart,Zr=cr.onInterrupt,Jn=cr.onComplete;if(or=we(ir,L),bE(or)||(or=ir),It=Math.max(0,Math.round(fe+or*ve)),ue<=Se&&ue>=fe&&It!==ue){if(Oe&&!Oe._initted&&Oe.data<=q_(It-ue))return;w.inertia===!1&&(sr=or-Ye),Te(It,{duration:cn(q_(Math.max(q_(ir-ct),q_(or-ct))*.185/Ct/.05||0)),ease:w.ease||"power3",data:q_(It-ue),onInterrupt:function(){return kr.restart(!0)&&Zr&&G_(L,Zr)},onComplete:function(){L.update(),X=le(),i&&!k&&(Ot?Ot.resetTo("totalProgress",or,i._tTime/i._tDur):i.progress(or)),Kt=pr=i&&!k?i.totalProgress():L.progress,v&&v(L),Jn&&G_(L,Jn)}}
vendor: 5,315 bytes, line 520
520,ue,sr*ve,It-ue-sr*ve),Qr&&G_(L,Qr,Te.tween)}}else L.isActive&&X!==ue&&kr.restart(!0)}).pause()),l&&(B$[l]=L),f=L.trigger=Hu(f||h!==!0&&h),Ar=f&&f._gsap&&f._gsap.stRevert,Ar&&(Ar=Ar(L)),h=h===!0?f:Hu(h),Oc(o)&&(o={targets:f,className:o}),h&&(p===!1||p===Ld||(p=!p&&h.parentNode&&h.parentNode.style&&jd(h.parentNode).display==="flex"?!1:uo),L.pin=h,be=jr.core.getCache(h),be.spacer?Re=be.pinState:(E&&(E=Hu(E),E&&!E.nodeType&&(E=E.current||E.nativeElement),be.spacerIsNative=!!E,E&&(be.spacerState=qP(E))),be.spacer=Ge=E||ea.createElement("div"),Ge.classList.add("pin-spacer"),l&&Ge.classList.add("pin-spacer-"+l),be.pinState=Re=qP(h)),n.force3D!==!1&&jr.set(h,{force3D:!0}),L.spacer=Ge=be.spacer,yr=jd(h),gt=yr[p+C.os2],He=jr.getProperty(h),Ke=jr.quickSetter(h,C.a,No),AD(h,Ge,yr),tt=qP(h)),z){ke=py(z)?YX(z,XX):XX,me=GP("scroller-start",l,M,C,ke,0),Ue=GP("scroller-end",l,M,C,ke,0,me),Ie=me["offset"+C.op.d2];var Jt=Hu(Ug(M,"content")||M);ne=this.markerStart=GP("start",l,Jt,C,ke,Ie,0,T),$e=this.markerEnd=GP("end",l,Jt,C,ke,Ie,0,T),T&&(wr=jr.quickSetter([ne,$e],C.a,No)),!V&&!(Wh.length&&Ug(M,"fixedMarkers")===!0)&&(lFe($?Gi:M),jr.set([me,Ue],{force3D:!0}),kt=jr.quickSetter(me,C.a,No),fr=jr.quickSetter(Ue,C.a,No))}if(T){var Ht=T.vars.onUpdate,Z=T.vars.onUpdateParams;T.eventCallback("onUpdate",function(){L.update(0,0,1),Ht&&Ht.apply(T,Z||[])})}if(L.previous=function(){return Hn[Hn.indexOf(L)-1]},L.next=function(){return Hn[Hn.indexOf(L)+1]},L.revert=function(ue,Ee){if(!Ee)return L.kill(!0);var Oe=ue!==!1||!L.enabled,Ye=Fl;Oe!==L.isReverted&&(Oe&&(rr=Math.max(le(),L.scroll.rec||0),ee=L.progress,Ut=i&&i.progress()),ne&&[ne,$e,me,Ue].forEach(function(ct){return ct.style.display=Oe?"none":"block"}),Oe&&(Fl=L,L.update(Oe)),h&&(!x||!L.isActive)&&(Oe?hFe(h,Ge,Re):AD(h,Ge,jd(h),$t)),Oe||L.update(Oe),Fl=Ye,L.isReverted=Oe)},L.refresh=function(ue,Ee,Oe,Ye){if(!((Fl||!L.enabled)&&!Ee)){if(h&&ue&&Kd){Xo(e,"scrollEnd",Wme);return}!yu&&K&&K(L),Fl=L,Te.tween&&!Oe&&(Te.tween.kill(),Te.tween=0),Ot&&Ot.pause(),m&&i&&(i.revert({kill:!1}).invalidate(),i.getChildren?i.getChildren(!0,!0,!1).forEach(function(Ta){return Ta.vars.immediateRender&&Ta.render(0,!0,!0)}):i.vars.immediateRender&&i.render(0,!0,!0)),L.isReverted||L.revert(!0,!0),L._subPinOffset=!1;var ct=O(),Ct=N(),sr=T?T.duration():Dh(M,C),ir=ve<=.01||!ve,or=0,It=Ye||0,cr=py(Oe)?Oe.end:n.end,Qr=n.endTrigger||f,Zr=py(Oe)?Oe.start:n.start||(n.start===0||!f?0:h?"0 0":"0 100%"),Jn=L.pinnedContainer=n.pinnedContainer&&Hu(n.pinnedContainer,L),yn=f&&Math.max(0,Hn.indexOf(L))||0,En=yn,pn,si,fa,aa,xi,ci,oi,Ki,ls,Yi,sa,Ei,gi;for(z&&py(Oe)&&(Ei=jr.getProperty(me,C.p),gi=jr.getProperty(Ue,C.p));En-- >0;)ci=Hn[En],ci.end||ci.refresh(0,1)||(Fl=L),oi=ci.pin,oi&&(oi===f||oi===h||oi===Jn)&&!ci.isReverted&&(Yi||(Yi=[]),Yi.unshift(ci),ci.revert(!0,!0)),ci!==Hn[En]&&(yn--,En--);for(ql(Zr)&&(Zr=Zr(L)),Zr=HX(Zr,"start",L),fe=eQ(Zr,f,ct,C,le(),ne,me,L,Ct,q,V,sr,T,L._startClamp&&"_startClamp")||(h?-.001:0),ql(cr)&&(cr=cr(L)),Oc(cr)&&!cr.indexOf("+=")&&(~cr.indexOf(" ")?cr=(Oc(Zr)?Zr.split(" ")[0]:"")+cr:(or=yk(cr.substr(2),ct),cr=Oc(Zr)?Zr:(T?jr.utils.mapRange(0,T.duration(),T.scrollTrigger.start,T.scrollTrigger.end,fe):fe)+or,Qr=f)),cr=HX(cr,"end",L),Se=Math.max(fe,eQ(cr||(Qr?"100% 0":sr),Qr,ct,C,le()+or,$e,Ue,L,Ct,q,V,sr,T,L._endClamp&&"_endClamp"))||-.001,or=0,En=yn;En--;)ci=Hn[En]||{},oi=ci.pin,oi&&ci.start-ci._pinPush<=fe&&!T&&ci.end>0&&(pn=ci.end-(L._startClamp?Math.max(0,ci.start):ci.start),(oi===f&&ci.start-ci._pinPush<fe||oi===Jn)&&isNaN(Zr)&&(or+=pn*(1-ci.progress)),oi===h&&(It+=pn));if(fe+=or,Se+=or,L._startClamp&&(L._startClamp+=or),L._endClamp&&!yu&&(L._endClamp=Se||-.001,Se=Math.min(Se,Dh(M,C))),ve=Se-fe||(fe-=.01)&&.001,ir&&(ee=jr.utils.clamp(0,1,jr.utils.normalize(fe,Se,rr))),L._pinPush=It,ne&&or&&(pn={},pn[C.a]="+="+or,Jn&&(pn[C.p]="-="+le()),jr.set([ne,$e],pn)),h&&!(F$&&L.end>=Dh(M,C)))pn=jd(h),aa=C===Do,fa=le(),Xe=parseFloat(He(C.a))+It,!sr&&Se>1&&(sa=($?ea.scrollingElement||jc:M).style,sa={style:sa,value:sa["overflow"+C.a.toUpperCase()]},$&&jd(Gi)["overflow"+C.a.toUpperCase()]!=="scroll"&&(sa.style["overflow"+C.a.toUpperCase()]="scroll")),AD(h,Ge,pn),tt=qP(h),si=Ip(h,!0),Ki=V&&i0(M,aa?xu:Do)(),p?($t=[p+C.os2,ve+It+No],$t.t=Ge,En=p===uo?t3(h,C)+ve+It:0,En&&($t.push(C.d,En+No),Ge.style.flexBasis!=="auto"&&(Ge.style.flexBasis=En+No)),lb($t),Jn&&Hn.forEach(function(Ta){Ta.pin===Jn&&Ta.vars.pinSpacing!==!1&&(Ta._subPinOffset=!0)}),V&&le(rr)):(En=t3(h,C),En&&Ge.style.flexBasis!=="auto"&&(Ge.style.flexBasis=En+No)),V&&(xi={top:si.top+(aa?fa-fe:Ki)+No,left:si.left+(aa?Ki:fa-fe)+No,boxSizing:"border-box",position:"fixed"},xi[cv]=xi["max"+ew]=Math.ceil(si.width)+No,xi[dv]=xi["max"+eU]=Math.ceil(si.height)+No,xi[Ld]=xi[Ld+aT]=xi[Ld+nT]=xi[Ld+sT]=xi[Ld+iT]="0",xi[uo]=pn[uo],xi[uo+aT]=pn[uo+aT],xi[uo+nT]=pn[uo+nT],xi[uo+sT]=pn[uo+sT],xi[uo+iT]=pn[uo+iT],De=mFe(Re,xi,x),yu&&le(0)),i?(ls=i._initted,xD(1),i.render(i.duration(),!0,!0),mt=He(C.a)-Xe+ve+It,Zt=Math.abs(ve-mt)>1,V&&Zt&&De.splice(De.length-2,2),i.render(0,!0,!0),ls||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),xD(0)):mt=ve,sa&&(sa.value?sa.style["overflow"+C.a.toUpperCase()]=sa.value:sa.style.removeProperty("overflow-"+C.a));else if(f&&le()&&!T)for(si=f.parentNode;si&&si!==Gi;)si._pinOffset&&(fe-=si._pinOffset,Se-=si._pinOffset),si=si.parentNode;
vendor: 12,265 bytes, line 520
520Yi&&Yi.forEach(function(Ta){return Ta.revert(!1,!0)}),L.start=fe,L.end=Se,ae=H=yu?rr:le(),!T&&!yu&&(ae<rr&&le(rr),L.scroll.rec=0),L.revert(!1,!0),ie=Vl(),kr&&(X=-1,kr.restart(!0)),Fl=0,i&&k&&(i._initted||Ut)&&i.progress()!==Ut&&i.progress(Ut||0,!0).render(i.time(),!0,!0),(ir||ee!==L.progress||T||m||i&&!i._initted)&&(i&&!k&&(i._initted||ee||i.vars.immediateRender!==!1)&&i.totalProgress(T&&fe<-.001&&!ee?jr.utils.normalize(fe,Se,0):ee,!0),L.progress=ir||(ae-fe)/ve===ee?0:ee),h&&p&&(Ge._pinOffset=Math.round(L.progress*mt)),Ot&&Ot.invalidate(),isNaN(Ei)||(Ei-=jr.getProperty(me,C.p),gi-=jr.getProperty(Ue,C.p),KP(me,C,Ei),KP(ne,C,Ei-(Ye||0)),KP(Ue,C,gi),KP($e,C,gi-(Ye||0))),ir&&!yu&&L.update(),c&&!yu&&!ce&&(ce=!0,c(L),ce=!1)}},L.getVelocity=function(){return(le()-H)/(Vl()-yE)*1e3||0},L.endAnimation=function(){A2(L.callbackAnimation),i&&(Ot?Ot.progress(1):i.paused()?k||A2(i,L.direction<0,1):A2(i,i.reversed()))},L.labelToScroll=function(ue){return i&&i.labels&&(fe||L.refresh()||fe)+i.labels[ue]/i.duration()*ve||0},L.getTrailing=function(ue){var Ee=Hn.indexOf(L),Oe=L.direction>0?Hn.slice(0,Ee).reverse():Hn.slice(Ee+1);return(Oc(ue)?Oe.filter(function(Ye){return Ye.vars.preventOverlaps===ue}):Oe).filter(function(Ye){return L.direction>0?Ye.end<=fe:Ye.start>=Se})},L.update=function(ue,Ee,Oe){if(!(T&&!Oe&&!ue)){var Ye=yu===!0?rr:L.scroll(),ct=ue?0:(Ye-fe)/ve,Ct=ct<0?0:ct>1?1:ct||0,sr=L.progress,ir,or,It,cr,Qr,Zr,Jn,yn;if(Ee&&(H=ae,ae=T?le():Ye,w&&(pr=Kt,Kt=i&&!k?i.totalProgress():Ct)),_&&h&&!Fl&&!zP&&Kd&&(!Ct&&fe<Ye+(Ye-H)/(Vl()-yE)*_?Ct=1e-4:Ct===1&&Se>Ye+(Ye-H)/(Vl()-yE)*_&&(Ct=.9999)),Ct!==sr&&L.enabled){if(ir=L.isActive=!!Ct&&Ct<1,or=!!sr&&sr<1,Zr=ir!==or,Qr=Zr||!!Ct!=!!sr,L.direction=Ct>sr?1:-1,L.progress=Ct,Qr&&!Fl&&(It=Ct&&!sr?0:Ct===1?1:sr===1?2:3,k&&(cr=!Zr&&B[It+1]!=="none"&&B[It+1]||B[It],yn=i&&(cr==="complete"||cr==="reset"||cr in i))),A&&(Zr||yn)&&(yn||d||!i)&&(ql(A)?A(L):L.getTrailing(A).forEach(function(fa){return fa.endAnimation()})),k||(Ot&&!Fl&&!zP?(Ot._dp._time-Ot._start!==Ot._time&&Ot.render(Ot._dp._time-Ot._start),Ot.resetTo?Ot.resetTo("totalProgress",Ct,i._tTime/i._tDur):(Ot.vars.totalProgress=Ct,Ot.invalidate().restart())):i&&i.totalProgress(Ct,!!(Fl&&(ie||ue)))),h){if(ue&&p&&(Ge.style[p+C.os2]=gt),!V)Ke(_E(Xe+mt*Ct));else if(Qr){if(Jn=!ue&&Ct>sr&&Se+1>Ye&&Ye+1>=Dh(M,C),x)if(!ue&&(ir||Jn)){var En=Ip(h,!0),pn=Ye-fe;tQ(h,Gi,En.top+(C===Do?pn:0)+No,En.left+(C===Do?0:pn)+No)}else tQ(h,Ge);lb(ir||Jn?De:tt),Zt&&Ct<1&&ir||Ke(Xe+(Ct===1&&!Jn?mt:0))}}w&&!Te.tween&&!Fl&&!zP&&kr.restart(!0),o&&(Zr||b&&Ct&&(Ct<1||!ED))&&vS(o.targets).forEach(function(fa){return fa.classList[ir||b?"add":"remove"](o.className)}),s&&!k&&!ue&&s(L),Qr&&!Fl?(k&&(yn&&(cr==="complete"?i.pause().totalProgress(1):cr==="reset"?i.restart(!0).pause():cr==="restart"?i.restart(!0):i[cr]()),s&&s(L)),(Zr||!ED)&&(u&&Zr&&G_(L,u),U[It]&&G_(L,U[It]),b&&(Ct===1?L.kill(!1,1):U[It]=0),Zr||(It=Ct===1?1:3,U[It]&&G_(L,U[It]))),S&&!ir&&Math.abs(L.getVelocity())>(bE(S)?S:2500)&&(A2(L.callbackAnimation),Ot?Ot.progress(1):A2(i,cr==="reverse"?1:!Ct,1))):k&&s&&!Fl&&s(L)}if(fr){var si=T?Ye/T.duration()*(T._caScrollDist||0):Ye;kt(si+(me._isFlipped?1:0)),fr(si)}wr&&wr(-Ye/T.duration()*(T._caScrollDist||0))}},L.enable=function(ue,Ee){L.enabled||(L.enabled=!0,Xo(M,"resize",wE),$||Xo(M,"scroll",K_),K&&Xo(e,"refreshInit",K),ue!==!1&&(L.progress=ee=0,ae=H=X=le()),Ee!==!1&&L.refresh())},L.getTween=function(ue){return ue&&Te?Te.tween:Ot},L.setPositions=function(ue,Ee,Oe,Ye){if(T){var ct=T.scrollTrigger,Ct=T.duration(),sr=ct.end-ct.start;ue=ct.start+sr*ue/Ct,Ee=ct.start+sr*Ee/Ct}L.refresh(!1,!1,{start:GX(ue,Oe&&!!L._startClamp),end:GX(Ee,Oe&&!!L._endClamp)},Ye),L.update()},L.adjustPinSpacing=function(ue){if($t&&ue){var Ee=$t.indexOf(C.d)+1;$t[Ee]=parseFloat($t[Ee])+ue+No,$t[1]=parseFloat($t[1])+ue+No,lb($t)}},L.disable=function(ue,Ee){if(ue!==!1&&L.revert(!0,!0),L.enabled&&(L.enabled=L.isActive=!1,Ee||Ot&&Ot.pause(),rr=0,be&&(be.uncache=1),K&&Yo(e,"refreshInit",K),kr&&(kr.pause(),Te.tween&&Te.tween.kill()&&(Te.tween=0)),!$)){for(var Oe=Hn.length;Oe--;)if(Hn[Oe].scroller===M&&Hn[Oe]!==L)return;Yo(M,"resize",wE),$||Yo(M,"scroll",K_)}},L.kill=function(ue,Ee){L.disable(ue,Ee),Ot&&!Ee&&Ot.kill(),l&&delete B$[l];var Oe=Hn.indexOf(L);Oe>=0&&Hn.splice(Oe,1),Oe===gu&&_k>0&&gu--,Oe=0,Hn.forEach(function(Ye){return Ye.scroller===L.scroller&&(Oe=1)}),Oe||yu||(L.scroll.rec=0),i&&(i.scrollTrigger=null,ue&&i.revert({kill:!1}),Ee||i.kill()),ne&&[ne,$e,me,Ue].forEach(function(Ye){return Ye.parentNode&&Ye.parentNode.removeChild(Ye)}),oT===L&&(oT=0),h&&(be&&(be.uncache=1),Oe=0,Hn.forEach(function(Ye){return Ye.pin===h&&Oe++}),Oe||(be.spacer=0)),n.onKill&&n.onKill(L)},Hn.push(L),L.enable(!1,!1),Ar&&Ar(L),i&&i.add&&!ve){var Pe=L.update;L.update=function(){L.update=Pe,Xn.cache++,fe||Se||L.refresh()},jr.delayedCall(.01,L.update),ve=.01,fe=Se=0}else L.refresh();h&&fFe()},e.register=function(n){return f1||(jr=n||Rme(),jme()&&window.document&&e.enable(),f1=vE),f1},e.defaults=function(n){if(n)for(var i in n)HP[i]=n[i];return HP},e.disable=function(n,i){vE=0,Hn.forEach(function(s){return s[i?"kill":"disable"](n)}),Yo(Yn,"wheel",K_),Yo(ea,"scroll",K_),clearInterval(BP),Yo(ea,"touchcancel",xh),Yo(Gi,"touchstart",xh),WP(Yo,ea,"pointerdown,touchstart,mousedown",qX),WP(Yo,ea,"pointerup,touchend,mouseup",KX),e3.kill(),UP(Yo);for(var a=0;a<Xn.length;a+=3)VP(Yo,Xn[a],Xn[a+1]),VP(Yo,Xn[a],Xn[a+2])},e.enable=function(){if(Yn=window,ea=document,jc=ea.documentElement,Gi=ea.body,jr){if(vS=jr.utils.toArray,tT=jr.utils.clamp,$$=jr.core.context||xh,xD=jr.core.suppressOverwrites||xh,X7=Yn.history.scrollRestoration||"auto",z$=Yn.pageYOffset||0,jr.core.globals("ScrollTrigger",e),Gi){vE=1,ob=document.createElement("div"),ob.style.height="100vh",ob.style.position="absolute",qme(),aFe(),Ks.register(jr),e.isTouch=Ks.isTouch,Wm=Ks.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),R$=Ks.isTouch===1,Xo(Yn,"wheel",K_),Y7=[Yn,ea,jc,Gi],jr.matchMedia?(e.matchMedia=function(c){var d=jr.matchMedia(),f;for(f in c)d.add(f,c[f]);return d},jr.addEventListener("matchMediaInit",function(){Hme(),rU()}),jr.addEventListener("matchMediaRevert",function(){return Vme()}),jr.addEventListener("matchMedia",function(){Iy(0,1),Iv("matchMedia")}),jr.matchMedia().add("(orientation: portrait)",function(){return SD(),SD})):console.warn("Requires GSAP 3.11.0 or later"),SD(),Xo(ea,"scroll",K_);var n=Gi.hasAttribute("style"),i=Gi.style,a=i.borderTopStyle,s=jr.core.Animation.prototype,o,l;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",o=Ip(Gi),Do.m=Math.round(o.top+Do.sc())||0,xu.m=Math.round(o.left+xu.sc())||0,a?i.borderTopStyle=a:i.removeProperty("border-top-style"),n||(Gi.setAttribute("style",""),Gi.removeAttribute("style")),BP=setInterval(QX,250),jr.delayedCall(.5,function(){return zP=0}),Xo(ea,"touchcancel",xh),Xo(Gi,"touchstart",xh),WP(Xo,ea,"pointerdown,touchstart,mousedown",qX),WP(Xo,ea,"pointerup,touchend,mouseup",KX),j$=jr.utils.checkPrefix("transform"),bk.push(j$),f1=Vl(),e3=jr.delayedCall(.2,Iy).pause(),h1=[ea,"visibilitychange",function(){var c=Yn.innerWidth,d=Yn.innerHeight;ea.hidden?(WX=c,VX=d):(WX!==c||VX!==d)&&wE()},ea,"DOMContentLoaded",Iy,Yn,"load",Iy,Yn,"resize",wE],UP(Xo),Hn.forEach(function(c){return c.enable(0,1)}),l=0;l<Xn.length;l+=3)VP(Yo,Xn[l],Xn[l+1]),VP(Yo,Xn[l],Xn[l+2])}else if(ea){var u=function c(){e.enable(),ea.removeEventListener("DOMContentLoaded",c)};ea.addEventListener("DOMContentLoaded",u)}}},e.config=function(n){"limitCallbacks"in n&&(ED=!!n.limitCallbacks);var i=n.syncInterval;i&&clearInterval(BP)||(BP=i)&&setInterval(QX,i),"ignoreMobileResize"in n&&(R$=e.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(UP(Yo)||UP(Xo,n.autoRefreshEvents||"none"),Ime=(n.autoRefreshEvents+"").indexOf("resize")===-1)},e.scrollerProxy=function(n,i){var a=Hu(n),s=Xn.indexOf(a),o=Ov(a);~s&&Xn.splice(s,o?6:2),i&&(o?Wh.unshift(Yn,i,Gi,i,jc,i):Wh.unshift(a,i))},e.clearMatchMedia=function(n){Hn.forEach(function(i){return i._ctx&&i._ctx.query===n&&i._ctx.kill(!0,!0)})},e.isInViewport=function(n,i,a){var s=(Oc(n)?Hu(n):n).getBoundingClientRect(),o=s[a?cv:dv]*i||0;return a?s.right-o>0&&s.left+o<Yn.innerWidth:s.bottom-o>0&&s.top+o<Yn.innerHeight},e.positionInViewport=function(n,i,a){Oc(n)&&(n=Hu(n));var s=n.getBoundingClientRect(),o=s[a?cv:dv],l=i==null?o/2:i in r3?r3[i]*o:~i.indexOf("%")?parseFloat(i)*o/100:parseFloat(i)||0;return a?(s.left+l)/Yn.innerWidth:(s.top+l)/Yn.innerHeight},e.killAll=function(n){if(Hn.slice(0).forEach(function(a){return a.vars.id!=="ScrollSmoother"&&a.kill()}),n!==!0){var i=Nv.killAll||[];Nv={},i.forEach(function(a){return a()})}},e}();ni.version="3.15.0";ni.saveStyles=function(e){return e?vS(e).forEach(function(t){if(t&&t.style){var r=Mc.indexOf(t);r>=0&&Mc.splice(r,5),Mc.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),jr.core.getCache(t),$$())}}):Mc};ni.revert=function(e,t){return rU(!e,t)};ni.create=function(e,t){return new ni(e,t)};ni.refresh=function(e){return e?wE(!0):(f1||ni.register())&&Iy(!0)};ni.update=function(e){return++Xn.cache&&Vp(e===!0?2:0)};ni.clearScrollMemory=Gme;ni.maxScroll=function(e,t){return Dh(e,t?xu:Do)};ni.getScrollFunc=function(e,t){return i0(Hu(e),t?xu:Do)};ni.getById=function(e){return B$[e]};ni.getAll=function(){return Hn.filter(function(e){return e.vars.id!=="ScrollSmoother"})};ni.isScrolling=function(){return!!Kd};ni.snapDirectional=tU;ni.addEventListener=function(e,t){var r=Nv[e]||(Nv[e]=[]);~r.indexOf(t)||r.push(t)};ni.removeEventListener=function(e,t){var r=Nv[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)};ni.batch=function(e,t){var r=[],n={},i=t.interval||.016,a=t.batchMax||1e9,s=function(u,c){var d=[],f=[],h=jr.delayedCall(i,function(){c(d,f),d=[],f=[]}).pause();return function(p){d.length||h.restart(!0),d.push(p.trigger),f.push(p),a<=d.length&&h.progress(1)}},o;for(o in t)n[o]=o.substr(0,2)==="on"&&ql(t[o])&&o!=="onRefreshInit"?s(o,t[o]):t[o];return ql(a)&&(a=a(),Xo(ni,"refresh",function(){return a=t.batchMax()})),vS(e).forEach(function(l){var u={};for(o in n)u[o]=n[o];u.trigger=l,r.push(ni.create(u))}),r};var nQ=function(t,r,n,i){return r>i?t(i):r<0&&t(0),n>i?(i-r)/(n-r):n<0?r/(r-n):1},CD=function e(t,r){r===!0?t.style.removeProperty("touch-action"):t.style.touchAction=r===!0?"auto":r?"pan-"+r+(Ks.isTouch?" pinch-zoom":""):"none",t===jc&&e(Gi,r)},YP={auto:1,scroll:1},yFe=function(t){var r=t.event,n=t.target,i=t.axis,a=(r.changedTouches?r.changedTouches[0]:r).target,s=a._gsap||jr.core.getCache(a),o=Vl(),l;if(!s._isScrollT||o-s._isScrollT>2e3){for(;a&&a!==Gi&&(a.scrollHeight<=a.clientHeight&&a.scrollWidth<=a.clientWidth||!(YP[(l=jd(a)).overflowY]||YP[l.overflowX]));)a=a.parentNode;s._isScroll=a&&a!==n&&!Ov(a)&&(YP[(l=jd(a)).overflowY]||YP[l.overflowX]),s._isScrollT=o}(s._isScroll||i==="x")&&(r.stopPropagation(),r._gsapAllow=!0)},Yme=function(t,r,n,i){return Ks.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:r,onWheel:i=i&&yFe,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&Xo(ea,Ks.eventTypes[0],aQ,!1,!0)},onDisable:function(){return Yo(ea,Ks.eventTypes[0],aQ,!0)}})},vFe=/(input|label|select|textarea)/i,iQ,aQ=function(t){var r=vFe.test(t.target.tagName);(r||iQ)&&(t._gsapAllow=!0,iQ=r)},_Fe=function(t){py(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var r=t,n=r.normalizeScrollX,i=r.momentum,a=r.allowNestedScroll,s=r.onRelease,o,l,u=Hu(t.target)||jc,c=jr.core.globals().ScrollSmoother,d=c&&c.get(),f=Wm&&(t.content&&Hu(t.content)||d&&t.content!==!1&&!d.smooth()&&d.content()),h=i0(u,Do),p=i0(u,xu),m=1,_=(Ks.isTouch&&Yn.visualViewport?Yn.visualViewport.scale*Yn.visualViewport.width:Yn.outerWidth)/Yn.innerWidth,y=0,v=ql(i)?function(){return i(o)}:function(){return i||2.8},b,w,x=Yme(u,t.type,!0,a),E=function(){return w=!1},T=xh,S=xh,A=function(){l=Dh(u,Do),S=tT(Wm?1:0,l),n&&(T=tT(0,Dh(u,xu))),b=fv},C=function(){f._gsap.y=_E(parseFloat(f._gsap.y)+h.offset)+"px",f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(f._gsap.y)+", 0, 1)",h.offset=h.cacheID=0},k=function(){if(w){requestAnimationFrame(E);var z=_E(o.deltaY/2),q=S(h.v-z);if(f&&q!==h.v+h.offset){h.offset=q-h.v;
520var L=_E((parseFloat(f&&f._gsap.y)||0)-h.offset);f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+L+", 0, 1)",f._gsap.y=L+"px",h.cacheID=Xn.cache,Vp()}return!0}h.offset&&C(),w=!0},M,D,$,V,U=function(){A(),M.isActive()&&M.vars.scrollY>l&&(h()>l?M.progress(1)&&h(l):M.resetTo("scrollY",l))};return f&&jr.set(f,{y:"+=0"}),t.ignoreCheck=function(B){return Wm&&B.type==="touchmove"&&k()||m>1.05&&B.type!=="touchstart"||o.isGesturing||B.touches&&B.touches.length>1},t.onPress=function(){w=!1;var B=m;m=_E((Yn.visualViewport&&Yn.visualViewport.scale||1)/_),M.pause(),B!==m&&CD(u,m>1.01?!0:n?!1:"x"),D=p(),$=h(),A(),b=fv},t.onRelease=t.onGestureStart=function(B,z){if(h.offset&&C(),!z)V.restart(!0);else{Xn.cache++;var q=v(),L,K;n&&(L=p(),K=L+q*.05*-B.velocityX/.227,q*=nQ(p,L,K,Dh(u,xu)),M.vars.scrollX=T(K)),L=h(),K=L+q*.05*-B.velocityY/.227,q*=nQ(h,L,K,Dh(u,Do)),M.vars.scrollY=S(K),M.invalidate().duration(q).play(.01),(Wm&&M.vars.scrollY>=l||L>=l-1)&&jr.to({},{onUpdate:U,duration:q})}s&&s(B)},t.onWheel=function(){M._ts&&M.pause(),Vl()-y>1e3&&(b=0,y=Vl())},t.onChange=function(B,z,q,L,K){if(fv!==b&&A(),z&&n&&p(T(L[2]===z?D+(B.startX-B.x):p()+z-L[1])),q){h.offset&&C();var O=K[2]===q,N=O?$+B.startY-B.y:h()+q-K[1],X=S(N);O&&N!==X&&($+=X-N),h(X)}(q||z)&&Vp()},t.onEnable=function(){CD(u,n?!1:"x"),ni.addEventListener("refresh",U),Xo(Yn,"resize",U),h.smooth&&(h.target.style.scrollBehavior="auto",h.smooth=p.smooth=!1),x.enable()},t.onDisable=function(){CD(u,!0),Yo(Yn,"resize",U),ni.removeEventListener("refresh",U),x.kill()},t.lockAxis=t.lockAxis!==!1,o=new Ks(t),o.iOS=Wm,Wm&&!h()&&h(1),Wm&&jr.ticker.add(xh),V=o._dc,M=jr.to(o,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Kme(h,h(),function(){return M.pause()})},onUpdate:Vp,onComplete:V.vars.onComplete}),o};ni.sort=function(e){if(ql(e))return Hn.sort(e);var t=Yn.pageYOffset||0;return ni.getAll().forEach(function(r){return r._sortY=r.trigger?t+r.trigger.getBoundingClientRect().top:r.start+Yn.innerHeight}),Hn.sort(e||function(r,n){return(r.vars.refreshPriority||0)*-1e6+(r.vars.containerAnimation?1e6:r._sortY)-((n.vars.containerAnimation?1e6:n._sortY)+(n.vars.refreshPriority||0)*-1e6)})};ni.observe=function(e){return new Ks(e)};ni.normalizeScroll=function(e){if(typeof e>"u")return pu;if(e===!0&&pu)return pu.enable();if(e===!1){pu&&pu.kill(),pu=e;return}var t=e instanceof Ks?e:_Fe(e);return pu&&pu.target===t.target&&pu.kill(),Ov(t.target)&&(pu=t),t};ni.core={_getVelocityProp:L$,_inputObserver:Yme,_scrollers:Xn,_proxies:Wh,bridge:{ss:function(){Kd||Iv("scrollStart"),Kd=Vl()},ref:function(){return Fl}}};Rme()&&jr.registerPlugin(ni);let sQ=!1;const Xme=()=>{sQ||(Qu.registerPlugin(ni),sQ=!0)},UA=()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,Qme=()=>typeof window<"u"&&window.innerWidth<768;function Zme(e={},t=[]){const r=R.useRef(null),{selector:n,y:i=24,stagger:a=.08,duration:s=.6,delay:o=0,immediate:l=!1}=e;return R.useEffect(()=>{if(!r.current||UA())return;Xme();const u=Qme()?Math.min(i,16):i,c=Qu.context(()=>{const d=n?Qu.utils.toArray(n):[r.current];d.length&&(Qu.set(d,{opacity:0,y:u}),Qu.to(d,{opacity:1,y:0,duration:s,delay:o,stagger:a,ease:"power2.out",overwrite:"auto",clearProps:"transform",...l?{}:{scrollTrigger:{trigger:r.current,start:"top 85%",once:!0}}}))},r);return()=>c.revert()},t),r}function bFe(e=60){const t=R.useRef(null);return R.useEffect(()=>{if(!t.current||UA())return;Xme();const r=Qme()?e*.35:e,n=Qu.context(()=>{Qu.to(t.current,{yPercent:r/10,ease:"none",scrollTrigger:{trigger:t.current.parentElement??t.current,start:"top top",end:"bottom top",scrub:!0}})},t);return()=>n.revert()},[e]),t}const wFe="/assets/hero-south-texas-city-BgOYKqi7.jpg",xFe=({onBrowse:e,onContact:t})=>{const r=R.useRef(null),n=bFe(60);return R.useEffect(()=>{if(!r.current||UA())return;const i=Qu.context(()=>{Qu.from(".hero-anim",{opacity:0,y:20,duration:.7,stagger:.12,ease:"power3.out",clearProps:"all"})},r);return()=>i.revert()},[]),g.jsx("section",{className:"relative overflow-hidden pt-16 md:pt-24",children:g.jsxs("div",{className:"relative min-h-[380px] sm:min-h-[440px] md:min-
520h-[520px] flex items-end overflow-hidden",children:[g.jsx("div",{ref:n,className:"absolute inset-0 -top-8 -bottom-8",children:g.jsx("img",{src:wFe,alt:"Commercial corridor and development sites in Alamo, Texas",className:"w-full h-full object-cover object-center"})}),g.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(ellipse at 20% 100%, hsl(144 48% 12% / 0.92) 0%, hsl(144 48% 12% / 0.72) 45%, hsl(144 48% 12% / 0.25) 100%)"}}),g.jsx("div",{ref:r,className:"relative container mx-auto px-4 pb-10 md:pb-14",children:g.jsxs("div",{className:"max-w-3xl",children:[g.jsxs("span",{className:"hero-anim inline-flex items-center gap-2 rounded-full bg-white/15 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-white backdrop-blur-sm",children:[g.jsx(lde,{className:"h-3.5 w-3.5"}),"Alamo EDC Property Directory"]}),g.jsx("h1",{className:"hero-anim mt-4 text-3xl sm:text-4xl md:text-5xl font-bold text-white",style:{textShadow:"0 2px 12px hsl(144 48% 8% / 0.8)"},children:"Find Your Place to Grow in Alamo"}),g.jsx("p",{className:"hero-anim mt-4 text-base md:text-lg text-white max-w-2xl",style:{textShadow:"0 2px 10px hsl(144 48% 8% / 0.85)"},children:"Explore available commercial buildings, retail spaces, offices, industrial facilities, development land, and investment opportunities throughout Alamo, Texas."}),g.jsxs("div",{className:"hero-anim mt-6 flex flex-col sm:flex-row gap-3",children:[g.jsxs(gr,{size:"lg",onClick:e,className:"group w-full sm:w-auto",children:["Browse Properties",g.jsx(t_,{className:"ml-2 h-4 w-4 transition-transform duration-200 group-hover:translate-x-1"})]}),g.jsx(gr,{size:"lg",variant:"secondary",onClick:t,className:"w-full sm:w-auto",children:"Contact a Broker"})]})]})})]})})};function oQ(e,[t,r]){return Math.min(r,Math.max(t,e))}var PD=0;function nU(){R.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lQ()),document.body.insertAdjacentElement("beforeend",e[1]??lQ()),PD++,()=>{PD===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),PD--}},[])}function lQ(){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 MD="focusScope.autoFocusOnMount",kD="focusScope.autoFocusOnUnmount",uQ={bubbles:!1,cancelable:!0},EFe="FocusScope",pN=R.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[o,l]=R.useState(null),u=jo(i),c=jo(a),d=R.useRef(null),f=Gn(t,m=>l(m)),h=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(n){let m=function(b){if(h.paused||!o)return;const w=b.target;o.contains(w)?d.current=w:Vm(d.current,{select:!0})},_=function(b){if(h.paused||!o)return;const w=b.relatedTarget;w!==null&&(o.contains(w)||Vm(d.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const x of b)x.removedNodes.length>0&&Vm(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",_);const v=new MutationObserver(y);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",_),v.disconnect()}}},[n,o,h.paused]),R.useEffect(()=>{if(o){dQ.add(h);const m=document.activeElement;if(!o.contains(m)){const y=new CustomEvent(MD,uQ);o.addEventListener(MD,u),o.dispatchEvent(y),y.defaultPrevented||(TFe(MFe(Jme(o)),{select:!0}),document.activeElement===m&&Vm(o))}return()=>{o.removeEventListener(MD,u),setTimeout(()=>{const y=new CustomEvent(kD,uQ);o.addEventListener(kD,c),o.dispatchEvent(y),y.defaultPrevented||Vm(m??document.body,{select:!0}),o.removeEventListener(kD,c),dQ.remove(h)},0)}}},[o,u,c,h]);const p=R.useCallback(m=>{if(!r&&!n||h.paused)return;const _=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(_&&y){const v=m.currentTarget,[b,w]=SFe(v);b&&w?!m.shiftKey&&y===w?(m.preventDefault(),r&&Vm(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),r&&Vm(w,{select:!0})):y===v&&m.preventDefault()}},[r,n,h.paused]);return g.jsx(Hr.div,{tabIndex:-1,...s,ref:f,onKeyDown:p})});pN.displayName=EFe;function TFe(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Vm(n,{select:t}),document.activeElement!==r)return}function SFe(e){const t=Jme(e),r=cQ(t,e),n=cQ(t.reverse(),e);return[r,n]}function Jme(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function cQ(e,t){for(const r of e)if(!AFe(r,{upTo:t}))return r}function AFe(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 CFe(e){return e instanceof HTMLInputElement&&"select"in e}function Vm(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&CFe(e)&&t&&e.select()}}var dQ=PFe();function PFe(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=fQ(e,t),e.unshift(t)},remove(t){var r;e=fQ(e,t),(r=e[0])==null||r.resume()}}}function fQ(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function MFe(e){return e.filter(t=>t.tagName!=="A")}var kFe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Y_=new WeakMap,XP=new WeakMap,QP={},OD=0,ege=function(e){return e&&(e.host||ege(e.parentNode))},OFe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ege(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})},NFe=function(e,t,r,n){var i=OFe(t,Array.isArray(e)?e:[e]);QP[r]||(QP[r]=new WeakMap);var a=QP[r],s=[],o=new Set,l=new Set(i),u=function(d){!d||o.has(d)||(o.add(d),u(d.parentNode))};
vendor: 2,832 bytes, line 520
520i.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(o.has(f))c(f);else try{var h=f.getAttribute(n),p=h!==null&&h!=="false",m=(Y_.get(f)||0)+1,_=(a.get(f)||0)+1;Y_.set(f,m),a.set(f,_),s.push(f),m===1&&p&&XP.set(f,!0),_===1&&f.setAttribute(r,"true"),p||f.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return c(t),o.clear(),OD++,function(){s.forEach(function(d){var f=Y_.get(d)-1,h=a.get(d)-1;Y_.set(d,f),a.set(d,h),f||(XP.has(d)||d.removeAttribute(n),XP.delete(d)),h||d.removeAttribute(r)}),OD--,OD||(Y_=new WeakMap,Y_=new WeakMap,XP=new WeakMap,QP={})}},iU=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=kFe(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),NFe(n,i,r,"aria-hidden")):function(){return null}},xk="right-scroll-bar-position",Ek="width-before-scroll-bar",IFe="with-scroll-bars-hidden",DFe="--removed-body-scroll-bar-size";function ND(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function LFe(e,t){var r=R.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var jFe=typeof window<"u"?R.useLayoutEffect:R.useEffect,hQ=new WeakMap;function RFe(e,t){var r=LFe(null,function(n){return e.forEach(function(i){return ND(i,n)})});return jFe(function(){var n=hQ.get(r);if(n){var i=new Set(n),a=new Set(e),s=r.current;i.forEach(function(o){a.has(o)||ND(o,null)}),a.forEach(function(o){i.has(o)||ND(o,s)})}hQ.set(r,e)},[e]),r}function $Fe(e){return e}function FFe(e,t){t===void 0&&(t=$Fe);var r=[],n=!1,i={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 s=t(a,n);return r.push(s),function(){r=r.filter(function(o){return o!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(o){return a(o)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var o=r;r=[],o.forEach(a),s=r}var l=function(){var c=s;s=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),r}}}};return i}function BFe(e){e===void 0&&(e={});var t=FFe(null);return t.options=Fd({async:!0,ssr:!1},e),t}var tge=function(e){var t=e.sideCar,r=d0(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 R.createElement(n,Fd({},r))};tge.isSideCarExport=!0;function zFe(e,t){return e.useMedium(t),tge}var rge=BFe(),ID=function(){}
vendor: 4,583 bytes, lines 520-557
520,mN=R.forwardRef(function(e,t){var r=R.useRef(null),n=R.useState({onScrollCapture:ID,onWheelCapture:ID,onTouchMoveCapture:ID}),i=n[0],a=n[1],s=e.forwardProps,o=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,p=e.noIsolation,m=e.inert,_=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,b=e.gapMode,w=d0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,E=RFe([r,t]),T=Fd(Fd({},w),i);return R.createElement(R.Fragment,null,c&&R.createElement(x,{sideCar:rge,removeScrollBar:u,shards:d,noRelative:h,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!_,lockRef:r,gapMode:b}),s?R.cloneElement(R.Children.only(o),Fd(Fd({},T),{ref:E})):R.createElement(v,Fd({},T,{className:l,ref:E}),o))});mN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mN.classNames={fullWidth:Ek,zeroRight:xk};var UFe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function WFe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=UFe();return t&&e.setAttribute("nonce",t),e}function VFe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HFe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GFe=function(){var e=0,t=null;return{add:function(r){e==0&&(t=WFe())&&(VFe(t,r),HFe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qFe=function(){var e=GFe();return function(t,r){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},nge=function(){var e=qFe(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},KFe={left:0,top:0,right:0,gap:0},DD=function(e){return parseInt(e||"",10)||0},YFe=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[DD(r),DD(n),DD(i)]},XFe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return KFe;var t=YFe(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])}},QFe=nge(),ub="data-scroll-locked",ZFe=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,o=e.gap;return r===void 0&&(r="margin"),` 521 .`.concat(IFe,` { 522 overflow: hidden `).concat(n,`; 523 padding-right: `).concat(o,"px ").concat(n,`; 524 } 525 body[`).concat(ub,`] { 526 overflow: hidden `).concat(n,`; 527 overscroll-behavior: contain; 528 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 529 padding-left: `.concat(i,`px; 530 padding-top: `).concat(a,`px; 531 padding-right: `).concat(s,`px; 532 margin-left:0; 533 margin-top:0; 534 margin-right: `).concat(o,"px ").concat(n,`; 535 `),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),` 536 } 537 538 .`).concat(xk,` { 539 right: `).concat(o,"px ").concat(n,`; 540 } 541 542 .`).concat(Ek,` { 543 margin-right: `).concat(o,"px ").concat(n,`; 544 } 545 546 .`).concat(xk," .").concat(xk,` { 547 right: 0 `).concat(n,`; 548 } 549 550 .`).concat(Ek," .").concat(Ek,` { 551 margin-right: 0 `).concat(n,`; 552 } 553 554 body[`).concat(ub,`] { 555 `).concat(DFe,": ").concat(o,`px; 556 } 557`)},pQ=function(){var e=parseInt(document.body.getAttribute(ub)||"0",10);return isFinite(e)?e:0},JFe=function(){R.useEffect(function(){return document.body.setAttribute(ub,(pQ()+1).toString()),function(){var e=pQ()-1;e<=0?document.body.removeAttribute(ub):document.body.setAttribute(ub,e.toString())}},[])},e8e=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;JFe();var a=R.useMemo(function(){return XFe(i)},[i]);return R.createElement(QFe,{styles:ZFe(a,!t,i,r?"":"!important")})},W$=!1;if(typeof window<"u")try{var ZP=Object.defineProperty({},"passive",{get:function(){return W$=!0,!0}});window.addEventListener("test",ZP,ZP),window.removeEventListener("test",ZP,ZP)}catch{W$=!1}var X_=W$?{passive:!1}:!1,t8e=function(e){return e.tagName==="TEXTAREA"},ige=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!t8e(e)&&r[t]==="visible")},r8e=function(e){return ige(e,"overflowY")},n8e=function(e){return ige(e,"overflowX")},mQ=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=age(e,n);if(i){var a=sge(e,n),s=a[1],o=a[2];if(s>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1}
vendor: 8,229 bytes, lines 557-560
557,i8e=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},a8e=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},age=function(e,t){return e==="v"?r8e(t):n8e(t)},sge=function(e,t){return e==="v"?i8e(t):a8e(t)},s8e=function(e,t){return e==="h"&&t==="rtl"?-1:1},o8e=function(e,t,r,n,i){var a=s8e(e,window.getComputedStyle(t).direction),s=a*n,o=r.target,l=t.contains(o),u=!1,c=s>0,d=0,f=0;do{if(!o)break;var h=sge(e,o),p=h[0],m=h[1],_=h[2],y=m-_-a*p;(p||y)&&age(e,o)&&(d+=y,f+=p);var v=o.parentNode;o=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(f)<1||!i))&&(u=!0),u},JP=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gQ=function(e){return[e.deltaX,e.deltaY]},yQ=function(e){return e&&"current"in e?e.current:e},l8e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},u8e=function(e){return` 558 .block-interactivity-`.concat(e,` {pointer-events: none;} 559 .allow-interactivity-`).concat(e,` {pointer-events: all;} 560`)},c8e=0,Q_=[];function d8e(e){var t=R.useRef([]),r=R.useRef([0,0]),n=R.useRef(),i=R.useState(c8e++)[0],a=R.useState(nge)[0],s=R.useRef(e);R.useEffect(function(){s.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Qz([e.lockRef.current],(e.shards||[]).map(yQ),!0).filter(Boolean);return m.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=R.useCallback(function(m,_){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var y=JP(m),v=r.current,b="deltaX"in m?m.deltaX:v[0]-y[0],w="deltaY"in m?m.deltaY:v[1]-y[1],x,E=m.target,T=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in m&&T==="h"&&E.type==="range")return!1;var S=mQ(T,E);if(!S)return!0;if(S?x=T:(x=T==="v"?"h":"v",S=mQ(T,E)),!S)return!1;if(!n.current&&"changedTouches"in m&&(b||w)&&(n.current=x),!x)return!0;var A=n.current||x;return o8e(A,_,m,A==="h"?b:w,!0)},[]),l=R.useCallback(function(m){var _=m;if(!(!Q_.length||Q_[Q_.length-1]!==a)){var y="deltaY"in _?gQ(_):JP(_),v=t.current.filter(function(x){return x.name===_.type&&(x.target===_.target||_.target===x.shadowParent)&&l8e(x.delta,y)})[0];if(v&&v.should){_.cancelable&&_.preventDefault();return}if(!v){var b=(s.current.shards||[]).map(yQ).filter(Boolean).filter(function(x){return x.contains(_.target)}),w=b.length>0?o(_,b[0]):!s.current.noIsolation;w&&_.cancelable&&_.preventDefault()}}},[]),u=R.useCallback(function(m,_,y,v){var b={name:m,delta:_,target:y,should:v,shadowParent:f8e(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),c=R.useCallback(function(m){r.current=JP(m),n.current=void 0},[]),d=R.useCallback(function(m){u(m.type,gQ(m),m.target,o(m,e.lockRef.current))},[]),f=R.useCallback(function(m){u(m.type,JP(m),m.target,o(m,e.lockRef.current))},[]);R.useEffect(function(){return Q_.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,X_),document.addEventListener("touchmove",l,X_),document.addEventListener("touchstart",c,X_),function(){Q_=Q_.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,X_),document.removeEventListener("touchmove",l,X_),document.removeEventListener("touchstart",c,X_)}},[]);var h=e.removeScrollBar,p=e.inert;return R.createElement(R.Fragment,null,p?R.createElement(a,{styles:u8e(i)}):null,h?R.createElement(e8e,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function f8e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const h8e=zFe(rge,d8e);var gN=R.forwardRef(function(e,t){return R.createElement(mN,Fd({},e,{ref:t,sideCar:h8e}))});gN.classNames=mN.classNames;var p8e=[" ","Enter","ArrowUp","ArrowDown"],m8e=[" ","Enter"],Dv="Select",[yN,vN,g8e]=Yw(Dv),[ox,h5t]=Ou(Dv,[g8e,ex]),_N=ex(),[y8e,p0]=ox(Dv),[v8e,_8e]=ox(Dv),oge=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:o,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:p}=e,m=_N(t),[_,y]=R.useState(null),[v,b]=R.useState(null),[w,x]=R.useState(!1),E=$A(u),[T,S]=rd({prop:n,defaultProp:i??!1,onChange:a,caller:Dv}),[A,C]=rd({prop:s,defaultProp:o,onChange:l,caller:Dv}),k=R.useRef(null),M=_?p||!!_.closest("form"):!0,[D,$]=R.useState(new Set),V=Array.from(D).map(U=>U.props.value).join(";");return g.jsx(Vde,{...m,children:g.jsxs(y8e,{required:h,scope:t,trigger:_,onTriggerChange:y,valueNode:v,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:Yc(),value:A,onValueChange:C,open:T,onOpenChange:S,dir:E,triggerPointerDownPosRef:k,disabled:f,children:[g.jsx(yN.Provider,{scope:t,children:g.jsx(v8e,{scope:e.__scopeSelect,onNativeOptionAdd:R.useCallback(U=>{$(B=>new Set(B).add(U))},[]),onNativeOptionRemove:R.useCallback(U=>{$(B=>{const z=new Set(B);return z.delete(U),z})},[]),children:r})}),M?g.jsxs(Oge,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:A,onChange:U=>C(U.target.value),disabled:f,form:p,children:[A===void 0?g.jsx("option",{value:""}):null,Array.from(D)]},V):null]})})};oge.displayName=Dv;var lge="SelectTrigger",uge=R.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=_N(r),s=p0(lge,r),o=s.disabled||n,l=Gn(t,s.onTriggerChange),u=vN(r),c=R.useRef("touch"),[d,f,h]=Ige(m=>{const _=u().filter(b=>!b.disabled),y=_.find(b=>b.value===s.value),v=Dge(_,m,y);v!==void 0&&s.onValueChange(v.value)}),p=m=>{o||(s.onOpenChange(!0),h()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return g.jsx(XO,{asChild:!0,...a,children:g.jsx(Hr.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":Nge(s.value)?"":void 0,...i,ref:l,onClick:_r(i.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&p(m)}),onPointerDown:_r(i.onPointerDown,m=>{c.current=m.pointerType;const _=m.target;_.hasPointerCapture(m.pointerId)&&_.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(p(m),m.preventDefault())}),onKeyDown:_r(i.onKeyDown,m=>{const _=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(_&&m.key===" ")&&p8e.includes(m.key)&&(p(),m.preventDefault())})})})});uge.displayName=lge;var cge="SelectValue",dge=R.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...o}=e,l=p0(cge,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=Gn(t,l.onValueNodeChange);return Xs(()=>{u(c)},[u,c]),g.jsx(Hr.span,{...o,ref:d,style:{pointerEvents:"none"},children:Nge(l.value)?g.jsx(g.Fragment,{children:s}):a})});dge.displayName=cge;var b8e="SelectIcon",fge=R.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return g.jsx(Hr.span,{"aria-hidden":!0,...i,ref:t,children:n||"â¼"})});fge.displayName=b8e;var w8e="SelectPortal",hge=e=>g.jsx(PA,{asChild:!0,...e});hge.displayName=w8e;var Lv="SelectContent",pge=R.forwardRef((e,t)=>{const r=p0(Lv,e.__scopeSelect),[n,i]=R.useState();if(Xs(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Jv.createPortal(g.jsx(mge,{scope:e.__scopeSelect,children:g.jsx(yN.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),a):null}return g.jsx(gge,{...e,ref:t})});pge.displayName=Lv;var Mf=10,[mge,m0]=ox(Lv),x8e="SelectContentImpl",E8e=Sv("SelectContent.RemoveScroll"),gge=R.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:o,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:_,...y}=e,v=p0(Lv,r),[b,w]=R.useState(null),[x,E]=R.useState(null),T=Gn(t,le=>
vendor: 14,284 bytes, line 560
560w(le)),[S,A]=R.useState(null),[C,k]=R.useState(null),M=vN(r),[D,$]=R.useState(!1),V=R.useRef(!1);R.useEffect(()=>{if(b)return iU(b)},[b]),nU();const U=R.useCallback(le=>{const[Te,...be]=M().map(H=>H.ref.current),[we]=be.slice(-1),ae=document.activeElement;for(const H of le)if(H===ae||(H==null||H.scrollIntoView({block:"nearest"}),H===Te&&x&&(x.scrollTop=0),H===we&&x&&(x.scrollTop=x.scrollHeight),H==null||H.focus(),document.activeElement!==ae))return},[M,x]),B=R.useCallback(()=>U([S,b]),[U,S,b]);R.useEffect(()=>{D&&B()},[D,B]);const{onOpenChange:z,triggerPointerDownPosRef:q}=v;R.useEffect(()=>{if(b){let le={x:0,y:0};const Te=we=>{var ae,H;le={x:Math.abs(Math.round(we.pageX)-(((ae=q.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(we.pageY)-(((H=q.current)==null?void 0:H.y)??0))}},be=we=>{le.x<=10&&le.y<=10?we.preventDefault():b.contains(we.target)||z(!1),document.removeEventListener("pointermove",Te),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",Te),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Te),document.removeEventListener("pointerup",be,{capture:!0})}}},[b,z,q]),R.useEffect(()=>{const le=()=>z(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[z]);const[L,K]=Ige(le=>{const Te=M().filter(ae=>!ae.disabled),be=Te.find(ae=>ae.ref.current===document.activeElement),we=Dge(Te,le,be);we&&setTimeout(()=>we.ref.current.focus())}),O=R.useCallback((le,Te,be)=>{const we=!V.current&&!be;(v.value!==void 0&&v.value===Te||we)&&(A(le),we&&(V.current=!0))},[v.value]),N=R.useCallback(()=>b==null?void 0:b.focus(),[b]),X=R.useCallback((le,Te,be)=>{const we=!V.current&&!be;(v.value!==void 0&&v.value===Te||we)&&k(le)},[v.value]),ie=n==="popper"?V$:yge,ee=ie===V$?{side:o,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:_}:{};return g.jsx(mge,{scope:r,content:b,viewport:x,onViewportChange:E,itemRefCallback:O,selectedItem:S,onItemLeave:N,itemTextRefCallback:X,focusSelectedItem:B,selectedItemText:C,position:n,isPositioned:D,searchRef:L,children:g.jsx(gN,{as:E8e,allowPinchZoom:!0,children:g.jsx(pN,{asChild:!0,trapped:v.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:_r(i,le=>{var Te;(Te=v.trigger)==null||Te.focus({preventScroll:!0}),le.preventDefault()}),children:g.jsx(e_,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:g.jsx(ie,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:le=>le.preventDefault(),...y,...ee,onPlaced:()=>$(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_r(y.onKeyDown,le=>{const Te=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!Te&&le.key.length===1&&K(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let we=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(le.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const ae=le.target,H=we.indexOf(ae);we=we.slice(H+1)}setTimeout(()=>U(we)),le.preventDefault()}})})})})})})});gge.displayName=x8e;var T8e="SelectItemAlignedPosition",yge=R.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=p0(Lv,r),s=m0(Lv,r),[o,l]=R.useState(null),[u,c]=R.useState(null),d=Gn(t,T=>c(T)),f=vN(r),h=R.useRef(!1),p=R.useRef(!0),{viewport:m,selectedItem:_,selectedItemText:y,focusSelectedItem:v}=s,b=R.useCallback(()=>{if(a.trigger&&a.valueNode&&o&&u&&m&&_&&y){const T=a.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),C=y.getBoundingClientRect();if(a.dir!=="rtl"){const ae=C.left-S.left,H=A.left-ae,fe=T.left-H,Se=T.width+fe,ne=Math.max(Se,S.width),$e=window.innerWidth-Mf,me=oQ(H,[Mf,Math.max(Mf,$e-ne)]);o.style.minWidth=Se+"px",o.style.left=me+"px"}else{const ae=S.right-C.right,H=window.innerWidth-A.right-ae,fe=window.innerWidth-T.right-H,Se=T.width+fe,ne=Math.max(Se,S.width),$e=window.innerWidth-Mf,me=oQ(H,[Mf,Math.max(Mf,$e-ne)]);o.style.minWidth=Se+"px",o.style.right=me+"px"}const k=f(),M=window.innerHeight-Mf*2,D=m.scrollHeight,$=window.getComputedStyle(u),V=parseInt($.borderTopWidth,10),U=parseInt($.paddingTop,10),B=parseInt($.borderBottomWidth,10),z=parseInt($.paddingBottom,10),q=V+U+D+z+B,L=Math.min(_.offsetHeight*5,q),K=window.getComputedStyle(m),O=parseInt(K.paddingTop,10),N=parseInt(K.paddingBottom,10),X=T.top+T.height/2-Mf,ie=M-X,ee=_.offsetHeight/2,le=_.offsetTop+ee,Te=V+U+le,be=q-Te;if(Te<=X){const ae=k.length>0&&_===k[k.length-1].ref.current;o.style.bottom="0px";const H=u.clientHeight-m.offsetTop-m.offsetHeight,fe=Math.max(ie,ee+(ae?N:0)+H+B),Se=Te+fe;o.style.height=Se+"px"}else{const ae=k.length>0&&_===k[0].ref.current;o.style.top="0px";const fe=Math.max(X,V+m.offsetTop+(ae?O:0)+ee)+be;o.style.height=fe+"px",m.scrollTop=Te-X+m.offsetTop}o.style.margin=`${Mf}px 0`,o.style.minHeight=L+"px",o.style.maxHeight=M+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[f,a.trigger,a.valueNode,o,u,m,_,y,a.dir,n]);Xs(()=>b(),[b]);const[w,x]=R.useState();Xs(()=>{u&&x(window.getComputedStyle(u).zIndex)},[u]);const E=R.useCallback(T=>{T&&p.current===!0&&(b(),v==null||v(),p.current=!1)},[b,v]);return g.jsx(A8e,{scope:r,contentWrapper:o,shouldExpandOnScrollRef:h,onScrollButtonChange:E,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:g.jsx(Hr.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});yge.displayName=T8e;var S8e="SelectPopperPosition",V$=R.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Mf,...a}=e,s=_N(r);return g.jsx(zz,{...s,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});V$.displayName=S8e;var[A8e,aU]=ox(Lv,{}),H$="SelectViewport",vge=R.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=m0(H$,r),s=aU(H$,r),o=Gn(t,a.onViewportChange),l=R.useRef(0);return g.jsxs(g.Fragment,{children:[g.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}),g.jsx(yN.Slot,{scope:r,children:g.jsx(Hr.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:_r(i.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&d){const h=Math.abs(l.current-c.scrollTop);if(h>0){const p=window.innerHeight-Mf*2,m=parseFloat(d.style.minHeight),_=parseFloat(d.style.height),y=Math.max(m,_);if(y<p){const v=y+h,b=Math.min(p,v),w=v-b;d.style.height=b+"px",d.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});vge.displayName=H$;var _ge="SelectGroup",[C8e,P8e]=ox(_ge),M8e=R.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Yc();return g.jsx(C8e,{scope:r,id:i,children:g.jsx(Hr.div,{role:"group","aria-labelledby":i,...n,ref:t})})});M8e.displayName=_ge;var bge="SelectLabel",wge=R.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=P8e(bge,r);return g.jsx(Hr.div,{id:i.id,...n,ref:t})});wge.displayName=bge;var n3="SelectItem",[k8e,xge]=ox(n3),Ege=R.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,o=p0(n3,r),l=m0(n3,r),u=o.value===n,[c,d]=R.useState(a??""),[f,h]=R.useState(!1),p=Gn(t,v=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,v,n,i)}),m=Yc(),_=R.useRef("touch"),y=()=>{i||(o.onValueChange(n),o.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 g.jsx(k8e,{scope:r,value:n,disabled:i,textId:m,isSelected:u,onItemTextChange:R.useCallback(v=>{d(b=>b||((v==null?void 0:v.textContent)??"").trim())},[]),children:g.jsx(yN.ItemSlot,{scope:r,value:n,disabled:i,textValue:c,children:g.jsx(Hr.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:p,onFocus:_r(s.onFocus,()=>h(!0)),onBlur:_r(s.onBlur,()=>h(!1)),onClick:_r(s.onClick,()=>{_.current!=="mouse"&&y()}),onPointerUp:_r(s.onPointerUp,()=>{_.current==="mouse"&&y()}),onPointerDown:_r(s.onPointerDown,v=>{_.current=v.pointerType}),onPointerMove:_r(s.onPointerMove,v=>{var b;_.current=v.pointerType,i?(b=l.onItemLeave)==null||b.call(l):_.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_r(s.onPointerLeave,v=>{var b;v.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:_r(s.onKeyDown,v=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&v.key===" "||(m8e.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});Ege.displayName=n3;var xE="SelectItemText",Tge=R.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,s=p0(xE,r),o=m0(xE,r),l=xge(xE,r),u=_8e(xE,r),[c,d]=R.useState(null),f=Gn(t,y=>d(y),l.onItemTextChange,y=>{var v;return(v=o.itemTextRefCallback)==null?void 0:v.call(o,y,l.value,l.disabled)}),h=c==null?void 0:c.textContent,p=R.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:_}=u;return Xs(()=>(m(p),()=>_(p)),[m,_,p]),g.jsxs(g.Fragment,{children:[g.jsx(Hr.span,{id:l.textId,...a,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Jv.createPortal(a.children,s.valueNode):null]})});Tge.displayName=xE;var Sge="SelectItemIndicator",Age=R.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return xge(Sge,r).isSelected?g.jsx(Hr.span,{"aria-hidden":!0,...n,ref:t}):null});Age.displayName=Sge;var G$="SelectScrollUpButton",Cge=R.forwardRef((e,t)=>{const r=m0(G$,e.__scopeSelect),n=aU(G$,e.__scopeSelect),[i,a]=R.useState(!1),s=Gn(t,n.onScrollButtonChange);return Xs(()=>{if(r.viewport&&r.isPositioned){let o=function(){const u=l.scrollTop>0;a(u)};const l=r.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[r.viewport,r.isPositioned]),i?g.jsx(Mge,{...e,ref:s,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=r;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});Cge.displayName=G$;var q$="SelectScrollDownButton",Pge=R.forwardRef((e,t)=>{const r=m0(q$,e.__scopeSelect),n=aU(q$,e.__scopeSelect),[i,a]=R.useState(!1),s=Gn(t,n.onScrollButtonChange);return Xs(()=>{if(r.viewport&&r.isPositioned){let o=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)<u;a(c)};const l=r.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[r.viewport,r.isPositioned]),i?g.jsx(Mge,{...e,ref:s,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=r;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});Pge.displayName=q$;var Mge=R.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=m0("SelectScrollButton",r),s=R.useRef(null),o=vN(r),l=R.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return R.useEffect(()=>()=>l(),[l]),Xs(()=>{var c;const u=o().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[o]),g.jsx(Hr.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:_r(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:_r(i.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:_r(i.onPointerLeave,()=>{l()})})}),O8e="SelectSeparator",kge=R.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return g.jsx(Hr.div,{"aria-hidden":!0,...n,ref:t})});kge.displayName=O8e;var K$="SelectArrow",N8e=R.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=_N(r),a=p0(K$,r),s=m0(K$,r);return a.open&&s.position==="popper"?g.jsx(Uz,{...i,...n,ref:t}):null});N8e.displayName=K$;var I8e="SelectBubbleInput",Oge=R.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=R.useRef(null),a=Gn(n,i),s=s7(t);return R.useEffect(()=>{const o=i.current;if(!o)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&c){const d=new Event("change",{bubbles:!0});c.call(o,t),o.dispatchEvent(d)}},[s,t]),g.jsx(Hr.select,{...r,style:{...Fce,...r.style},ref:a,defaultValue:t})});Oge.displayName=I8e;function Nge(e){return e===""||e===void 0}function Ige(e){const t=jo(e),r=R.useRef(""),n=R.useRef(0),i=R.useCallback(s=>{const o=r.current+s;t(o),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(o)},[t]),a=R.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return R.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function Dge(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=D8e(e,Math.max(a,0));i.length===1&&(s=s.filter(u=>u!==r));const l=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function D8e(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var L8e=oge,Lge=uge,j8e=dge,R8e=fge,$8e=hge,jge=pge,F8e=vge,Rge=wge,$ge=Ege,B8e=Tge,z8e=Age,Fge=Cge,Bge=Pge,zge=kge;const L1=L8e,j1=j8e,Dy=R.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(Lge,{ref:n,className:Xt("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
560ing-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,g.jsx(R8e,{asChild:!0,children:g.jsx(OA,{className:"h-4 w-4 opacity-50"})})]}));Dy.displayName=Lge.displayName;const Uge=R.forwardRef(({className:e,...t},r)=>g.jsx(Fge,{ref:r,className:Xt("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(m5e,{className:"h-4 w-4"})}));Uge.displayName=Fge.displayName;const Wge=R.forwardRef(({className:e,...t},r)=>g.jsx(Bge,{ref:r,className:Xt("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(OA,{className:"h-4 w-4"})}));Wge.displayName=Bge.displayName;const Ly=R.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>g.jsx($8e,{children:g.jsxs(jge,{ref:i,className:Xt("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:[g.jsx(Uge,{}),g.jsx(F8e,{className:Xt("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),g.jsx(Wge,{})]})}));Ly.displayName=jge.displayName;const U8e=R.forwardRef(({className:e,...t},r)=>g.jsx(Rge,{ref:r,className:Xt("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));U8e.displayName=Rge.displayName;const zl=R.forwardRef(({className:e,children:t,...r},n)=>g.jsxs($ge,{ref:n,className:Xt("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:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(z8e,{children:g.jsx(p5,{className:"h-4 w-4"})})}),g.jsx(B8e,{children:t})]}));zl.displayName=$ge.displayName;const W8e=R.forwardRef(({className:e,...t},r)=>g.jsx(zge,{ref:r,className:Xt("-mx-1 my-1 h-px bg-muted",e),...t}));W8e.displayName=zge.displayName;const V8e=["Land","Retail","Office","Industrial","Medical","Mixed Use","Special Purpose"],vQ=[{id:"122-n-alamo-road",title:"122 N. Alamo Road",address:"122 N. Alamo Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"lease",propertyTypes:["Office","Medical","Retail"],priceDisplay:"$12/SF/year",leaseRate:"$12/SF/year, Modified Gross",buildingSize:3882,availableSpace:"1,404 SF â 2,484 SF",summary:"Two move-in-ready medical or professional spaces near Interstate 2 with strong access and visibility.",highlights:["Building: 3,882 SF","Modified Gross lease structure","Approximately 20 parking spaces","Built in 1988"],spaces:[{label:"Space 1",size:"1,404 SF",note:"Formerly a clinical laboratory"},{label:"Space 2",size:"approx. 2,478â2,484 SF",note:"Formerly a primary-care clinic"}],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/lease/properties/1174340/texas-122-n-alamo",brokerCompany:"Coldwell Banker Commercial Rio Grande Valley",brokerPhone:"956-631-1322",image:"/properties/122-n-alamo-road/cover.jpg",featured:!0},{id:"101-e-crockett-avenue",title:"101 E. Crockett Avenue",address:"101 E. Crockett Avenue",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Retail","Office","Industrial","Mixed Use"],price:13e5,priceDisplay:"$1,300,000",buildingSize:1232,summary:"Commercial investment property near central Alamo with potential retail, office, industrial, or mixed-use applications.",highlights:["Building: approximately 1,232 SF","Near central Alamo"],sourceName:"Medina Real Estate",sourceUrl:"https://www.medinarealestatetx.com/idx/listing/TX-GMABOR/475680/101-E-Crockett-Avenue-Alamo-TX-78516",image:"/properties/101-e-crockett-avenue/cover.jpg",verificationNote:"Confirm availability, lot size, and building measurements with the broker."},{id:"1513-expressway-83",title:"1513 Expressway 83",address:"1513 Expressway 83",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Land","Mixed Use","Retail","Industrial","Office"],price:175e4,priceDisplay:"$1,750,000",acreage:2.64,summary:"2.64-acre commercial tract immediately east of Alamo Walmart with expressway and Duranta Avenue access.",highlights:["Immediately east of Alamo Walmart","Expressway and Duranta Avenue access","Fully fenced","Existing office and garage bay","Potential commercial, retail, industrial, office, automotive, or multifamily use subject to approvals"],sourceName:"Lo
560opNet",sourceUrl:"https://www.loopnet.com/Listing/1513-Expressway-83-Alamo-TX/39786662/",image:"/properties/1513-expressway-83/cover.jpg",featured:!0},{id:"los-alamos-plaza-427-e-duranta",title:"Los Alamos Plaza â 427 E. Duranta Avenue",address:"427 E. Duranta Avenue",city:"Alamo",state:"TX",zip:"78516",transactionType:"lease",propertyTypes:["Medical","Office"],priceDisplay:"$18/SF/year NNN",leaseRate:"$18/SF/year NNN",buildingSize:42697,availableSpace:"1,920 â 7,165 SF",summary:"Medical and professional office suites in an established Alamo plaza with ample parking, close to Interstate 2.",highlights:["Building: 42,697 SF","Ample parking","Close to Interstate 2"],spaces:[{label:"Suite",size:"1,920 SF"},{label:"Suite",size:"4,584 SF"},{label:"Suite",size:"4,814 SF"},{label:"Suite",size:"7,165 SF"}],brokerName:"Shannon Dopp",brokerCompany:"Coldwell Banker Commercial Rio Grande Valley",brokerPhone:"956-451-2030",brokerEmail:"[email protected]",sourceName:"Coldwell Banker Commercial",sourceUrl:"https://www.cbcworldwide.com/properties/XG5H6M/427-e-duranta-avenue-105",image:"/properties/los-alamos-plaza-427-e-duranta/cover.jpg",featured:!0},{id:"705-e-business-83",title:"705 E. Business 83",address:"705 E. Business 83",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Retail","Industrial","Land"],price:12e5,priceDisplay:"$1,200,000",acreage:1.1,buildingSize:25521,summary:"Business 83 property with potential retail, industrial, or redevelopment uses.",highlights:["Approximately 1.10 acres","Approximately 25,521 SF of improvements"],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/properties/2553826/texas-705-east-business-83",brokerCompany:"Coldwell Banker Commercial Rio Grande Valley",brokerPhone:"956-631-1322",image:"/properties/705-e-business-83/cover.jpg"},{id:"611-e-us-highway-business-83",title:"611 E. US Highway Business 83",address:"611 E. US Highway Business 83",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Retail","Industrial"],price:5e5,priceDisplay:"$500,000",acreage:.58,buildingSize:5723,summary:"Commercial building suited for retail, automotive, service, warehouse, or light-industrial use.",highlights:["Building: 5,723 SF","Approximately 0.58 acres"],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/properties/2555136/texas-611-e-us-highway-business-83",brokerCompany:"Coldwell Banker Commercial Rio Grande Valley",brokerPhone:"956-631-1322",image:"/properties/611-e-us-highway-business-83/cover.jpg"},{id:"w-ridge-road-pad-sites",title:"W. Ridge Road Commercial Pad Sites",address:"Southwest corner of Ridge Road and S. Alamo Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Land"],price:522700,priceDisplay:"$522,700 per approx. one-acre pad",acreage:1,summary:"Commercially zoned pad sites at a high-activity Alamo corner adjacent to Stripes and McDonald's.",highlights:["Approximately 1â1.2 acres per pad","Commercial zoning","Four pad sites reported available","Adjacent to Stripes and McDonald's","Approximately 165 by 265 feet per proposed lot"],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/properties/1491490/texas-000-w-ridge-road",brokerName:"Rogelio Rivera",image:"/properties/w-ridge-road-pad-sites/cover.jpg"},{id:"503-state-highway-495",title:"503 State Highway 495",address:"503 State Highway 495",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Special Purpose"],price:625e4,priceDisplay:"$6,250,000",acreage:1.45,buildingSize:13120,summary:"Income-producing event center suitable for weddings, quinceañeras, corporate events, private parties, and hospitality operations.",highlights:["Building: 13,120 SF","Land: 1.45 acres","Built in 2013","Approximately 120 parking spaces","MLS 512577"],sourceUrl:"https://www.weichert.com/137516214/",brokerCompany:"Nova Realty Enterprise LLC",brokerEmail:"[email protected]",image:"/properties/503-state-highway-495/cover.jpg",verificationNote:"Confirm current information with the listing broker."},{id:"240-e-frontage-road",title:"240 E. Frontage Road",address:"240 E. Frontage Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Industrial","Warehouse","Office"],price:695e4,priceDisplay:"$6,950,000",acreage:3.8,buildingSize:22681,summary:"Industrial and manufacturing campus with Interstate 2 frontage, truck access, loading areas, and secure fencing.",highlights:["Land: 3.8 acres","Approximately 22,681 SF","Approximately 11,954 SF of combined office and warehouse space","6,096 SF metal warehouse","1,680 SF workshop","Approximately 89,000 SF of concrete paving","Approximately 200 parking space
560s","Interstate 2 frontage"],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/properties/2603667/texas-240-e-frontage-road",brokerCompany:"Coldwell Banker La Mansion Real Estate",brokerPhone:"956-631-1322",image:"/properties/240-e-frontage-road/cover.jpg",verificationNote:"Pricing subject to verification. An older flyer showed $6,450,000.",featured:!0},{id:"101-n-alamo-road",title:"101 N. Alamo Road",address:"101 N. Alamo Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Mixed Use","Retail","Special Purpose","Multifamily"],price:11e5,priceDisplay:"$1,100,000",acreage:.471,buildingSize:7567,summary:"Mixed-use property with existing tenants and income, combining apartments, commercial spaces, and on-site laundry.",highlights:["Building: 7,567 SF","Approximately 0.471 acres","Built in 1988","Approximately 16 parking spaces","Four apartments","One manufactured home","Three commercial spaces","On-site laundry","Existing tenants and income","Owner financing advertised"],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/properties/1417088/texas-101-n-alamo-road",brokerCompany:"Pinnacle Realty Advisors",image:"/properties/101-n-alamo-road/cover.jpg"},{id:"847-s-alamo-road",title:"847 S. Alamo Road",address:"847 S. Alamo Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Retail","Office","Medical"],price:2999e3,priceDisplay:"$2,999,000",acreage:1.72,buildingSize:10050,summary:"Four freestanding buildings on a corner site with dual access from Alamo Road and Ridge Road.",highlights:["Building: 10,050 SF","Land: 1.72 acres","Built in 2017","Approximately 31 parking spaces","Four freestanding buildings","Access from Alamo Road and Ridge Road","Storage, workshop, and motorized gate"],sourceUrl:"https://www.gmar.org/listings/236752634/847%2BS%2BAlamo%2BRoad%2C%2BAlamo%2C%2BTX%2B78516?sr_vendor=Gmar&view=print",brokerName:"Leticia Garza",brokerCompany:"Coldwell Banker Commercial Rio Grande Valley",brokerPhone:"956-631-1322",brokerEmail:"[email protected]",image:"/properties/847-s-alamo-road/cover.jpg"},{id:"1300-w-us-highway-business-83",title:"1300 W. US Highway Business 83",address:"1300 W. US Highway Business 83",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale-lease",propertyTypes:["Industrial","Warehouse"],price:21e5,priceDisplay:"$2,100,000",leaseRate:"$0.96/SF/month",acreage:2,buildingSize:24901,summary:"Dock-high warehouse and cold-storage facility with office space, truck-loading doors, and a covered loading area.",highlights:["Building: 24,901 SF","Approximately 2 acres","Office: 3,443 SF","Warehouse and cold storage: approximately 21,454 SF","Approximately 51 parking spaces","Dock-high warehouse","Four truck-loading doors","Covered loading area"],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/lease/properties/1208962/texas-1300-w-us-highway-business-83",brokerCompany:"Equity Assets Realty",brokerPhone:"956-802-3375",image:"/properties/1300-w-us-highway-business-83/cover.jpg",verificationNote:"Confirm whether it remains available for sale, lease, or both."},{id:"former-walgreens-510-n-alamo-road",title:"Former Walgreens â 510 N. Alamo Road",address:"510 N. Alamo Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"lease",propertyTypes:["Retail"],priceDisplay:"$13/SF/year NNN",leaseRate:"$13/SF/year NNN (approximately $189,150 annually)",acreage:1.39,buildingSize:14550,status:"Sublease",summary:"Freestanding retail building on a signalized corner with a drive-through and pylon sign with digital panel.",highlights:["Building: 14,550 SF","Land: 1.39 acres","Built in 2009","Approximately 63 parking spaces","Term through September 30, 2038","Drive-through","Pylon sign with digital panel","Signalized corner"],sourceName:"LoopNet",sourceUrl:"https://www.loopnet.com/Listing/510-N-Alamo-Rd-Alamo-TX/40741610/",brokerName:"Matthew Mousavi",brokerCompany:"SRS Capital Markets (SRS Real Estate Partners)",image:"/properties/former-walgreens-510-n-alamo-road/cover.jpg",featured:!0},{id:"206-tower-road",title:"206 Tower Road",address:"206 Tower Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Land"],price:28e4,priceDisplay:"$280,000",acreage:.732,summary:"High-visibility commercial lot near Business 83, residential neighborhoods, and schools.",highlights:["Approximately 0.732 acres","MLS 501876"],sourceName:"LandSearch",sourceUrl:"https://www.landsearch.com/properties/206-tower-rd-alamo-tx-78516/5196393",brokerName:"Jaime (Lee) Gonzalez",brokerCompany:"Keller Williams Realty RGV",brokerPhone:"956-928-11
56055",image:"/properties/206-tower-road/cover.jpg"},{id:"alamo-townsite-plaza-1037-w-duranta",title:"Alamo Townsite Plaza â 1037 W. Duranta Avenue",address:"1037 W. Duranta Avenue",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Retail","Office","Restaurant","Investment"],price:975e3,priceDisplay:"$975,000",acreage:.522,buildingSize:4622,summary:"Income-producing retail and restaurant property with a leased drive-through restaurant space in a high-traffic Alamo location.",highlights:["Approximately 4,622 SF building, built in 2005","Approximately 0.522 acres","Leased restaurant space with drive-through, plus additional retail","Roughly 30 parking spaces","High-traffic W. Duranta Avenue location"],sourceName:"MLS# 493244",sourceUrl:"https://www.bicrealtors.com/listing/493244-1037-w-duranta-avenue-alamo-tx-78516/",brokerCompany:"RE/MAX Platinum",brokerPhone:"956-668-8555",image:"/properties/alamo-townsite-plaza-1037-w-duranta/cover.jpg",imageNote:"Primary photo from the property listing.",verificationNote:"Price and square footage are from MLS# 493244 ($975,000, 4,622 SF); earlier materials showed a higher price and a smaller building. Confirm current pricing, leases, and measurements with the broker."},{id:"alamo-land-w-nebraska-road",title:"Alamo Land â W. Nebraska Road",address:"W. Nebraska Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Land","Multifamily"],price:1399e3,priceDisplay:"$1,399,000",acreage:19.4,summary:"19.4-acre development tract minutes from Interstate 2, schools, healthcare, and shopping.",highlights:["19.4 acres","Development tract","Approved notice to proceed for a multifamily project stated in the supplied flyer","Water and sewer infrastructure reported available"],brokerName:"Michael Pacheco (956-739-5172) and Eric Ledé (956-223-0586)",brokerCompany:"Coldwell Banker Commercial Rio Grande Valley",brokerPhone:"956-739-5172",sourceName:"Coldwell Banker (MLS# 506394)",sourceUrl:"https://www.coldwellbanker.com/tx/alamo/000-w-nebraska-rd/lid-P00800000HC1Fp01UpbtgwR5oe7X6doDnu7VwAnl",image:"/properties/alamo-land-w-nebraska-road/cover.jpg",imageNote:"Aerial from the listing showing the outlined 19.4-acre tract at Nebraska Road and Interstate 2.",verificationNote:"Listed as MLS# 506394 at $1,399,000. Confirm entitlements, utilities, and current availability with the broker."},{id:"alamo-corners-1451-w-duranta",title:"Alamo Corners â 1451 W. Duranta Avenue",address:"1451 W. Duranta Avenue",city:"Alamo",state:"TX",zip:"78516",transactionType:"lease",propertyTypes:["Retail"],priceDisplay:"Contact for pricing",leaseRate:"Contact for pricing â flyer reports NNN of approximately $7.30/SF",buildingSize:66704,availableSpace:"1,152 â 3,000 SF",summary:"Walmart shadow-anchored center with Dollar Tree and Planet Fitness anchors, less than 1,000 feet from Interstate 2.",highlights:["Building: 66,704 SF","Shadow-anchored by Walmart","Dollar Tree and Planet Fitness anchors","Less than 1,000 feet from Interstate 2"],spaces:[{label:"Restaurant end cap",size:"3,000 SF",note:"Second generation, with drive-through"},{label:"Retail",size:"1,152 SF",note:"Second generation"},{label:"Future retail",size:"approx. 1,540 SF"},{label:"Medical",size:"2,167 SF",note:"Second generation"}],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/lease/properties/927606/texas-alamo-corners",brokerCompany:"Coldwell Banker Commercial Rio Grande Valley",brokerPhone:"956-631-1322",image:"/properties/alamo-corners-1451-w-duranta/cover.jpg",featured:!0},{id:"315-e-expressway-83",title:"315 E. Expressway 83",address:"315 E. Expressway 83",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Land"],priceDisplay:"Contact broker for pricing",acreage:16.9,summary:"Large commercial development tract with Interstate 2 visibility and access, suited to retail, hotel, restaurant, theater, community-center, or mixed development.",highlights:["Approximately 16.9â17.47 acres","Interstate 2 visibility and access","Commercial zoning","Located within an Alamo tax-increment zone according to prior materials"],sourceName:"Lo
560opNet",sourceUrl:"https://www.loopnet.com/Listing/315-E-Expressway-83-Alamo-TX/31141893/",verificationNote:'Listing marketed as "16.9ac Frontage to Hwy 83" (APN A1800-00-037-0005-00 / -06). Confirm current availability and pricing with the broker.',image:"/properties/315-e-expressway-83/cover.jpg",imageNote:"Aerial from the listing showing the marked tract boundaries along the Interstate 2 / US-83 frontage."},{id:"102-s-9th-street",title:"102 S. 9th Street",address:"102 S. 9th Street",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Retail","Mixed Use","Multifamily"],price:369999,priceDisplay:"$369,999",acreage:.4,buildingSize:7440,summary:"Mixed-use corner property near downtown Alamo combining three retail spaces and four apartment units.",highlights:["Building: 7,440 SF","Lot: approximately 17,463 SF","Built in 1978","Approximately 15 parking spaces","Three retail spaces","Four apartment units","Corner of Business 83 and S. 9th Street"],sourceName:"Crexi",sourceUrl:"https://www.crexi.com/properties/1794836/texas-102-s-9th-street-s",brokerCompany:"Capital Advisors Real Estate Group",brokerPhone:"956-322-3669",image:"/properties/102-s-9th-street/cover.jpg"},{id:"cinemark-theater-pad-sites",title:"Cinemark Theater Commercial Pad Sites",address:"Northeast quadrant of Tower Road and Interstate 2",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale",propertyTypes:["Land"],price:1041984,priceDisplay:"$1,041,984 â $1,514,150 per pad",acreage:1.6,summary:"Four commercial pad sites at the Cinemark theater development, intended for QSRs, restaurants, and complementary commercial development.",highlights:["Northeast quadrant of Tower Road and Interstate 2","Intended for QSRs, restaurants, and complementary commercial development","2020 traffic counts â Interstate 2: 106,127","2020 traffic counts â N. Tower Road: 10,349","2020 traffic counts â S. Tower Road: 11,943"],lots:[{label:"Lot 1",size:"1.23 acres",price:"$1,070,940",url:"https://www.crexi.com/properties/1813726/texas-cinemark-theater-pad-sitesâlot-1"},{label:"Lot 2",size:"1 acre",price:"$1,041,984",url:"https://www.crexi.com/properties/1813754/texas-cinemark-theater-pad-siteâlot-2"},{label:"Lot 3",size:"1.03 acres",price:"$1,081,920",url:"https://www.crexi.com/properties/1813787/texas-cinemark-theater-pad-sitesâlot-3"},{label:"Lot 4",size:"1.6 acres",price:"$1,514,150",url:"https://www.crexi.com/properties/TX/Alamo/Land"}],brokerName:"Randy Summers",brokerCompany:"Davis Equity Realty",brokerPhone:"956-969-8648",sourceName:"Crexi",sourceUrl:"https://www.crexi.com/properties/TX/Alamo/Land",image:"/properties/cinemark-theater-pad-sites/cover.jpg",verificationNote:"Lot 4 links to the general Crexi Alamo land search until an exact verified URL is provided.",featured:!0},{id:"heights-at-alamo-crossings",title:"Heights at Alamo / Alamo Crossings",address:"Southwest quadrant of FM 495 and N. Alamo Road",city:"Alamo",state:"TX",zip:"78516",transactionType:"sale-lease",propertyTypes:["Retail","Land","Multifamily"],priceDisplay:"Retail from $24/SF/year; pad sites from $17/SF",leaseRate:"Approximately $24â$30/SF/year, NNN approximately $5.20/SF",buildingSize:36315,availableSpace:"1,100 â 1,826 SF retail units",summary:"New retail development and commercial pad sites one block from Interstate 2, with multifamily fourplex lots also shown as available.",highlights:["Approximately 36,315 SF new retail development","Units approximately 1,100â1,826 SF","Pick-up-window and patio opportunities","One block from Interstate 2","Approximately 237 total parking spaces reported","Fourplex lots shown as available â contact broker for current availability and pricing"],lots:[{label:"Lot 89-B",size:"13,145 SF",price:"$17/SF"},{label:"Lot 90-A",size:"55,800 SF",price:"$17/SF"},{label:"Lot 90-B",size:"55,800 SF",price:"$17/SF"},{label:"Lot 91",size:"35,561 SF",price:"$18/SF"}],brokerName:"Sergio A. Adame, CCIM",brokerCompany:"API Real Estate",brokerPhone:"956-412-1412",brokerEmail:"[email protected]",sourceName:"API Real Estate",sourceUrl:"https://www.apirealestate.com/",image:"/properties/heights-at-alamo-crossings/cover.jpg",featured:!0}],H8e="Property information is provided for general informational purposes and was obtained from listing brokers and third-party sources believed to be reliable. Alamo EDC does not represent or warrant that pricing, measurements, zoning, availability, or other details are complete or current. Prospective buyers and tenants should independently verify all information with the property owner, listing broker, and applicable governmental authorities.",_Q={ke
560yword:"",transaction:"all",type:"all",price:"all",sort:"featured"},G8e=[{value:"all",label:"Any price"},{value:"0-500000",label:"Under $500,000"},{value:"500000-1000000",label:"$500,000 â $1M"},{value:"1000000-3000000",label:"$1M â $3M"},{value:"3000000-",label:"Over $3M"},{value:"lease",label:"Lease listings only"}],q8e=({filters:e,onChange:t,onClear:r,resultCount:n})=>{const i=(s,o)=>t({...e,[s]:o}),a=e.keyword!==""||e.transaction!=="all"||e.type!=="all"||e.price!=="all"||e.sort!=="featured";return g.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-soft p-4 md:p-6",children:[g.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-5",children:[g.jsxs("div",{className:"lg:col-span-2",children:[g.jsx(vs,{htmlFor:"property-search",className:"text-sm font-medium",children:"Search"}),g.jsxs("div",{className:"relative mt-1.5",children:[g.jsx(P5e,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),g.jsx(Ya,{id:"property-search",value:e.keyword,onChange:s=>i("keyword",s.target.value),placeholder:"Keyword or address",className:"pl-9"})]})]}),g.jsxs("div",{children:[g.jsx(vs,{htmlFor:"filter-transaction",className:"text-sm font-medium",children:"Transaction"}),g.jsxs(L1,{value:e.transaction,onValueChange:s=>i("transaction",s),children:[g.jsx(Dy,{id:"filter-transaction",className:"mt-1.5",children:g.jsx(j1,{})}),g.jsxs(Ly,{className:"bg-popover z-50",children:[g.jsx(zl,{value:"all",children:"All"}),g.jsx(zl,{value:"sale",children:"For Sale"}),g.jsx(zl,{value:"lease",children:"For Lease"})]})]})]}),g.jsxs("div",{children:[g.jsx(vs,{htmlFor:"filter-type",className:"text-sm font-medium",children:"Property type"}),g.jsxs(L1,{value:e.type,onValueChange:s=>i("type",s),children:[g.jsx(Dy,{id:"filter-type",className:"mt-1.5",children:g.jsx(j1,{})}),g.jsxs(Ly,{className:"bg-popover z-50",children:[g.jsx(zl,{value:"all",children:"All"}),V8e.map(s=>g.jsx(zl,{value:s,children:s},s))]})]})]}),g.jsxs("div",{children:[g.jsx(vs,{htmlFor:"filter-price",className:"text-sm font-medium",children:"Price"}),g.jsxs(L1,{value:e.price,onValueChange:s=>i("price",s),children:[g.jsx(Dy,{id:"filter-price",className:"mt-1.5",children:g.jsx(j1,{})}),g.jsx(Ly,{className:"bg-popover z-50",children:G8e.map(s=>g.jsx(zl,{value:s.value,children:s.label},s.value))})]})]})]}),g.jsxs("div",{className:"mt-4 flex flex-col sm:flex-row sm:items-end gap-4 sm:justify-between",children:[g.jsxs("div",{className:"w-full sm:w-64",children:[g.jsx(vs,{htmlFor:"filter-sort",className:"text-sm font-medium",children:"Sort by"}),g.jsxs(L1,{value:e.sort,onValueChange:s=>i("sort",s),children:[g.jsx(Dy,{id:"filter-sort",className:"mt-1.5",children:g.jsx(j1,{})}),g.jsxs(Ly,{className:"bg-popover z-50",children:[g.jsx(zl,{value:"featured",children:"Featured"}),g.jsx(zl,{value:"price-asc",children:"Price: Low to High"}),g.jsx(zl,{value:"price-desc",children:"Price: High to Low"}),g.jsx(zl,{value:"acreage",children:"Acreage"}),g.jsx(zl,{value:"building",children:"Building Size"})]})]})]}),g.jsxs("div",{className:"flex items-center justify-between sm:justify-end gap-4",children:[g.jsxs("p",{className:"text-sm text-muted-foreground","aria-live":"polite",children:[g.jsx("span",{className:"font-semibold text-foreground",children:n})," ",n===1?"property":"properties"," matching"]}),a&&g.jsxs(gr,{variant:"outline",size:"sm",onClick:r,children:[g.jsx(Xg,{className:"mr-1.5 h-4 w-4"}),"Clear filters"]})]})]})]})},K8e=kA("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 Hp({className:e,variant:t,...r}){return g.jsx("div",{className:Xt(K8e({variant:t}),e),...r})}const Y8e=e=>{const t=e.propertyTypes[0];return t==="Land"?T5e:t==="Retail"||t==="Restaurant"?dde:t==="Industrial"||t==="Warehouse"?L5e:t==="Medical"?N5e:lde},Vge=e=>e==="sale"?"For Sale":e==="lease"?"For Lease":"For Sale / Lease",X8e=e=>
560e.toLocaleString("en-US"),Hge=e=>{const t=[];return e.acreage&&t.push(`${e.acreage} acres`),e.buildingSize&&t.push(`${X8e(e.buildingSize)} SF building`),e.availableSpace&&t.push(`${e.availableSpace} available`),t},Q8e=({property:e,onOpen:t})=>{const r=Y8e(e),n=Hge(e);return g.jsxs("article",{className:"property-card group flex flex-col h-full bg-card border border-border rounded-xl overflow-hidden shadow-soft transition-all duration-300 hover:-translate-y-1 hover:shadow-lg focus-within:-translate-y-1",children:[g.jsxs("div",{className:"relative aspect-[16/10] overflow-hidden bg-muted",children:[e.image?g.jsx("img",{src:e.image,alt:`${e.title}, commercial property in Alamo, Texas`,loading:"lazy",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-[1.04]"}):g.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center gap-2 bg-gradient-to-br from-primary/10 via-muted to-secondary/10","aria-hidden":"true",children:[g.jsx(r,{className:"h-10 w-10 text-primary/60"}),g.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:e.propertyTypes[0]})]}),e.imageNote&&g.jsx("span",{className:"absolute bottom-2 right-2 rounded bg-background/85 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.imageNote.startsWith("Google Maps")?"Map view":e.imageNote.toLowerCase().includes("aerial")?"Listing aerial":"Listing photo"}),g.jsxs("div",{className:"absolute top-3 left-3 flex flex-wrap gap-2",children:[g.jsx(Hp,{className:"property-badge bg-primary text-primary-foreground",children:Vge(e.transactionType)}),g.jsx(Hp,{variant:"secondary",className:"property-badge",children:e.propertyTypes[0]})]})]}),g.jsxs("div",{className:"flex flex-col flex-1 p-5 border-l-4 border-l-primary/70",children:[g.jsx("h3",{className:"text-lg font-bold text-foreground",children:e.title}),e.address&&g.jsxs("p",{className:"mt-1 flex items-start gap-1.5 text-sm text-muted-foreground",children:[g.jsx(Yh,{className:"h-4 w-4 mt-0.5 flex-shrink-0 text-secondary"}),g.jsxs("span",{children:[e.address,", ",e.city,", ",e.state,e.zip?` ${e.zip}`:""]})]}),g.jsx("p",{className:"mt-3 text-xl font-bold text-primary",children:e.priceDisplay}),n.length>0&&g.jsx("ul",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-sm text-muted-foreground",children:n.map(i=>g.jsxs("li",{className:"flex items-center gap-1.5",children:[g.jsx(A5e,{className:"h-3.5 w-3.5 text-secondary"}),i]},i))}),g.jsx("p",{className:"mt-3 text-sm text-muted-foreground line-clamp-3",children:e.summary}),g.jsx("div",{className:"mt-auto pt-5",children:g.jsx(gr,{className:"w-full",onClick:()=>t(e),children:"View Property Details"})})]})]})};var bN="Dialog",[Gge,qge]=Ou(bN),[Z8e,nh]=Gge(bN),Kge=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,o=R.useRef(null),l=R.useRef(null),[u,c]=rd({prop:n,defaultProp:i??!1,onChange:a,caller:bN});return g.jsx(Z8e,{scope:t,triggerRef:o,contentRef:l,contentId:Yc(),titleId:Yc(),descriptionId:Yc(),open:u,onOpenChange:c,onOpenToggle:R.useCallback(()=>c(d=>!d),[c]),modal:s,children:r})};Kge.displayName=bN;var Yge="DialogTrigger",Xge=R.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=nh(Yge,r),a=Gn(t,i.triggerRef);return g.jsx(Hr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":lU(i.open),...n,ref:a,onClick:_r(e.onClick,i.onOpenToggle)})});Xge.displayName=Yge;var sU="DialogPortal",[J8e,Qge]=Gge(sU,{forceMount:void 0}),Zge=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=nh(sU,t);return g.jsx(J8e,{scope:t,forceMount:r,children:R.Children.map(n,s=>g.jsx(cc,{present:r||a.open,children:g.jsx(PA,{asChild:!0,container:i,children:s})}))})};Zge.displayName=sU;var i3="DialogOverlay",Jge=R.forwardRef((e,t)=>{const r=Qge(i3,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=nh(i3,e.__scopeDialog);return a.modal?g.jsx(cc,{present:n||a.open,children:g.jsx(tBe,{...i,ref:t})}):null});Jge.displayName=i3;var eBe=Sv("DialogOverlay.RemoveScroll"),tBe=R.forwardRef((e,t)=>
vendor: 4,697 bytes, lines 560-564
560{const{__scopeDialog:r,...n}=e,i=nh(i3,r);return g.jsx(gN,{as:eBe,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(Hr.div,{"data-state":lU(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),jv="DialogContent",e0e=R.forwardRef((e,t)=>{const r=Qge(jv,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=nh(jv,e.__scopeDialog);return g.jsx(cc,{present:n||a.open,children:a.modal?g.jsx(rBe,{...i,ref:t}):g.jsx(nBe,{...i,ref:t})})});e0e.displayName=jv;var rBe=R.forwardRef((e,t)=>{const r=nh(jv,e.__scopeDialog),n=R.useRef(null),i=Gn(t,r.contentRef,n);return R.useEffect(()=>{const a=n.current;if(a)return iU(a)},[]),g.jsx(t0e,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_r(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:_r(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,o=s.button===0&&s.ctrlKey===!0;(s.button===2||o)&&a.preventDefault()}),onFocusOutside:_r(e.onFocusOutside,a=>a.preventDefault())})}),nBe=R.forwardRef((e,t)=>{const r=nh(jv,e.__scopeDialog),n=R.useRef(!1),i=R.useRef(!1);return g.jsx(t0e,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(o=r.triggerRef.current)==null||o.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),t0e=R.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,o=nh(jv,r),l=R.useRef(null),u=Gn(t,l);return nU(),g.jsxs(g.Fragment,{children:[g.jsx(pN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:g.jsx(e_,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":lU(o.open),...s,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(aBe,{titleId:o.titleId}),g.jsx(oBe,{contentRef:l,descriptionId:o.descriptionId})]})]})}),oU="DialogTitle",r0e=R.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=nh(oU,r);return g.jsx(Hr.h2,{id:i.titleId,...n,ref:t})});r0e.displayName=oU;var n0e="DialogDescription",i0e=R.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=nh(n0e,r);return g.jsx(Hr.p,{id:i.descriptionId,...n,ref:t})});i0e.displayName=n0e;var a0e="DialogClose",s0e=R.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=nh(a0e,r);return g.jsx(Hr.button,{type:"button",...n,ref:t,onClick:_r(e.onClick,()=>i.onOpenChange(!1))})});s0e.displayName=a0e;function lU(e){return e?"open":"closed"}var o0e="DialogTitleWarning",[iBe,l0e]=_ke(o0e,{contentName:jv,titleName:oU,docsSlug:"dialog"}),aBe=({titleId:e})=>{const t=l0e(o0e),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 561 562If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 563 564For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return R.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},sBe="DialogDescriptionWarning",oBe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${l0e(sBe).contentName}}.`;return R.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},u0e=Kge,c0e=Xge,d0e=Zge,uU=Jge,cU=e0e,dU=r0e,fU=i0e,hU=s0e;const wN=u0e,lBe=c0e,uBe=d0e,f0e=R.forwardRef(({className:e,...t},r)=>g.jsx(uU,{ref:r,className:Xt("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}));f0e.displayName=uU.displayName;const WA=R.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(uBe,{children:[g.jsx(f0e,{}),g.jsxs(cU,{ref:n,className:Xt("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:rou
564nded-lg",e),...r,children:[t,g.jsxs(hU,{className:"absolute right-4 top-4 rounded-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:[g.jsx(Xg,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));WA.displayName=cU.displayName;const VA=({className:e,...t})=>g.jsx("div",{className:Xt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});VA.displayName="DialogHeader";const h0e=({className:e,...t})=>g.jsx("div",{className:Xt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});h0e.displayName="DialogFooter";const HA=R.forwardRef(({className:e,...t},r)=>g.jsx(dU,{ref:r,className:Xt("text-lg font-semibold leading-none tracking-tight",e),...t}));HA.displayName=dU.displayName;const pU=R.forwardRef(({className:e,...t},r)=>g.jsx(fU,{ref:r,className:Xt("text-sm text-muted-foreground",e),...t}));pU.displayName=fU.displayName;const cBe=({property:e,open:t,onOpenChange:r})=>{const n=R.useRef(null);if(R.useEffect(()=>{if(!t||!n.current||UA())return;const a=Qu.context(()=>{Qu.from(".detail-fact",{opacity:0,y:12,duration:.45,stagger:.05,ease:"power2.out",clearProps:"all"})},n);return()=>a.revert()},[t,e==null?void 0:e.id]),!e)return null;const i=Hge(e);return g.jsx(wN,{open:t,onOpenChange:r,children:g.jsxs(WA,{className:"max-w-2xl max-h-[90vh] overflow-y-auto bg-background",children:[g.jsxs(VA,{children:[g.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[g.jsx(Hp,{className:"bg-primary text-primary-foreground",children:Vge(e.transactionType)}),e.propertyTypes.map(a=>g.jsx(Hp,{variant:"secondary",children:a},a))]}),g.jsx(HA,{className:"text-xl md:text-2xl",children:e.title}),g.jsxs(pU,{children:[e.address?`${e.address}, `:"",e.city,", ",e.state,e.zip?` ${e.zip}`:""]})]}),g.jsxs("div",{ref:n,className:"space-y-6",children:[g.jsx("div",{className:"detail-fact",children:e.image?g.jsxs(g.Fragment,{children:[g.jsx("img",{src:e.image,alt:e.title,loading:"lazy",className:"w-full h-52 md:h-64 object-cover rounded-xl border border-border"}),e.imageNote&&g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:e.imageNote})]}):g.jsxs("div",{className:"w-full h-52 md:h-64 rounded-xl border border-border flex flex-col items-center justify-center gap-2 bg-gradient-to-br from-primary/10 via-muted to-secondary/10",children:[g.jsx(w5e,{className:"h-9 w-9 text-primary/60","aria-hidden":"true"}),g.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e.propertyTypes[0]}),g.jsx("span",{className:"text-xs text-muted-foreground",children:"Photo not available â contact the broker"})]})}),g.jsxs("div",{className:"detail-fact",children:[g.jsx("p",{className:"text-2xl font-bold text-primary",children:e.priceDisplay}),e.leaseRate&&g.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Lease rate: ",e.leaseRate]})]}),i.length>0&&g.jsx("div",{className:"detail-fact grid grid-cols-1 sm:grid-cols-3 gap-3",children:i.map(a=>g.jsx("div",{className:"rounded-lg bg-muted/60 px-3 py-2 text-sm text-foreground",children:a},a))}),g.jsx("p",{className:"detail-fact text-sm text-muted-foreground",children:e.summary}),e.highlights&&e.highlights.length>0&&g.jsxs("div",{className:"detail-fact",children:[g.jsx("h4",{className:"font-semibold text-foreground mb-2",children:"Highlights"}),g.jsx("ul",{className:"space-y-1.5 text-sm text-muted-foreground",children:e.highlights.map(a=>g.jsxs("li",{className:"flex gap-2",children:[g.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 rounded-full bg-secondary flex-shrink-0"}),a]},a))})]}),e.spaces&&e.spaces.length>0&&g.jsxs("div",{className:"detail-fact",children:[g.jsx("h4",{className:"font-semibold text-foreground mb-2",children:"Available spaces"}),g.jsx("ul",{className:"divide-y divide-border rounded-lg border border-border",children:e.spaces.map((a,s)=>g.jsxs("li",{className:"px-3 py-2 text-sm",children:[g.jsx("span",{className:"font-medium text-foreground",children:a.label}),a.size?g.jsxs("span",{className:"text-muted-foreground",children:[" â ",a.size]}):null,a.note?g.jsx("span",{className:"block text-xs text-muted-foreground",children:a.note}):null]},`${a.label}-${s}`))})]}),e.lots&&e.lots.length>0&&g.jsxs("div",{className:"detail-fact",children:[g.jsx("h4",{className:"font-semibold text-foreground mb-2",children:"Pad sites / lots"}),g.jsx("ul",{className:"divide-y divide-border rounded-lg border border-border",children:e.lots.map(a=>g.jsxs("li",{className:"px-3 py-2 text-sm flex flex-wrap items-center justify-between gap-2",children:[g.jsxs("span",{children:[g.jsx("span",{className:"font-medium text-foreground",children:a.label}),a.size?g.jsxs("span",{className:"text-muted-foreground",children:[" â ",a.size]}):null,a.price?g.jsxs("span",{className:"text-muted-foreground",children:[" · ",a.price]}):null]}),a.url&&g.jsx("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80",children:"View listing"})]},a.label))})]}),(e.brokerName||e.brokerCompany||e.sourceName)&&g.jsxs("div",{className:"detail-fact rounded-lg bg-muted/50 p-4",children:[g.jsx("h4",{className:"font-semibold text-foreground mb-2",children:"Listing contact & source"}),g.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[e.brokerName&&g.jsx("p",{children:e.brokerName}),e.brokerCompany&&g.jsx("p",{children:e.brokerCompany}),e.brokerPhone&&g.jsxs("p",{className:"flex items-center gap-2",children:[g.jsx(c0,{className:"h-4 w-4 text-secondary"}),g.jsx("a",{href:`tel:${e.brokerPhone.replace(/[^\d]/g,"")}`,className:"hover:text-primary",children:e.brokerPhone})]}),e.brokerEmail&&g.jsxs("p",{className:"flex items-center gap-2",children:[g.jsx(IA,{className:"h-4 w-4 text-secondary"}),g.jsx("a",{href:`mailto:${e.brokerEmail}`,className:"hover:text-primary",children:e.brokerEmail})]}),e.sourceName&&g.jsxs("p",{children:["Source: ",e.sourceName]})]}),g.jsx("p",{className:"mt-3 rounded-lg border border-secondary/30 bg-secondary/10 px-3 py-2 text-xs text-foreground",children:"This property is listed by the broker shown above. Alamo EDC does not own or represent this property â please contact the broker directly for tours, pricing, and negotiations."})]}),e.verificationNote&&g.jsxs("p",{className:"detail-fact text-sm rounded-lg border border-secondary/40 bg-secondary/10 px-3 py-2 text-foreground",children:[g.jsx("span",{className:"font-semibold",children:"Please verify: "}),e.verificationNote]}),g.jsxs("div",{className:"detail-fact flex flex-col sm:flex-row gap-3",children:[e.sourceUrl&&g.jsx(gr,{asChild:!0,variant:"outline",className:"w-full sm:w-auto",children:g.jsxs("a",{href:e.sourceUrl,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(Mz,{className:"mr-2 h-4 w-4"}),"View Original Listing"]})}),e.flyerUrl&&g.jsx(gr,{asChild:!0,variant:"outline",className:"w-full sm:w-auto",children:g.jsxs("a",{href:e.flyerUrl,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(_5e,{className:"mr-2 h-4 w-4"}),"Download Property Flyer"]})})]}),g.jsx("p",{className:"text-xs text-muted-foreground border-t border-border pt-4",children:"Information obtained from listing brokers and third-party sources believed reliable. Alamo EDC does not warrant pricing, measurements, zoning, or availability. Verify all details independently."})]})]})})},dBe=({properties:e=[],onViewProperty:t})=>{const r=Zme({selector:".contact-anim",y:20}),n=R.useMemo(()=>{const i=new Map;
564for(const a of e){if(!a.brokerName&&!a.brokerCompany)continue;const s=`${a.brokerName??""}|${a.brokerCompany??""}`,o=i.get(s)??{name:a.brokerName,company:a.brokerCompany,phone:a.brokerPhone,email:a.brokerEmail,properties:[]};o.properties.push(a),i.set(s,o)}return[...i.values()]},[e]);return g.jsx("section",{id:"properties-contact",className:"py-12 md:py-20 bg-muted/30 scroll-mt-20",children:g.jsxs("div",{ref:r,className:"container mx-auto px-4 max-w-6xl",children:[g.jsxs("div",{className:"contact-anim text-center mb-8 md:mb-12",children:[g.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-foreground",children:"Contact the Listing Broker Directly"}),g.jsx("span",{className:"mt-3 block h-1 w-20 mx-auto rounded-full bg-secondary"}),g.jsx("p",{className:"mt-4 text-muted-foreground max-w-3xl mx-auto",children:"Alamo EDC does not own or represent these properties. For tours, pricing, and negotiations, please reach out to the listing broker or agent below."})]}),g.jsx("div",{className:"contact-anim grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(i=>g.jsxs("div",{className:"bg-card rounded-xl border border-border shadow-sm p-5 flex flex-col",children:[i.name&&g.jsx("p",{className:"font-semibold text-foreground",children:i.name}),i.company&&g.jsx("p",{className:"text-sm text-primary font-medium",children:i.company}),g.jsxs("div",{className:"mt-3 space-y-1.5 text-sm",children:[i.phone&&g.jsxs("a",{href:`tel:${i.phone.replace(/[^\d]/g,"")}`,className:"flex items-center gap-2 text-muted-foreground hover:text-primary transition-colors",children:[g.jsx(c0,{className:"h-4 w-4 text-secondary flex-shrink-0"}),i.phone]}),i.email&&g.jsxs("a",{href:`mailto:${i.email}`,className:"flex items-center gap-2 text-muted-foreground hover:text-primary transition-colors break-all",children:[g.jsx(IA,{className:"h-4 w-4 text-secondary flex-shrink-0"}),i.email]})]}),g.jsx("div",{className:"mt-4 pt-3 border-t border-border space-y-2 flex-1",children:i.properties.map(a=>g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("span",{className:"text-sm text-muted-foreground line-clamp-2",children:a.title}),t?g.jsx("button",{type:"button",onClick:()=>t(a),className:"text-primary text-sm font-medium underline underline-offset-2 hover:text-primary/80 whitespace-nowrap shrink-0",children:"View"}):g.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:a.transactionType==="lease"?"For lease":"For sale"})]},a.id))})]},`${i.name??""}-${i.company??""}`))})]})})},bQ="Available Commercial Properties in Alamo, TX | Alamo EDC",wQ="Explore commercial properties, development land, retail spaces, offices, industrial facilities, and investment opportunities available in Alamo, Texas.",LD="https://alamoedc.org/available-properties",Z_=(e,t,r)=>{let n=document.head.querySelector(`meta[${e}="${t}"]`);n||(n=document.createElement("meta"),n.setAttribute(e,t),document.head.appendChild(n)),n.setAttribute("content",r)},fBe=()=>{const[e,t]=R.useState("en"),[r,n]=R.useState(_Q),[i,a]=R.useState(null),[s,o]=R.useState(!1),l=R.useRef(null),u=R.useRef(null),c=Zme({selector:".filters-anim",y:20});R.useEffect(()=>{const p=document.title;document.title=bQ,Z_("name","description",wQ),Z_("property","og:title",bQ),Z_("property","og:description",wQ),Z_("property","og:type","website"),Z_("property","og:url",LD),Z_("name","twitter:card","summary_large_image");let m=document.head.querySelector('link[rel="canonical"]');const _=m==null?void 0:m.href;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m)),m.href=LD;const y=document.createElement("script");return y.type="application/ld+json",y.text=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://alamoedc.org/"},{"@type":"ListItem",position:2,name:"Available Properties",item:LD}]}),document.head.appendChild(y),()=>{document.title=p,_&&m&&(m.href=_),y.remove()}},[]);const d=R.useMemo(()=>{const p=r.keyword.trim().toLowerCase();let m=vQ.filter(_=>{if(p&&![_.title,_.address,_.city,_.summary,..._.propertyTypes].filter(
564Boolean).join(" ").toLowerCase().includes(p)||r.transaction==="sale"&&_.transactionType==="lease"||r.transaction==="lease"&&_.transactionType==="sale"||r.type!=="all"&&!_.propertyTypes.includes(r.type))return!1;if(r.price==="lease"){if(_.transactionType==="sale")return!1}else if(r.price!=="all"){if(_.price===void 0)return!1;const[y,v]=r.price.split("-");if(y&&_.price<Number(y)||v&&_.price>Number(v))return!1}return!0});switch(m=[...m],r.sort){case"price-asc":m.sort((_,y)=>(_.price??1/0)-(y.price??1/0));break;case"price-desc":m.sort((_,y)=>(y.price??-1/0)-(_.price??-1/0));break;case"acreage":m.sort((_,y)=>(y.acreage??0)-(_.acreage??0));break;case"building":m.sort((_,y)=>(y.buildingSize??0)-(_.buildingSize??0));break;default:m.sort((_,y)=>+!!y.featured-+!!_.featured)}return m},[r]);R.useEffect(()=>{if(!u.current||UA())return;const p=Qu.context(()=>{Qu.fromTo(".property-card",{opacity:0,y:18},{opacity:1,y:0,duration:.5,stagger:.05,ease:"power2.out",overwrite:"auto",clearProps:"transform"})},u);return()=>p.revert()},[d]);const f=p=>{var m;(m=document.getElementById(p))==null||m.scrollIntoView({behavior:"smooth",block:"start"})},h=p=>{a(p),o(!0)};return g.jsxs("div",{className:"min-h-screen overflow-x-hidden",children:[g.jsx(po,{language:e,onLanguageToggle:()=>t(p=>p==="en"?"es":"en")}),g.jsxs("main",{children:[g.jsx(xFe,{onBrowse:()=>f("listings"),onContact:()=>f("properties-contact")}),g.jsx("nav",{"aria-label":"Breadcrumb",className:"container mx-auto px-4 pt-6",children:g.jsxs("ol",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[g.jsx("li",{children:g.jsx(Rs,{to:"/",className:"hover:text-primary",children:"Home"})}),g.jsx(Pz,{className:"h-3.5 w-3.5","aria-hidden":"true"}),g.jsx("li",{"aria-current":"page",className:"text-foreground font-medium",children:"Available Properties"})]})}),g.jsx("section",{id:"listings",className:"py-8 md:py-14 scroll-mt-20",ref:l,children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{ref:c,children:[g.jsxs("div",{className:"filters-anim mb-6",children:[g.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"Available Commercial Properties in Alamo, Texas"}),g.jsx("span",{className:"mt-3 block h-1 w-20 rounded-full bg-secondary"}),g.jsxs("p",{className:"mt-3 text-muted-foreground max-w-3xl",children:["Alamo EDC compiles publicly available listings as a service to investors, developers, brokers, and businesses. Alamo EDC is not the listing broker and does not guarantee pricing or availability. Learn more about"," ",g.jsx(Rs,{to:"/incentives",className:"text-primary underline underline-offset-2",children:"local incentive programs"}),"."]})]}),g.jsx("div",{className:"filters-anim",children:g.jsx(q8e,{filters:r,onChange:n,onClear:()=>n(_Q),resultCount:d.length})})]}),g.jsx("div",{ref:u,className:"mt-8 grid gap-6 sm:grid-cols-2 lg:grid-cols-3 transition-all",children:d.map(p=>g.jsx(Q8e,{property:p,onOpen:h},p.id))}),d.length===0&&g.jsx("p",{className:"mt-10 text-center text-muted-foreground",children:"No properties match your current filters. Try clearing the filters or contact Alamo EDC for help finding a site."}),g.jsx("p",{className:"mt-10 text-xs md:text-sm text-muted-foreground border-t border-border pt-6 max-w-4xl",children:H8e})]})}),g.jsx(dBe,{properties:vQ,onViewProperty:h})]}),g.jsx(cBe,{property:i,open:s,onOpenChange:o}),g.jsx(mo,{language:e})]})},p0e=R.createContext(null);function xN(){const e=R.useContext(p0e);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const m0e=R.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,plugins:n,className:i,children:a,...s},o)=>{const[l,u]=sN({...t,axis:e==="horizontal"?"x":"y"},n),[c,d]=R.useState(!1),[f,h]=R.useState(!1),p=R.useCallback(v=>{v&&(d(v.canScrollPrev()),h(v.canScrollNext()))},[]),m=R.useCallback(()=>{u==null||u.scrollPrev()},[u]),_=R.useCallback(()=>{u==null||u.scrollNext()},[u]),y=R.useCallback(v=>{v.key==="ArrowLeft"?(v.preventDefault(),m()):v.key==="ArrowRight"&&(v.preventDefault(),_())},[m,_]);return R.useEffect(()=>{!u||!r||r(u)},[u,r]),R.useEffect(()=>{if(u)return p(u),u.on("reInit",p),u.on("select",p),()=>{u==null||u.off("select",p)}},[u,p]),g.jsx(p0e.Provider,{value:{carouselRef:l,api:u,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:m,scrollNext:_,canScrollPrev:c,canScrollNext:f},children:g.jsx("div",{ref:o,onKeyDownCapture:y,className:Xt("relative",i),role:"region","aria-roledescription":"carousel",...s,children:a})})});
564m0e.displayName="Carousel";const g0e=R.forwardRef(({className:e,...t},r)=>{const{carouselRef:n,orientation:i}=xN();return g.jsx("div",{ref:n,className:"overflow-hidden",children:g.jsx("div",{ref:r,className:Xt("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});g0e.displayName="CarouselContent";const EE=R.forwardRef(({className:e,...t},r)=>{const{orientation:n}=xN();return g.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:Xt("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",e),...t})});EE.displayName="CarouselItem";const y0e=R.forwardRef(({className:e,variant:t="outline",size:r="icon",...n},i)=>{const{orientation:a,scrollPrev:s,canScrollPrev:o}=xN();return g.jsxs(gr,{ref:i,variant:t,size:r,className:Xt("absolute h-8 w-8 rounded-full",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!o,onClick:s,...n,children:[g.jsx(_6,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Previous slide"})]})});y0e.displayName="CarouselPrevious";const v0e=R.forwardRef(({className:e,variant:t="outline",size:r="icon",...n},i)=>{const{orientation:a,scrollNext:s,canScrollNext:o}=xN();return g.jsxs(gr,{ref:i,variant:t,size:r,className:Xt("absolute h-8 w-8 rounded-full",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!o,onClick:s,...n,children:[g.jsx(t_,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Next slide"})]})});v0e.displayName="CarouselNext";const hBe="/assets/alamo-aerial-7kh4UWCX.webp",_0e="/assets/community-event-iyavnIJY.jpg",pBe="/assets/community-gathering-DgpTu4Zq.jpg",mBe="/assets/fiesta-cleaners-DPsSIQHj.jpg",gBe="/assets/flores-furniture-Df74x5-o.jpg",yBe="/assets/watermelon-pageant-CefYNvKZ.jpg",vBe="/assets/shop-alamo-first-2-DzkAM9GS.jpg",_Be="/assets/shop-alamo-first-3-CewmDujT.jpg",bBe="/assets/shop-alamo-first-4-CgEn7hSa.jpg",wBe="/assets/shop-alamo-first-5-BVknWoGn.jpg",xBe=()=>{const[e,t]=R.useState("en"),r=()=>{t(a=>a==="en"?"es":"en")},i={en:{title:"Our Vibrant Community",intro:"Experience the heart and soul of Alamo - a thriving community where tradition meets opportunity. From our celebrated annual festivals to our growing business landscape, Alamo is a place where families flourish and dreams take root.",locationTitle:"Prime Location",locationDesc:"Strategically positioned along major highways with access to major retailers and established businesses, Alamo offers unparalleled opportunities for growth and development.",eventsTitle:"Community Events & Festivals",eventsDesc:"Throughout the year, Alamo hosts vibrant community events that bring our residents together in celebration of our rich culture and heritage. From the famous Watermelon Festival to National Night Out, our events showcase the warmth and spirit of our community.",shopLocalTitle:"Shop Alamo First",shopLocalDesc:"Our Shop Alamo First initiative encourages residents to support local businesses, keeping dollars circulating in our community and helping our neighbors thrive. When you shop local, you invest in Alamo's future.",successTitle:"Business Success Stories",successDesc:"Through our incentive programs, we've helped local entrepreneurs turn their dreams into reality. These success stories represent the future of Alamo's economic growth."},es:{title:"Nuestra Vibrante Comunidad",intro:"Experimente el corazón y el alma de Alamo: una comunidad próspera donde la tradición se encuentra con la oportunidad. Desde nuestros celebrados festivales anuales hasta nuestro creciente panorama empresarial, Alamo es un lugar donde las familias florecen y los sueños se arraigan.",locationTitle:"Ubicación Privilegiada",locationDesc:"Estratégicamente posicionado a lo largo de las principales autopistas con acceso a los principales minoristas y negocios establecidos, Alamo ofrece oportunidades incomparables de crecimiento y desarrollo.",eventsTitle:"Eventos y Festivales Comunitarios",eventsDesc:"Durante todo el año, Alamo organiza eventos comunitarios vibrantes que reúnen a nuestros residentes en celebración de nuestra rica cultura y herencia. Desde el famoso Festival de la SandÃa hasta la Noche Nacional contra el Crimen, nuestros eventos muestran la calidez y el espÃritu de nuestra comunidad.",shopLocalTitle:"Compre en Alamo Primero",shopLocalDesc:"Nuestra iniciativa Compre en Alamo Primero alienta a los residentes a apoyar a los negocios locales, manteniendo los dólares circulando en nuestra comunidad y ayudando a nuestros vecinos a prosperar. Cuando compra localmente, invierte en el futuro de Alamo.",successTitle:"Historias de Ãxito Empresarial",successDesc:"A través de nuestros programas de incentivos, hemos ayudado a los empresarios locales a convert
564ir sus sueños en realidad. Estas historias de éxito representan el futuro del crecimiento económico de Alamo."}}[e];return g.jsxs("div",{className:"min-h-screen",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsxs("main",{className:"pt-16 md:pt-20",children:[g.jsx("section",{className:"py-10 md:py-16 px-4 bg-gradient-to-b from-primary/5 to-background",children:g.jsxs("div",{className:"container mx-auto max-w-6xl",children:[g.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-center mb-6",children:i.title}),g.jsx("p",{className:"text-base md:text-lg text-center text-muted-foreground max-w-3xl mx-auto mb-8 md:mb-12",children:i.intro})]})}),g.jsx("section",{className:"py-12 px-4",children:g.jsx("div",{className:"container mx-auto max-w-6xl",children:g.jsx(un,{className:"overflow-hidden",children:g.jsxs("div",{className:"grid md:grid-cols-2 gap-0",children:[g.jsx("div",{className:"relative h-64 md:h-auto",children:g.jsx("img",{src:hBe,alt:"Aerial view of Alamo showing major businesses and highways",className:"w-full h-full object-cover"})}),g.jsxs(kn,{className:"p-6 md:p-8 flex flex-col justify-center",children:[g.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4",children:i.locationTitle}),g.jsx("p",{className:"text-lg text-muted-foreground",children:i.locationDesc})]})]})})})}),g.jsx("section",{className:"py-12 px-4 bg-muted/30",children:g.jsxs("div",{className:"container mx-auto max-w-6xl",children:[g.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-4",children:i.eventsTitle}),g.jsx("p",{className:"text-base md:text-lg text-center text-muted-foreground mb-10 max-w-3xl mx-auto",children:i.eventsDesc}),g.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[g.jsx(un,{className:"overflow-hidden hover-scale",children:g.jsx("img",{src:_0e,alt:"Community festival with tents and activities",className:"w-full h-64 object-cover"})}),g.jsx(un,{className:"overflow-hidden hover-scale",children:g.jsx("img",{src:pBe,alt:"Community members gathered at El Dorado event",className:"w-full h-64 object-cover"})}),g.jsx(un,{className:"overflow-hidden hover-scale",children:g.jsx("img",{src:yBe,alt:"Alamo Watermelon Festival participants",className:"w-full h-64 object-cover"})})]})]})}),g.jsx("section",{className:"py-12 px-4",children:g.jsxs("div",{className:"container mx-auto max-w-6xl",children:[g.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-4",children:i.shopLocalTitle}),g.jsx("p",{className:"text-base md:text-lg text-center text-muted-foreground mb-10 max-w-3xl mx-auto",children:i.shopLocalDesc}),g.jsxs(m0e,{opts:{align:"start",loop:!0},className:"w-full max-w-4xl mx-auto",children:[g.jsxs(g0e,{children:[g.jsx(EE,{className:"md:basis-1/2 lg:basis-1/3",children:g.jsx(un,{className:"overflow-hidden",children:g.jsx("img",{src:vBe,alt:"Community members promoting Shop Alamo First",className:"w-full h-96 object-cover"})})}),g.jsx(EE,{className:"md:basis-1/2 lg:basis-1/3",children:g.jsx(un,{className:"overflow-hidden",children:g.jsx("img",{src:_Be,alt:"Shop Alamo First campaign participants",className:"w-full h-96 object-cover"})})}),g.jsx(EE,{className:"md:basis-1/2 lg:basis-1/3",children:g.jsx(un,{className:"overflow-hidden",children:g.jsx("img",{src:bBe,alt:"Shop Alamo First initiative supporter",className:"w-full h-96 object-contain bg-muted"})})}),g.jsx(EE,{className:"md:basis-1/2 lg:basis-1/3",children:g.jsx(un,{className:"overflow-hidden",children:g.jsx("img",{src:wBe,alt:"Community member with dog supporting Shop Alamo First",className:"w-full h-96 object-cover"})})})]}),g.jsx(y0e,{}),g.jsx(v0e,{})]})]})}),g.jsx("section",{className:"py-12 px-4 bg-muted/30",children:g.jsxs("div",{className:"container mx-auto max-w-6xl",children:[g.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-4",children:i.successTitle}),g.jsx("p",{className:"text-base md:text-lg text-center text-muted-foreground mb-10 max-w-3xl mx-auto",children:i.successDesc}),g.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[g.jsxs(un,{className:"overflow-hidden hover-scale",children:[g.jsx("img",{src:mBe,alt:"Fiesta Cleaners receiving grant from Alamo EDC",className:"w-full h-80 object-cover"}),g.jsxs(kn,{className:"p-6",children:[g.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Fiesta Cleaners"}),g.jsx("p",{className:"text-muted-foreground",children:e==="en"?"Recipient of the Alamo Mayor Small Business Start-Up Grant, helping bring quality cleaning services to our community.":"Beneficiario de la Subvención de Inicio de Pequeñas Empresas del Alcalde de Alamo, ayudando a traer servicios de limpieza de calida
564d a nuestra comunidad."})]})]}),g.jsxs(un,{className:"overflow-hidden hover-scale",children:[g.jsx("img",{src:gBe,alt:"Flores Furniture LLC receiving grant from Alamo EDC",className:"w-full h-80 object-cover"}),g.jsxs(kn,{className:"p-6",children:[g.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Flores Furniture LLC"}),g.jsx("p",{className:"text-muted-foreground",children:e==="en"?"Awarded the Alamo Mayor Small Business Start-Up Grant to expand furniture services in the Rio Grande Valley.":"Premiado con la Subvención de Inicio de Pequeñas Empresas del Alcalde de Alamo para expandir servicios de muebles en el Valle del RÃo Grande."})]})]})]})]})})]}),g.jsx(mo,{language:e})]})},EBe="/assets/schools-hero-memorial-Ia46qvNr.webp",TBe=()=>{const[e,t]=R.useState("en"),r=()=>{t(e==="en"?"es":"en")},n={en:{title:"Alamo Schools",subtitle:"Quality education for our community's future",description:"Alamo is home to a diverse range of educational institutions serving students from elementary through high school, including public schools, charter schools, and private academies.",elementary:"Elementary School",middle:"Middle School",highSchool:"High School",charter:"Charter School",private:"Private School"},es:{title:"Escuelas de Alamo",subtitle:"Educación de calidad para el futuro de nuestra comunidad",description:"Alamo alberga una amplia gama de instituciones educativas que atienden a estudiantes desde la escuela primaria hasta la secundaria, incluidas escuelas públicas, escuelas autónomas y academias privadas.",elementary:"Escuela Primaria",middle:"Escuela Intermedia",highSchool:"Escuela Secundaria",charter:"Escuela Autónoma",private:"Escuela Privada"}},i=[{name:"Augusto Guerra Elementary School",address:"807 FM 495, Alamo TX 78516",type:"elementary",phone:"(956) 354-2810",website:"https://guerra.psjaisd.us/"},{name:"Capt D. Salinas II Elementary School",address:"333 E Hwy 83, Alamo TX 78516",type:"elementary",phone:"(956) 783-1332"},{name:"John McKeever Elementary School",address:"1310 W Ridge Rd, Alamo TX 78516",type:"elementary",phone:"(956) 354-2680",website:"https://mckeever.psjaisd.us/"},{name:"Marcia R. Garza Elementary School",address:"810 E El Gato, Alamo TX 78516",type:"elementary",phone:"(956) 354-2780",website:"https://garza.psjaisd.us/"},{name:"Santos Livas Elementary School",address:"733 N Alamo Rd, Alamo TX 78516",type:"elementary",phone:"(956) 354-2840",website:"https://livas.psjaisd.us/"},{name:"Zeferino Farias Elementary School",address:"1100 W Acacia St, Alamo TX 78516",type:"elementary",phone:"(956) 354-2760",website:"https://farias.psjaisd.us/"},{name:"Audie Murphy Middle School",address:"924 W Sioux Rd, Alamo TX 78516",type:"middle",phone:"(956) 354-2530",website:"https://murphy.psjaisd.us/"},{name:"Alamo Middle School",address:"1819 W HWY 83, Alamo TX 78516",type:"middle",phone:"(956) 354-2550",website:"https://vela.psjaisd.us/"},{name:"IDEA Alamo",address:"325 Kansas Rd, Alamo TX 78516",type:"charter",phone:"(956) 377-8000",website:"https://ideapublicschools.org/our-schools/idea-alamo/"},{name:"PSJA Memorial Early College High School",address:"800 S Alamo Rd, Alamo TX 78516",type:"highSchool",phone:"(956) 354-2420",website:"https://wolverines.psjaisd.us/"},{name:"Vanguard Mozart (Secondary)",address:"155 E Business 83, Alamo TX 78516",type:"highSchool",phone:"(956) 223-2030",website:"https://mozart-secondary.vanguardacademy.education/"},{name:"Valley Christian Heritage School",address:"932 N Alamo Rd, Alamo TX 78516",type:"private",phone:"(956) 787-9743",website:"https://www.vchschool.org/"}],a=s=>{switch(s){case"elementary":return n[e].elementary;case"middle":return n[e].middle;case"highSchool":return n[e].highSchool;case"charter":return n[e].charter;case"private":return n[e].private;default:return""}};return g.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsxs("section",{className:"relative pt-16 md:pt-24 h-[45vh] min-h-[300px] md:h-[60vh] md:min-h-[400px] flex items-end overflow-hidden",children:[g.jsx("div",{className:"absolute inset-0 z-0",style:{backgroundImage:`url(${EBe})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_8
5640%)]",children:n[e].title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:n[e].subtitle})]})})})]}),g.jsx("section",{className:"py-10 md:py-16 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:i.map((s,o)=>{const l=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20"}],u=l[o%l.length];return g.jsxs(un,{className:`hover:shadow-lg transition-all duration-300 hover:-translate-y-1 ${u.border} ${u.cardBg}`,children:[g.jsxs(zi,{children:[g.jsxs(Ui,{className:"text-lg flex items-start gap-2",children:[g.jsx("div",{className:`p-1.5 rounded-lg ${u.bg} flex-shrink-0`,children:g.jsx(cde,{className:"h-4 w-4 text-white"})}),g.jsx("span",{children:s.name})]}),g.jsx(ho,{className:"text-sm font-medium text-primary",children:a(s.type)})]}),g.jsxs(kn,{children:[g.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[g.jsx(Yh,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),g.jsx("span",{children:s.address})]}),s.phone&&g.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground mt-2",children:[g.jsx(c0,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),g.jsx("a",{href:`tel:${s.phone}`,className:"hover:text-primary transition-colors",children:s.phone})]}),s.website&&g.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground mt-2",children:[g.jsx(b6,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),g.jsx("a",{href:s.website,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:e==="en"?"Visit Website":"Visitar Sitio Web"})]})]})]},o)})})})}),g.jsx(mo,{language:e})]})},SBe="/assets/affordable-living-hero-ClxyQcMB.jpg",ABe=()=>{const[e,t]=R.useState("en"),r=()=>{t(i=>i==="en"?"es":"en")},n={en:{title:"Affordable Living in Alamo",subtitle:"Quality of Life Without Breaking the Bank",description:"Discover why Alamo, Texas offers one of the most affordable living experiences in the region while maintaining excellent quality of life and community amenities.",sections:[{icon:w6,title:"Housing Affordability",description:"Alamo offers diverse housing options at prices well below state and national averages. From starter homes to spacious family residences, find your perfect home without overstretching your budget."},{icon:NK,title:"Cost of Living",description:"The overall cost of living in Alamo is significantly lower than major Texas cities. Enjoy lower expenses for groceries, transportation, healthcare, and everyday essentials while maintaining a high quality of life."},{icon:$K,title:"Property Taxes",description:"Benefit from competitive property tax rates that make homeownership more accessible. Lower property taxes mean more money in your pocket for the things that matter most to you and your family."},{icon:DK,title:"Utilities & Services",description:"Reasonable rates for essential services including electricity, water, internet, and natural gas. Predictable utility costs help you budget effectively and save more each month."},{icon:PK,title:"Business Friendly",description:"Low operating costs and competitive commercial real estate make Alamo an ideal location for entrepreneurs and small business owners. Start or expand your business with lower overhead expenses."},{icon:$b,title:"Quality of Life",description:"Affordability doesn't mean compromise. Enjoy excellent schools, safe neighborhoods, cultural events, and a strong sense of community. Alamo offers the best of both worlds: low cost and high value."}]},es:{title:"Vida Asequible en Alamo",subtitle:"Calidad de Vida Sin Romper el Banco",description:"Descubra por qué Alamo, Texas ofrece una de las experiencias de vida más asequibles en la región mientras mantiene una excelente calidad de vida y comodidades comunitarias.",sections:[{icon:w6,title:"Vivienda Asequible",description:"Alamo ofrece diversas opciones de vivienda a precios muy por debajo de los promedios estatales y nacionales. Des
564de casas iniciales hasta amplias residencias familiares, encuentre su hogar perfecto sin estirar su presupuesto."},{icon:NK,title:"Costo de Vida",description:"El costo general de vida en Alamo es significativamente más bajo que en las principales ciudades de Texas. Disfrute de menores gastos en comestibles, transporte, atención médica y artÃculos esenciales diarios mientras mantiene una alta calidad de vida."},{icon:$K,title:"Impuestos a la Propiedad",description:"BenefÃciese de tasas competitivas de impuestos a la propiedad que hacen que la propiedad de vivienda sea más accesible. Impuestos más bajos significan más dinero en su bolsillo para las cosas que más le importan a usted y su familia."},{icon:DK,title:"Servicios Públicos",description:"Tarifas razonables para servicios esenciales incluyendo electricidad, agua, internet y gas natural. Los costos predecibles de servicios públicos le ayudan a presupuestar efectivamente y ahorrar más cada mes."},{icon:PK,title:"Amigable con los Negocios",description:"Bajos costos operativos y bienes raÃces comerciales competitivos hacen de Alamo una ubicación ideal para emprendedores y propietarios de pequeñas empresas. Inicie o expanda su negocio con menores gastos generales."},{icon:$b,title:"Calidad de Vida",description:"La asequibilidad no significa compromiso. Disfrute de excelentes escuelas, vecindarios seguros, eventos culturales y un fuerte sentido de comunidad. Alamo ofrece lo mejor de ambos mundos: bajo costo y alto valor."}]}};return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsxs("section",{className:"relative pt-16 md:pt-24 h-[45vh] min-h-[300px] md:h-[60vh] md:min-h-[400px] flex items-end overflow-hidden",children:[g.jsx("div",{className:"absolute inset-0 z-0",style:{backgroundImage:`url(${SBe})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:n[e].title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:n[e].subtitle})]})})})]}),g.jsx("section",{className:"py-10 md:py-16 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:n[e].sections.map((i,a)=>{const s=i.icon,o=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20"}],l=o[a%o.length];return g.jsxs(un,{className:`hover:shadow-lg transition-shadow duration-300 ${l.border} ${l.cardBg}`,children:[g.jsxs(zi,{children:[g.jsx("div",{className:"flex items-center gap-3 mb-2",children:g.jsx("div",{className:`p-3 rounded-lg ${l.bg}`,children:g.jsx(s,{className:"h-6 w-6 text-white"})})}),g.jsx(Ui,{className:"text-xl",children:i.title})]}),g.jsx(kn,{children:g.jsx(ho,{className:"text-base leading-relaxed",children:i.description})})]},a)})})})}),g.jsx(mo,{language:e})]})},CBe="/assets/alamo-rv-park-FSDJNOnO.webp",PBe=()=>{const[e,t]=R.useState("en"),r=()=>{t(e==="en"?"es":"en")},n={en:{title:"Welcome to Alamo's RV Parks",subtitle:"Your home away from home in the heart of the Rio Grande Valley",description:"Discover the perfect spot to park your RV and embrace the warmth of South Texas. Whether you're a Winter Texan seeking sunshine or an adventurer exploring the Valley, Alamo's RV parks wel
564come you with open arms, exceptional amenities, and a friendly community atmosphere.",ageRestricted:"Age 55+",amenities:"Amenities"},es:{title:"Bienvenido a los Parques de RV de Alamo",subtitle:"Su hogar lejos de casa en el corazón del Valle del RÃo Grande",description:"Descubra el lugar perfecto para estacionar su RV y abrazar la calidez del sur de Texas. Ya sea que sea un Winter Texan buscando sol o un aventurero explorando el Valle, los parques de RV de Alamo le dan la bienvenida con los brazos abiertos, comodidades excepcionales y un ambiente comunitario amigable.",ageRestricted:"Mayores de 55",amenities:"Comodidades"}},i=[{name:"Winter Ranch RV Resort",address:"600 State Hwy 495, Alamo, TX 78516",phone:"(956) 781-1358",amenities:"Heated pool, pickleball, events; pets allowed",agerestricted:!0},{name:"Alamo Palms RV Resort",address:"1341 W Business Hwy 83, Alamo, TX 78516",phone:"(956) 787-7571",amenities:"Luxury resort; pool, tennis, shuffleboard, clubhouse",agerestricted:!0},{name:"Alamo Rose RV Resort",address:"938 S Alamo Rd, Alamo, TX 78516",phone:"(956) 783-2600",amenities:"Resort-style park; pool, events center, long-term and short-term stays"},{name:"Acacia RV & MH Park",address:"89 US-83 Business, Alamo, TX 78516",phone:"(956) 884-0202",amenities:"Affordable park with RV and mobile home spaces; daily/weekly/monthly"},{name:"Roadrunner RV Park",address:"1222 N Cesar Chavez Rd, Alamo, TX 78516",phone:"(956) 787-2847",amenities:"Small, quiet park; basic amenities, family-friendly"},{name:"Bluebonnet RV Resort",address:"1919 W Business 83, Alamo, TX 78516",phone:"(956) 585-7630",amenities:"Spacious sites, rec hall, and community events"},{name:"Casa del Valle RV Resort",address:"1048 N Alamo Rd, Alamo, TX 78516",amenities:"Gated community with pool, craft rooms, and fitness area",agerestricted:!0}];return g.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsxs("section",{className:"relative pt-16 md:pt-24 h-[45vh] min-h-[300px] md:h-[60vh] md:min-h-[400px] flex items-end overflow-hidden",children:[g.jsx("div",{className:"absolute inset-0 z-0",children:g.jsx("img",{src:CBe,alt:"RV Park in Alamo, Texas",className:"w-full h-full object-cover"})}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:n[e].title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:n[e].subtitle})]})})})]}),g.jsx("section",{className:"py-10 md:py-16 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:i.map((a,s)=>{const o=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20"}],l=o[s%o.length];return g.jsxs(un,{className:`hover:shadow-lg transition-all duration-300 hover:-translate-y-1 ${l.border} ${l.cardBg}`,children:[g.jsx(zi,{children:g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsxs(Ui,{className:"text-lg flex items-start gap-2 flex-1",children:[g.jsx("div",{className:`p-1.5 rounded-lg ${l.bg} flex-shrink-0`,children:g.jsx(w6,{className:"h-4 w-4 text-white"})}),g.jsx("span",{children:a.name})]}),a.agerestricted&&g.jsx(Hp,{variant:"secondary",className:"text-xs whitespace-nowrap",children:n[e].ageRestricted})]})}),g.jsxs(kn,{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[g.jsx(Yh,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),g.jsx("span",{children:a.address})]}),a.phone&&g.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[g.jsx(c0,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),g.jsx("a",{href:`tel:${a.phone}`,className:"hover:text-primary transition-colors",children:a.phone})]}),g.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[g.jsx(x6,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),g.jsx("span",{children:a.amenities})]})]})]},s)})})})}),g.jsx(mo,{language:e})]})},MBe="/assets/ecotourism-hero-new-xjSmDSVf.jpg",kBe=()=>{const[e,t]=R.useState("en"),r=()=>{t(i=>i==="en"?"es":"en")},n={en:{title:"Ecotourism in Alamo",subtitle:"Discover South Texas Natural Beauty",description:"Experience the rich biodiversity and natural wonders of Alamo, Texas - a gateway to ecotourism in the Rio Grande Valley.",sections:[{icon:Rb,title:"Natural Attractions",description:"Discover native plant species, scenic nature trails, and pristine outdoor space
564s perfect for nature enthusiasts and families alike."},{icon:f5,title:"Birding Paradise",description:"Located in the renowned South Texas birding corridor, Alamo offers exceptional opportunities to spot rare and migratory bird species throughout the year."},{icon:IK,title:"Sustainable Tourism",description:"We promote eco-friendly practices, conservation efforts, and green business initiatives that protect our natural heritage for future generations."},{icon:h5,title:"Outdoor Recreation",description:"Enjoy hiking, wildlife photography, and nature education programs that connect visitors with the unique South Texas ecosystem."},{icon:g5,title:"Local Eco-Tours",description:"Join guided nature tours, educational programs, and community partnerships that showcase Alamo's commitment to environmental stewardship."}]},es:{title:"Ecoturismo en Alamo",subtitle:"Descubre la Belleza Natural del Sur de Texas",description:"Experimenta la rica biodiversidad y las maravillas naturales de Alamo, Texas - una puerta de entrada al ecoturismo en el Valle del RÃo Grande.",sections:[{icon:Rb,title:"Atracciones Naturales",description:"Descubre especies de plantas nativas, senderos naturales escénicos y espacios al aire libre prÃstinos perfectos para entusiastas de la naturaleza y familias."},{icon:f5,title:"ParaÃso de Observación de Aves",description:"Ubicado en el renombrado corredor de observación de aves del sur de Texas, Alamo ofrece oportunidades excepcionales para avistar especies de aves raras y migratorias durante todo el año."},{icon:IK,title:"Turismo Sostenible",description:"Promovemos prácticas ecológicas, esfuerzos de conservación e iniciativas de negocios verdes que protegen nuestro patrimonio natural para las generaciones futuras."},{icon:h5,title:"Recreación al Aire Libre",description:"Disfruta de senderismo, fotografÃa de vida silvestre y programas de educación ambiental que conectan a los visitantes con el ecosistema único del sur de Texas."},{icon:g5,title:"Eco-Tours Locales",description:"Ãnete a tours naturales guiados, programas educativos y asociaciones comunitarias que muestran el compromiso de Alamo con la administración ambiental."}]}};return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsx("section",{className:"relative h-[60vh] bg-cover bg-center flex items-end",style:{backgroundImage:`url(${MBe})`},children:g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:n[e].title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:n[e].subtitle})]})})})}),g.jsx("section",{className:"py-10 md:py-16 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:n[e].sections.map((i,a)=>{const s=i.icon,o=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20"}],l=o[a%o.length];return g.jsxs(un,{className:`hover-scale ${l.border} ${l.cardBg}`,children:[g.jsxs(zi,{children:[g.jsx("div",{className:`w-12 h-12 ${l.bg} rounded-lg flex items-center justify-center mb-4`,children:g.jsx(s,{className:"w-6 h-6 text-white"})}),g.jsx(Ui,{children:i.title})]}),g.jsx(kn,{children:g.jsx(ho,{className:"text-base",children:i.description})})]},a)})})})}),g.jsx(mo,{language:e})]})},OBe="/assets/santa-ana-refuge-hero-DqmiZfYl.png",NBe=()=>{const[e,t]=R.useState("en"),r=()=>{t(e==="en"?"es":"en")},n={en:{title:"Santa Ana National Wildlife Refuge",subtitle:"The Jewel of the National Wildlife Refuge System",description:"One of America's premier birding and ecotourism destinations, right here in Alamo, Texas",sections:[{icon:x6,title:"About the Refuge",description:"Established in 1943 for migratory bird protection, Santa Ana encompasses 2,088 acres of protected habitat. Located at the juncture of major migratory routes, it serves as the northern-most point for many Central and South American species. This remarkable sanctuary is an integral part of Alamo's natural heritage and the World Birding Center network."},{icon:f5,title:"World-Class Birding",description:"With over 400 bird species recorded, Santa Ana is renowned as one of America's top birding destinations. Observe rare species including Green Jay, Plain Chachalaca, Altamira Oriole, and Great Kiskadee. Year-round birding opportunities abound, with peak migration seasons in spring and fall drawing enthusiasts from around the globe."},{icon:Rb,title:"Wildlife & Nature",description:"The refuge protects critical subtropical thorn forest habitat, home to diverse wildlife including bobcats, the rare ocelot, Texas tortoises, and countless butterfly species. This biodiversity hotspot features native plants and rare flora found nowhere else in the United States, making it a living laboratory for conservation."},{icon:g5,title:"Trails & Activities",description:"Explore walking trails and observation decks offering spectacular wildlife viewing. The refuge provides wildlife p
564hotography opportunities, guided tours, and educational programs. Visit the informative visitor center with engaging exhibits, and enjoy tram tours when available for an enhanced experience of this natural wonder."},{icon:Yh,title:"Visit Information",description:"Located at 3325 Green Jay Rd, Alamo, TX 78516. Check the official website for current visitor center hours, entrance fees, and seasonal information. Best visited during cooler morning hours. Bring binoculars, water, sun protection, and comfortable walking shoes for the best experience."},{icon:m5,title:"Conservation Importance",description:"Santa Ana plays a vital role in protecting critical habitat and preserving endangered species. As part of the World Birding Center network, it serves an essential educational mission while promoting community stewardship of our natural resources. Your visit supports ongoing conservation efforts."}],visitWebsite:"Visit Official Website",planVisit:"Plan Your Visit"},es:{title:"Refugio Nacional de Vida Silvestre Santa Ana",subtitle:"La Joya del Sistema Nacional de Refugios de Vida Silvestre",description:"Uno de los principales destinos de observación de aves y ecoturismo de América, aquà en Alamo, Texas",sections:[{icon:x6,title:"Sobre el Refugio",description:"Establecido en 1943 para la protección de aves migratorias, Santa Ana abarca 2,088 acres de hábitat protegido. Ubicado en la confluencia de las principales rutas migratorias, sirve como el punto más septentrional para muchas especies de América Central y del Sur. Este notable santuario es parte integral del patrimonio natural de Alamo y de la red del Centro Mundial de Observación de Aves."},{icon:f5,title:"Observación de Aves de Clase Mundial",description:"Con más de 400 especies de aves registradas, Santa Ana es reconocido como uno de los principales destinos de observación de aves de América. Observe especies raras como el Chara Verde, la Chachalaca del Norte, el Bolsero de Altamira y el Gran KiskadÃ. Las oportunidades de observación de aves durante todo el año abundan, con temporadas pico de migración en primavera y otoño que atraen entusiastas de todo el mund
564o."},{icon:Rb,title:"Vida Silvestre y Naturaleza",description:"El refugio protege el hábitat crÃtico del bosque espinoso subtropical, hogar de diversa vida silvestre que incluye linces, el raro ocelote, tortugas de Texas e innumerables especies de mariposas. Este punto crÃtico de biodiversidad presenta plantas nativas y flora rara que no se encuentra en ningún otro lugar de los Estados Unidos, convirtiéndolo en un laboratorio viviente para la conservación."},{icon:g5,title:"Senderos y Actividades",description:"Explore senderos para caminar y miradores de observación que ofrecen vistas espectaculares de vida silvestre. El refugio ofrece oportunidades de fotografÃa de vida silvestre, visitas guiadas y programas educativos. Visite el informativo centro de visitantes con exhibiciones atractivas, y disfrute de los recorridos en tranvÃa cuando estén disponibles para una experiencia mejorada de esta maravilla natural."},{icon:Yh,title:"Información para Visitar",description:"Ubicado en 3325 Green Jay Rd, Alamo, TX 78516. Consulte el sitio web oficial para conocer los horarios actuales del centro de visitantes, tarifas de entrada e información de temporada. Es mejor visitar durante las horas más frescas de la mañana. Traiga binoculares, agua, protección solar y zapatos cómodos para caminar para tener la mejor experiencia."},{icon:m5,title:"Importancia de la Conservación",description:"Santa Ana desempeña un papel vital en la protección del hábitat crÃtico y la preservación de especies en peligro de extinción. Como parte de la red del Centro Mundial de Observación de Aves, cumple una misión educativa esencial al tiempo que promueve la administración comunitaria de nuestros recursos naturales. Su visita apoya los esfuerzos continuos de conservación."}],visitWebsite:"Visitar Sitio Web Oficial",planVisit:"Planifica tu Visita"}};return g.jsxs("div",{className:"min-h-screen",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsx("section",{className:"relative h-[60vh] md:h-[70vh] flex items-end bg-cover bg-center",style:{backgroundImage:`url(${OBe})`},children:g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:n[e].title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:n[e].subtitle})]})})})}),g.jsx("section",{className:"py-10 md:py-16 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:n[e].sections.map((i,a)=>{const s=i.icon,o=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20"}],l=o[a%o.length];return g.jsxs(un,{className:`hover:shadow-lg transition-shadow ${l.border} ${l.cardBg}`,children:[g.jsxs(zi,{children:[g.jsx("div",{className:"flex items-center gap-3 mb-2",children:g.jsx("div",{className:`p-2 rounded-lg ${l.bg}`,children:g.jsx(s,{className:"h-6 w-6 text-white"})})}),g.jsx(Ui,{className:"text-xl",children:i.title})]}),g.jsx(kn,{children:g.jsx(ho,{className:"text-base leading-relaxed",children:i.description})})]},a)})})})}),g.jsx("section",{className:"container mx-auto px-4 py-10 md:py-16 text-center",children:g.jsxs("div",{className:"max-w-2xl mx-auto",children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:n[e].planVisit}),g.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:g.jsx(gr,{asChild:!0,size:"lg",className:"gap-2",children:g.jsxs("a",{href:"https://www.fws.gov/refuge/santa-ana",target:"_blank",rel:"noopener noreferrer",children:[n[e].visitWebsite,g.jsx(Mz,{className:"h-4 w-4"})]})})}),g.jsx("p",{className:"mt-6 text-muted-foreground",children:"3325 Green Jay Rd, Alamo, TX 78516"})]})}),g.jsx(mo,{language:e})]})},IBe="/assets/business-empowerment-hero-c0UA8yE2.jpg",DBe="/assets/business-handshake-BeSo_TRQ.jpg",LBe="/assets/business-center-CfD0Ia6t.jpg",jBe="/assets/education-workforce-Dp3JKVRv.jpg",RBe=()=>{var s,o,l,u,c;const[e,t]=R.useState("en"),r=()=>{t(d=>d==="en"?"es":"en")},n={en:{title:"Business Empowerment",subtitle:"Fostering Economic Growth Through a Three-Phase Approach",description:"The Alamo Economic Development Corporation (EDC) is committed to fostering an economic environment that empowers local businesses to grow and succeed. Through the implementation of various initiatives, the EDC seeks to encourage private investment and spur job creation to benefit the city and the region at large.",introText:"We have adopted a three-phase approach designed to effectively meet our business empowerment objectives.",phases:[{title:"Phase One",subtitle:"Technical Assistance & Startup Support",description:"As part of our commitment to empowering new businesses, we provide the following services during phase one:",items:["Technical assistance including business and financial planning","Site selection services and aiding with negotiation","Paperwork assistance","Permits and other procedures"]},{title:"Phase Two",subtitle:"Business Expansion & Retention",description:"Phase two of our empowerment initiative involves our Business Expansion and Retention Program. In this phase, we work with businesses to generate concepts and work towards implementing these ideas and strategies with the goal of sustaining successful operations.",paragraphs:["An emphasis is placed on networking and in strategic partnerships with organizations such as the Small Business Administration, the Women's Business Center and others that provide training resources.","Our organization also facilitates participation in special events and public relations opportunities such as seminars, networking events and the annual Alamo Business Spirit Award during Homecoming week â a contest designed to unite local businesses, high school sports and the community.","The Alamo EDC has received funding through two loans with the USDA-Rural Development Program. The first loan is through the Rural Business Enterprise Grant (RBEG) Program and the other through the USDA Rural Development Intermediary Relending Program. Through this revolving loan program, the Alamo EDC will use the money and interest obtained through loan repayment to relend to additional businesses. Businesses unable to find funding from other sources can also apply for assistance through the Texas Rural Communities (TRC) loan program."],certifications:{title:"Phase two also sees the EDC work with businesses to obtain certifications to enable growth providing goods or services to the public sector, including:",items:["HUB certification program","UTPA Procurement Technical Assistance Center (for certification as a minority owned- or woman-owned business)","8A Certification","Corporate Certification"]}}
564,{title:"Phase Three",subtitle:"Workforce Development & Education",description:"The third phase of our empowerment initiative involves working with local institutions of higher education to ensure the development of a strong, educated workforce. Both The University of Texas-Rio Grande Valley (UTRGV) and South Texas College offer study and continuing education in a variety of disciplines.",highlight:"Both schools have received extensive recognition for serving Hispanic students. UTRGV, formerly UTPA, has been ranked as the 6th most affordable university in the nation and is ranked 2nd and 3rd in the nation for awarding bachelors and masters degrees, respectively, to Hispanic students."}],ctaTitle:"Empowering Businesses in Alamo",ctaText:"The City of Alamo holds great promise for continued job growth and economic development. The Alamo EDC is available to assist companies of all scopes and sizes with their endeavors for further success. We want to ensure that the number of new companies and business expansions in Alamo continues to increase.",ctaButton:"Contact Us Today",phone:"956.787.6622",resourcesTitle:"Download Our Incentive Guides",resources:[{title:"Alamo Revolving Loan Fund Program",file:"/documents/Alamo_Revolving_Loan_Fund_Program_2026.pdf"},{title:"Alamo EDC Incentives Guide",file:"/documents/Alamo_EDC_Incentives_Guide_2024.pdf"},{title:"Alamo Small New Business Grant Program",file:"/documents/Alamo_Small_New_Business_Grant_Program_2026.pdf"},{title:"Alamo's Mayor Small Business Start-Up Grant",file:"/documents/Alamos_Mayor_Small_Business_Start_Up_Grant_2026.pdf"},{title:"Alamo Small Business Equipment Grant",file:"/documents/Alamo_Small_Business_Equipment_Grant_2026.pdf"},{title:"Legacy Business Appreciation Program",file:"/documents/Legacy_Business_Appreciation_Program_2026.pdf"}]},es:{title:"Empoderamiento Empresarial",subtitle:"Fomentando el Crecimiento Económico a Través de un Enfoque de Tres Fases",description:"La Corporación de Desarrollo Económico de Alamo (EDC) está comprometida a fomentar un ambiente económico que empodere a las empresas locales para crecer y tener éxito. A través de la implementación de varias iniciativas, el EDC busca fomentar la inversión privada y estimular la creación de empleo para beneficiar a la ciudad y la región en general.",introText:"Hemos adoptado un enfoque de tres fases diseñado para cumplir efectivamente nuestros objetivos de empoderamiento empresarial.",phases:[{title:"Fase Uno",subtitle:"Asistencia Técnica y Apoyo a Nuevas Empresas",description:"Como parte de nuestro compromiso de empoderar a nuevas empresas, proporcionamos los siguientes servicios durante la fase uno:",items:["Asistencia técnica incluyendo planificación empresarial y financiera","Servicios de selección de sitios y ayuda con negociaciones","Asistencia con documentación","Permisos y otros procedimientos"]},{title:"Fase Dos",subtitle:"Expansión y Retención de Negocios",description:"La fase dos de nuestra iniciativa de empoderamiento involucra nuestro Programa de Expansión y Retención de Negocios. En esta fase, trabajamos con las empresas para generar conceptos y trabajar hacia la implementación de estas ideas y estrategias con el objetivo de mantener operaciones exitosas.",paragraphs:["Se pone énfasis en el networking y en asociaciones estratégicas con organizaciones como la Administración de Pequeñas Empresas, el Centro de Negocios para Mujeres y otros que proporcionan recursos de capacitación.","Nuestra organización también facilita la participación en eventos especiales y oportunidades de relaciones públicas como seminarios, eventos de networking y el Premio Anual al EspÃritu Empresarial de Alamo durante la semana de Homecoming â un concurso diseñado para unir a las empresas locales, los deportes de la preparatoria y la comunidad.","El EDC de Alamo ha recibido financiamiento a través de dos préstamos con el Programa de Desarrollo Rural del USDA. El primer préstamo es a través del Programa de Subvención para Empresas Rurales (RBEG) y el otro a través del Programa de Représtamo Intermediario de Desarrollo Rural del USDA. A través de este programa de préstamos rotativos, el EDC de Alamo utilizará el dinero e intereses obtenidos a través del repago de préstamos para prestar a negocios adicionales. Las empresas que no puedan encontrar financiamiento de otras fuentes también pueden solicitar asistencia a través del programa de préstamos de Comunidades Rurales de Texas (TRC)."],certifications:{title:"La fase dos también ve al EDC trabajar con empresas para obtener certificaciones que permitan el crecimiento proporcionando bienes o servicios al sector público, incluyendo:",items:["Programa de certificación HUB","Centro de Asistencia Técnica de Adquisiciones de UTPA (para certificación como empresa propiedad de minorÃas o mujeres)","Certificación 8A","Certificación Corporativa"]}},{title:"Fase Tres",subtitle:"Desarrollo de Fuerza Laboral y Educación",description:"La tercera fase de nuestra iniciativa de empoderamiento involucra trabajar con instituciones locales de educación superior para asegurar el desarrollo de una fuerza laboral fuerte y educada. Tanto la Universidad de Texas-Rio Grande Valley (UTRGV) como South Texas College ofrecen estudios y educación continua en una variedad de disciplinas.",highlight:"Ambas escuelas han recibido amplio reconocimiento por servir a estudiantes hispanos. UTRGV, anteriormente UTPA, ha sido clasificada como la 6ta universidad más accesible de la nación y está clasificada 2da y 3ra en la nación por otorgar tÃtulos de licenciatura y maestrÃa, respectivamente, a estudiantes hispanos."}],ctaTitle:"Empoderando Negocios en Alamo",ctaText:"La Ciudad de Alamo tiene una gran promesa para el crecimiento continuo del empleo y el desarrollo económico. El EDC de Alamo está disponible para asistir a empresas de todos los tamaños y alcances con sus esfuerzos para un mayor éxito. Queremos asegurar que el número de nuevas empresas y expansiones de negocios en Alamo continúe aumentando.",ctaButton:"Contáctenos Hoy",phone:"956.787.6622",resourcesTitle:"Descarga Nuestras GuÃas de Incentivos",resources:[{title:"Programa de Fondo Rotatorio de Préstamos de Alamo",file:"/documents/Alamo_Revolving_Loan_Fund_Program_2026.pdf"},{title:"GuÃa de Incentivos EDC de Alamo",file:"/documents/Alamo_EDC_Incentives_Guide_2024.pdf"},{title:"Programa de Subvención para Pequeños Negocios Nuevos de Alamo",file:"/documents/Alamo_Small_New_Business_Grant_Program_2026.pdf"},{title:"Subvención de Inicio del Alcalde de Alamo",file:"/documents/Alamos_Mayor_Small_Business_Start_Up_Grant_2026.pdf"},{title:"Subvención de Equipo para Pequeños Negocios de Alamo",file:"/documents/Alamo_Small_Business_Equipment_Grant_2026.pdf"},{title:"Programa de Apreciación de Negocios de Legado",file:"/documents/Legacy_Business_Appreciation_Program_2026.pdf"}]}},i=[DBe,LBe,jBe],a=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5",text:"text-primary"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10",text:"text-secondary"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20",text:"text-accent-foreground"}];return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsx("section",{className:"relative h-[45vh] min-h-[300px] md:h-[60vh] md:min-
564h-[400px] bg-cover bg-[center_35%] flex items-end",style:{backgroundImage:`url(${IBe})`},children:g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:n[e].title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:n[e].subtitle})]})})})}),g.jsx("section",{className:"py-12 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("p",{className:"text-xl md:text-2xl text-center max-w-3xl mx-auto text-muted-foreground",children:n[e].introText})})}),g.jsx("section",{className:"py-10 md:py-16 bg-background",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[g.jsxs("div",{className:"order-2 lg:order-1",children:[g.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[g.jsx("div",{className:`w-14 h-14 ${a[0].bg} rounded-lg flex items-center justify-center`,children:g.jsx(f5e,{className:"w-7 h-7 text-white"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold",children:n[e].phases[0].title}),g.jsx("p",{className:`text-lg ${a[0].text} font-semibold`,children:n[e].phases[0].subtitle})]})]}),g.jsx("p",{className:"text-lg text-muted-foreground mb-6",children:n[e].phases[0].description}),g.jsx("ul",{className:"space-y-3",children:(s=n[e].phases[0].items)==null?void 0:s.map((d,f)=>g.jsxs("li",{className:"flex items-start gap-3",children:[g.jsx(MK,{className:`w-5 h-5 ${a[0].text} mt-1 flex-shrink-0`}),g.jsx("span",{className:"text-foreground",children:d})]},f))})]}),g.jsx("div",{className:"order-1 lg:order-2",children:g.jsx("div",{className:`${a[0].border} ${a[0].cardBg} rounded-xl overflow-hidden shadow-lg`,children:g.jsx("img",{src:i[0],alt:"Phase One - Technical Assistance",className:"w-full h-64 md:h-80 object-cover"})})})]})})}),g.jsx("section",{className:"py-10 md:py-16 bg-gradient-to-br from-secondary/5 via-background to-primary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-start",children:[g.jsx("div",{children:g.jsx("div",{className:`${a[1].border} ${a[1].cardBg} rounded-xl overflow-hidden shadow-lg`,children:g.jsx("img",{src:i[1],alt:"Phase Two - Business Expansion",className:"w-full h-64 md:h-80 object-cover"})})}),g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[g.jsx("div",{className:`w-14 h-14 ${a[1].bg} rounded-lg flex items-center justify-center`,children:g.jsx(_5,{className:"w-7 h-7 text-white"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold",children:n[e].phases[1].title}),g.jsx("p",{className:`text-lg ${a[1].text} font-semibold`,children:n[e].phases[1].subtitle})]})]}),g.jsx("p",{className:"text-lg text-muted-foreground mb-4",children:n[e].phases[1].description}),(o=n[e].phases[1].paragraphs)==null?void 0:o.map((d,f)=>g.jsx("p",{className:"text-muted-foreground mb-4",children:d},f)),g.jsxs("div",{className:`${a[1].cardBg} ${a[1].border} rounded-lg p-6 mt-6`,children:[g.jsx("p",{className:"font-semibold mb-4",children:(l=n[e].phases[1].certifications)==null?void 0:l.title}),g.jsx("ul",{className:"space-y-2",children:(c=(u=n[e].phases[1].certifications)==null?void 0:u.items)==null?void 0:c.map((d,f)=>g.jsxs("li",{className:"flex items-start gap-3",children:[g.jsx(MK,{className:`w-5 h-5 ${a[1].text} mt-0.5 flex-shrink-0`}),g.jsx("span",{children:d})]},f))})]})]})]})})}),g.jsx("section",{className:"py-10 md:py-16 bg-background",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[g.jsxs("div",{className:"order-2 lg:order-1",children:[g.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[g.jsx("div",{className:`w-14 h-14 ${a[2].bg} rounded-lg flex items-center justify-center`,children:g.jsx(cde,{className:"w-7 h-7 text-white"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold",children:n[e].phases[2].title}),g.jsx("p",{className:`text-lg ${a[2].text} font-semibold`,children:n[e].phases[2].subtitle})]})]}),g.jsx("p",{className:"text-lg text-muted-foreground mb-6",children:n[e].phases[2].description}),g.jsx("div",{className:`${a[2].cardBg} ${a[2].border} rounded-lg p-6`,children:g.jsxs("p",{className:"text-foreground italic",children:['"',n[e].phases[2].highlight,'"']})})]}),g.jsx("div",{className:"order-1 lg:order-2",children:g.jsx("div",{className:`${a[2].border} ${a[2].cardBg} rounded-xl overflow-hidden shadow-lg`,children:g.jsx("img",{src:i[2],alt:"Phase Three - Workforce Development",className:"w-full h-64 md:h-80 object-cover"})})})]})})}),g.jsx("section",{className:"py-10 md:py-16 bg-gradient-to-br from-primary/10 via-secondary/5 to-accent/10",children:g.jsxs("div",{className:"container mx-auto px-4 text-center",children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:n[e].ctaTitle}),g.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto mb-8",children:n[e].ctaText}),g.jsxs(gr,{size:"lg",className:"gap-2",children:[g.jsx(c0,{className:"w-5 h-5"}),n[e].ctaButton,": ",n[e].phone]})]})}),g.jsx("section",{className:"bg-gradient-to-br from-secondary/5 via-background to-primary/5 py-10 md:py-16",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-8 md:mb-12",children:n[e].resourcesTitle}),g.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl mx-auto",children:n[e].resources.map((d,f)=>{const h=a[f%a.length];return g.jsxs(un,{className:`hover-scale ${h.border} ${h.cardBg}`,children:[g.jsxs(zi,{children:[g.jsx("div",{className:`w-10 h-10 ${h.bg} rounded-lg flex items-center justify-center mb-2`,children:g.jsx(av,{className:"w-5 h-5 text-white"})}),g.jsx(Ui,{className:"text-lg",children:d.title})]}),g.jsx(kn,{children:g.jsx(gr,{asChild:!0,className:"w-full",children:g.jsx("a",{href:d.file,download:!0,target:"_blank",rel:"noopener noreferrer",children:e==="en"?"Download PDF":"Descargar PDF"})})})]},f)})})]})}),g.jsx(mo,{language:e})]})},b0e=()=>
564{const[e,t]=R.useState([]),[r,n]=R.useState(!0),[i,a]=R.useState(null),s=async()=>{try{n(!0);const{data:o,error:l}=await nn.from("community_photos").select("*").eq("is_active",!0).order("display_order",{ascending:!0});if(l)throw l;const u=(o||[]).map(c=>{const{data:d}=nn.storage.from("community-photos").getPublicUrl(c.storage_path);return{...c,url:d.publicUrl}});t(u)}catch(o){a(o instanceof Error?o.message:"Failed to fetch photos")}finally{n(!1)}};return R.useEffect(()=>{s()},[]),{photos:e,loading:r,error:i,refetch:s}};function Gu({className:e,...t}){return g.jsx("div",{className:Xt("animate-pulse rounded-md bg-muted",e),...t})}const $Be="/assets/hero-3-BBJUApAK.jpg",FBe="/assets/hero-4-X1JCF5tR.jpg",BBe="/assets/new-participant-3-BeP8oO9T.jpg",zBe="/assets/hero-5-BN665C8y.jpg",UBe=[{url:$Be,alt:"Shop Alamo First participant 1"},{url:FBe,alt:"Shop Alamo First participant 2"},{url:BBe,alt:"Shop Alamo First participant 3"},{url:zBe,alt:"Shop Alamo First participant 4"}],WBe=({title:e,description:t})=>{const{photos:r,loading:n}=b0e(),i=r.length>0?r.map(a=>({url:a.url,alt:a.alt_text||"Shop Alamo First participant"})):UBe;return g.jsx("section",{className:"bg-muted/50 py-10 md:py-16",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsxs("div",{className:"text-center mb-8 md:mb-12",children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:e}),g.jsx("p",{className:"text-lg text-muted-foreground whitespace-pre-line max-w-3xl mx-auto",children:t})]}),n?g.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 md:gap-6 max-w-6xl mx-auto",children:[1,2,3,4].map(a=>g.jsx(Gu,{className:"aspect-[3/4] rounded-xl"},a))}):g.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 md:gap-6 max-w-6xl mx-auto",children:i.map((a,s)=>g.jsxs("div",{className:"relative overflow-hidden rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 group aspect-[3/4]",children:[g.jsx("img",{src:a.url,alt:a.alt,className:"w-full h-full object-cover object-top group-hover:scale-105 transition-transform duration-300"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/30 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]},s))})]})})},VBe="/assets/hero-1-CseVY5UU.jpg",HBe="/assets/hero-2-DRQLcBqe.jpg",GBe="/assets/hero-3-BBJUApAK.jpg",qBe="/assets/hero-4-X1JCF5tR.jpg",KBe="/assets/hero-5-BN665C8y.jpg",YBe="/assets/hero-6-CnSScVeD.jpg",XBe=()=>{const[e,t]=R.useState("en"),[r,n]=R.useState(0),i=[VBe,HBe,GBe,qBe,KBe,YBe];R.useEffect(()=>{const o=()=>n(window.scrollY);return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[]);const a=()=>{t(o=>o==="en"?"es":"en")},s={en:{title:"Annual T-Shirt Program",subtitle:"Wear Your Alamo Pride",description:"Join thousands of community members in celebrating our shared identity and local pride through our annual t-shirt program.",sections:[{icon:jK,title:"Program Overview",description:"Our Annual T-Shirt Program is a beloved tradition that brings the community together. Each year, we design and distribute branded t-shirts to residents, fostering a sense of unity and belonging throughout Alamo."},{icon:OK,title:"How It Works",description:"Residents can visit our office for their free annual t-shirt. Just bring in four receipts from a business in Alamo."},{icon:m5,title:"Community Unity",description:"The t-shirt program strengthens our local identity and creates visible connections throughout the community. When you see someone wearing their Alamo shirt, you know you're part of something special."},{icon:FK,title:"Get Involved",description:"Wear your shirt at community gatherings. Your participation helps build the strong, connected community we all value."},{icon:_5,title:"Program Impact",description:"With thousands of residents participating annually, our t-shirt program has become a powerful symbol of community engagement, social cohesion, and local pride. It supports local businesses and strengthens neighborhood bonds."}],galleryTitle:"Community Photos",galleryDescription:`Shop Alamo First is all about supporting the businesses right here in our
564community. Every purchase helps Alamo grow! 565See our community members proudly wearing their Shop Alamo First t-shirts`,contactTitle:"Get your Shop Alamo First T-Shirt.",contactDescription:"Contact us to learn when shirts become available:"},es:{title:"Programa Anual de Camisetas",subtitle:"Usa tu Orgullo de Alamo",description:"Ãnete a miles de miembros de la comunidad para celebrar nuestra identidad compartida y orgullo local a través de nuestro programa anual de camisetas.",sections:[{icon:jK,title:"Descripción del Programa",description:"Nuestro Programa Anual de Camisetas es una tradición querida que une a la comunidad. Cada año, diseñamos y distribuimos camisetas de marca a los residentes, fomentando un sentido de unidad y pertenencia en todo Alamo."},{icon:OK,title:"Cómo Funciona",description:"Los residentes pueden visitar nuestra oficina para obtener su camiseta anual gratuita. Solo traiga cuatro recibos de un negocio en Alamo."},{icon:m5,title:"Unidad Comunitaria",description:"El programa de camisetas fortalece nuestra identidad local y crea conexiones visibles en toda la comunidad. Cuando ves a alguien usando su camiseta de Alamo, sabes que eres parte de algo especial."},{icon:FK,title:"Participa",description:"Usa tu camiseta en reuniones comunitarias. Tu participación ayuda a construir la comunidad fuerte y conectada que todos valoramos."},{icon:_5,title:"Impacto del Programa",description:"Con miles de residentes participando anualmente, nuestro programa de camisetas se ha convert
565ido en un sÃmbolo poderoso de participación comunitaria, cohesión social y orgullo local. Apoya a los negocios locales y fortalece los lazos vecinales."}],galleryTitle:"Fotos de la Comunidad",galleryDescription:`Shop Alamo First se trata de apoyar a los negocios de nuestra comunidad. ¡Cada compra ayuda a Alamo a crecer! 566Mira a los miembros de nuestra comunidad usando con orgullo sus camisetas de Shop Alamo First`,contactTitle:"Get your Shop Alamo First T-Shirt.",contactDescription:"Contáctanos para saber cuándo las camisetas estén disponibles:"}};return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx(po,{language:e,onLanguageToggle:a}),g.jsxs("section",{className:"relative h-[60vh] overflow-hidden flex items-end",children:[g.jsx("div",{className:"flex h-[120%] absolute inset-0",style:{transform:`translateY(${r*.3}px)`},children:i.map((o,l)=>g.jsx("img",{src:o,alt:`Shop Alamo First Participant ${l+1}`,className:"h-full flex-1 object-cover object-top min-w-0"},l))}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsx("div",{className:"container mx-auto text-center",children:g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:"Shop Alamo First T-Shirt"})})})})]}),g.jsx("section",{className:"bg-gradient-to-br from-primary/5 via-background to-secondary/5 py-10 md:py-16",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:s[e].sections.map((o,l)=>{const u=o.icon,c=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20"},{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"}],d=c[l%c.length];return g.jsxs(un,{className:`hover-scale ${d.border} ${d.cardBg}`,children:[g.jsxs(zi,{children:[g.jsx("div",{className:`w-12 h-12 ${d.bg} rounded-lg flex items-center justify-center mb-4 shadow-md`,children:g.jsx(u,{className:"w-6 h-6 text-white"})}),g.jsx(Ui,{children:o.title})]}),g.jsx(kn,{children:g.jsx(ho,{className:"text-base",children:o.description})})]},l)})})})}),g.jsx(WBe,{title:s[e].galleryTitle,description:s[e].galleryDescription}),g.jsx("section",{className:"container mx-auto px-4 py-10 md:py-16",children:g.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[g.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:s[e].contactTitle}),g.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:s[e].contactDescription}),g.jsx(un,{className:"text-left",children:g.jsx(kn,{className:"p-6",children:g.jsxs("div",{className:"space-y-3",children:[g.jsx("p",{className:"font-semibold text-lg",children:"Alamo EDC"}),g.jsx("p",{children:"715 US Business 83"}),g.jsx("p",{children:"Alamo, TX 78516"}),g.jsx("p",{className:"pt-2",children:g.jsx("a",{href:"tel:9567876622",className:"text-primary hover:underline",children:"(956) 787-6622"})}),g.jsx("p",{children:g.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})})]})})})]})}),g.jsx(mo,{language:e})]})},QBe="/assets/alamo-highway-CH8YMbY6.jpg";function ZBe(e,t){const[r,n]=e.split("-");return new Date(parseInt(r),parseInt(n)-1,1).toLocaleDateString(t==="es"?"es-MX":"en-US",{month:"long",year:"numeric"})}const JBe=()=>{const[e,t]=R.useState("en"),[r,n]=R.useState([]),[i,a]=R.useState(!0),s=()=>{t(e==="en"?"es":"en")};R.useEffect(()=>{(async()=>{const{data:f,error:h}=await nn.from("featured_businesses").select("id, name, image_url, featured_month, display_order").eq("is_active",!0).order("featured_month",{ascending:!1,nullsFirst:!1}).order("display_order",{ascending:!0});!h&&f&&n(f),a(!1)})()},[]);const o=r.reduce((d,f)=>{const h=f.featured_month||"past";return d[h]||(d[h]=[]),d[h].push(f),d},{}),l=Object.keys(o).sort((d,f)=>d==="past"?1:f==="past"?-1:f.localeCompare(d)),c={en:{title:"Shop Local Biz",subt
566itle:"Support Your Neighbors, Strengthen Your Community",featuredSuffix:"Featured Businesses",pastTitle:"Past Featured Businesses",pastSubtitle:"Previously featured local favorites",monthSubtitle:d=>d?"This month's spotlight on local excellence":"Spotlight on local excellence",contact:{title:"Are You a Local Business Owner?",description:"The Alamo Economic Development Corporation is here to help your business succeed. From grants to incentives, we offer comprehensive support programs.",phone:"(956) 787-6622",email:"[email protected]",address:"715 US Business 83, Alamo, TX 78516",links:{empowerment:"Business Empowerment Programs",incentives:"View Available Incentives"}}},es:{title:"Compre Negocios Locales",subtitle:"Apoye a Sus Vecinos, Fortalezca Su Comunidad",featuredSuffix:"Negocios Destacados",pastTitle:"Negocios Destacados Anteriores",pastSubtitle:"Favoritos locales destacados anteriormente",monthSubtitle:d=>d?"El enfoque de este mes en la excelencia local":"Enfoque en la excelencia local",contact:{title:"¿Es Propietario de un Negocio Local?",description:"La Corporación de Desarrollo Económico de Ãlamo está aquà para ayudar a su negocio a tener éxito. Desde subvenciones hasta incentivos, ofrecemos programas de apoyo integral.",phone:"(956) 787-6622",email:"[email protected]",address:"715 US Business 83, Alamo, TX 78516",links:{empowerment:"Programas de Empoderamiento Empresarial",incentives:"Ver Incentivos Disponibles"}}}}[e];return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx(po,{language:e,onLanguageToggle:s}),g.jsxs("section",{className:"relative h-[45vh] min-h-[300px] md:h-[60vh] md:min-h-[400px] flex items-end overflow-hidden",children:[g.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${QBe})`}}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:c.title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:c.subtitle})]})})})]}),g.jsxs("main",{className:"container mx-auto px-4 py-12 md:py-20",children:[i?g.jsx("div",{className:"flex justify-center py-12 md:py-20",children:g.jsx(yl,{className:"h-8 w-8 animate-spin text-primary"})}):l.map((d,f)=>{const h=o[d],p=d==="past",m=p?c.pastTitle:`${ZBe(d,e)} ${c.featuredSuffix}`,_=p?c.pastSubtitle:c.monthSubtitle(f===0);return g.jsxs("section",{className:"mb-24",children:[g.jsxs("div",{className:"text-center mb-16",children:[g.jsx("h2",{className:`font-bold mb-4 text-primary ${p?"text-2xl md:text-4xl":"text-3xl md:text-5xl"}`,children:m}),g.jsx("p",{className:`text-muted-foreground ${p?"text-lg":"text-xl"}`,children:_})]}),g.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-7xl mx-auto",children:h.map(y=>g.jsxs("div",{className:"relative overflow-hidden rounded-2xl shadow-elegant hover:shadow-glow transition-all duration-500 bg-card group",children:[g.jsx("img",{src:y.image_url,alt:y.name,className:"w-full h-auto object-contain"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary/30 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"})]},y.id))})]},d)}),g.jsxs("section",{className:"bg-gradient-to-br from-primary/10 via-accent/5 to-primary/5 rounded-2xl p-12 md:p-16 text-center max-w-5xl mx-auto shadow-lg",children:[g.jsx(O5e,{className:"w-16 h-16 text-primary mx-auto mb-6"}),g.jsx("h2",{className:"text-2xl sm:text-4xl md:text-5xl font-bold mb-6",children:c.contact.title}),g.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-10 max-w-3xl mx-auto leading-relaxed",children:c.contact.description}),g.jsxs("div",{className:"space-y-5 mb-8 md:mb-12 text-lg",children:[g.jsxs("div",{className:"flex items-center justify-center gap-3",children:[g.jsx("span",{className:"font-semibold text-foreground",children:"Phone:"}),g.jsx("a",{href:`tel:${c.contact.phone}`,className:"text-primary hover:text-primary/80 transition-colors font-medium",children:c.contact.phone})]}),g.jsxs("div",{className:"flex items-center justify-center gap-3",children:[g.jsx("span",{className:"font-semibold text-foreground",children:"Email:"}),g.jsx("a",{href:`mailto:${c.contact.email}`,className:"text-primary hover:text-primary/80 transition-colors font-medium",children:c.contact.email})]}),g.jsx("p",{className:"text-muted-foreground",children:c.contact.address})]}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[g.jsx(gr,{asChild:!0,size:"lg",className:"shadow-md hover:shadow-lg transition-all",children:g.jsx(Rs,{to:"/community/business-empowerment",children:c.contact.links.empowerment})}),g.jsx(gr,{asChild:!0,size:"lg",variant:"outline",className:"shadow-sm hover:shadow-md transition-all",children:g.jsx(Rs,{to:"/incentives",children:c.contact.links.incentives})})]})]})]}),g.jsx(mo,{language:e})]})};var ih="Accordion",eze=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[mU,tze,rze]=Yw(ih),[EN,p5t]=Ou(ih,[rze,rpe]),gU=rpe(),w0e=_e.forwardRef((e,t)=>
566{const{type:r,...n}=e,i=n,a=n;return g.jsx(mU.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?g.jsx(sze,{...a,ref:t}):g.jsx(aze,{...i,ref:t})})});w0e.displayName=ih;var[x0e,nze]=EN(ih),[E0e,ize]=EN(ih,{collapsible:!1}),aze=_e.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:a=!1,...s}=e,[o,l]=rd({prop:r,defaultProp:n??"",onChange:i,caller:ih});return g.jsx(x0e,{scope:e.__scopeAccordion,value:_e.useMemo(()=>o?[o]:[],[o]),onItemOpen:l,onItemClose:_e.useCallback(()=>a&&l(""),[a,l]),children:g.jsx(E0e,{scope:e.__scopeAccordion,collapsible:a,children:g.jsx(T0e,{...s,ref:t})})})}),sze=_e.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},...a}=e,[s,o]=rd({prop:r,defaultProp:n??[],onChange:i,caller:ih}),l=_e.useCallback(c=>o((d=[])=>[...d,c]),[o]),u=_e.useCallback(c=>o((d=[])=>d.filter(f=>f!==c)),[o]);return g.jsx(x0e,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:g.jsx(E0e,{scope:e.__scopeAccordion,collapsible:!0,children:g.jsx(T0e,{...a,ref:t})})})}),[oze,TN]=EN(ih),T0e=_e.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:i,orientation:a="vertical",...s}=e,o=_e.useRef(null),l=Gn(o,t),u=tze(r),d=$A(i)==="ltr",f=_r(e.onKeyDown,h=>{var S;if(!eze.includes(h.key))return;const p=h.target,m=u().filter(A=>{var C;return!((C=A.ref.current)!=null&&C.disabled)}),_=m.findIndex(A=>A.ref.current===p),y=m.length;if(_===-1)return;h.preventDefault();let v=_;const b=0,w=y-1,x=()=>{v=_+1,v>w&&(v=b)},E=()=>{v=_-1,v<b&&(v=w)};switch(h.key){case"Home":v=b;break;case"End":v=w;break;case"ArrowRight":a==="horizontal"&&(d?x():E());break;case"ArrowDown":a==="vertical"&&x();break;case"ArrowLeft":a==="horizontal"&&(d?E():x());break;case"ArrowUp":a==="vertical"&&E();break}const T=v%y;(S=m[T].ref.current)==null||S.focus()});return g.jsx(oze,{scope:r,disabled:n,direction:i,orientation:a,children:g.jsx(mU.Slot,{scope:r,children:g.jsx(Hr.div,{...s,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),a3="AccordionItem",[lze,yU]=EN(a3),S0e=_e.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...i}=e,a=TN(a3,r),s=nze(a3,r),o=gU(r),l=Yc(),u=n&&s.value.includes(n)||!1,c=a.disabled||e.disabled;return g.jsx(lze,{scope:r,open:u,disabled:c,triggerId:l,children:g.jsx(ape,{"data-orientation":a.orientation,"data-state":O0e(u),...o,...i,ref:t,disabled:c,open:u,onOpenChange:d=>{d?s.onItemOpen(n):s.onItemClose(n)}})})});S0e.displayName=a3;var A0e="AccordionHeader",C0e=_e.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=TN(ih,r),a=yU(A0e,r);return g.jsx(Hr.h3,{"data-orientation":i.orientation,"data-state":O0e(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});C0e.displayName=A0e;var Y$="AccordionTrigger",P0e=_e.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=TN(ih,r),a=yU(Y$,r),s=ize(Y$,r),o=gU(r);return g.jsx(mU.ItemSlot,{scope:r,children:g.jsx(gje,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...o,...n,ref:t})})});P0e.displayName=Y$;var M0e="AccordionContent",k0e=_e.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,i=TN(ih,r),a=yU(M0e,r),s=gU(r);return g.jsx(yje,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});k0e.displayName=M0e;function O0e(e){return e?"open":"closed"}var uze=w0e,cze=S0e,dze=C0e,N0e=P0e,I0e=k0e;const fze=uze,D0e=R.forwardRef(({className:e,...t},r)=>g.jsx(cze,{ref:r,className:Xt("border-b",e),...t}));D0e.displayName="AccordionItem";const L0e=R.forwardRef(({className:e,children:t,...r},n)=>g.jsx(dze,{className:"flex",children:g.jsxs(N0e,{ref:n,className:Xt("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,g.jsx(OA,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));L0e.displayName=N0e.displayName;const j0e=R.forwardRef(({className:e,children:t,...r},n)=>g.jsx(I0e,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:g.jsx("div",{className:Xt("pb-4 pt-0",e),children:t})}));j0e.displayName=I0e.displayName;function ii(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 sd(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function bu(e,t){const r=ii(e);return isNaN(t)?sd(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Jf(e,t){const r=ii(e);if(isNaN(t))return sd(e,NaN);if(!t)return r;const n=r.getDate(),i=sd(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return n>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}const vU=6048e5,hze=864e5,R0e=6e4,$0e=36e5;let pze={};function GA(){return pze}function Zh(e,t){var o,l,u,c;const r=GA(),n=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=ii(e),a=i.getDay(),s=(a<n?7:0)+a-n;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function Rv(e){return Zh(e,{weekStartsOn:1}
566)}function F0e(e){const t=ii(e),r=t.getFullYear(),n=sd(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=Rv(n),a=sd(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Rv(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=s.getTime()?r:r-1}function $v(e){const t=ii(e);return t.setHours(0,0,0,0),t}function s3(e){const t=ii(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 Lh(e,t){const r=$v(e),n=$v(t),i=+r-s3(r),a=+n-s3(n);return Math.round((i-a)/hze)}function mze(e){const t=F0e(e),r=sd(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Rv(r)}function X$(e,t){const r=t*7;return bu(e,r)}function gze(e,t){return Jf(e,t*12)}function yze(e){let t;return e.forEach(function(r){const n=ii(r);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function vze(e){let t;return e.forEach(r=>{const n=ii(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function Zu(e,t){const r=$v(e),n=$v(t);return+r==+n}function _U(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function yh(e){if(!_U(e)&&typeof e!="number")return!1;const t=ii(e);return!isNaN(Number(t))}function bS(e,t){const r=ii(e),n=ii(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function _ze(e,t,r){const n=Zh(e,r),i=Zh(t,r),a=+n-s3(n),s=+i-s3(i);return Math.round((a-s)/vU)}function bze(e){const t=ii(e);return t.setHours(23,59,59,999),t}function bU(e){const t=ii(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function wze(e,t){const r=ii(e.start),n=ii(e.end);let i=+r>+n;const a=i?+r:+n,s=i?n:r;s.setHours(0,0,0,0);let o=1;const l=[];for(;+s<=a;)l.push(ii(s)),s.setDate(s.getDate()+o),s.setHours(0,0,0,0);return i?l.reverse():l}function lc(e){const t=ii(e);return t.setDate(1),t.setHours(0,0,0,0),t}function B0e(e){const t=ii(e),r=sd(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function wU(e,t){var o,l,u,c;const r=GA(),n=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=ii(e),a=i.getDay(),s=(a<n?-7:0)+6-(a-n);return i.setDate(i.getDate()+s),i.setHours(23,59,59,999),i}function z0e(e){return wU(e,{weekStartsOn:1})}const xze={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"}},Eze=(e,t,r)=>{let n;const i=xze[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function jD(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Tze={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Sze={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Aze={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Cze={date:jD({formats:Tze,defaultWidth:"full"}),time:jD({formats:Sze,defaultWidth:"full"}),dateTime:jD({formats:Aze,defaultWidth:"full"})},Pze={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Mze=(e,t,r,n)=>Pze[e];function C2(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):s;i=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[o]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const kze={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Oze={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Nze={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"]},Ize={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","Frid
566ay","Saturday"]},Dze={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"}},Lze={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"}},jze=(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"},Rze={ordinalNumber:jze,era:C2({values:kze,defaultWidth:"wide"}),quarter:C2({values:Oze,defaultWidth:"wide",argumentCallback:e=>e-1}),month:C2({values:Nze,defaultWidth:"wide"}),day:C2({values:Ize,defaultWidth:"wide"}),dayPeriod:C2({values:Dze,defaultWidth:"wide",formattingValues:Lze,defaultFormattingWidth:"wide"})};function P2(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?Fze(o,d=>d.test(s)):$ze(o,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const c=t.slice(s.length);return{value:u,rest:c}}}function $ze(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Fze(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Bze(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=r.valueCallback?r.valueCallback(s):s;const o=t.slice(i.length);return{value:s,rest:o}}}const zze=/^(\d+)(th|st|nd|rd)?/i,Uze=/\d+/i,Wze={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},Vze={any:[/^b/i,/^(a|c)/i]},Hze={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gze={any:[/1/i,/2/i,/3/i,/4/i]},qze={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},Kze={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]},Yze={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},Xze={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]},Qze={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},Zze={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}},Jze={ordinalNumber:Bze({matchPattern:zze,parsePattern:Uze,valueCallback:e=>parseInt(e,10)}),era:P2({matchPatterns:Wze,defaultMatchWidth:"wide",parsePatterns:Vze,defaultParseWidth:"any"}),quarter:P2({matchPatterns:Hze,defaultMatchWidth:"wide",parsePatterns:Gze,defaultParseWidth:"any",valueCallback:e=>e+1}),month:P2({matchPatterns:qze,defaultMatchWidth:"wide",parsePatterns:Kze,defaultParseWidth:"any"}),day:P2({matchPatterns:Yze,defaultMatchWidth:"wide",parsePatterns:Xze,defaultParseWidth:"any"}),dayPeriod:P2({matchPatterns:Qze,defaultMatchWidth:"any",parsePatterns:Zze,defaultParseWidth:"any"})},U0e={code:"en-US",formatDistance:Eze,formatLong:Cze,formatRelative:Mze,localize:Rze,match:Jze,options:{weekStartsOn:0,firstWeekContainsDate:1}};function e7e(e){const t=ii(e);return Lh(t,B0e(t))+1}function W0e(e){const t=ii(e),r=+Rv(t)-+mze(t);return Math.round(r/vU)+1}function V0e(e,t){var c,d,f,h;const r=ii(e),n=r.getFullYear(),i=GA(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=sd(e,0);s.setFullYear(n+1,0,a),s.setHours(0,0,0,0);const o=Zh(s,t),l=sd(e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);const u=Zh(l,t);return r.getTime()>=o.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function t7e(e,t){var o,l,u,c;const r=GA(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=V0e(e,t),a=sd(e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),Zh(a,t)}function H0e(e,t){const r=ii(e),n=+Zh(r,t)-+t7e(r,t);return Math.round(n/vU)+1}function ta(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Dm={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return ta(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):ta(r+1,2)},d(e,t){return ta(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 ta(e.getHours()%12||12,t.length)},H(e,t){return ta(e.getHours(),t.length)},m(e,t){return ta(e.getMinutes(),t.length)},s(e,t){return ta(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return ta(i,t.length)}},J_={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xQ={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(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Dm.y(e,t)},Y:function(e,t,r,n){const i=V0e(e,n),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return ta(s,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):ta(a,t.length)},R:function(e,t){const r=F0e(e);return ta(r,t.length)},u:function(e,t){const r=e.getFullYear();return ta(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 ta(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 ta(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 Dm.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 ta(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 i=H0e(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):ta(i,t.length)},I:function(e,t,r){const n=W0e(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):ta(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Dm.d(e,t)},D:function(e,t,r){const n=e7e(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):ta(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 i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ta(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ta(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return ta(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=J_.noon:n===0?i=J_.midnight:i=n/12>
vendor: 4,720 bytes, line 566
566=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=J_.evening:n>=12?i=J_.afternoon:n>=4?i=J_.morning:i=J_.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Dm.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Dm.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):ta(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):ta(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Dm.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Dm.s(e,t)},S:function(e,t){return Dm.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return TQ(n);case"XXXX":case"XX":return my(n);case"XXXXX":case"XXX":default:return my(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return TQ(n);case"xxxx":case"xx":return my(n);case"xxxxx":case"xxx":default:return my(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+EQ(n,":");case"OOOO":default:return"GMT"+my(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+EQ(n,":");case"zzzz":default:return"GMT"+my(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return ta(n,t.length)},T:function(e,t,r){const n=e.getTime();return ta(n,t.length)}};function EQ(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+t+ta(a,2)}function TQ(e,t){return e%60===0?(e>0?"-":"+")+ta(Math.abs(e)/60,2):my(e,t)}function my(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=ta(Math.trunc(n/60),2),a=ta(n%60,2);return r+i+t+a}const SQ=(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"})}},G0e=(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"})}},r7e=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return SQ(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}}",SQ(n,t)).replace("{{time}}",G0e(i,t))},n7e={p:G0e,P:r7e},i7e=/^D+$/,a7e=/^Y+$/,s7e=["D","DD","YY","YYYY"];function o7e(e){return i7e.test(e)}function l7e(e){return a7e.test(e)}function u7e(e,t,r){const n=c7e(e,t,r);if(console.warn(n),s7e.includes(e))throw new RangeError(n)}function c7e(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 d7e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,f7e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,h7e=/^'([^]*?)'?$/,p7e=/''/g,m7e=/[a-zA-Z]/;function Ii(e,t,r){var c,d,f,h,p,m,_,y;const n=GA(),i=(r==null?void 0:r.locale)??n.locale??U0e,a=(r==null?void 0:r.firstWeekContainsDate)??((d=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((h=(f=n.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((m=(p=r==null?void 0:r.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((y=(_=n.locale)==null?void 0:_.options)==null?void 0:y.weekStartsOn)??0,o=ii(e);if(!yh(o))throw new RangeError("Invalid time value");let l=t.match(f7e).map(v=>{const b=v[0];if(b==="p"||b==="P"){const w=n7e[b];return w(v,i.formatLong)}return v}).join("").match(d7e).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const b=v[0];if(b==="'")return{isToken:!1,value:g7e(v)};if(xQ[b])return{isToken:!0,value:v};
vendor: 4,209 bytes, line 566
566if(b.match(m7e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:v}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return l.map(v=>{if(!v.isToken)return v.value;const b=v.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&l7e(b)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&o7e(b))&&u7e(b,t,String(e));const w=xQ[b[0]];return w(o,b,i.localize,u)}).join("")}function g7e(e){const t=e.match(h7e);return t?t[1].replace(p7e,"'"):e}function y7e(e){const t=ii(e),r=t.getFullYear(),n=t.getMonth(),i=sd(e,0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}function v7e(e){return Math.trunc(+ii(e)/1e3)}function _7e(e){const t=ii(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function b7e(e,t){return _ze(_7e(e),lc(e),t)+1}function Q$(e,t){const r=ii(e),n=ii(t);return r.getTime()>n.getTime()}function q0e(e,t){const r=ii(e),n=ii(t);return+r<+n}function xU(e,t){const r=ii(e),n=ii(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function w7e(e,t){const r=ii(e),n=ii(t);return r.getFullYear()===n.getFullYear()}function RD(e,t){return bu(e,-t)}function o3(e,t){const n=S7e(e);let i;if(n.date){const l=A7e(n.date,2);i=C7e(l.restDateString,l.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const a=i.getTime();let s=0,o;if(n.time&&(s=P7e(n.time),isNaN(s)))return new Date(NaN);if(n.timezone){if(o=M7e(n.timezone),isNaN(o))return new Date(NaN)}else{const l=new Date(a+s),u=new Date(0);return u.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),u.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),u}return new Date(a+s+o)}const eM={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},x7e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,E7e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,T7e=/^([+-])(\d{2})(?::?(\d{2}))?$/;function S7e(e){const t={},r=e.split(eM.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],eM.timeZoneDelimiter.test(t.date)&&(t.date=e.split(eM.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const i=eM.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function A7e(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function C7e(e,t){if(t===null)return new Date(NaN);const r=e.match(x7e);if(!r)return new Date(NaN);const n=!!r[4],i=M2(r[1]),a=M2(r[2])-1,s=M2(r[3]),o=M2(r[4]),l=M2(r[5])-1;if(n)return D7e(t,o,l)?k7e(t,o,l):new Date(NaN);{const u=new Date(0);return!N7e(t,a,s)||!I7e(t,i)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(i,s)),u)}}function M2(e){return e?parseInt(e):1}function P7e(e){const t=e.match(E7e);if(!t)return NaN;const r=$D(t[1]),n=$D(t[2]),i=$D(t[3]);return L7e(r,n,i)?r*$0e+n*R0e+i*1e3:NaN}function $D(e){return e&&parseFloat(e.replace(",","."))||0}function M7e(e){if(e==="Z")return 0;const t=e.match(T7e);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return j7e(n,i)?r*(n*$0e+i*R0e):NaN}function k7e(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const i=n.getUTCDay()||7,a=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}const O7e=[31,null,31,30,31,30,31,31,30,31,30,31];function K0e(e){return e%400===0||e%4===0&&e%100!==0}function N7e(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(O7e[t]||(K0e(e)?29:28))}function I7e(e,t){return t>=1&&t<=(K0e(e)?366:365)}function D7e(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function L7e(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function j7e(e,t){return t>=0&&t<=59}function FD(e,t){const r=ii(e),n=r.getFullYear(),i=r.getDate(),a=sd(e,0);a.setFullYear(n,t,15),a.setHours(0,0,0,0);const s=y7e(a);return r.setMonth(t,Math.min(i,s)),r}function AQ(e,t){const r=ii(e);return isNaN(+r)?sd(e,NaN):(r.setFullYear(t),r)}const R7e=()=>
566{const[e,t]=R.useState("en"),[r,n]=R.useState(null),i=()=>{t(c=>c==="en"?"es":"en")},{data:a,isLoading:s}=r_({queryKey:["board-agendas"],queryFn:async()=>{const{data:c,error:d}=await nn.from("board_agendas").select("*").order("meeting_date",{ascending:!1});if(d)throw d;return c}}),o=a==null?void 0:a.reduce((c,d)=>{const f=o3(d.meeting_date).getFullYear().toString();return c[f]||(c[f]=[]),c[f].push(d),c},{}),u={en:{title:"Board Meetings",subtitle:"Stay informed about Alamo EDC board meetings and access agendas",meetingInfo:"Meeting Information",schedule:"Schedule",scheduleDetail:"Regular meetings are held the 2nd Wednesday of the month at 6:00 PM",publicParticipation:"Public Participation",publicDetail:"Community members are welcome to attend board meetings. Public comments may be made during the designated public comment period.",contact:"Contact",contactDetail:"For meeting inquiries or to submit items for the agenda:",contactEmail:"[email protected]",contactPhone:"(956) 787-6622",pastMeetings:"Past Meetings Archive",viewAgenda:"View",downloadAgenda:"Download",noAgendas:"No agendas available yet",loading:"Loading agendas..."},es:{title:"Reuniones de la Junta",subtitle:"Manténgase informado sobre las reuniones de la junta de Alamo EDC y acceda a las agendas",meetingInfo:"Información de Reuniones",schedule:"Horario",scheduleDetail:"Las reuniones regulares se llevan a cabo el segundo miércoles del mes a las 6:00 PM",publicParticipation:"Participación Pública",publicDetail:"Los miembros de la comunidad son bienvenidos a asistir a las reuniones de la junta. Se pueden hacer comentarios públicos durante el perÃodo de comentarios públicos designado.",contact:"Contacto",contactDetail:"Para consultas sobre reuniones o para enviar temas para la agenda:",contactEmail:"[email protected]",contactPhone:"(956) 787-6622",pastMeetings:"Archivo de Reuniones Pasadas",viewAgenda:"Ver",downloadAgenda:"Descargar",n
566oAgendas:"Aún no hay agendas disponibles",loading:"Cargando agendas..."}}[e];return g.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-background to-secondary/20",children:[g.jsx(po,{language:e,onLanguageToggle:i}),g.jsxs("main",{className:"pt-16 md:pt-24 pb-16",children:[g.jsx("section",{className:"py-12 bg-primary text-primary-foreground",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsxs("div",{className:"max-w-3xl",children:[g.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold mb-4",children:u.title}),g.jsx("p",{className:"text-lg opacity-90",children:u.subtitle})]})})}),g.jsxs("div",{className:"container mx-auto px-4 py-12",children:[g.jsxs(un,{className:"mb-8 md:mb-12 border-primary/20 shadow-large",children:[g.jsx(zi,{children:g.jsxs(Ui,{className:"text-2xl flex items-center gap-2",children:[g.jsx(av,{className:"h-6 w-6 text-primary"}),u.meetingInfo]})}),g.jsxs(kn,{className:"space-y-6",children:[g.jsxs("div",{children:[g.jsxs("h3",{className:"font-semibold text-lg mb-2 flex items-center gap-2",children:[g.jsx(jg,{className:"h-5 w-5 text-primary"}),u.schedule]}),g.jsx("p",{className:"text-muted-foreground",children:u.scheduleDetail})]}),g.jsxs("div",{className:"border-t pt-6",children:[g.jsx("h3",{className:"font-semibold text-lg mb-2",children:u.publicParticipation}),g.jsx("p",{className:"text-muted-foreground mb-4",children:u.publicDetail}),g.jsxs("div",{className:"flex items-start gap-2 text-sm bg-secondary/50 p-4 rounded-lg",children:[g.jsx(IA,{className:"h-5 w-5 text-primary mt-0.5"}),g.jsxs("div",{children:[g.jsx("strong",{children:u.contact}),g.jsx("p",{className:"text-muted-foreground",children:u.contactDetail}),g.jsxs("p",{className:"text-sm mt-2",children:[g.jsx("a",{href:`mailto:${u.contactEmail}`,className:"text-primary hover:underline",children:u.contactEmail})," ⢠",g.jsx("a",{href:`tel:${u.contactPhone}`,className:"text-primary hover:underline",children:u.contactPhone})]})]})]})]})]})]}),g.jsxs("section",{children:[g.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-6",children:u.pastMeetings}),s?g.jsxs("div",{className:"text-center py-8",children:[g.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),g.jsx("p",{className:"mt-4 text-muted-foreground",children:u.loading})]}):o&&Object.keys(o).length>0?g.jsx(fze,{type:"single",collapsible:!0,defaultValue:new Date().getFullYear().toString(),className:"space-y-4",children:Object.entries(o).sort(([c],[d])=>parseInt(d)-parseInt(c)).map(([c,d])=>g.jsxs(D0e,{value:c,className:"border rounded-lg px-4",children:[g.jsx(L0e,{className:"text-xl font-semibold",children:c}),g.jsx(j0e,{children:g.jsx("div",{className:"space-y-4 pt-4",children:d.map(f=>g.jsx(un,{children:g.jsx(kn,{className:"pt-6",children:g.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[g.jsx(jg,{className:"h-4 w-4 text-primary"}),g.jsx("span",{className:"font-medium",children:Ii(o3(f.meeting_date),"MMMM d, yyyy")})]}),f.title&&g.jsx("div",{className:"text-sm font-medium",children:f.title}),f.description&&g.jsx("div",{className:"text-sm text-muted-foreground",children:f.description})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs(gr,{variant:"default",size:"sm",onClick:()=>n(f.file_url),children:[g.jsx(kz,{className:"mr-2 h-4 w-4"}),u.viewAgenda]}),g.jsx(gr,{variant:"outline",size:"sm",asChild:!0,children:g.jsxs("a",{href:f.file_url,target:"_blank",rel:"noopener noreferrer",download:!0,children:[g.jsx(Xw,{className:"mr-2 h-4 w-4"}),u.downloadAgenda]})})]})]})})},f.id))})})]},c))}):g.jsx("div",{className:"text-center py-8 text-muted-foreground",children:u.noAgendas})]})]})]}),g.jsx(wN,{open:!!r,onOpenChange:()=>n(null),children:g.jsxs(WA,{className:"max-w-5xl w-[95vw] h-[92dvh] p-0",children:[g.jsxs(VA,{className:"p-4 pb-0 pr-12",children:[g.jsx(HA,{className:"text-base sm:text-lg",children:e==="en"?"Agenda Viewer":"Visor de Agenda"}),r&&g.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary underline underline-offset-4 text-left",children:e==="en"?"Open PDF in a new tab":"Abrir PDF en una nueva pestaña"})]}),g.jsx("div",{className:"flex-1 p-2 sm:p-4 pt-2 h-[calc(92dvh-130p
566x)]",children:r&&g.jsx("iframe",{src:`https://docs.google.com/viewer?url=${encodeURIComponent(r)}&embedded=true`,className:"w-full h-full rounded-lg border",title:"PDF Viewer"})})]})}),g.jsx(mo,{language:e})]})};function $7e(){const[e,t]=R.useState(""),[r,n]=R.useState(""),[i,a]=R.useState(!1),[s,o]=R.useState(!1),[l,u]=R.useState(""),[c,d]=R.useState(!1),[f,h]=R.useState(!1),p=ix(),{toast:m}=Kw(),{isAdmin:_,checkAdminStatus:y}=i_();R.useEffect(()=>{_&&p("/admin/dashboard")},[_,p]),R.useEffect(()=>{f&&!_&&!i&&(m({title:"Access Denied",description:"You do not have admin privileges.",variant:"destructive"}),nn.auth.signOut(),h(!1))},[f,_,i,m]);const v=async w=>{w.preventDefault(),a(!0);try{const{error:x}=await nn.auth.signInWithPassword({email:e,password:r});if(x)throw x;await y(),h(!0)}catch(x){m({title:"Login Failed",description:x.message,variant:"destructive"})}finally{a(!1)}},b=async w=>{w.preventDefault(),d(!0);try{const{error:x}=await nn.auth.resetPasswordForEmail(l,{redirectTo:`${window.location.origin}/admin/reset-password`});if(x)throw x;m({title:"Email Sent",description:"Check your inbox for the password reset link."}),o(!1),u("")}catch(x){m({title:"Reset Failed",description:x.message,variant:"destructive"})}finally{d(!1)}};return g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:g.jsxs(un,{className:"w-full max-w-md",children:[g.jsxs(zi,{className:"space-y-1",children:[g.jsx(Ui,{className:"text-2xl font-bold",children:s?"Reset Password":"Admin Login"}),g.jsx(ho,{children:s?"Enter your email to receive a reset link":"Enter your credentials to access the admin dashboard"})]}),g.jsx(kn,{children:s?g.jsxs("form",{onSubmit:b,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"resetEmail",className:"text-sm font-medium",children:"Email"}),g.jsx(Ya,{id:"resetEmail",type:"email",placeholder:"[email protected]",value:l,onChange:w=>u(w.target.value),required:!0})]}),g.jsx(gr,{type:"submit",className:"w-full",disabled:c,children:c?"Sending...":"Send Reset Link"}),g.jsx(gr,{type:"button",variant:"ghost",className:"w-full",onClick:()=>o(!1),children:"Back to Login"})]}):g.jsxs("form",{onSubmit:v,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"email",className:"text-sm font-medium",children:"Email"}),g.jsx(Ya,{id:"email",type:"email",placeholder:"[email protected]",value:e,onChange:w=>t(w.target.value),required:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"password",className:"text-sm font-medium",children:"Password"}),g.jsx(Ya,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:w=>n(w.target.value),required:!0})]}),g.jsx(gr,{type:"submit",className:"w-full",disabled:i,children:i?"Logging in...":"Login"}),g.jsx(gr,{type:"button",variant:"link",className:"w-full text-muted-foreground",onClick:()=>o(!0),children:"Forgot your password?"})]})})]})})}var gn=function(){return gn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},gn.apply(this,arguments)};function F7e(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Y0e(e,t,r){for(var n=0,i=t.length,a;n<i;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 qA(e){return e.mode==="multiple"}function KA(e){return e.mode==="range"}function SN(e){return e.mode==="single"}var B7e={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
566p-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 z7e(e,t){return Ii(e,"LLLL y",t)}function U7e(e,t){return Ii(e,"d",t)}function W7e(e,t){return Ii(e,"LLLL",t)}function V7e(e){return"".concat(e)}function H7e(e,t){return Ii(e,"cccccc",t)}function G7e(e,t){return Ii(e,"yyyy",t)}var q7e=Object.freeze({__proto__:null,formatCaption:z7e,formatDay:U7e,formatMonthCaption:W7e,formatWeekNumber:V7e,formatWeekdayName:H7e,formatYearCaption:G7e}),K7e=function(e,t,r){return Ii(e,"do MMMM (EEEE)",r)},Y7e=function(){return"Month: "},X7e=function(){return"Go to next month"},Q7e=function(){return"Go to previous month"},Z7e=function(e,t){return Ii(e,"cccc",t)},J7e=function(e){return"Week n. ".concat(e)},eUe=function(){return"Year: "},tUe=Object.freeze({__proto__:null,labelDay:K7e,labelMonthDropdown:Y7e,labelNext:X7e,labelPrevious:Q7e,labelWeekNumber:J7e,labelWeekday:Z7e,labelYearDropdown:eUe});function rUe(){var e="buttons",t=B7e,r=U0e,n={},i={},a=1,s={},o=new Date;return{captionLayout:e,classNames:t,formatters:q7e,labels:tUe,locale:r,modifiersClassNames:n,modifiers:i,numberOfMonths:a,styles:s,today:o,mode:"default"}}function nUe(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,i=e.toMonth,a=e.fromDate,s=e.toDate;return n?a=lc(n):t&&(a=new Date(t,0,1)),i?s=bU(i):r&&(s=new Date(r,11,31)),{fromDate:a?$v(a):void 0,toDate:s?$v(s):void 0}}var X0e=R.createContext(void 0);function iUe(e){var t,r=e.initialProps,n=rUe(),i=nUe(r),a=i.fromDate,s=i.toDate,o=(t=r.captionLayout)!==null&&t!==void 0?t:n.captionLayout;o!=="buttons"&&(!a||!s)&&(o="buttons");var l;(SN(r)||qA(r)||KA(r))&&(l=r.onSelect);var u=gn(gn(gn({},n),r),{captionLayout:o,classNames:gn(gn({},n.classNames),r.classNames),components:gn({},r.components),formatters:gn(gn({},n.formatters),r.formatters),fromDate:a,labels:gn(gn({},n.labels),r.labels),mode:r.mode||n.mode,modifiers:gn(gn({},n.modifiers),r.modifiers),modifiersClassNames:gn(gn({},n.modifiersClassNames),r.modifiersClassNames),onSelect:l,styles:gn(gn({},n.styles),r.styles),toDate:s});return g.jsx(X0e.Provider,{value:u,children:e.children})}function ja(){var e=R.useContext(X0e);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Q0e(e){var t=ja(),r=t.locale,n=t.classNames,i=t.styles,a=t.formatters.formatCaption;return g.jsx("div",{className:n.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:a(e.displayMonth,{locale:r})})}function aUe(e){return g.jsx("svg",gn({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:g.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 Z0e(e){var t,r,n=e.onChange,i=e.value,a=e.children,s=e.caption,o=e.className,l=e.style,u=ja(),c=(r=(t=u.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&r!==void 0?r:aUe;return g.jsxs("div",{className:o,style:l,children:[g.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),g.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:i,onChange:n,children:a}),g.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[s,g.jsx(c,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function sUe(e){var t,r=ja(),n=r.fromDate,i=r.toDate,a=r.styles,s=r.locale,o=r.formatters.formatMonthCaption,l=r.classNames,u=r.components,c=r.labels.labelMonthDropdown;if(!n)return g.jsx(g.Fragment,{});if(!i)return g.jsx(g.Fragment,{});var d=[];if(w7e(n,i))for(var f=lc(n),h=n.getMonth();h<=i.getMonth();h++)d.push(FD(f,h));else for(var f=lc(new Date),h=0;h<=11;h++)d.push(FD(f,h));var p=function(_){var y=Number(_.target.value),v=FD(lc(e.displayMonth),y);e.onChange(v)},m=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:Z0e;return g.jsx(m,{name:"months","aria-label":c(),className:l.dropdown_month,style:a.dropdown_month,onChange:p,value:e.displayMonth.getMonth(),c
566aption:o(e.displayMonth,{locale:s}),children:d.map(function(_){return g.jsx("option",{value:_.getMonth(),children:o(_,{locale:s})},_.getMonth())})})}function oUe(e){var t,r=e.displayMonth,n=ja(),i=n.fromDate,a=n.toDate,s=n.locale,o=n.styles,l=n.classNames,u=n.components,c=n.formatters.formatYearCaption,d=n.labels.labelYearDropdown,f=[];if(!i)return g.jsx(g.Fragment,{});if(!a)return g.jsx(g.Fragment,{});for(var h=i.getFullYear(),p=a.getFullYear(),m=h;m<=p;m++)f.push(AQ(B0e(new Date),m));var _=function(v){var b=AQ(lc(r),Number(v.target.value));e.onChange(b)},y=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:Z0e;return g.jsx(y,{name:"years","aria-label":d(),className:l.dropdown_year,style:o.dropdown_year,onChange:_,value:r.getFullYear(),caption:c(r,{locale:s}),children:f.map(function(v){return g.jsx("option",{value:v.getFullYear(),children:c(v,{locale:s})},v.getFullYear())})})}function lUe(e,t){var r=R.useState(e),n=r[0],i=r[1],a=t===void 0?n:t;return[a,i]}function uUe(e){var t=e.month,r=e.defaultMonth,n=e.today,i=t||r||n||new Date,a=e.toDate,s=e.fromDate,o=e.numberOfMonths,l=o===void 0?1:o;if(a&&bS(a,i)<0){var u=-1*(l-1);i=Jf(a,u)}return s&&bS(i,s)<0&&(i=s),lc(i)}function cUe(){var e=ja(),t=uUe(e),r=lUe(t,e.month),n=r[0],i=r[1],a=function(s){var o;if(!e.disableNavigation){var l=lc(s);i(l),(o=e.onMonthChange)===null||o===void 0||o.call(e,l)}};return[n,a]}function dUe(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,i=lc(e),a=lc(Jf(i,n)),s=bS(a,i),o=[],l=0;l<s;l++){var u=Jf(i,l);o.push(u)}return r&&(o=o.reverse()),o}function fUe(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,i=t.numberOfMonths,a=i===void 0?1:i,s=n?a:1,o=lc(e);if(!r)return Jf(o,s);var l=bS(r,e);if(!(l<a))return Jf(o,s)}}function hUe(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,i=t.numberOfMonths,a=i===void 0?1:i,s=n?a:1,o=lc(e);if(!r)return Jf(o,-s);var l=bS(o,r);if(!(l<=0))return Jf(o,-s)}}var J0e=R.createContext(void 0);function pUe(e){var t=ja(),r=cUe(),n=r[0],i=r[1],a=dUe(n,t),s=fUe(n,t),o=hUe(n,t),l=function(d){return a.some(function(f){return xU(d,f)})},u=function(d,f){l(d)||(f&&q0e(d,f)?i(Jf(d,1+t.numberOfMonths*-1)):i(d))},c={currentMonth:n,displayMonths:a,goToMonth:i,goToDate:u,previousMonth:o,nextMonth:s,isDateDisplayed:l};return g.jsx(J0e.Provider,{value:c,children:e.children})}function YA(){var e=R.useContext(J0e);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function CQ(e){var t,r=ja(),n=r.classNames,i=r.styles,a=r.components,s=YA().goToMonth,o=function(c){s(Jf(c,e.displayIndex?-e.dis
566playIndex:0))},l=(t=a==null?void 0:a.CaptionLabel)!==null&&t!==void 0?t:Q0e,u=g.jsx(l,{id:e.id,displayMonth:e.displayMonth});return g.jsxs("div",{className:n.caption_dropdowns,style:i.caption_dropdowns,children:[g.jsx("div",{className:n.vhidden,children:u}),g.jsx(sUe,{onChange:o,displayMonth:e.displayMonth}),g.jsx(oUe,{onChange:o,displayMonth:e.displayMonth})]})}function mUe(e){return g.jsx("svg",gn({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:g.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 gUe(e){return g.jsx("svg",gn({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:g.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 l3=R.forwardRef(function(e,t){var r=ja(),n=r.classNames,i=r.styles,a=[n.button_reset,n.button];e.className&&a.push(e.className);var s=a.join(" "),o=gn(gn({},i.button_reset),i.button);return e.style&&Object.assign(o,e.style),g.jsx("button",gn({},e,{ref:t,type:"button",className:s,style:o}))});function yUe(e){var t,r,n=ja(),i=n.dir,a=n.locale,s=n.classNames,o=n.styles,l=n.labels,u=l.labelPrevious,c=l.labelNext,d=n.components;if(!e.nextMonth&&!e.previousMonth)return g.jsx(g.Fragment,{});var f=u(e.previousMonth,{locale:a}),h=[s.nav_button,s.nav_button_previous].join(" "),p=c(e.nextMonth,{locale:a}),m=[s.nav_button,s.nav_button_next].join(" "),_=(t=d==null?void 0:d.IconRight)!==null&&t!==void 0?t:gUe,y=(r=d==null?void 0:d.IconLeft)!==null&&r!==void 0?r:mUe;return g.jsxs("div",{className:s.nav,style:o.nav,children:[!e.hidePrevious&&g.jsx(l3,{name:"previous-month","aria-label":f,className:h,style:o.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:i==="rtl"?g.jsx(_,{className:s.nav_icon,style:o.nav_icon}):g.jsx(y,{className:s.nav_icon,style:o.nav_icon})}),!e.hideNext&&g.jsx(l3,{name:"next-month","aria-label":p,className:m,style:o.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:i==="rtl"?g.jsx(y,{className:s.nav_icon,style:o.nav_icon}):g.jsx(_,{className:s.nav_icon,style:o.nav_icon})})]})}function PQ(e){var t=ja().numberOfMonths,r=YA(),n=r.previousMonth,i=r.nextMonth,a=r.goToMonth,s=r.displayMonths,o=s.findIndex(function(p){return xU(e.displayMonth,p)}),l=o===0,u=o===s.length-1,c=t>1&&(l||!u),d=t>1&&(u||!l),f=function(){n&&a(n)},h=function(){i&&a(i)};return g.jsx(yUe,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:i,previousMonth:n,onPreviousClick:f,onNextClick:h})}function vUe(e){var t,r=ja(),n=r.classNames,i=r.disableNavigation,a=r.styles,s=r.captionLayout,o=r.components,l=(t=o==null?void 0:o.CaptionLabel)!==null&&t!==void 0?t:Q0e,u;return i?u=g.jsx(l,{id:e.id,displayMonth:e.displayMonth}):s==="dropdown"?u=g.jsx(CQ,{displayMonth:e.displayMonth,id:e.id}):s==="dropdown-buttons"?u=g.jsxs(g.Fragment,{children:[g.jsx(CQ,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),g.jsx(PQ,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=g.jsxs(g.Fragment,{children:[g.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),g.jsx(PQ,{displayMonth:e.displayMonth,id:e.id})]}),g.jsx("div",{className:n.caption,style:a.caption,children:u})}function _Ue(e){var t=ja(),r=t.footer,n=t.styles,i=t.classNames.tfoot;return r?g.jsx("tfoot",{className:i,style:n.tfoot,children:g.jsx("tr",{children:g.jsx("td",{colSpan:8,children:r})})}):g.jsx(g.Fragment,{})}function bUe(e,t,r){for(var n=r?Rv(new Date):Zh(new Date,{locale:e,weekStartsOn:t}),i=[],a=0;a<7;a++){var s=bu(n,a);i.push(s)}return i}function wUe(){var e=ja(),t=e.classNames,r=e.styles,n=e.showWeekNumber,i=e.locale,a=e.weekStartsOn,s=e.ISOWeek,o=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,u=bUe(i,a,s);return g.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&g.jsx("td",{style:r.head_cell,className:t.head_cell}),u.map(function(c,d){return g.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":l(c,{locale:i}),children:o(c,{locale:i})},d)})]})}function xUe(){var e,t=ja(),r=t.classNames,n=t.styles,i=t.components,a=(e=i==null?void 0:i.HeadRow)!==null&&e!==void 0?e:wUe;return g.jsx("thead",{style:n.head,className:r.head,children:g.jsx(a,{})})}function EUe(e){var t=ja(),r=t.locale,n=t.formatters.formatDay;return g.jsx(g.Fragment,{children:n(e.date,{locale:r})})}var EU=R.createContext(void 0);function TUe(e){if(!qA(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return g.jsx(EU.Provider,{value:t,children:e.children})}return g.jsx(SUe,{initialProps:e.initialProps,children:e.children})}function SUe(e){var t=e.initialProps,r=e.children,n=t.selected,i=t.min,a=t.max,s=function(u,c,d){var f,h;(f=t.onDayClick)===null||f===void 0||f.call(t,u,c,d);var p=!!(c.selected&&i&&(n==null?void 0:n.length)===i);if(!p){var m=!!(!c.selected&&a&&(n==null?void 0:n.length)===a);if(!m){var _=n?Y0e([],n):[];if(c.selected){var y=_.findIndex(function(v){return Zu(u,v)});_.splice(y,1)}else _.push(u);(h=t.onSelect)===null||h===void 0||h.call(t,_,u,c,d)}}},o={disabled:[]};n&&o.disabled.push(function(u){var c=a&&n.length>a-1,d=n.some(function(f){return Zu(f,u)});return!!(c&&!d)});
566var l={selected:n,onDayClick:s,modifiers:o};return g.jsx(EU.Provider,{value:l,children:r})}function TU(){var e=R.useContext(EU);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function AUe(e,t){var r=t||{},n=r.from,i=r.to;return n&&i?Zu(i,e)&&Zu(n,e)?void 0:Zu(i,e)?{from:i,to:void 0}:Zu(n,e)?void 0:Q$(n,e)?{from:e,to:i}:{from:n,to:e}:i?Q$(e,i)?{from:i,to:e}:{from:e,to:i}:n?q0e(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}var SU=R.createContext(void 0);function CUe(e){if(!KA(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return g.jsx(SU.Provider,{value:t,children:e.children})}return g.jsx(PUe,{initialProps:e.initialProps,children:e.children})}function PUe(e){var t=e.initialProps,r=e.children,n=t.selected,i=n||{},a=i.from,s=i.to,o=t.min,l=t.max,u=function(h,p,m){var _,y;(_=t.onDayClick)===null||_===void 0||_.call(t,h,p,m);var v=AUe(h,n);(y=t.onSelect)===null||y===void 0||y.call(t,v,h,p,m)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(c.range_start=[a],s?(c.range_end=[s],Zu(a,s)||(c.range_middle=[{after:a,before:s}])):c.range_end=[a]):s&&(c.range_start=[s],c.range_end=[s]),o&&(a&&!s&&c.disabled.push({after:RD(a,o-1),before:bu(a,o-1)}),a&&s&&c.disabled.push({after:a,before:bu(a,o-1)}),!a&&s&&c.disabled.push({after:RD(s,o-1),before:bu(s,o-1)})),l){if(a&&!s&&(c.disabled.push({before:bu(a,-l+1)}),c.disabled.push({after:bu(a,l-1)})),a&&s){var d=Lh(s,a)+1,f=l-d;c.disabled.push({before:RD(a,f)}),c.disabled.push({after:bu(s,f)})}!a&&s&&(c.disabled.push({before:bu(s,-l+1)}),c.disabled.push({after:bu(s,l-1)}))}return g.jsx(SU.Provider,{value:{selected:n,onDayClick:u,modifiers:c},children:r})}function AU(){var e=R.useContext(SU);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Tk(e){return Array.isArray(e)?Y0e([],e):e!==void 0?[e]:[]}function MUe(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],i=r[1];t[n]=Tk(i)}),t}var eh;(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"})(eh||(eh={}));var kUe=eh.Selected,mp=eh.Disabled,OUe=eh.Hidden,NUe=eh.Today,BD=eh.RangeEnd,zD=eh.RangeMiddle,UD=eh.RangeStart,IUe=eh.Outside;function DUe(e,t,r){var n,i=(n={},n[kUe]=Tk(e.selected),n[mp]=Tk(e.disabled),n[OUe]=Tk(e.hidden),n[NUe]=[e.today],n[BD]=[],n[zD]=[],n[UD]=[],n[IUe]=[],n);return e.fromDate&&i[mp].push({before:e.fromDate}),e.toDate&&i[mp].push({after:e.toDate}),qA(e)?i[mp]=i[mp].concat(t.modifiers[mp]):KA(e)&&(i[mp]=i[mp].concat(r.modifiers[mp]),i[UD]=r.modifiers[UD],i[zD]=r.modifiers[zD],i[BD]=r.modifiers[BD]),i}var eye=R.createContext(void 0);function LUe(e){var t=ja(),r=TU(),n=AU(),i=DUe(t,r,n),a=MUe(t.modifiers),s=gn(gn({},i),a);return g.jsx(eye.Provider,{value:s,children:e.children})}function tye(){var e=R.useContext(eye);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function jUe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function RUe(e){return!!(e&&typeof e=="object"&&"from"in e)}function $Ue(e){return!!(e&&typeof e=="object"&&"after"in e)}function FUe(e){return!!(e&&typeof e=="object"&&"before"in e)}function BUe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function zUe(e,t){var r,n=t.from,i=t.to;if(n&&i){var a=Lh(i,n)<0;a&&(r=[i,n],n=r[0],i=r[1]);var s=Lh(e,n)>=0&&Lh(i,e)>=0;return s}return i?Zu(i,e):n?Zu(n,e):!1}function UUe(e){return _U(e)}function WUe(e){return Array.isArray(e)&&e.every(_U)}function VUe(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(UUe(r))return Zu(e,r);if(WUe(r))return r.includes(e);if(RUe(r))return zUe(e,r);if(BUe(r))return r.dayOfWeek.includes(e.getDay());if(jUe(r)){var n=Lh(r.before,e),i=Lh(r.after,e),a=n>0,s=i<0,o=Q$(r.before,r.after);return o?s&&a:a||s}return $Ue(r)?Lh(e,r.after)>0:FUe(r)?Lh(r.before,e)>0:typeof r=="function"?r(e):!1})}function CU(e,t,r){var n=Object.keys(t).reduce(function(a,s){var o=t[s];return VUe(e,o)&&a.push(s),a},[]),i={};
566return n.forEach(function(a){return i[a]=!0}),r&&!xU(e,r)&&(i.outside=!0),i}function HUe(e,t){for(var r=lc(e[0]),n=bU(e[e.length-1]),i,a,s=r;s<=n;){var o=CU(s,t),l=!o.disabled&&!o.hidden;if(!l){s=bu(s,1);continue}if(o.selected)return s;o.today&&!a&&(a=s),i||(i=s),s=bu(s,1)}return a||i}var GUe=365;function rye(e,t){var r=t.moveBy,n=t.direction,i=t.context,a=t.modifiers,s=t.retry,o=s===void 0?{count:0,lastFocused:e}:s,l=i.weekStartsOn,u=i.fromDate,c=i.toDate,d=i.locale,f={day:bu,week:X$,month:Jf,year:gze,startOfWeek:function(_){return i.ISOWeek?Rv(_):Zh(_,{locale:d,weekStartsOn:l})},endOfWeek:function(_){return i.ISOWeek?z0e(_):wU(_,{locale:d,weekStartsOn:l})}},h=f[r](e,n==="after"?1:-1);n==="before"&&u?h=yze([u,h]):n==="after"&&c&&(h=vze([c,h]));var p=!0;if(a){var m=CU(h,a);p=!m.disabled&&!m.hidden}return p?h:o.count>GUe?o.lastFocused:rye(h,{moveBy:r,direction:n,context:i,modifiers:a,retry:gn(gn({},o),{count:o.count+1})})}var nye=R.createContext(void 0);function qUe(e){var t=YA(),r=tye(),n=R.useState(),i=n[0],a=n[1],s=R.useState(),o=s[0],l=s[1],u=HUe(t.displayMonths,r),c=i??(o&&t.isDateDisplayed(o))?o:u,d=function(){l(i),a(void 0)},f=function(_){a(_)},h=ja(),p=function(_,y){if(i){var v=rye(i,{moveBy:_,direction:y,context:h,modifiers:r});Zu(i,v)||(t.goToDate(v,i),f(v))}},m={focusedDay:i,focusTarget:c,blur:d,focus:f,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return g.jsx(nye.Provider,{value:m,children:e.children})}function PU(){var e=R.useContext(nye);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function KUe(e,t){var r=tye(),n=CU(e,r,t);return n}var MU=R.createContext(void 0);function YUe(e){if(!SN(e.initialProps)){var t={selected:void 0};return g.jsx(MU.Provider,{value:t,children:e.children})}return g.jsx(XUe,{initialProps:e.initialProps,children:e.children})}function XUe(e){var t=e.initialProps,r=e.children,n=function(a,s,o){var l,u,c;if((l=t.onDayClick)===null||l===void 0||l.call(t,a,s,o),s.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,a,s,o);return}(c=t.onSelect)===null||c===void 0||c.call(t,a,a,s,o)},i={selected:t.selected,onDayClick:n};return g.jsx(MU.Provider,{value:i,children:r})}function iye(){var e=R.useContext(MU);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function QUe(e,t){var r=ja(),n=iye(),i=TU(),a=AU(),s=PU(),o=s.focusDayAfter,l=s.focusDayBefore,u=s.focusWeekAfter,c=s.focusWeekBefore,d=s.blur,f=s.focus,h=s.focusMonthBefore,p=s.focusMonthAfter,m=s.focusYearBefore,_=s.focusYearAfter,y=s.focusStartOfWeek,v=s.focusEndOfWeek,b=function(B){var z,q,L,K;SN(r)?(z=n.onDayClick)===null||z===void 0||z.call(n,e,t,B):qA(r)?(q=i.onDayClick)===null||q===void 0||q.call(i,e,t,B):KA(r)?(L=a.onDayClick)===null||L===void 0||L.call(a,e,t,B):(K=r.onDayClick)===null||K===void 0||K.call(r,e,t,B)},w=function(B){var z;f(e),(z=r.onDayFocus)===null||z===void 0||z.call(r,e,t,B)},x=function(B){var z;d(),(z=r.onDayBlur)===null||z===void 0||z.call(r,e,t,B)},E=function(B){var z;(z=r.onDayMouseEnter)===null||z===void 0||z.call(r,e,t,B)},T=function(B){var z;(z=r.onDayMouseLeave)===null||z===void 0||z.call(r,e,t,B)},S=function(B){var z;(z=r.onDayPointerEnter)===null||z===void 0||z.call(r,e,t,B)},A=function(B){var z;(z=r.onDayPointerLeave)===null||z===void 0||z.call(r,e,t,B)},C=function(B){var z;(z=r.onDayTouchCancel)===null||z===void 0||z.call(r,e,t,B)},k=function(B){var z;(z=r.onDayTouchEnd)===null||z===void 0||z.call(r,e,t,B)},M=function(B){var z;(z=r.onDayTouchMove)===null||z===void 0||z.call(r,e,t,B)},D=function(B){var z;(z=r.onDayTouchStart)===null||z===void 0||z.call(r,e,t,B)},$=function(B){var z;(z=r.onDayKeyUp)===null||z===void 0||z.call(r,e,t,B)},V=function(B){var z;switch(B.key){case"ArrowLeft":B.preventDefault(),B.stopPropagation(),r.dir==="rtl"?o():l();break;case"ArrowRight":B.preventDefault(),B.stopPropagation(),r.dir==="rtl"?l(
566):o();break;case"ArrowDown":B.preventDefault(),B.stopPropagation(),u();break;case"ArrowUp":B.preventDefault(),B.stopPropagation(),c();break;case"PageUp":B.preventDefault(),B.stopPropagation(),B.shiftKey?m():h();break;case"PageDown":B.preventDefault(),B.stopPropagation(),B.shiftKey?_():p();break;case"Home":B.preventDefault(),B.stopPropagation(),y();break;case"End":B.preventDefault(),B.stopPropagation(),v();break}(z=r.onDayKeyDown)===null||z===void 0||z.call(r,e,t,B)},U={onClick:b,onFocus:w,onBlur:x,onKeyDown:V,onKeyUp:$,onMouseEnter:E,onMouseLeave:T,onPointerEnter:S,onPointerLeave:A,onTouchCancel:C,onTouchEnd:k,onTouchMove:M,onTouchStart:D};return U}function ZUe(){var e=ja(),t=iye(),r=TU(),n=AU(),i=SN(e)?t.selected:qA(e)?r.selected:KA(e)?n.selected:void 0;return i}function JUe(e){return Object.values(eh).includes(e)}function e9e(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var i=e.modifiersClassNames[n];if(i)r.push(i);else if(JUe(n)){var a=e.classNames["day_".concat(n)];a&&r.push(a)}}),r}function t9e(e,t){var r=gn({},e.styles.day);return Object.keys(t).forEach(function(n){var i;r=gn(gn({},r),(i=e.modifiersStyles)===null||i===void 0?void 0:i[n])}),r}function r9e(e,t,r){var n,i,a,s=ja(),o=PU(),l=KUe(e,t),u=QUe(e,l),c=ZUe(),d=!!(s.onDayClick||s.mode!=="default");R.useEffect(function(){var E;l.outside||o.focusedDay&&d&&Zu(o.focusedDay,e)&&((E=r.current)===null||E===void 0||E.focus())},[o.focusedDay,e,r,d,l.outside]);var f=e9e(s,l).join(" "),h=t9e(s,l),p=!!(l.outside&&!s.showOutsideDays||l.hidden),m=(a=(i=s.components)===null||i===void 0?void 0:i.DayContent)!==null&&a!==void 0?a:EUe,_=g.jsx(m,{date:e,displayMonth:t,activeModifiers:l}),y={style:h,className:f,children:_,role:"gridcell"},v=o.focusTarget&&Zu(o.focusTarget,e)&&!l.outside,b=o.focusedDay&&Zu(o.focusedDay,e),w=gn(gn(gn({},y),(n={disabled:l.disabled,role:"gridcell"},n["aria-selected"]=l.selected,n.tabIndex=b||v?0:-1,n)),u),x={isButton:d,isHidden:p,activeModifiers:l,selectedDays:c,buttonProps:w,divProps:y};return x}function n9e(e){var t=R.useRef(null),r=r9e(e.date,e.displayMonth,t);return r.isHidden?g.jsx("div",{role:"gridcell"}):r.isButton?g.jsx(l3,gn({name:"day",ref:t},r.buttonProps)):g.jsx("div",gn({},r.divProps))}function i9e(e){var t=e.number,r=e.dates,n=ja(),i=n.onWeekNumberClick,a=n.styles,s=n.classNames,o=n.locale,l=n.labels.labelWeekNumber,u=n.formatters.formatWeekNumber,c=u(Number(t),{locale:o});if(!i)return g.jsx("span",{className:s.weeknumber,style:a.weeknumber,children:c});var d=l(Number(t),{locale:o}),f=function(h){i(t,r,h)};return g.jsx(l3,{name:"week-number","aria-label":d,className:s.weeknumber,style:a.weeknumber,onClick:f,children:c})}function a9e(e){var t,r,n=ja(),i=n.styles,a=n.classNames,s=n.showWeekNumber,o=n.components,l=(t=o==null?void 0:o.Day)!==null&&t!==void 0?t:n9e,u=(r=o==null?void 0:o.WeekNumber)!==null&&r!==void 0?r:i9e,c;return s&&(c=g.jsx("td",{className:a.cell,style:i.cell,children:g.jsx(u,{number:e.weekNumber,dates:e.dates})})),g.jsxs("tr",{className:a.row,style:i.row,children:[c,e.dates.map(function(d){return g.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:g.jsx(l,{displayMonth:e.displayMonth,date:d})},v7e(d))})]})}function MQ(e,t,r){for(var n=r!=null&&r.ISOWeek?z0e(t):wU(t,r),i=r!=null&&r.ISOWeek?Rv(e):Zh(e,r),a=Lh(n,i),s=[],o=0;o<=a;o++)s.push(bu(i,o));var l=s.reduce(function(u,c){var d=r!=null&&r.ISOWeek?W0e(c):H0e(c,r),f=u.find(function(h){return h.weekNumber===d});return f?(f.dates.push(c),u):(u.push({weekNumber:d,dates:[c]}),u)},[]);return l}function s9e(e,t){var r=MQ(lc(e),bU(e),t);if(t!=null&&t.useFixedWeeks){var n=b7e(e,t);if(n<6){var i=r[r.length-1],a=i.dates[i.dates.length-1],s=X$(a,6-n),o=MQ(X$(a,1),s,t);r.push.apply(r,o)}}return r}function o9e(e){var t,r,n,i=ja(),a=i.locale,s=i.classNames,o=i.styles,l=i.hideHead,u=i.fixedWeeks,c=i.components,d=i.weekStartsOn,f=i.firstWeekContainsDate,h=i.ISOWeek,p=s9e(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:h,locale:a,weekStartsOn:d,firstWeekContainsDate:f}),m=(t=c==null?void 0:c.Head)!==null&&t!==void 0?t:xUe,_=(r=c==null?void 0:c.Row)!==null&&r!==void 0?r:a9e,y=(n=c==null?void 0:c.Footer)!==null&&n!==void 0?n:_Ue;return g.jsxs("table",{id:e.id,className:s.table,style:o.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&g.jsx(m,{}),g.jsx("tbody",{className:s.tbody,style:o.tbody,children:p.map(function(v){return g.jsx(_,{displayMonth:e.displayMonth,dates:v.dates,weekNumber:v.weekNumber},v.weekNumber)})}),g.jsx(y,{displayMonth:e.displayMonth})]})}function l9e(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var u9e=l9e()?R.useLayoutEffect:R.useEffect,WD=!1,c9e=0;function kQ(){return"react-day-picker-".concat(++c9e)}
566function d9e(e){var t,r=e??(WD?kQ():null),n=R.useState(r),i=n[0],a=n[1];return u9e(function(){i===null&&a(kQ())},[]),R.useEffect(function(){WD===!1&&(WD=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function f9e(e){var t,r,n=ja(),i=n.dir,a=n.classNames,s=n.styles,o=n.components,l=YA().displayMonths,u=d9e(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),c=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,d=[a.month],f=s.month,h=e.displayIndex===0,p=e.displayIndex===l.length-1,m=!h&&!p;i==="rtl"&&(t=[h,p],p=t[0],h=t[1]),h&&(d.push(a.caption_start),f=gn(gn({},f),s.caption_start)),p&&(d.push(a.caption_end),f=gn(gn({},f),s.caption_end)),m&&(d.push(a.caption_between),f=gn(gn({},f),s.caption_between));var _=(r=o==null?void 0:o.Caption)!==null&&r!==void 0?r:vUe;return g.jsxs("div",{className:d.join(" "),style:f,children:[g.jsx(_,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),g.jsx(o9e,{id:c,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function h9e(e){var t=ja(),r=t.classNames,n=t.styles;return g.jsx("div",{className:r.months,style:n.months,children:e.children})}function p9e(e){var t,r,n=e.initialProps,i=ja(),a=PU(),s=YA(),o=R.useState(!1),l=o[0],u=o[1];R.useEffect(function(){i.initialFocus&&a.focusTarget&&(l||(a.focus(a.focusTarget),u(!0)))},[i.initialFocus,l,a.focus,a.focusTarget,a]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var d=gn(gn({},i.styles.root),i.style),f=Object.keys(n).filter(function(p){return p.startsWith("data-")}).reduce(function(p,m){var _;return gn(gn({},p),(_={},_[m]=n[m],_))},{}),h=(r=(t=n.components)===null||t===void 0?void 0:t.Months)!==null&&r!==void 0?r:h9e;return g.jsx("div",gn({className:c.join(" "),style:d,dir:i.dir,id:i.id,nonce:n.nonce,title:n.title,lang:n.lang},f,{children:g.jsx(h,{children:s.displayMonths.map(function(p,m){return g.jsx(f9e,{displayIndex:m,displayMonth:p},m)})})}))}function m9e(e){var t=e.children,r=F7e(e,["children"]);return g.jsx(iUe,{initialProps:r,children:g.jsx(pUe,{children:g.jsx(YUe,{initialProps:r,children:g.jsx(TUe,{initialProps:r,children:g.jsx(CUe,{initialProps:r,children:g.jsx(LUe,{children:g.jsx(qUe,{children:t})})})})})})})}function g9e(e){return g.jsx(m9e,gn({},e,{children:g.jsx(p9e,{initialProps:e})}))}function Sk({className:e,classNames:t,showOutsideDays:r=!0,...n}){return g.jsx(g9e,{showOutsideDays:r,className:Xt("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:Xt(nS({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:Xt(nS({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:({...i})=>g.jsx(ude,{className:"h-4 w-4"}),IconRight:({...i})=>g.jsx(Pz,{className:"h-4 w-4"})},...n})}Sk.displayName="Calendar";var AN="Popover",[aye,m5t]=Ou(AN,[ex]),XA=ex(),[y9e,g0]=aye(AN),sye=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!1}
vendor: 4,248 bytes, line 566
566=e,o=XA(t),l=R.useRef(null),[u,c]=R.useState(!1),[d,f]=rd({prop:n,defaultProp:i??!1,onChange:a,caller:AN});return g.jsx(Vde,{...o,children:g.jsx(y9e,{scope:t,contentId:Yc(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:R.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:u,onCustomAnchorAdd:R.useCallback(()=>c(!0),[]),onCustomAnchorRemove:R.useCallback(()=>c(!1),[]),modal:s,children:r})})};sye.displayName=AN;var oye="PopoverAnchor",v9e=R.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=g0(oye,r),a=XA(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:o}=i;return R.useEffect(()=>(s(),()=>o()),[s,o]),g.jsx(XO,{...a,...n,ref:t})});v9e.displayName=oye;var lye="PopoverTrigger",uye=R.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=g0(lye,r),a=XA(r),s=Gn(t,i.triggerRef),o=g.jsx(Hr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":pye(i.open),...n,ref:s,onClick:_r(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:g.jsx(XO,{asChild:!0,...a,children:o})});uye.displayName=lye;var kU="PopoverPortal",[_9e,b9e]=aye(kU,{forceMount:void 0}),cye=e=>{const{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=g0(kU,t);return g.jsx(_9e,{scope:t,forceMount:r,children:g.jsx(cc,{present:r||a.open,children:g.jsx(PA,{asChild:!0,container:i,children:n})})})};cye.displayName=kU;var tw="PopoverContent",dye=R.forwardRef((e,t)=>{const r=b9e(tw,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,a=g0(tw,e.__scopePopover);return g.jsx(cc,{present:n||a.open,children:a.modal?g.jsx(x9e,{...i,ref:t}):g.jsx(E9e,{...i,ref:t})})});dye.displayName=tw;var w9e=Sv("PopoverContent.RemoveScroll"),x9e=R.forwardRef((e,t)=>{const r=g0(tw,e.__scopePopover),n=R.useRef(null),i=Gn(t,n),a=R.useRef(!1);return R.useEffect(()=>{const s=n.current;if(s)return iU(s)},[]),g.jsx(gN,{as:w9e,allowPinchZoom:!0,children:g.jsx(fye,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_r(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),a.current||(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:_r(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0,u=o.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:_r(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),E9e=R.forwardRef((e,t)=>{const r=g0(tw,e.__scopePopover),n=R.useRef(!1),i=R.useRef(!1);return g.jsx(fye,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(o=r.triggerRef.current)==null||o.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),fye=R.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=g0(tw,r),h=XA(r);return nU(),g.jsx(pN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:g.jsx(e_,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:g.jsx(zz,{"data-state":pye(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.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)"}})})})}),hye="PopoverClose",T9e=R.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,i=g0(hye,r);return g.jsx(Hr.button,{type:"button",...n,ref:t,onClick:_r(e.onClick,()=>i.onOpenChange(!1))})});T9e.displayName=hye;var S9e="PopoverArrow",A9e=R.forwardRef((e,t)=>
566{const{__scopePopover:r,...n}=e,i=XA(r);return g.jsx(Uz,{...i,...n,ref:t})});A9e.displayName=S9e;function pye(e){return e?"open":"closed"}var C9e=sye,P9e=uye,M9e=cye,mye=dye;const VD=C9e,HD=P9e,Ak=R.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>g.jsx(M9e,{children:g.jsx(mye,{ref:i,align:t,sideOffset:r,className:Xt("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Ak.displayName=mye.displayName;var gye="AlertDialog",[k9e,g5t]=Ou(gye,[qge]),fm=qge(),yye=e=>{const{__scopeAlertDialog:t,...r}=e,n=fm(t);return g.jsx(u0e,{...n,...r,modal:!0})};yye.displayName=gye;var O9e="AlertDialogTrigger",vye=R.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=fm(r);return g.jsx(c0e,{...i,...n,ref:t})});vye.displayName=O9e;var N9e="AlertDialogPortal",_ye=e=>{const{__scopeAlertDialog:t,...r}=e,n=fm(t);return g.jsx(d0e,{...n,...r})};_ye.displayName=N9e;var I9e="AlertDialogOverlay",bye=R.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=fm(r);return g.jsx(uU,{...i,...n,ref:t})});bye.displayName=I9e;var cb="AlertDialogContent",[D9e,L9e]=k9e(cb),j9e=Lce("AlertDialogContent"),wye=R.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...i}=e,a=fm(r),s=R.useRef(null),o=Gn(t,s),l=R.useRef(null);return g.jsx(iBe,{contentName:cb,titleName:xye,docsSlug:"alert-dialog",children:g.jsx(D9e,{scope:r,cancelRef:l,children:g.jsxs(cU,{role:"alertdialog",...a,...i,ref:o,onOpenAutoFocus:_r(i.onOpenAutoFocus,u=>{var c;u.preventDefault(),(c=l.current)==null||c.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[g.jsx(j9e,{children:n}),g.jsx($9e,{contentRef:s})]})})})});wye.displayName=cb;var xye="AlertDialogTitle",Eye=R.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=fm(r);return g.jsx(dU,{...i,...n,ref:t})});Eye.displayName=xye;var Tye="AlertDialogDescription",Sye=R.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=fm(r);return g.jsx(fU,{...i,...n,ref:t})});Sye.displayName=Tye;var R9e="AlertDialogAction",Aye=R.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=fm(r);return g.jsx(hU,{...i,...n,ref:t})});Aye.displayName=R9e;var Cye="AlertDialogCancel",Pye=R.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:i}=L9e(Cye,r),a=fm(r),s=Gn(t,i);return g.jsx(hU,{...a,...n,ref:s})});Pye.displayName=Cye;var $9e=({contentRef:e})=>{const t=`\`${cb}\` requires a description for the component to be accessible for screen reader users. 567 568You can add a description to the \`${cb}\` by passing a \`${Tye}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 569 570Alternatively, 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 \`${cb}\`. 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. 571 572For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return R.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},F9e=yye,B9e=vye,z9e=_ye,Mye=bye,kye=wye,Oye=Aye,Nye=Pye,Iye=Eye,Dye=Sye;const wS=F9e,Lye=B9e,U9e=z9e,jye=R.forwardRef(({className:e,...t},r)=>g.jsx(Mye,{className:Xt("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}));jye.displayName=Mye.displayName;const rw=R.forwardRef(({className:e,...t},r)=>g.jsxs(U9e,{children:[g.jsx(jye,{}),g.jsx(kye,{ref:r,className:Xt("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:rou
572nded-lg",e),...t})]}));rw.displayName=kye.displayName;const nw=({className:e,...t})=>g.jsx("div",{className:Xt("flex flex-col space-y-2 text-center sm:text-left",e),...t});nw.displayName="AlertDialogHeader";const iw=({className:e,...t})=>g.jsx("div",{className:Xt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});iw.displayName="AlertDialogFooter";const aw=R.forwardRef(({className:e,...t},r)=>g.jsx(Iye,{ref:r,className:Xt("text-lg font-semibold",e),...t}));aw.displayName=Iye.displayName;const sw=R.forwardRef(({className:e,...t},r)=>g.jsx(Dye,{ref:r,className:Xt("text-sm text-muted-foreground",e),...t}));sw.displayName=Dye.displayName;const ow=R.forwardRef(({className:e,...t},r)=>g.jsx(Oye,{ref:r,className:Xt(nS(),e),...t}));ow.displayName=Oye.displayName;const lw=R.forwardRef(({className:e,...t},r)=>g.jsx(Nye,{ref:r,className:Xt(nS({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));lw.displayName=Nye.displayName;var OU="Progress",NU=100,[W9e,y5t]=Ou(OU),[V9e,H9e]=W9e(OU),Rye=R.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:a=G9e,...s}=e;(i||i===0)&&!OQ(i)&&console.error(q9e(`${i}`,"Progress"));const o=OQ(i)?i:NU;n!==null&&!NQ(n,o)&&console.error(K9e(`${n}`,"Progress"));const l=NQ(n,o)?n:null,u=u3(l)?a(l,o):void 0;return g.jsx(V9e,{scope:r,value:l,max:o,children:g.jsx(Hr.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":u3(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Bye(l,o),"data-value":l??void 0,"data-max":o,...s,ref:t})})});Rye.displayName=OU;var $ye="ProgressIndicator",Fye=R.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=H9e($ye,r);return g.jsx(Hr.div,{"data-state":Bye(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});Fye.displayName=$ye;function G9e(e,t){return`${Math.round(e/t*100)}%`}function Bye(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function u3(e){return typeof e=="number"}function OQ(e){return u3(e)&&!isNaN(e)&&e>0}function NQ(e,t){return u3(e)&&!isNaN(e)&&e<=t&&e>=0}function q9e(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${NU}\`.`}function K9e(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 573 - a positive number 574 - less than the value passed to \`max\` (or ${NU} if no \`max\` prop is set) 575 - \`null\` or \`undefined\` if the progress is indeterminate. 576 577Defaulting to \`null\`.`}var zye=Rye,Y9e=Fye;const Uye=R.forwardRef(({className:e,value:t,...r},n)=>g.jsx(zye,{ref:n,className:Xt("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:g.jsx(Y9e,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Uye.displayName=zye.displayName;function IQ(e){const t=e.toUpperCase().replace(/[_-]/g," ");return t.includes("RBM")||t.includes("REGULAR BOARD MEETING")||t.includes("REGULAR MEETING")?{title:"Regular Board Meeting",meetingType:"regular"}:t.includes("SBM")||t.includes("SPECIAL BOARD MEETING")||t.includes("SPECIAL MEETING")?{title:"Special Board Meeting",meetingType:"special"}:t.includes("WORKSHOP")?{title:"Workshop",meetingType:"workshop"}:t.includes("AGENDA")?{title:"Board Meeting",meetingType:"unknown"}:{title:null,meetingType:"unknown"}}const GD={january:0,jan:0,february:1,feb:1,march:2,mar:2,april:3,apr:3,may:4,june:5,jun:5,july:6,jul:6,august:7,aug:7,september:8,sep:8,sept:8,october:9,oct:9,november:10,nov:10,december:11,dec:11};function DQ(e){const t=e.replace(/\.[^.]+$/,"").replace(/[_]/g," ").replace(/[-]/g," ").replace(/\.(?=\d)/g," ").trim(),r=e.match(/(\d{4})[\s\-\/\.](\d{1,2})[\s\-\/\.](\d{1,2})/);if(r){const[,c,d,f]=r,h=new Date(parseInt(c),parseInt(d)-1,parseInt(f));if(yh(h)&&parseInt(c)>=1990&&parseInt(c)<=2100)return{date:h,confidence:"high"}}const n=e.match(/(\d{1,2})[\s\-\/\.](\d{1,2})[\s\-\/\.](\d{4})/);if(n){const[,c,d,f]=n,h=new Date(parseInt(f),parseInt(c)-1,parseInt(d));if(yh(h)&&parseInt(f)>=1990&&parseInt(f)<=2100)return{date:h,confidence:"high"}}const i=e.match(/(\d{1,2})[\s\-\/\.](\d{1,2})[\s\-\/\.](\d{2})(?!\d)/);if(i){const[,c,d,f]=i,h=parseInt(f)>50?1900+parseInt(f):2e3+parseInt(f),p=new Date(h,parseInt(c)-1,parseInt(d));if(yh(p))return{date:p,confidence:"high"}}const a=t.match(/([a-zA-Z]+)\s+(\d{1,2})(?:st|nd|rd|th)?,?\s*(\d{4})/i);if(a){const[,c,d,f]=a,h=GD[c.toLowerCase()];if(h!==void 0){const p=new Date(parseInt(f),h,parseInt(d));if(yh(p))return{date:p,confidence:"high"}}}const s=t.match(/(\d{1,2})(?:st|nd|rd|th)?\s+([a-zA-Z]+),?\s*(\d{4})/i);if(s){const[,c,d,f]=s,h=GD[d.toLowerCase()];if(h!==void 0){const p=new Date(parseInt(f),h,parseInt(c));if(yh(p))return{date:p,confidence:"high"}}}const o=e.match(/(\d{8})/);if(o){const c=o[1],d=parseInt(c.slice(0,4)),f=parseInt(c.slice(4,6)
577),h=parseInt(c.slice(6,8));if(d>=1990&&d<=2100&&f>=1&&f<=12&&h>=1&&h<=31){const y=new Date(d,f-1,h);if(yh(y))return{date:y,confidence:"medium"}}const p=parseInt(c.slice(0,2)),m=parseInt(c.slice(2,4)),_=parseInt(c.slice(4,8));if(_>=1990&&_<=2100&&p>=1&&p<=12&&m>=1&&m<=31){const y=new Date(_,p-1,m);if(yh(y))return{date:y,confidence:"medium"}}}const l=t.match(/([a-zA-Z]+)\s+(\d{4})/i);if(l){const[,c,d]=l,f=GD[c.toLowerCase()];if(f!==void 0&&parseInt(d)>=1990&&parseInt(d)<=2100){const h=new Date(parseInt(d),f,1);if(yh(h))return{date:h,confidence:"low"}}}const u=e.match(/(\d{1,2})[\s\-\/\.](\d{4})/);if(u){const[,c,d]=u;if(parseInt(c)>=1&&parseInt(c)<=12&&parseInt(d)>=1990&&parseInt(d)<=2100){const f=new Date(parseInt(d),parseInt(c)-1,1);if(yh(f))return{date:f,confidence:"low"}}}return{date:null,confidence:"none"}}const X9e=[{path:"/admin/dashboard",label:"Board Agendas",icon:av},{path:"/admin/users",label:"User Management",icon:$b},{path:"/admin/analytics",label:"Analytics",icon:p5e},{path:"/admin/community-photos",label:"Community Photos",icon:x5e},{path:"/admin/blog",label:"Blog",icon:k5e},{path:"/admin/shop-local-biz",label:"Shop Local Biz",icon:dde}],lx=()=>{const e=rp();return g.jsx("nav",{className:"border-b bg-card",children:g.jsx("div",{className:"container mx-auto px-4",children:g.jsx("div",{className:"flex items-center gap-1 overflow-x-auto py-2",children:X9e.map(t=>{const r=e.pathname===t.path;return g.jsxs(h4e,{to:t.path,className:Xt("flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors whitespace-nowrap",r?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[g.jsx(t.icon,{className:"h-4 w-4"}),t.label]},t.path)})})})})};function Q9e(){const[e,t]=R.useState(),[r,n]=R.useState(""),[i,a]=R.useState(""),[s,o]=R.useState(null),[l,u]=R.useState(!1),[c,d]=R.useState(null),{toast:f}=Kw(),{logout:h}=i_(),p=jA(),[m,_]=R.useState([]),[y,v]=R.useState(!1),[b,w]=R.useState(0),[x,E]=R.useState(null),[T,S]=R.useState(!1),[A,C]=R.useState([]),[k,M]=R.useState(!1),{data:D,isLoading:$}=r_({queryKey:["board-agendas"],queryFn:async()=>{const{data:H,error:fe}=await nn.from("board_agendas").select("*").order("meeting_date",{ascending:!1});if(fe)throw fe;return H}}),V=$p({mutationFn:async H=>{const fe=D==null?void 0:D.find($e=>$e.id===H);if(!fe)throw new Error("Agenda not found");const Se=fe.file_url.split("/").pop();Se&&await nn.storage.from("meeting-agendas").remove([Se]);const{error:ne}=await nn.from("board_agendas").delete().eq("id",H);if(ne)throw ne},onSuccess:()=>{p.invalidateQueries({queryKey:["board-agendas"]}),f({title:"Success",description:"Agenda deleted successfully"}),d(null)},onError:H=>{f({title:"Error",description:H.message,variant:"destructive"})}}),U=$p({mutationFn:async({id:H,date:fe,title:Se,description:ne})=>{const{error:$e}=await nn.from("board_agendas").update({meeting_date:Ii(fe,"yyyy-MM-dd"),title:Se.trim()||null,description:ne.trim()||null}).eq("id",H);if($e)throw $e},onSuccess:()=>{p.invalidateQueries({queryKey:["board-agendas"]}),f({title:"Success",description:"Agenda updated successfully"}),E(null)},onError:H=>{f({title:"Error",description:H.message,variant:"destructive"})}}),B=()=>{if(!D)return;const fe=D.filter(Se=>!Se.title).map(Se=>{const{title:ne}=IQ(Se.file_name);return ne?{id:Se.id,fileName:Se.file_name,suggestedTitle:ne}:null}).filter(Se=>Se!==null);C(fe),S(!0)},z=async()=>{if(A.length!==0){M(!0);try{const H=A.map(fe=>({id:fe.id,title:fe.suggestedTitle}));for(const fe of H){const{error:Se}=await nn.from("board_agendas").update({title:fe.title}).eq("id",fe.id);if(Se)throw Se}p.invalidateQueries({queryKey:["board-agendas"]}),f({title:"Success",description:`Updated ${H.length} agenda titles`}),S(!1),C([])}catch(H){f({title:"Error",description:H.message,variant:"destructive"})}finally{M(!1)}}},q=async H=>{if(H.preventDefault(),!s||!e){f({title:"Error",description:"Please select a date and file",variant:"destructive"});return}if(s.type!=="application/pdf"){f({title:"Error",description:"Only PDF files are allowed",variant:"destructive"});return}if(s.size>10*1024*1024){f({title:"Error",description:"File size must be less than 10MB",variant:"destructive"});return}u(!0);try{const fe=`${Date.now()}-${s.name}`,{error:Se}=await nn.storage.from("meeting-agendas").upload(fe,s);if(Se)throw Se;const{data:{publicUrl:ne}}=nn.storage.from("meeting-agendas").getPublicUrl(fe),{error:$e}=await nn.from("board_agendas").insert({meeting_date:Ii(e,"yyyy-MM-dd"),title:r||null,description:i||null,file_url:ne,file_name:s.name});if($e)throw $e;f({title:"Success",description:"Agenda uploaded successfully"}),t(void 0),n(""),a(""),o(null),document.getElementById("file-input").value="",p.invalidateQueries({queryKey:["board-agendas"]})}catch(fe){f({title:"Error",description:fe.message,variant:"destructive"})}finally{u(!1)}},L=R.useCallback((H,fe)=>{if(D){if(D.find(ne=>ne.file_name===H))return{isDuplicate:!0,reason:"File already uploaded"};if(fe){const ne=Ii(fe,"yyyy-MM-dd");if(D.find(me=>me.meeting_date===ne))return{isDuplicate:!0,reason:`Agenda for ${Ii(fe,"MMM d, yyyy")} already exists`}}}return{isDuplicate:!1}},[D]),K=R.useCallback(H=>{const fe=H.target.files;if(!fe)return;let Se=0;const ne=[],$e=new Set,me=new Set;m.forEach(Ue=>{me.add(Ue.file.name),Ue.parsedDate&&$e.add(Ii(Ue.parsedDate,"yyyy-MM-dd"))}),Array.from(fe).filter(Ue=>Ue.type==="application/pdf").forEach(Ue=>{const{date:ke,confidence:ce}=DQ(Ue.name),{isDuplicate:ve,reason:Re}=L(Ue.name,ke);
577if(ve){Se++,f({title:"Duplicate skipped",description:`${Ue.name}: ${Re}`,variant:"destructive"});return}if(me.has(Ue.name)){Se++,f({title:"Duplicate skipped",description:`${Ue.name}: Already in upload queue`,variant:"destructive"});return}if(ke){const De=Ii(ke,"yyyy-MM-dd");if($e.has(De)){Se++,f({title:"Duplicate skipped",description:`${Ue.name}: Another file for ${Ii(ke,"MMM d, yyyy")} already in queue`,variant:"destructive"});return}$e.add(De)}me.add(Ue.name),ne.push({file:Ue,parsedDate:ke,confidence:ce,status:"pending"})}),ne.length>0&&_(Ue=>[...Ue,...ne]),Se>0&&ne.length>0&&f({title:"Files added",description:`Added ${ne.length} files, skipped ${Se} duplicates`}),H.target.value=""},[D,m,L,f]),O=R.useCallback(H=>{H.preventDefault();const fe=H.dataTransfer.files;let Se=0;const ne=[],$e=new Set,me=new Set;m.forEach(Ue=>{me.add(Ue.file.name),Ue.parsedDate&&$e.add(Ii(Ue.parsedDate,"yyyy-MM-dd"))}),Array.from(fe).filter(Ue=>Ue.type==="application/pdf").forEach(Ue=>{const{date:ke,confidence:ce}=DQ(Ue.name),{isDuplicate:ve,reason:Re}=L(Ue.name,ke);if(ve){Se++,f({title:"Duplicate skipped",description:`${Ue.name}: ${Re}`,variant:"destructive"});return}if(me.has(Ue.name)){Se++,f({title:"Duplicate skipped",description:`${Ue.name}: Already in upload queue`,variant:"destructive"});return}if(ke){const De=Ii(ke,"yyyy-MM-dd");if($e.has(De)){Se++,f({title:"Duplicate skipped",description:`${Ue.name}: Another file for ${Ii(ke,"MMM d, yyyy")} already in queue`,variant:"destructive"});return}$e.add(De)}me.add(Ue.name),ne.push({file:Ue,parsedDate:ke,confidence:ce,status:"pending"})}),ne.length>0&&_(Ue=>[...Ue,...ne]),Se>0&&ne.length>0&&f({title:"Files added",description:`Added ${ne.length} files, skipped ${Se} duplicates`})},[D,m,L,f]),N=R.useCallback(H=>{H.preventDefault()},[]),X=(H,fe)=>{_(Se=>Se.map((ne,$e)=>$e===H?{...ne,parsedDate:fe||null,confidence:fe?"high":"none"}:ne))},ie=H=>{_(fe=>fe.filter((Se,ne)=>ne!==H))},ee=()=>{_([]),w(0)},le=async()=>{if(m.filter(me=>me.parsedDate!==null).length===0)return;v(!0),w(0);let fe=0,Se=0;const ne={};for(let me=0;me<m.length;me++){const Ue=m[me];if(!Ue.parsedDate){_(ke=>ke.map((ce,ve)=>ve===me?{...ce,status:"error",error:"No date set"}:ce)),Se++;continue}_(ke=>ke.map((ce,ve)=>ve===me?{...ce,status:"uploading"}:ce));try{if(Ue.file.size>10*1024*1024)throw new Error("File too large (max 10MB)");const ke=`${Date.now()}-${Ue.file.name}`,{error:ce}=await nn.storage.from("meeting-agendas").upload(ke,Ue.file);if(ce)throw ce;const{data:{publicUrl:ve}}=nn.storage.from("meeting-agendas").getPublicUrl(ke),{title:Re}=IQ(Ue.file.name),{error:De}=await nn.from("board_agendas").insert({meeting_date:Ii(Ue.parsedDate,"yyyy-MM-dd"),title:Re,file_url:ve,file_name:Ue.file.name});if(De)throw De;_(Ge=>Ge.map((Ie,He)=>He===me?{...Ie,status:"success"}:Ie));const tt=Ue.parsedDate.getFullYear();ne[tt]=(ne[tt]||0)+1,fe++}catch(ke){_(ce=>ce.map((ve,Re)=>Re===me?{...ve,status:"error",error:ke.message}:ve)),Se++}w((me+1)/m.length*100)}v(!1),p.invalidateQueries({queryKey:["board-agendas"]});const $e=Object.entries(ne).sort(([me],[Ue])=>parseInt(Ue)-parseInt(me)).map(([me,Ue])=>`${Ue} to ${me}`).join(", ");f({title:"Bulk Upload Complete",description:`Uploaded ${fe} files${Se>0?`, ${Se} failed`:""}. ${$e?`(${$e})`:""}`,variant:Se>0?"destructive":"default"})},Te=m.reduce((H,fe,Se)=>{var $e;const ne=(($e=fe.parsedDate)==null?void 0:$e.getFullYear())||"Unknown";return H[ne]||(H[ne]=[]),H[ne].push({...fe,originalIndex:Se}),H},{}),be=m.length>0&&m.every(H=>H.parsedDate!==null),we=m.filter(H=>H.status==="pending").length,ae=m.filter(H=>H.status==="success").length;return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx("header",{className:"border-b bg-card",children:g.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Admin Panel"}),g.jsxs(gr,{variant:"outline",onClick:h,children:[g.jsx(NA,{className:"mr-2 h-4 w-4"}),"Logout"]})]})}),g.jsx(lx,{}),g.jsxs("div",{className:"container mx-auto py-8 px-4",children:[g.jsxs(un,{className:"mb-8",children:[g.jsxs(zi,{children:[g.jsxs(Ui,{className:"flex items-center gap-2",children:[g.jsx(b5,{className:"h-5 w-5"}),"Bulk Upload Agendas"]}),g.jsx(ho,{children:"Upload multiple PDFs at once. Dates will be automatically parsed from filenames."})]}),g.jsxs(kn,{children:[g.jsxs("div",{onDrop:O,onDragOver:N,className:Xt("border-2 border-dashed rounded-lg p-8 text-center transition-colors","hover:border-primary hover:bg-primary/5 curs
577or-pointer",m.length>0?"border-primary/50":"border-muted-foreground/25"),children:[g.jsx("input",{type:"file",id:"bulk-file-input",multiple:!0,accept:".pdf",onChange:K,className:"hidden"}),g.jsxs("label",{htmlFor:"bulk-file-input",className:"cursor-pointer",children:[g.jsx(av,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),g.jsx("p",{className:"text-lg font-medium",children:"Drop PDF files here or click to select"}),g.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Dates will be automatically extracted from filenames"})]})]}),m.length>0&&g.jsxs("div",{className:"mt-6 space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs(Hp,{variant:"secondary",children:[m.length," files selected"]}),ae>0&&g.jsxs(Hp,{variant:"default",className:"bg-green-600",children:[ae," uploaded"]})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(gr,{variant:"outline",size:"sm",onClick:ee,disabled:y,children:"Clear All"}),g.jsx(gr,{size:"sm",onClick:le,disabled:!be||y||we===0,children:y?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),"Uploading..."]}):g.jsxs(g.Fragment,{children:[g.jsx(b5,{className:"mr-2 h-4 w-4"}),"Upload All (",we,")"]})})]})]}),y&&g.jsx(Uye,{value:b,className:"h-2"}),Object.entries(Te).sort(([H],[fe])=>H==="Unknown"?1:fe==="Unknown"?-1:parseInt(fe)-parseInt(H)).map(([H,fe])=>g.jsxs("div",{className:"space-y-2",children:[g.jsxs("h3",{className:"font-semibold text-lg flex items-center gap-2",children:[H==="Unknown"?g.jsx(X4,{className:"h-4 w-4 text-yellow-500"}):g.jsx(kK,{className:"h-4 w-4 text-green-500"}),H,g.jsxs(Hp,{variant:"outline",className:"ml-2",children:[fe.length," files"]})]}),g.jsx("div",{className:"space-y-2",children:fe.map(Se=>g.jsxs("div",{className:Xt("flex items-center gap-4 p-3 border rounded-lg",Se.status==="success"&&"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800",Se.status==="error"&&"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800",Se.status==="uploading"&&"bg-blue-50 border-blue-200 dark:bg-blue-950/20 dark:border-blue-800"),children:[g.jsx("div",{className:"flex-shrink-0",children:Se.status==="success"?g.jsx(kK,{className:"h-5 w-5 text-green-600"}):Se.status==="error"?g.jsx(X4,{className:"h-5 w-5 text-red-600"}):Se.status==="uploading"?g.jsx(yl,{className:"h-5 w-5 text-blue-600 animate-spin"}):Se.confidence==="none"?g.jsx(X4,{className:"h-5 w-5 text-yellow-500"}):g.jsx(av,{className:"h-5 w-5 text-muted-foreground"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("p",{className:"text-sm font-medium truncate",children:Se.file.name}),Se.error&&g.jsx("p",{className:"text-xs text-red-600",children:Se.error}),Se.confidence!=="none"&&Se.confidence!=="high"&&Se.status==="pending"&&g.jsx("p",{className:"text-xs text-yellow-600",children:Se.confidence==="medium"?"Date parsed - please verify":"Low confidence - please verify"})]}),g.jsx("div",{className:"flex-shrink-0",children:g.jsxs(VD,{children:[g.jsx(HD,{asChild:!0,children:g.jsxs(gr,{variant:"outline",size:"sm",className:Xt("w-[160px] justify-start text-left font-normal",!Se.parsedDate&&"text-destructive border-destructive"),disabled:Se.status!=="pending",children:[g.jsx(jg,{className:"mr-2 h-4 w-4"}),Se.parsedDate?Ii(Se.parsedDate,"MMM d, yyyy"):"Set date"]})}),g.jsx(Ak,{className:"w-auto p-0",align:"end",children:g.jsx(Sk,{mode:"single",selected:Se.parsedDate||void 0,onSelect:ne=>X(Se.originalIndex,ne),initialFocus:!0,className:"pointer-events-auto"})})]})}),g.jsx(gr,{variant:"ghost",size:"sm",onClick:()=>ie(Se.originalIndex),disabled:Se.status==="uploading"||Se.status==="success",children:g.jsx(Xg,{className:"h-4 w-4"})})]},Se.originalIndex))})]},H))]})]})]}),g.jsxs(un,{className:"mb-8",children:[g.jsxs(zi,{children:[g.jsx(Ui,{children:"Upload Single Agenda"}),g.jsx(ho,{children:"Add a new board meeting agenda (PDF only, max 10MB)"})]}),g.jsx(kn,{children:g.jsxs("form",{onSubmit:q,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-medium",children:"Meeting Date *"}),g.jsxs(VD,{children:[g.jsx(HD,{asChild:!0,children:g.jsxs(gr,{variant:"outline",className:Xt("w-full justify-start text-left font-normal",!e&&"text-muted-foreground"),children:[g.jsx(jg,{className:"mr-2 h-4 w-4"}),e?Ii(e,"PPP"):"Pick a date"]})}),g.jsx(Ak,{className:"w-auto p-0",align:"start",children:g.jsx(Sk,{mode:"single",selected:e,onSelect:t,initialFocus:!0,className:"pointer-events-auto"})})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"title",className:"text-sm font-medium",children:"Title (Optional)"}),g.jsx(Ya,{id:"title",placeholder:"e.g., Regular Meeting",value:r,onChange:H=>n(H.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"description",className:"text-sm font-medium",children:"Description (Optional)"}),g.jsx(yg,{id:"description",placeholder:"Brief description of the meeting",value:i,onChange:H=>a(H.target.value),rows:3})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"file-input",className:"text-sm font-medium",children:"Agenda PDF *"}),g.jsx(Ya,{id:"file-input",type:"file",accept:".pdf",onChange:H=>{var fe;return o(((fe=H.target.files)==null?void 0:fe[0])||null)},required:!0})]}),g.jsx(gr,{type:"submit",disabled:l,className:"w-full",children:l?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),"Uploading..."]}):"Upload Agenda"})]})})]}),g.jsxs(un,{children:[g.jsx(zi,{children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx(Ui,{children:"All Agendas"}),g.jsx(ho,{children:"Manage uploaded board meeting agendas"})]}),D&&D.some(H=>!H.title)&&g.jsxs(gr,{variant:"outline",size:"sm",onClick:B,children:[g.jsx(y5,{className:"mr-2 h-4 w-4"}),"Auto-fill Titles"]})]})}),g.jsx(kn,{children:$?g.jsx("div",{className:"flex justify-center py-8",children:g.jsx(yl,{className:"h-8 w-8 animate-spin"})}):D&&D.length>0?g.jsx("div",{className:"space-y-4",children:D.map(H=>g.jsx("div",{className:"p-4 border rounded-lg",children:(x==null?void 0:x.id)===H.id?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-sm font-medium",children:"Date:"}),g.jsxs(VD,{children:[g.jsx(HD,{asChild:!0,children:g.jsxs(gr,{variant:"outline",size:"sm",children:[g.jsx(jg,{className:"mr-2 h-4 w-4"}),Ii(x.date,"MMMM d, yyyy")]})}),g.jsx(Ak,{className:"w-auto p-0",align:"start",children:g.jsx(Sk,{mode:"single",selected:x.date,onSelect:fe=>fe&&E({...x,date:fe}),className:"pointer-events-auto"})})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-medium",children:"Title (optional)"}),g.jsx(Ya,{value:x.title,onChange:fe=>E({...x,title:fe.target.value}),placeholder:"e.g., Regular Board Meeting"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-medium",children:"Description (optional)"}),g.jsx(yg,{value:x.description,onChange:fe=>E({...x,description:fe.target.value}),placeholder:"Brief description of the meeting...",rows:2})]}),g.jsxs("div",{className:"text-xs text-muted-foreground",children:["File: ",H.file_name]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs(gr,{size:"sm",onClick:()=>
577U.mutate({id:H.id,date:x.date,title:x.title,description:x.description}),disabled:U.isPending,children:[U.isPending?g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}):g.jsx(p5,{className:"mr-2 h-4 w-4"}),"Save Changes"]}),g.jsx(gr,{variant:"outline",size:"sm",onClick:()=>E(null),children:"Cancel"})]})]}):g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx("div",{className:"font-semibold",children:Ii(o3(H.meeting_date),"MMMM d, yyyy")}),H.title&&g.jsx("div",{className:"text-sm text-muted-foreground",children:H.title}),H.description&&g.jsx("div",{className:"text-sm text-muted-foreground mt-1",children:H.description}),g.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:H.file_name})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(gr,{variant:"outline",size:"sm",onClick:()=>E({id:H.id,date:o3(H.meeting_date),title:H.title||"",description:H.description||""}),children:g.jsx(y5,{className:"h-4 w-4"})}),g.jsx(gr,{variant:"outline",size:"sm",asChild:!0,children:g.jsx("a",{href:H.file_url,target:"_blank",rel:"noopener noreferrer",children:g.jsx(Xw,{className:"h-4 w-4"})})}),g.jsx(gr,{variant:"destructive",size:"sm",onClick:()=>d(H.id),children:g.jsx(DA,{className:"h-4 w-4"})})]})]})},H.id))}):g.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No agendas uploaded yet"})})]})]}),g.jsx(wS,{open:!!c,onOpenChange:()=>d(null),children:g.jsxs(rw,{children:[g.jsxs(nw,{children:[g.jsx(aw,{children:"Are you sure?"}),g.jsx(sw,{children:"This action cannot be undone. This will permanently delete the agenda and remove the file from storage."})]}),g.jsxs(iw,{children:[g.jsx(lw,{children:"Cancel"}),g.jsx(ow,{onClick:()=>c&&V.mutate(c),children:"Delete"})]})]})}),g.jsx(wN,{open:T,onOpenChange:S,children:g.jsxs(WA,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[g.jsxs(VA,{children:[g.jsx(HA,{children:"Auto-fill Agenda Titles"}),g.jsx(pU,{children:A.length>0?`Found ${A.length} agendas that can be updated based on filename patterns.`:"No agendas found that can be automatically updated. Titles couldn't be determined from filenames."})]}),A.length>0&&g.jsx("div",{className:"space-y-3 my-4",children:A.map(H=>g.jsxs("div",{className:"flex items-center gap-3 p-3 border rounded-lg bg-muted/50",children:[g.jsx(av,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("p",{className:"text-sm font-medium truncate",children:H.fileName}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["â ",g.jsx("span",{className:"text-primary font-medium",children:H.suggestedTitle})]})]})]},H.id))}),g.jsxs(h0e,{children:[g.jsx(gr,{variant:"outline",onClick:()=>S(!1),children:"Cancel"}),A.length>0&&g.jsx(gr,{onClick:z,disabled:k,children:k?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),"Updating..."]}):g.jsxs(g.Fragment,{children:[g.jsx(p5,{className:"mr-2 h-4 w-4"}),"Apply ",A.length," Changes"]})})]})]})})]})}var qD="rovingFocusGroup.onEntryFocus",Z9e={bubbles:!1,cancelable:!0},QA="RovingFocusGroup",[Z$,Wye,J9e]=Yw(QA),[eWe,Vye]=Ou(QA,[J9e]),[tWe,rWe]=eWe(QA),Hye=R.forwardRef((e,t)=>g.jsx(Z$.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Z$.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(nWe,{...e,ref:t})})}));Hye.displayName=QA;var nWe=R.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=R.useRef(null),h=Gn(t,f),p=$A(a),[m,_]=rd({prop:s,defaultProp:o??null,onChange:l,caller:QA}),[y,v]=R.useState(!1),b=jo(u),w=Wye(r),x=R.useRef(!1),[E,T]=R.useState(0);return R.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(qD,b),()=>S.removeEventListener(qD,b)},[b]),g.jsx(tWe,{scope:r,orientation:n,dir:p,loop:i,currentTabStopId:m,onItemFocus:R.useCallback(S=>_(S),[_]),onItemShiftTab:R.useCallback(()=>v(!0),[]),onFocusableItemAdd:R.useCallback(()=>T(S=>S+1),[]),onFocusableItemRemove:R.useCallback(()=>T(S=>S-1),[]),children:g.jsx(Hr.div,{tabIndex:y||E===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:_r(e.onMouseDown,()=>{x.current=!0}),onFocus:_r(e.onFocus,S=>{const A=!x.current;if(S.target===S.currentTarget&&A&&!y){const C=new CustomEvent(qD,Z9e);if(S.currentTarget.dispatchEvent(C),!C.defaultPrevented){const k=w().filter(U=>U.focusable),M=k.find(U=>U.active),D=k.find(U=>
vendor: 5,289 bytes, line 577
577U.id===m),V=[M,D,...k].filter(Boolean).map(U=>U.ref.current);Kye(V,c)}}x.current=!1}),onBlur:_r(e.onBlur,()=>v(!1))})})}),Gye="RovingFocusGroupItem",qye=R.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...o}=e,l=Yc(),u=a||l,c=rWe(Gye,r),d=c.currentTabStopId===u,f=Wye(r),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:m}=c;return R.useEffect(()=>{if(n)return h(),()=>p()},[n,h,p]),g.jsx(Z$.ItemSlot,{scope:r,id:u,focusable:n,active:i,children:g.jsx(Hr.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...o,ref:t,onMouseDown:_r(e.onMouseDown,_=>{n?c.onItemFocus(u):_.preventDefault()}),onFocus:_r(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:_r(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){c.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const y=sWe(_,c.orientation,c.dir);if(y!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let b=f().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const w=b.indexOf(_.currentTarget);b=c.loop?oWe(b,w+1):b.slice(w+1)}setTimeout(()=>Kye(b))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:m!=null}):s})})});qye.displayName=Gye;var iWe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function aWe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function sWe(e,t,r){const n=aWe(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return iWe[n]}function Kye(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function oWe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var lWe=Hye,uWe=qye,CN="Tabs",[cWe,v5t]=Ou(CN,[Vye]),Yye=Vye(),[dWe,IU]=cWe(CN),Xye=R.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:o,activationMode:l="automatic",...u}=e,c=$A(o),[d,f]=rd({prop:n,onChange:i,defaultProp:a??"",caller:CN});return g.jsx(dWe,{scope:r,baseId:Yc(),value:d,onValueChange:f,orientation:s,dir:c,activationMode:l,children:g.jsx(Hr.div,{dir:c,"data-orientation":s,...u,ref:t})})});Xye.displayName=CN;var Qye="TabsList",Zye=R.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=IU(Qye,r),s=Yye(r);return g.jsx(lWe,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:g.jsx(Hr.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});Zye.displayName=Qye;var Jye="TabsTrigger",eve=R.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=IU(Jye,r),o=Yye(r),l=nve(s.baseId,n),u=ive(s.baseId,n),c=n===s.value;return g.jsx(uWe,{asChild:!0,...o,focusable:!i,active:c,children:g.jsx(Hr.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:t,onMouseDown:_r(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:_r(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:_r(e.onFocus,()=>{const d=s.activationMode!=="manual";!c&&!i&&d&&s.onValueChange(n)})})})});eve.displayName=Jye;var tve="TabsContent",rve=R.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,o=IU(tve,r),l=nve(o.baseId,n),u=ive(o.baseId,n),c=n===o.value,d=R.useRef(c);return R.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),g.jsx(cc,{present:i||c,children:({present:f})=>g.jsx(Hr.div,{"data-state":c?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});rve.displayName=tve;function nve(e,t){return`${e}-trigger-${t}`}function ive(e,t){return`${e}-content-${t}`}var fWe=Xye,ave=Zye,sve=eve,ove=rve;const hWe=fWe,lve=R.forwardRef(({className:e,...t},r)=>g.jsx(ave,{ref:r,className:Xt("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));lve.displayName=ave.displayName;const Ck=R.forwardRef(({className:e,...t},r)=>g.jsx(sve,{ref:r,className:Xt("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}));Ck.displayName=sve.displayName;const pWe=R.forwardRef(({className:e,...t},r)=>g.jsx(ove,{ref:r,className:Xt("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));pWe.displayName=ove.displayName;var mWe=Array.isArray,dc=mWe,gWe=typeof Wf=="object"&&Wf&&Wf.Object===Object&&Wf,uve=gWe,yWe=uve,vWe=typeof self=="object"&&self&&self.Object===Object&&self,_We=yWe||vWe||Function("return this")(),np=_We,bWe=np,wWe=bWe.Symbol,ZA
vendor: 5,529 bytes, line 577
577=wWe,LQ=ZA,cve=Object.prototype,xWe=cve.hasOwnProperty,EWe=cve.toString,k2=LQ?LQ.toStringTag:void 0;function TWe(e){var t=xWe.call(e,k2),r=e[k2];try{e[k2]=void 0;var n=!0}catch{}var i=EWe.call(e);return n&&(t?e[k2]=r:delete e[k2]),i}var SWe=TWe,AWe=Object.prototype,CWe=AWe.toString;function PWe(e){return CWe.call(e)}var MWe=PWe,jQ=ZA,kWe=SWe,OWe=MWe,NWe="[object Null]",IWe="[object Undefined]",RQ=jQ?jQ.toStringTag:void 0;function DWe(e){return e==null?e===void 0?IWe:NWe:RQ&&RQ in Object(e)?kWe(e):OWe(e)}var hm=DWe;function LWe(e){return e!=null&&typeof e=="object"}var pm=LWe,jWe=hm,RWe=pm,$We="[object Symbol]";function FWe(e){return typeof e=="symbol"||RWe(e)&&jWe(e)==$We}var ux=FWe,BWe=dc,zWe=ux,UWe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,WWe=/^\w*$/;function VWe(e,t){if(BWe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||zWe(e)?!0:WWe.test(e)||!UWe.test(e)||t!=null&&e in Object(t)}var DU=VWe;function HWe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var y0=HWe;const cx=mi(y0);var GWe=hm,qWe=y0,KWe="[object AsyncFunction]",YWe="[object Function]",XWe="[object GeneratorFunction]",QWe="[object Proxy]";function ZWe(e){if(!qWe(e))return!1;var t=GWe(e);return t==YWe||t==XWe||t==KWe||t==QWe}var LU=ZWe;const wn=mi(LU);var JWe=np,eVe=JWe["__core-js_shared__"],tVe=eVe,KD=tVe,$Q=function(){var e=/[^.]+$/.exec(KD&&KD.keys&&KD.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function rVe(e){return!!$Q&&$Q in e}var nVe=rVe,iVe=Function.prototype,aVe=iVe.toString;function sVe(e){if(e!=null){try{return aVe.call(e)}catch{}try{return e+""}catch{}}return""}var dve=sVe,oVe=LU,lVe=nVe,uVe=y0,cVe=dve,dVe=/[\\^$.*+?()[\]{}|]/g,fVe=/^\[object .+?Constructor\]$/,hVe=Function.prototype,pVe=Object.prototype,mVe=hVe.toString,gVe=pVe.hasOwnProperty,yVe=RegExp("^"+mVe.call(gVe).replace(dVe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vVe(e){if(!uVe(e)||lVe(e))return!1;var t=oVe(e)?yVe:fVe;return t.test(cVe(e))}var _Ve=vVe;function bVe(e,t){return e==null?void 0:e[t]}var wVe=bVe,xVe=_Ve,EVe=wVe;function TVe(e,t){var r=EVe(e,t);return xVe(r)?r:void 0}var o_=TVe,SVe=o_,AVe=SVe(Object,"create"),PN=AVe,FQ=PN;function CVe(){this.__data__=FQ?FQ(null):{},this.size=0}var PVe=CVe;function MVe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kVe=MVe,OVe=PN,NVe="__lodash_hash_undefined__",IVe=Object.prototype,DVe=IVe.hasOwnProperty;function LVe(e){var t=this.__data__;if(OVe){var r=t[e];return r===NVe?void 0:r}return DVe.call(t,e)?t[e]:void 0}var jVe=LVe,RVe=PN,$Ve=Object.prototype,FVe=$Ve.hasOwnProperty;function BVe(e){var t=this.__data__;return RVe?t[e]!==void 0:FVe.call(t,e)}var zVe=BVe,UVe=PN,WVe="__lodash_hash_undefined__";function VVe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=UVe&&t===void 0?WVe:t,this}var HVe=VVe,GVe=PVe,qVe=kVe,KVe=jVe,YVe=zVe,XVe=HVe;function dx(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}dx.prototype.clear=GVe;dx.prototype.delete=qVe;dx.prototype.get=KVe;dx.prototype.has=YVe;dx.prototype.set=XVe;var QVe=dx;function ZVe(){this.__data__=[],this.size=0}var JVe=ZVe;function eHe(e,t){return e===t||e!==e&&t!==t}var jU=eHe,tHe=jU;function rHe(e,t){for(var r=e.length;r--;)if(tHe(e[r][0],t))return r;return-1}var MN=rHe,nHe=MN,iHe=Array.prototype,aHe=iHe.splice;function sHe(e){var t=this.__data__,r=nHe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():aHe.call(t,r,1),--this.size,!0}var oHe=sHe,lHe=MN;function uHe(e){var t=this.__data__,r=lHe(t,e);return r<0?void 0:t[r][1]}var cHe=uHe,dHe=MN;function fHe(e){return dHe(this.__data__,e)>-1}var hHe=fHe,pHe=MN;function mHe(e,t){var r=this.__data__,n=pHe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var gHe=mHe,yHe=JVe,vHe=oHe,_He=cHe,bHe=hHe,wHe=gHe;function fx(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}fx.prototype.clear=yHe;fx.prototype.delete=vHe;fx.prototype.get=_He;fx.prototype.has=bHe;fx.prototype.set=wHe;var kN=fx,xHe=o_,EHe=np,THe=xHe(EHe,"Map"),RU=THe,BQ=QVe,SHe=kN,AHe=RU;function CHe(){this.size=0,this.__data__={hash:new BQ,map:new(AHe||SHe),string:new BQ}}var PHe=CHe;function MHe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var kHe=MHe,OHe=kHe;function NHe(e,t){var r=e.__data__;return OHe(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ON=NHe,IHe=ON;function DHe(e){var t=IHe(this,e).delete(e);return this.size-=t?1:0,t}var LHe=DHe,jHe=ON;function RHe(e){return jHe(this,e).get(e)}var $He=RHe,FHe=ON;function BHe(e){return FHe(this,e).has(e)}var zHe=BHe,UHe=ON;function WHe(e,t){var r=UHe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var VHe=WHe,HHe=PHe,GHe=LHe,qHe=$He,KHe=zHe,YHe=VHe;function hx(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hx.prototype.clear=HHe;hx.prototype.delete=GHe;hx.prototype.get=qHe;hx.prototype.has=KHe;hx.prototype.set=YHe;var $U=hx,fve=$U,XHe="Expected a function";function FU(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XHe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(FU.Cache||fve),r}FU.Cache=fve;var hve=FU;const QHe=mi(hve);var ZHe=hve,JHe=500;function eGe(e){var t=ZHe(e,function(n){return r.size===JHe&&r.clear(),n}
577),r=t.cache;return t}var tGe=eGe,rGe=tGe,nGe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,iGe=/\\(\\)?/g,aGe=rGe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(nGe,function(r,n,i,a){t.push(i?a.replace(iGe,"$1"):n||r)}),t}),sGe=aGe;function oGe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var BU=oGe,zQ=ZA,lGe=BU,uGe=dc,cGe=ux,dGe=1/0,UQ=zQ?zQ.prototype:void 0,WQ=UQ?UQ.toString:void 0;function pve(e){if(typeof e=="string")return e;if(uGe(e))return lGe(e,pve)+"";if(cGe(e))return WQ?WQ.call(e):"";var t=e+"";return t=="0"&&1/e==-dGe?"-0":t}var fGe=pve,hGe=fGe;function pGe(e){return e==null?"":hGe(e)}var mve=pGe,mGe=dc,gGe=DU,yGe=sGe,vGe=mve;function _Ge(e,t){return mGe(e)?e:gGe(e,t)?[e]:yGe(vGe(e))}var gve=_Ge,bGe=ux,wGe=1/0;function xGe(e){if(typeof e=="string"||bGe(e))return e;var t=e+"";return t=="0"&&1/e==-wGe?"-0":t}var NN=xGe,EGe=gve,TGe=NN;function SGe(e,t){t=EGe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[TGe(t[r++])];return r&&r==n?e:void 0}var zU=SGe,AGe=zU;function CGe(e,t,r){var n=e==null?void 0:AGe(e,t);return n===void 0?r:n}var yve=CGe;const Zc=mi(yve);function PGe(e){return e==null}var MGe=PGe;const Ln=mi(MGe);var kGe=hm,OGe=dc,NGe=pm,IGe="[object String]";function DGe(e){return typeof e=="string"||!OGe(e)&&NGe(e)&&kGe(e)==IGe}var LGe=DGe;const Fv=mi(LGe);var vve={exports:{}},ia={};/** 578 * @license React 579 * react-is.production.min.js 580 * 581 * Copyright (c) Facebook, Inc. and its affiliates. 582 * 583 * This source code is licensed under the MIT license found in the 584 * LICENSE file in the root directory of this source tree. 585 */var UU=Symbol.for("react.element"),WU=Symbol.for("react.portal"),IN=Symbol.for("react.fragment"),DN=Symbol.for("react.strict_mode"),LN=Symbol.for("react.profiler"),jN=Symbol.for("react.provider"),RN=Symbol.for("react.context"),jGe=Symbol.for("react.server_context"),$N=Symbol.for("react.forward_ref"),FN=Symbol.for("react.suspense"),BN=Symbol.for("react.suspense_list"),zN=Symbol.for("react.memo"),UN=Symbol.for("react.lazy"),RGe=Symbol.for("react.offscreen"),_ve;_ve=Symbol.for("react.module.reference");function nf(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case UU:switch(e=e.type,e){case IN:case LN:case DN:case FN:case BN:return e;default:switch(e=e&&e.$$typeof,e){case jGe:case RN:case $N:case UN:case zN:case jN:return e;default:return t}}case WU:return t}}}ia.ContextConsumer=RN;ia.ContextProvider=jN;ia.Element=UU;ia.ForwardRef=$N;ia.Fragment=IN;ia.Lazy=UN;ia.Memo=zN;ia.Portal=WU;ia.Profiler=LN;ia.StrictMode=DN;ia.Suspense=FN;ia.SuspenseList=BN;ia.isAsyncMode=function(){return!1};ia.isConcurrentMode=function(){return!1};ia.isContextConsumer=function(e){return nf(e)===RN};ia.isContextProvider=function(e){return nf(e)===jN};ia.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===UU};ia.isForwardRef=function(e){return nf(e)===$N};ia.isFragment=function(e){return nf(e)===IN};ia.isLazy=function(e){return nf(e)===UN};ia.isMemo=function(e){return nf(e)===zN};ia.isPortal=function(e){return nf(e)===WU};ia.isProfiler=function(e){return nf(e)===LN};ia.isStrictMode=function(e){return nf(e)===DN};ia.isSuspense=function(e){return nf(e)===FN};ia.isSuspenseList=function(e){return nf(e)===BN};ia.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===IN||e===LN||e===DN||e===FN||e===BN||e===RGe||typeof e=="object"&&e!==null&&(e.$$typeof===UN||e.$$typeof===zN||e.$$typeof===jN||e.$$typeof===RN||e.$$typeof===$N||e.$$typeof===_ve||e.getModuleId!==void 0)};ia.typeOf=nf;vve.exports=ia;var $Ge=vve.exports,FGe=hm,BGe=pm,zGe="[object Number]";function UGe(e){return typeof e=="number"||BGe(e)&&FGe(e)==zGe}var bve=UGe;const WGe=mi(bve);var VGe=bve;function HGe(e){return VGe(e)&&e!=+e}var GGe=HGe;const px=mi(GGe);var Tu=function(t){return t===0?0:t>0?1:-1},jy=function(t){return Fv(t)&&t.indexOf("%")===t.length-1},ar=function(t){return WGe(t)&&!px(t)},qGe=function(t){return Ln(t)},Bo=function(t){return ar(t)||Fv(t)},KGe=0,mx=function(t){var r=++KGe;return"".concat(t||"").concat(r)},Su=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ar(t)&&!Fv(t))return n;var a;if(jy(t)){var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}
vendor: 5,304 bytes, line 585
585else a=+t;return px(a)&&(a=n),i&&a>r&&(a=r),a},p1=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},YGe=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},Ku=function(t,r){return ar(t)&&ar(r)?function(n){return t+n*(r-t)}:function(){return r}};function c3(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Zc(n,t))===r})}var XGe=function(t,r){return ar(t)&&ar(r)?t-r:Fv(t)&&Fv(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function db(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function J$(e){"@babel/helpers - typeof";return J$=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},J$(e)}var QGe=["viewBox","children"],ZGe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],VQ=["points","pathLength"],YD={svg:QGe,polygon:VQ,polyline:VQ},VU=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
585ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],d3=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(R.isValidElement(t)&&(n=t.props),!cx(n))return null;var i={};return Object.keys(n).forEach(function(a){VU.includes(a)&&(i[a]=r||function(s){return n[a](n,s)})}),i},JGe=function(t,r,n){return function(i){return t(r,n,i),null}},Bv=function(t,r,n){if(!cx(t)||J$(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var s=t[a];VU.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=JGe(s,r,n))}),i},eqe=["children"],tqe=["children"];function HQ(e,t){if(e==null)return{};var r=rqe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rqe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function eF(e){"@babel/helpers - typeof";return eF=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},eF(e)}var GQ={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"}
vendor: 6,585 bytes, line 585
585,Gp=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},qQ=null,XD=null,HU=function e(t){if(t===qQ&&Array.isArray(XD))return XD;var r=[];return R.Children.forEach(t,function(n){Ln(n)||($Ge.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),XD=r,qQ=t,r};function Yd(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Gp(i)}):n=[Gp(t)],HU(e).forEach(function(i){var a=Zc(i,"type.displayName")||Zc(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Nc(e,t){var r=Yd(e,t);return r&&r[0]}var KQ=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!ar(n)||n<=0||!ar(i)||i<=0)},nqe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],iqe=function(t){return t&&t.type&&Fv(t.type)&&nqe.indexOf(t.type)>=0},aqe=function(t){return t&&eF(t)==="object"&&"clipDot"in t},sqe=function(t,r,n,i){var a,s=(a=YD==null?void 0:YD[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!wn(t)&&(i&&s.includes(r)||ZGe.includes(r))||n&&VU.includes(r)},en=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(R.isValidElement(t)&&(i=t.props),!cx(i))return null;var a={};return Object.keys(i).forEach(function(s){var o;sqe((o=i)===null||o===void 0?void 0:o[s],s,r,n)&&(a[s]=i[s])}),a},tF=function e(t,r){if(t===r)return!0;var n=R.Children.count(t);if(n!==R.Children.count(r))return!1;if(n===0)return!0;if(n===1)return YQ(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],s=r[i];if(Array.isArray(a)||Array.isArray(s)){if(!e(a,s))return!1}else if(!YQ(a,s))return!1}return!0},YQ=function(t,r){if(Ln(t)&&Ln(r))return!0;if(!Ln(t)&&!Ln(r)){var n=t.props||{},i=n.children,a=HQ(n,eqe),s=r.props||{},o=s.children,l=HQ(s,tqe);return i&&o?db(a,l)&&tF(i,o):!i&&!o?db(a,l):!1}return!1},XQ=function(t,r){var n=[],i={};return HU(t).forEach(function(a,s){if(iqe(a))n.push(a);else if(a){var o=Gp(a.type),l=r[o]||{},u=l.handler,c=l.once;if(u&&(!c||!i[o])){var d=u(a,o,s);n.push(d),i[o]=!0}}}),n},oqe=function(t){var r=t&&t.type;return r&&GQ[r]?GQ[r]:null},lqe=function(t,r){return HU(r).indexOf(t)},uqe=["children","width","height","viewBox","className","style","title","desc"];function rF(){return rF=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},rF.apply(this,arguments)}function cqe(e,t){if(e==null)return{};var r=dqe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dqe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function nF(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,s=e.style,o=e.title,l=e.desc,u=cqe(e,uqe),c=i||{width:r,height:n,x:0,y:0},d=Dn("recharts-surface",a);return _e.createElement("svg",rF({},en(u,!0,"svg"),{className:d,width:r,height:n,style:s,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),_e.createElement("title",null,o),_e.createElement("desc",null,l),t)}var fqe=["children","className"];function iF(){return iF=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},iF.apply(this,arguments)}function hqe(e,t){if(e==null)return{};var r=pqe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pqe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var bi=_e.forwardRef(function(e,t){var r=e.children,n=e.className,i=hqe(e,fqe),a=Dn("recharts-layer",n);return _e.createElement("g",iF({className:a},en(i,!0),{ref:t}),r)}),qp=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function mqe(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var gqe=mqe,yqe=gqe;function vqe(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:yqe(e,t,r)}var _qe=vqe,bqe="\\ud800-\\udfff",wqe="\\u0300-\\u036f",xqe="\\ufe20-\\ufe2f",Eqe="\\u20d0-\\u20ff",Tqe=wqe+xqe+Eqe,Sqe="\\ufe0e\\ufe0f",Aqe="\\u200d",Cqe=RegExp("["+Aqe+bqe+Tqe+Sqe+"]");function Pqe(e){return Cqe.test(e)}var wve=Pqe;function Mqe(e){return e.split("")}var kqe=Mqe,xve="\\ud800-\\udfff",Oqe="\\u0300-\\u036f",Nqe="\\ufe20-\\ufe2f",Iqe="\\u20d0-\\u20ff",Dqe=Oqe+Nqe+Iqe,Lqe="\\ufe0e\\ufe0f",jqe="["+xve+"]",aF="["+Dqe+"]",sF="\\ud83c[\\udffb-\\udfff]",Rqe="(?:"+aF+"|"+sF+")",Eve="[^"+xve+"]",Tve="(?:\\ud83c[\\udde6-\\uddff]){2}",Sve="[\\ud800-\\udbff][\\udc00-\\udfff]",$qe="\\u200d",Ave=Rqe+"?",Cve="["+Lqe+"]?",Fqe="(?:"+$qe+"(?:"+[Eve,Tve,Sve].join("|")+")"+Cve+Ave+")*",Bqe=Cve+Ave+Fqe,zqe="(?:"+[Eve+aF+"?",aF,Tve,Sve,jqe].join("|")+")",Uqe=RegExp(sF+"(?="+sF+")|"+zqe+Bqe,"g");function Wqe(e){return e.match(Uqe)||[]}var Vqe=Wqe,Hqe=kqe,Gqe=wve,qqe=Vqe;function Kqe(e){return Gqe(e)?qqe(e):Hqe(e)}var Yqe=Kqe,Xqe=_qe,Qqe=wve,Zqe=Yqe,Jqe=mve;function eKe(e){return function(t){t=Jqe(t);var r=Qqe(t)?Zqe(t):void 0,n=r?r[0]:t.charAt(0),i=r?Xqe(r,1).join(""):t.slice(1);return n[e]()+i}}var tKe=eKe,rKe=tKe,nKe=rKe("toUpperCase"),iKe=nKe;const WN=mi(iKe);function Ia(e){return function(){return e}}const Pve=Math.cos,f3=Math.sin,ah=Math.sqrt,h3=Math.PI,VN=2*h3,oF=Math.PI,lF=2*oF,g
vendor: 4,223 bytes, line 585
585y=1e-6,aKe=lF-gy;function Mve(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function sKe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Mve;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class oKe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Mve:sKe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-t,u=i-r,c=s-t,d=o-r,f=c*c+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>gy)if(!(Math.abs(d*l-u*c)>gy)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-s,p=i-o,m=l*l+u*u,_=h*h+p*p,y=Math.sqrt(m),v=Math.sqrt(f),b=a*Math.tan((oF-Math.acos((m+f-_)/(2*y*v)))/2),w=b/v,x=b/y;Math.abs(w-1)>gy&&this._append`L${t+w*c},${r+w*d}`,this._append`A${a},${a},0,0,${+(d*h>c*p)},${this._x1=t+x*l},${this._y1=r+x*u}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),u=t+o,c=r+l,d=1^s,f=s?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>gy||Math.abs(this._y1-c)>gy)&&this._append`L${u},${c}`,n&&(f<0&&(f=f%lF+lF),f>aKe?this._append`A${n},${n},0,1,${d},${t-o},${r-l}A${n},${n},0,1,${d},${this._x1=u},${this._y1=c}`:f>gy&&this._append`A${n},${n},0,${+(f>=oF)},${d},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function GU(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new oKe(t)}function qU(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kve(e){this._context=e}kve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function HN(e){return new kve(e)}function Ove(e){return e[0]}function Nve(e){return e[1]}function Ive(e,t){var r=Ia(!0),n=null,i=HN,a=null,s=GU(o);e=typeof e=="function"?e:e===void 0?Ove:Ia(e),t=typeof t=="function"?t:t===void 0?Nve:Ia(t);function o(l){var u,c=(l=qU(l)).length,d,f=!1,h;for(n==null&&(a=i(h=s())),u=0;u<=c;++u)!(u<c&&r(d=l[u],u,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(d,u,l),+t(d,u,l));if(h)return a=null,h+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ia(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ia(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ia(!!l),o):r},o.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),o):i},o.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),o):n},o}function tM(e,t,r){var n=null,i=Ia(!0),a=null,s=HN,o=null,l=GU(u);e=typeof e=="function"?e:e===void 0?Ove:Ia(+e),t=typeof t=="function"?t:Ia(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Nve:Ia(+r);function u(d){var f,h,p,m=(d=qU(d)).length,_,y=!1,v,b=new Array(m),w=new Array(m);for(a==null&&(o=s(v=l())),f=0;f<=m;++f){if(!(f<m&&i(_=d[f],f,d))===y)if(y=!y)h=f,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=f-1;p>=h;--p)o.point(b[p],w[p]);o.lineEnd(),o.areaEnd()}y&&(b[f]=+e(_,f,d),w[f]=+t(_,f,d),o.point(n?+n(_,f,d):b[f],r?+r(_,f,d):w[f]))}if(v)return o=null,v+""||null}
vendor: 9,667 bytes, line 585
585function c(){return Ive().defined(i).curve(s).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ia(+d),n=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ia(+d),u):e},u.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ia(+d),u):n},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ia(+d),r=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ia(+d),u):t},u.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ia(+d),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Ia(!!d),u):i},u.curve=function(d){return arguments.length?(s=d,a!=null&&(o=s(a)),u):s},u.context=function(d){return arguments.length?(d==null?a=o=null:o=s(a=d),u):a},u}class Dve{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function lKe(e){return new Dve(e,!0)}function uKe(e){return new Dve(e,!1)}const KU={draw(e,t){const r=ah(t/h3);e.moveTo(r,0),e.arc(0,0,r,0,VN)}},cKe={draw(e,t){const r=ah(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Lve=ah(1/3),dKe=Lve*2,fKe={draw(e,t){const r=ah(t/dKe),n=r*Lve;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},hKe={draw(e,t){const r=ah(t),n=-r/2;e.rect(n,n,r,r)}},pKe=.8908130915292852,jve=f3(h3/10)/f3(7*h3/10),mKe=f3(VN/10)*jve,gKe=-Pve(VN/10)*jve,yKe={draw(e,t){const r=ah(t*pKe),n=mKe*r,i=gKe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=VN*a/5,o=Pve(s),l=f3(s);e.lineTo(l*r,-o*r),e.lineTo(o*n-l*i,l*n+o*i)}e.closePath()}},QD=ah(3),vKe={draw(e,t){const r=-ah(t/(QD*3));e.moveTo(0,r*2),e.lineTo(-QD*r,-r),e.lineTo(QD*r,-r),e.closePath()}},Sd=-.5,Ad=ah(3)/2,uF=1/ah(12),_Ke=(uF/2+1)*3,bKe={draw(e,t){const r=ah(t/_Ke),n=r/2,i=r*uF,a=n,s=r*uF+r,o=-a,l=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(o,l),e.lineTo(Sd*n-Ad*i,Ad*n+Sd*i),e.lineTo(Sd*a-Ad*s,Ad*a+Sd*s),e.lineTo(Sd*o-Ad*l,Ad*o+Sd*l),e.lineTo(Sd*n+Ad*i,Sd*i-Ad*n),e.lineTo(Sd*a+Ad*s,Sd*s-Ad*a),e.lineTo(Sd*o+Ad*l,Sd*l-Ad*o),e.closePath()}};function wKe(e,t){let r=null,n=GU(i);e=typeof e=="function"?e:Ia(e||KU),t=typeof t=="function"?t:Ia(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ia(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ia(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function p3(){}function m3(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Rve(e){this._context=e}Rve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m3(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xKe(e){return new Rve(e)}function $ve(e){this._context=e}$ve.prototype={areaStart:p3,areaEnd:p3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m3(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function EKe(e){return new $ve(e)}function Fve(e){this._context=e}Fve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:m3(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TKe(e){return new Fve(e)}function Bve(e){this._context=e}Bve.prototype={areaStart:p3,areaEnd:p3,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function SKe(e){return new Bve(e)}function QQ(e){return e<0?-1:1}function ZQ(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(QQ(a)+QQ(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function JQ(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ZD(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-n)/3;e._context.bezierCurveTo(n+o,i+o*t,a-o,s-o*r,a,s)}function g3(e){this._context=e}g3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ZD(this,this._t0,JQ(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ZD(this,JQ(this,r=ZQ(this,e,t)),r);break;default:ZD(this,this._t0,r=ZQ(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function zve(e){this._context=new Uve(e)}(zve.prototype=Object.create(g3.prototype)).point=function(e,t){g3.prototype.point.call(this,t,e)};function Uve(e){this._context=e}Uve.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function AKe(e){return new g3(e)}function CKe(e){return new zve(e)}function Wve(e){this._context=e}Wve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=eZ(e),i=eZ(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function eZ(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,s[t]-=n*s[t-1];for(i[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function PKe(e){return new Wve(e)}function GN(e,t){this._context=e,this._t=t}GN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 10,270 bytes, lines 585-588
585default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function MKe(e){return new GN(e,.5)}function kKe(e){return new GN(e,0)}function OKe(e){return new GN(e,1)}function uw(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,o=a.length;r<s;++r)for(i=a,a=e[t[r]],n=0;n<o;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function cF(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function NKe(e,t){return e[t]}function IKe(e){const t=[];return t.key=e,t}function DKe(){var e=Ia([]),t=cF,r=uw,n=NKe;function i(a){var s=Array.from(e.apply(this,arguments),IKe),o,l=s.length,u=-1,c;for(const d of a)for(o=0,++u;o<l;++o)(s[o][u]=[0,+n(d,s[o].key,u,a)]).data=d;for(o=0,c=qU(t(s));o<l;++o)s[c[o]].index=o;return r(s,c),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ia(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ia(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?cF:typeof a=="function"?a:Ia(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??uw,i):r},i}function LKe(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=e[r][i][1]||0;if(s)for(r=0;r<n;++r)e[r][i][1]/=s}uw(e,t)}}function jKe(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var s=0,o=0;s<i;++s)o+=e[s][r][1]||0;n[r][1]+=n[r][0]=-o/2}uw(e,t)}}function RKe(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var o=0,l=0,u=0;o<s;++o){for(var c=e[t[o]],d=c[n][1]||0,f=c[n-1][1]||0,h=(d-f)/2,p=0;p<o;++p){var m=e[t[p]],_=m[n][1]||0,y=m[n-1][1]||0;h+=_-y}l+=d,u+=h*d}i[n-1][1]+=i[n-1][0]=r,l&&(r-=u/l)}i[n-1][1]+=i[n-1][0]=r,uw(e,t)}}function xS(e){"@babel/helpers - typeof";return xS=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},xS(e)}var $Ke=["type","size","sizeType"];function dF(){return dF=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},dF.apply(this,arguments)}function tZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tZ(Object(r),!0).forEach(function(n){FKe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tZ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FKe(e,t,r){return t=BKe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BKe(e){var t=zKe(e,"string");return xS(t)=="symbol"?t:t+""}function zKe(e,t){if(xS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UKe(e,t){if(e==null)return{};var r=WKe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WKe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Vve={symbolCircle:KU,symbolCross:cKe,symbolDiamond:fKe,symbolSquare:hKe,symbolStar:yKe,symbolTriangle:vKe,symbolWye:bKe},VKe=Math.PI/180,HKe=function(t){var r="symbol".concat(WN(t));return Vve[r]||KU},GKe=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*VKe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},qKe=function(t,r){Vve["symbol".concat(WN(t))]=r},YU=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,s=t.sizeType,o=s===void 0?"area":s,l=UKe(t,$Ke),u=rZ(rZ({},l),{},{type:n,size:a,sizeType:o}),c=function(){var _=HKe(n),y=wKe().type(_).size(GKe(a,o,n));return y()},d=u.className,f=u.cx,h=u.cy,p=en(u,!0);return f===+f&&h===+h&&a===+a?_e.createElement("path",dF({},p,{className:Dn("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(h,")"),d:c()})):null};YU.registerSymbol=qKe;function cw(e){"@babel/helpers - typeof";return cw=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},cw(e)}function fF(){return fF=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},fF.apply(this,arguments)}function nZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KKe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nZ(Object(r),!0).forEach(function(n){ES(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nZ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XKe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gve(n.key),n)}}function QKe(e,t,r){return t&&XKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZKe(e,t,r){return t=y3(t),JKe(e,Hve()?Reflect.construct(t,r||[],y3(e).constructor):t.apply(e,r))}function JKe(e,t){if(t&&(cw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eYe(e)}function eYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hve=function(){return!!e})()}function y3(e){return y3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},y3(e)}function tYe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hF(e,t)}function hF(e,t){return hF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},hF(e,t)}function ES(e,t,r){return t=Gve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gve(e){var t=rYe(e,"string");return cw(t)=="symbol"?t:t+""}function rYe(e,t){if(cw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cd=32,XU=function(e){function t(){return YKe(this,t),ZKe(this,t,arguments)}return tYe(t,e),QKe(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Cd/2,s=Cd/6,o=Cd/3,l=n.inactive?i:n.color;if(n.type==="plainline")return _e.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Cd,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return _e.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(o,` 586 A`).concat(s,",").concat(s,",0,1,1,").concat(2*o,",").concat(a,` 587 H`).concat(Cd,"M").concat(2*o,",").concat(a,` 588 A`).concat(s,",").concat(s,",0,1,1,").concat(o,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return _e.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Cd/8,"h").concat(Cd,"v").concat(Cd*3/4,"h").concat(-Cd,"z"),className:"recharts-legend-icon"});if(_e.isValidElement(n.legendIcon)){var u=KKe({},n);return delete u.legendIcon,_e.cloneElement(n.legendIcon,u)}return _e.createElement(YU,{fill:l,cx:a,cy:a,size:Cd,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,s=i.iconSize,o=i.layout,l=i.formatter,u=i.inactiveColor,c={x:0,y:0,width:Cd,height:Cd},d={display:o==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,p){var m=h.formatter||l,_=Dn(ES(ES({"recharts-legend-item":!0},"legend-item-".concat(p),!0),"inactive",h.inactive));if(h.type==="none")return null;var y=wn(h.value)?null:h.value;qp(!wn(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var v=h.inactive?u:h.color;return _e.createElement("li",fF({className:_,style:d,key:"legend-item-".concat(p)},Bv(n.props,h,p)),_e.createElement(nF,{width:s,height:s,viewBox:c,style:f},n.renderIcon(h)),_e.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},m?m(y,h,p):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var o={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return _e.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}
vendor: 4,958 bytes, line 588
588(R.PureComponent);ES(XU,"displayName","Legend");ES(XU,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var nYe=kN;function iYe(){this.__data__=new nYe,this.size=0}var aYe=iYe;function sYe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oYe=sYe;function lYe(e){return this.__data__.get(e)}var uYe=lYe;function cYe(e){return this.__data__.has(e)}var dYe=cYe,fYe=kN,hYe=RU,pYe=$U,mYe=200;function gYe(e,t){var r=this.__data__;if(r instanceof fYe){var n=r.__data__;if(!hYe||n.length<mYe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new pYe(n)}return r.set(e,t),this.size=r.size,this}var yYe=gYe,vYe=kN,_Ye=aYe,bYe=oYe,wYe=uYe,xYe=dYe,EYe=yYe;function gx(e){var t=this.__data__=new vYe(e);this.size=t.size}gx.prototype.clear=_Ye;gx.prototype.delete=bYe;gx.prototype.get=wYe;gx.prototype.has=xYe;gx.prototype.set=EYe;var qve=gx,TYe="__lodash_hash_undefined__";function SYe(e){return this.__data__.set(e,TYe),this}var AYe=SYe;function CYe(e){return this.__data__.has(e)}var PYe=CYe,MYe=$U,kYe=AYe,OYe=PYe;function v3(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new MYe;++t<r;)this.add(e[t])}v3.prototype.add=v3.prototype.push=kYe;v3.prototype.has=OYe;var Kve=v3;function NYe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Yve=NYe;function IYe(e,t){return e.has(t)}var Xve=IYe,DYe=Kve,LYe=Yve,jYe=Xve,RYe=1,$Ye=2;function FYe(e,t,r,n,i,a){var s=r&RYe,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=r&$Ye?new DYe:void 0;for(a.set(e,t),a.set(t,e);++d<o;){var p=e[d],m=t[d];if(n)var _=s?n(m,p,d,t,e,a):n(p,m,d,e,t,a);if(_!==void 0){if(_)continue;f=!1;break}if(h){if(!LYe(t,function(y,v){if(!jYe(h,v)&&(p===y||i(p,y,r,n,a)))return h.push(v)})){f=!1;break}}else if(!(p===m||i(p,m,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Qve=FYe,BYe=np,zYe=BYe.Uint8Array,UYe=zYe;function WYe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var VYe=WYe;function HYe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var QU=HYe,iZ=ZA,aZ=UYe,GYe=jU,qYe=Qve,KYe=VYe,YYe=QU,XYe=1,QYe=2,ZYe="[object Boolean]",JYe="[object Date]",eXe="[object Error]",tXe="[object Map]",rXe="[object Number]",nXe="[object RegExp]",iXe="[object Set]",aXe="[object String]",sXe="[object Symbol]",oXe="[object ArrayBuffer]",lXe="[object DataView]",sZ=iZ?iZ.prototype:void 0,JD=sZ?sZ.valueOf:void 0;function uXe(e,t,r,n,i,a,s){switch(r){case lXe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oXe:return!(e.byteLength!=t.byteLength||!a(new aZ(e),new aZ(t)));case ZYe:case JYe:case rXe:return GYe(+e,+t);case eXe:return e.name==t.name&&e.message==t.message;case nXe:case aXe:return e==t+"";case tXe:var o=KYe;case iXe:var l=n&XYe;if(o||(o=YYe),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=QYe,s.set(e,t);var c=qYe(o(e),o(t),n,i,a,s);return s.delete(e),c;case sXe:if(JD)return JD.call(e)==JD.call(t)}return!1}var cXe=uXe;function dXe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Zve=dXe,fXe=Zve,hXe=dc;function pXe(e,t,r){var n=t(e);return hXe(e)?n:fXe(n,r(e))}var mXe=pXe;function gXe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}var yXe=gXe;function vXe(){return[]}var _Xe=vXe,bXe=yXe,wXe=_Xe,xXe=Object.prototype,EXe=xXe.propertyIsEnumerable,oZ=Object.getOwnPropertySymbols,TXe=oZ?function(e){return e==null?[]:(e=Object(e),bXe(oZ(e),function(t){return EXe.call(e,t)}))}:wXe,SXe=TXe;function AXe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var CXe=AXe,PXe=hm,MXe=pm,kXe="[object Arguments]";function OXe(e){return MXe(e)&&PXe(e)==kXe}var NXe=OXe,lZ=NXe,IXe=pm,Jve=Object.prototype,DXe=Jve.hasOwnProperty,LXe=Jve.propertyIsEnumerable,jXe=lZ(function(){return arguments}())?lZ:function(e){return IXe(e)&&DXe.call(e,"callee")&&!LXe.call(e,"callee")},ZU=jXe,_3={exports:{}};function RXe(){return!1}var $Xe=RXe;_3.exports;(function(e,t){var r=np,n=$Xe,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?r.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||n;e.exports=u})(_3,_3.exports);var e_e=_3.exports,FXe=9007199254740991,BXe=/^(?:0|[1-9]\d*)$/;function zXe(e,t){var r=typeof e;return t=t??FXe,!!t&&(r=="number"||r!="symbol"&&BXe.test(e))&&e>-1&&e%1==0&&e<t}var JU=zXe,UXe=9007199254740991;function WXe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UXe}var e9=WXe,VXe=hm,HXe=e9,GXe=pm,qXe="[object Arguments]",KXe="[object Array]",YXe="[object Boolean]",XXe="[object Date]",QXe="[object Error]",ZXe="[object Function]",JXe="[object Map]",eQe="[object Number]",tQe="[object Object]",rQe="[object RegExp]",nQe="[object Set]",iQe="[object String]",aQe="[object WeakMap]",sQe="[object ArrayBuffer]",oQe="[object DataView]",lQe="[object Float32Array]",uQe="[object Float64Array
588]",cQe="[object Int8Array]",dQe="[object Int16Array]",fQe="[object Int32Array]",hQe="[object Uint8Array]",pQe="[object Uint8ClampedArray]",mQe="[object Uint16Array]",gQe="[object Uint32Array]",qa={};qa[lQe]=qa[uQe]=qa[cQe]=qa[dQe]=qa[fQe]=qa[hQe]=qa[pQe]=qa[mQe]=qa[gQe]=!0;qa[qXe]=qa[KXe]=qa[sQe]=qa[YXe]=qa[oQe]=qa[XXe]=qa[QXe]=qa[ZXe]=qa[JXe]=qa[eQe]=qa[tQe]=qa[rQe]=qa[nQe]=qa[iQe]=qa[aQe]=!1;function yQe(e){return GXe(e)&&HXe(e.length)&&!!qa[VXe(e)]}var vQe=yQe;function _Qe(e){return function(t){return e(t)}}var t_e=_Qe,b3={exports:{}};b3.exports;(function(e,t){var r=uve,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a&&r.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(b3,b3.exports);var bQe=b3.exports,wQe=vQe,xQe=t_e,uZ=bQe,cZ=uZ&&uZ.isTypedArray,EQe=cZ?xQe(cZ):wQe,r_e=EQe,TQe=CXe,SQe=ZU,AQe=dc,CQe=e_e,PQe=JU,MQe=r_e,kQe=Object.prototype,OQe=kQe.hasOwnProperty;function NQe(e,t){var r=AQe(e),n=!r&&SQe(e),i=!r&&!n&&CQe(e),a=!r&&!n&&!i&&MQe(e),s=r||n||i||a,o=s?TQe(e.length,String):[],l=o.length;for(var u in e)(t||OQe.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||PQe(u,l)))&&o.push(u);return o}var IQe=NQe,DQe=Object.prototype;function LQe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||DQe;return e===r}var jQe=LQe;function RQe(e,t){return function(r){return e(t(r))}}var n_e=RQe,$Qe=n_e,FQe=$Qe(Object.keys,Object),BQe=FQe,zQe=jQe,UQe=BQe,WQe=Object.prototype,VQe=WQe.hasOwnProperty;function HQe(e){if(!zQe(e))return UQe(e);var t=[];for(var r in Object(e))VQe.call(e,r)&&r!="constructor"&&t.push(r);return t}var GQe=HQe,qQe=LU,KQe=e9;function YQe(e){return e!=null&&KQe(e.length)&&!qQe(e)}var qN=YQe,XQe=IQe,QQe=GQe,ZQe=qN;function JQe(e){return ZQe(e)?XQe(e):QQe(e)}var t9=JQe,eZe=mXe,tZe=SXe,rZe=t9;function nZe(e){return eZe(e,rZe,tZe)}var iZe=nZe,dZ=iZe,aZe=1,sZe=Object.prototype,oZe=sZe.hasOwnProperty;function lZe(e,t,r,n,i,a){var s=r&aZe,o=dZ(e),l=o.length,u=dZ(t),c=u.length;if(l!=c&&!s)return!1;for(var d=l;d--;){var f=o[d];if(!(s?f in t:oZe.call(t,f)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var _=s;++d<l;){f=o[d];var y=e[f],v=t[f];if(n)var b=s?n(v,y,f,t,e,a):n(y,v,f,e,t,a);if(!(b===void 0?y===v||i(y,v,r,n,a):b)){m=!1;break}_||(_=f=="constructor")}if(m&&!_){var w=e.constructor,x=t.constructor;w!=x&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(m=!1)}return a.delete(e),a.delete(t),m}var uZe=lZe,cZe=o_,dZe=np,fZe=cZe(dZe,"DataView"),hZe=fZe,pZe=o_,mZe=np,gZe=pZe(mZe,"Promise"),yZe=gZe,vZe=o_,_Ze=np,bZe=vZe(_Ze,"Set"),i_e=bZe,wZe=o_,xZe=np,EZe=wZe(xZe,"WeakMap"),TZe
vendor: 5,195 bytes, line 588
588=EZe,pF=hZe,mF=RU,gF=yZe,yF=i_e,vF=TZe,a_e=hm,yx=dve,fZ="[object Map]",SZe="[object Object]",hZ="[object Promise]",pZ="[object Set]",mZ="[object WeakMap]",gZ="[object DataView]",AZe=yx(pF),CZe=yx(mF),PZe=yx(gF),MZe=yx(yF),kZe=yx(vF),yy=a_e;(pF&&yy(new pF(new ArrayBuffer(1)))!=gZ||mF&&yy(new mF)!=fZ||gF&&yy(gF.resolve())!=hZ||yF&&yy(new yF)!=pZ||vF&&yy(new vF)!=mZ)&&(yy=function(e){var t=a_e(e),r=t==SZe?e.constructor:void 0,n=r?yx(r):"";if(n)switch(n){case AZe:return gZ;case CZe:return fZ;case PZe:return hZ;case MZe:return pZ;case kZe:return mZ}return t});var OZe=yy,eL=qve,NZe=Qve,IZe=cXe,DZe=uZe,yZ=OZe,vZ=dc,_Z=e_e,LZe=r_e,jZe=1,bZ="[object Arguments]",wZ="[object Array]",rM="[object Object]",RZe=Object.prototype,xZ=RZe.hasOwnProperty;function $Ze(e,t,r,n,i,a){var s=vZ(e),o=vZ(t),l=s?wZ:yZ(e),u=o?wZ:yZ(t);l=l==bZ?rM:l,u=u==bZ?rM:u;var c=l==rM,d=u==rM,f=l==u;if(f&&_Z(e)){if(!_Z(t))return!1;s=!0,c=!1}if(f&&!c)return a||(a=new eL),s||LZe(e)?NZe(e,t,r,n,i,a):IZe(e,t,l,r,n,i,a);if(!(r&jZe)){var h=c&&xZ.call(e,"__wrapped__"),p=d&&xZ.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,_=p?t.value():t;return a||(a=new eL),i(m,_,r,n,a)}}return f?(a||(a=new eL),DZe(e,t,r,n,i,a)):!1}var FZe=$Ze,BZe=FZe,EZ=pm;function s_e(e,t,r,n,i){return e===t?!0:e==null||t==null||!EZ(e)&&!EZ(t)?e!==e&&t!==t:BZe(e,t,r,n,s_e,i)}var r9=s_e,zZe=qve,UZe=r9,WZe=1,VZe=2;function HZe(e,t,r,n){var i=r.length,a=i,s=!n;if(e==null)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){o=r[i];var l=o[0],u=e[l],c=o[1];if(s&&o[2]){if(u===void 0&&!(l in e))return!1}else{var d=new zZe;if(n)var f=n(u,c,l,e,t,d);if(!(f===void 0?UZe(c,u,WZe|VZe,n,d):f))return!1}}return!0}var GZe=HZe,qZe=y0;function KZe(e){return e===e&&!qZe(e)}var o_e=KZe,YZe=o_e,XZe=t9;function QZe(e){for(var t=XZe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,YZe(i)]}return t}var ZZe=QZe;function JZe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var l_e=JZe,eJe=GZe,tJe=ZZe,rJe=l_e;function nJe(e){var t=tJe(e);return t.length==1&&t[0][2]?rJe(t[0][0],t[0][1]):function(r){return r===e||eJe(r,e,t)}}var iJe=nJe;function aJe(e,t){return e!=null&&t in Object(e)}var sJe=aJe,oJe=gve,lJe=ZU,uJe=dc,cJe=JU,dJe=e9,fJe=NN;function hJe(e,t,r){t=oJe(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var s=fJe(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&dJe(i)&&cJe(s,i)&&(uJe(e)||lJe(e)))}var pJe=hJe,mJe=sJe,gJe=pJe;function yJe(e,t){return e!=null&&gJe(e,t,mJe)}var vJe=yJe,_Je=r9,bJe=yve,wJe=vJe,xJe=DU,EJe=o_e,TJe=l_e,SJe=NN,AJe=1,CJe=2;function PJe(e,t){return xJe(e)&&EJe(t)?TJe(SJe(e),t):function(r){var n=bJe(r,e);return n===void 0&&n===t?wJe(r,e):_Je(t,n,AJe|CJe)}}var MJe=PJe;function kJe(e){return e}var vx=kJe;function OJe(e){return function(t){return t==null?void 0:t[e]}}var NJe=OJe,IJe=zU;function DJe(e){return function(t){return IJe(t,e)}}var LJe=DJe,jJe=NJe,RJe=LJe,$Je=DU,FJe=NN;function BJe(e){return $Je(e)?jJe(FJe(e)):RJe(e)}var zJe=BJe,UJe=iJe,WJe=MJe,VJe=vx,HJe=dc,GJe=zJe;function qJe(e){return typeof e=="function"?e:e==null?VJe:typeof e=="object"?HJe(e)?WJe(e[0],e[1]):UJe(e):GJe(e)}var v0=qJe;function KJe(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var YJe=KJe;function XJe(e){return e!==e}var QJe=XJe;function ZJe(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var JJe=ZJe,eet=YJe,tet=QJe,ret=JJe;function net(e,t,r){return t===t?ret(e,t,r):eet(e,tet,r)}var iet=net,aet=iet;function set(e,t){var r=e==null?0:e.length;return!!r&&aet(e,t,0)>-1}var oet=set;function uet(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var cet=uet;function det(){}var fet=det,tL=i_e,het=fet,pet=QU,met=1/0,get=tL&&1/pet(new tL([,-0]))[1]==met?function(e){return new tL(e)}:het,yet=get,vet=Kve,_et=oet,bet=cet,wet=Xve,xet=yet,Eet=QU,Tet=200;function Aet(e,t,r){var n=-1,i=_et,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=bet;else if(a>=Tet){var u=t?null:xet(e);if(u)return Eet(u);s=!1,i=wet,l=new vet}else l=t?[]:o;e:for(;++n<a;){var c=e[n],d=t?t(c):c;if(c=r||c!==0?c:0,s&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),o.push(c)}else i(l,d,r)||(l!==o&&l.push(d),o.push(c))}return o}var Cet=Aet,Pet=v0,Met=Cet;function ket(e,t){return e&&e.length?Met(e,Pet(t)):[]}var Oet=ket;const TZ=mi(Oet);function u_e(e,t,r){return t===!0?TZ(e,r):wn(t)?TZ(e,t):e}function dw(e){"@babel/helpers - typeof";return dw=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},dw(e)}var Net=["ref"];function SZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SZ(Object(r),!0).forEach(function(n){KN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SZ(Object(r)).forEac
vendor: 4,292 bytes, line 588
588h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Iet(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AZ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d_e(n.key),n)}}function Det(e,t,r){return t&&AZ(e.prototype,t),r&&AZ(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Let(e,t,r){return t=w3(t),jet(e,c_e()?Reflect.construct(t,r||[],w3(e).constructor):t.apply(e,r))}function jet(e,t){if(t&&(dw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ret(e)}function Ret(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c_e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c_e=function(){return!!e})()}function w3(e){return w3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},w3(e)}function $et(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_F(e,t)}function _F(e,t){return _F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},_F(e,t)}function KN(e,t,r){return t=d_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d_e(e){var t=Fet(e,"string");return dw(t)=="symbol"?t:t+""}function Fet(e,t){if(dw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bet(e,t){if(e==null)return{};var r=zet(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zet(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Uet(e){return e.value}function Wet(e,t){if(_e.isValidElement(e))return _e.cloneElement(e,t);if(typeof e=="function")return _e.createElement(e,t);t.ref;var r=Bet(t,Net);return _e.createElement(XU,r)}var CZ=1,fb=function(e){function t(){var r;Iet(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Let(this,t,[].concat(i)),KN(r,"lastBoundingBox",{width:-1,height:-1}),r}return $et(t,e),Det(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>CZ||Math.abs(i.height-this.lastBoundingBox.height)>CZ)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?gp({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,o=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,d,f;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();d={left:((u||0)-h.width)/2}}else d=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(o==="middle"){var p=this.getBBoxSnapsh
588ot();f={top:((c||0)-p.height)/2}}else f=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return gp(gp({},d),f)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,o=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,d=gp(gp({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return _e.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(h){n.wrapperNode=h}},Wet(a,gp(gp({},this.props),{},{payload:u_e(c,u,Uet)})))}}],[{key:"getWithHeight",value:function(n,i){var a=gp(gp({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&ar(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])}(R.PureComponent);KN(fb,"displayName","Legend");KN(fb,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var PZ=ZA,Vet=ZU,Het=dc,MZ=PZ?PZ.isConcatSpreadable:void 0;function Get(e){return Het(e)||Vet(e)||!!(MZ&&e&&e[MZ])}var qet=Get,Ket=Zve,Yet=qet;function f_e(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=Yet),i||(i=[]);++a<s;){var o=e[a];t>0&&r(o)?t>1?f_e(o,t-1,r,n,i):Ket(i,o):n||(i[i.length]=o)}return i}var h_e=f_e;function Xet(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++i];if(r(a[l],l,a)===!1)break}return t}}var Qet=Xet,Zet=Qet,Jet=Zet(),ett=Jet,ttt=ett,rtt=t9;function ntt(e,t){return e&&ttt(e,t,rtt)}var p_e=ntt,itt=qN;function att(e,t){return function(r,n){if(r==null)return r;if(!itt(r))return e(r,n);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&n(s[a],a,s)!==!1;);return r}}var stt=att,ott=p_e,ltt=stt,utt=ltt(ott),n9=utt,ctt=n9,dtt=qN;function ftt(e,t){var r=-1,n=dtt(e)?Array(e.length):[];return ctt(e,function(i,a,s){n[++r]=t(i,a,s)}),n}var m_e=ftt;function htt(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var ptt=htt,kZ=ux;function mtt(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=kZ(e),s=t!==void 0,o=t===null,l=t===t,u=kZ(t);if(!o&&!u&&!a&&e>t||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||o&&r&&i||!s&&i||!l)return-1}return 0}var gtt=mtt,ytt=gtt;function vtt(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,o=r.length;++n<s;){var l=ytt(i[n],a[n]);if(l){if(n>=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var _tt=vtt,rL=BU,btt=zU,wtt=v0,xtt=m_e,Ett=ptt,Ttt=t_e,Stt=_tt,Att=vx,Ctt=dc;function Ptt(e,t,r){t.length?t=rL(t,function(a){return Ctt(a)?function(s){return btt(s,a.length===1?a[0]:a)}:a}):t=[Att];var n=-1;t=rL(t,Ttt(wtt));var i=xtt(e,function(a,s,o){var l=rL(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return Ett(i,function(a,s){return Stt(a,s,r)})}var Mtt=Ptt;function ktt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Ott=ktt,Ntt=Ott,OZ=Math.max;function Itt(e,t,r){return t=OZ(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=OZ(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(s),Ntt(e,this,o)}}var Dtt=Itt;function Ltt(e){return function(){return e}}var jtt=Ltt,Rtt=o_,$tt=function(){try{var e=Rtt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),g_e=$tt,Ftt=jtt,NZ=g_e,Btt=vx,ztt=NZ?function(e,t){return NZ(e,"toString",{configurable:!0,enumerable:!1,value:Ftt(t),writable:!0})}:Btt,Utt=ztt,Wtt=800,Vtt=16,Htt=Date.now;function Gtt(e){var t=0,r=0;return function(){var n=Htt(),i=Vtt-(n-r);if(r=n,i>0){if(++t>=Wtt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var qtt=Gtt,Ktt=Utt,Ytt=qtt,Xtt=Ytt(Ktt),Qtt=Xtt,Ztt=vx,Jtt=Dtt,ert=Qtt;function trt(e,t){return ert(Jtt(e,t,Ztt),e+"")}var rrt=trt,nrt=jU,irt=qN,art=JU,srt=y0;function ort(e,t,r){if(!srt(r))return!1;var n=typeof t;return(n=="number"?irt(r)&&art(t,r.length):n=="string"&&t in r)?nrt(r[t],e):!1}var YN=ort,lrt=h_e,urt=Mtt,crt=rrt,IZ=YN,drt=crt(function(e,t){if(e==null)return[];var r=t.length;return r>1&&IZ(e,t[0],t[1])?t=[]:r>2&&IZ(t[0],t[1],t[2])&&(t=[t[0]]),urt(e,lrt(t,1),[])}),frt=drt;const i9=mi(frt);function TS(e){"@babel/helpers - typeof";return TS=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},TS(e)}function bF(){return bF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 29,193 bytes, lines 588-595
588for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bF.apply(this,arguments)}function hrt(e,t){return yrt(e)||grt(e,t)||mrt(e,t)||prt()}function prt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 589In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mrt(e,t){if(e){if(typeof e=="string")return DZ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DZ(e,t)}}function DZ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function grt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function yrt(e){if(Array.isArray(e))return e}function LZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LZ(Object(r),!0).forEach(function(n){vrt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LZ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vrt(e,t,r){return t=_rt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _rt(e){var t=brt(e,"string");return TS(t)=="symbol"?t:t+""}function brt(e,t){if(TS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(TS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wrt(e){return Array.isArray(e)&&Bo(e[0])&&Bo(e[1])?e.join(" ~ "):e}var xrt=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,s=t.itemStyle,o=s===void 0?{}:s,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,d=t.formatter,f=t.itemSorter,h=t.wrapperClassName,p=t.labelClassName,m=t.label,_=t.labelFormatter,y=t.accessibilityLayer,v=y===void 0?!1:y,b=function(){if(c&&c.length){var M={padding:0,margin:0},D=(f?i9(c,f):c).map(function($,V){if($.type==="none")return null;var U=nL({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},o),B=$.formatter||d||wrt,z=$.value,q=$.name,L=z,K=q;if(B&&L!=null&&K!=null){var O=B(z,q,$,V,c);if(Array.isArray(O)){var N=hrt(O,2);L=N[0],K=N[1]}else L=O}return _e.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(V),style:U},Bo(K)?_e.createElement("span",{className:"recharts-tooltip-item-name"},K):null,Bo(K)?_e.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,_e.createElement("span",{className:"recharts-tooltip-item-value"},L),_e.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return _e.createElement("ul",{className:"recharts-tooltip-item-list",style:M},D)}return null},w=nL({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),x=nL({margin:0},u),E=!Ln(m),T=E?m:"",S=Dn("recharts-default-tooltip",h),A=Dn("recharts-tooltip-label",p);E&&_&&c!==void 0&&c!==null&&(T=_(m,c));var C=v?{role:"status","aria-live":"assertive"}:{};return _e.createElement("div",bF({className:S,style:w},C),_e.createElement("p",{className:A,style:x},_e.isValidElement(T)?T:"".concat(T)),b())};function SS(e){"@babel/helpers - typeof";return SS=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},SS(e)}function nM(e,t,r){return t=Ert(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ert(e){var t=Trt(e,"string");return SS(t)=="symbol"?t:t+""}function Trt(e,t){if(SS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(SS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O2="recharts-tooltip-wrapper",Srt={visibility:"hidden"};function Art(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Dn(O2,nM(nM(nM(nM({},"".concat(O2,"-right"),ar(r)&&t&&ar(t.x)&&r>=t.x),"".concat(O2,"-left"),ar(r)&&t&&ar(t.x)&&r<t.x),"".concat(O2,"-bottom"),ar(n)&&t&&ar(t.y)&&n>=t.y),"".concat(O2,"-top"),ar(n)&&t&&ar(t.y)&&n<t.y))}function jZ(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,s=e.reverseDirection,o=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&ar(a[n]))return a[n];var c=r[n]-o-i,d=r[n]+i;if(t[n])return s[n]?c:d;if(s[n]){var f=c,h=l[n];return f<h?Math.max(d,l[n]):Math.max(c,l[n])}var p=d+o,m=l[n]+u;return p>m?Math.max(c,l[n]):Math.max(d,l[n])}function Crt(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Prt(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,u,c,d;return s.height>0&&s.width>0&&r?(c=jZ({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=jZ({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=Crt({translateX:c,translateY:d,useTranslate3d:o})):u=Srt,{cssProperties:u,cssClasses:Art({translateX:c,translateY:d,coordinate:r})}}function fw(e){"@babel/helpers - typeof";return fw=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},fw(e)}function RZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $Z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RZ(Object(r),!0).forEach(function(n){xF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RZ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mrt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function krt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v_e(n.key),n)}}function Ort(e,t,r){return t&&krt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nrt(e,t,r){return t=x3(t),Irt(e,y_e()?Reflect.construct(t,r||[],x3(e).constructor):t.apply(e,r))}function Irt(e,t){if(t&&(fw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Drt(e)}function Drt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y_e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y_e=function(){return!!e})()}function x3(e){return x3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},x3(e)}function Lrt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wF(e,t)}function wF(e,t){return wF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},wF(e,t)}function xF(e,t,r){return t=v_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v_e(e){var t=jrt(e,"string");return fw(t)=="symbol"?t:t+""}function jrt(e,t){if(fw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FZ=1,Rrt=function(e){function t(){var r;Mrt(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Nrt(this,t,[].concat(i)),xF(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),xF(r,"handleKeyDown",function(s){if(s.key==="Escape"){var o,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&o!==void 0?o:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return Lrt(t,e),Ort(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>FZ||Math.abs(n.height-this.state.lastBoundingBox.height)>FZ)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,o=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,d=i.hasPayload,f=i.isAnimationActive,h=i.offset,p=i.position,m=i.reverseDirection,_=i.useTranslate3d,y=i.viewBox,v=i.wrapperStyle,b=Prt({allowEscapeViewBox:s,coordinate:c,offsetTopLeft:h,position:p,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:_,viewBox:y}),w=b.cssClasses,x=b.cssProperties,E=$Z($Z({transition:f&&a?"transform ".concat(o,"ms ").concat(l):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return _e.createElement("div",{tabIndex:-1,className:w,style:E,ref:function(S){n.wrapperNode=S}},u)}}])}(R.PureComponent),$rt=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Vh={isSsr:$rt(),get:function(t){return Vh[t]},set:function(t,r){if(typeof t=="string")Vh[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){Vh[i]=t[i]})}}};function hw(e){"@babel/helpers - typeof";return hw=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},hw(e)}function BZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BZ(Object(r),!0).forEach(function(n){a9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BZ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Frt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Brt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b_e(n.key),n)}}function zrt(e,t,r){return t&&Brt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Urt(e,t,r){return t=E3(t),Wrt(e,__e()?Reflect.construct(t,r||[],E3(e).constructor):t.apply(e,r))}function Wrt(e,t){if(t&&(hw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vrt(e)}function Vrt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function __e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(__e=function(){return!!e})()}function E3(e){return E3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},E3(e)}function Hrt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EF(e,t)}function EF(e,t){return EF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},EF(e,t)}function a9(e,t,r){return t=b_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b_e(e){var t=Grt(e,"string");return hw(t)=="symbol"?t:t+""}function Grt(e,t){if(hw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qrt(e){return e.dataKey}function Krt(e,t){return _e.isValidElement(e)?_e.cloneElement(e,t):typeof e=="function"?_e.createElement(e,t):_e.createElement(xrt,t)}var Eh=function(e){function t(){return Frt(this,t),Urt(this,t,arguments)}return Hrt(t,e),zrt(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,o=i.animationDuration,l=i.animationEasing,u=i.content,c=i.coordinate,d=i.filterNull,f=i.isAnimationActive,h=i.offset,p=i.payload,m=i.payloadUniqBy,_=i.position,y=i.reverseDirection,v=i.useTranslate3d,b=i.viewBox,w=i.wrapperStyle,x=p??[];d&&x.length&&(x=u_e(p.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),m,qrt));var E=x.length>0;return _e.createElement(Rrt,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:f,active:a,coordinate:c,hasPayload:E,offset:h,position:_,reverseDirection:y,useTranslate3d:v,viewBox:b,wrapperStyle:w},Krt(u,zZ(zZ({},this.props),{},{payload:x})))}}])}(R.PureComponent);a9(Eh,"displayName","Tooltip");a9(Eh,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Vh.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Yrt=np,Xrt=function(){return Yrt.Date.now()},Qrt=Xrt,Zrt=/\s/;function Jrt(e){for(var t=e.length;t--&&Zrt.test(e.charAt(t)););return t}var ent=Jrt,tnt=ent,rnt=/^\s+/;function nnt(e){return e&&e.slice(0,tnt(e)+1).replace(rnt,"")}var int=nnt,ant=int,UZ=y0,snt=ux,WZ=NaN,ont=/^[-+]0x[0-9a-f]+$/i,lnt=/^0b[01]+$/i,unt=/^0o[0-7]+$/i,cnt=parseInt;function dnt(e){if(typeof e=="number")return e;if(snt(e))return WZ;if(UZ(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=UZ(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ant(e);var r=lnt.test(e);return r||unt.test(e)?cnt(e.slice(2),r?2:8):ont.test(e)?WZ:+e}var w_e=dnt,fnt=y0,iL=Qrt,VZ=w_e,hnt="Expected a function",pnt=Math.max,mnt=Math.min;function gnt(e,t,r){var n,i,a,s,o,l,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(hnt);t=VZ(t)||0,fnt(r)&&(c=!!r.leading,d="maxWait"in r,a=d?pnt(VZ(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f);function h(E){var T=n,S=i;return n=i=void 0,u=E,s=e.apply(S,T),s}function p(E){return u=E,o=setTimeout(y,t),c?h(E):s}function m(E){var T=E-l,S=E-u,A=t-T;return d?mnt(A,a-S):A}function _(E){var T=E-l,S=E-u;return l===void 0||T>=t||T<0||d&&S>=a}function y(){var E=iL();if(_(E))return v(E);o=setTimeout(y,m(E))}function v(E){return o=void 0,f&&n?h(E):(n=i=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,n=l=i=o=void 0}function w(){return o===void 0?s:v(iL())}function x(){var E=iL(),T=_(E);if(n=arguments,i=this,l=E,T){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(y,t),h(l)}return o===void 0&&(o=setTimeout(y,t)),s}return x.cancel=b,x.flush=w,x}var ynt=gnt,vnt=ynt,_nt=y0,bnt="Expected a function";function wnt(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(bnt);return _nt(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),vnt(e,t,{leading:n,maxWait:t,trailing:i})}var xnt=wnt;const x_e=mi(xnt);function AS(e){"@babel/helpers - typeof";return AS=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},AS(e)}function HZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function iM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HZ(Object(r),!0).forEach(function(n){Ent(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HZ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ent(e,t,r){return t=Tnt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tnt(e){var t=Snt(e,"string");return AS(t)=="symbol"?t:t+""}function Snt(e,t){if(AS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(AS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ant(e,t){return knt(e)||Mnt(e,t)||Pnt(e,t)||Cnt()}function Cnt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 590In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pnt(e,t){if(e){if(typeof e=="string")return GZ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GZ(e,t)}}function GZ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mnt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function knt(e){if(Array.isArray(e))return e}var Ont=R.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,s=a===void 0?"100%":a,o=e.height,l=o===void 0?"100%":o,u=e.minWidth,c=u===void 0?0:u,d=e.minHeight,f=e.maxHeight,h=e.children,p=e.debounce,m=p===void 0?0:p,_=e.id,y=e.className,v=e.onResize,b=e.style,w=b===void 0?{}:b,x=R.useRef(null),E=R.useRef();E.current=v,R.useImperativeHandle(t,function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})});var T=R.useState({containerWidth:i.width,containerHeight:i.height}),S=Ant(T,2),A=S[0],C=S[1],k=R.useCallback(function(D,$){C(function(V){var U=Math.round(D),B=Math.round($);return V.containerWidth===U&&V.containerHeight===B?V:{containerWidth:U,containerHeight:B}})},[]);R.useEffect(function(){var D=function(q){var L,K=q[0].contentRect,O=K.width,N=K.height;k(O,N),(L=E.current)===null||L===void 0||L.call(E,O,N)};m>0&&(D=x_e(D,m,{trailing:!0,leading:!1}));var $=new ResizeObserver(D),V=x.current.getBoundingClientRect(),U=V.width,B=V.height;return k(U,B),$.observe(x.current),function(){$.disconnect()}},[k,m]);var M=R.useMemo(function(){var D=A.containerWidth,$=A.containerHeight;if(D<0||$<0)return null;qp(jy(s)||jy(l),`The width(%s) and height(%s) are both fixed numbers, 591 maybe you don't need to use a ResponsiveContainer.`,s,l),qp(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=jy(s)?D:s,U=jy(l)?$:l;r&&r>0&&(V?U=V/r:U&&(V=U*r),f&&U>f&&(U=f)),qp(V>0||U>0,`The width(%s) and height(%s) of chart should be greater than 0, 592 please check the style of container, or the props width(%s) and height(%s), 593 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 594 height and width.`,V,U,s,l,c,d,r);var B=!Array.isArray(h)&&Gp(h.type).endsWith("Chart");return _e.Children.map(h,function(z){return _e.isValidElement(z)?R.cloneElement(z,iM({width:V,height:U},B?{style:iM({height:"100%",width:"100%",maxHeight:U,maxWidth:V},z.props.style)}:{})):z})},[r,h,l,f,d,c,A,s]);return _e.createElement("div",{id:_?"".concat(_):void 0,className:Dn("recharts-responsive-container",y),style:iM(iM({},w),{},{width:s,height:l,minWidth:c,minHeight:d,maxHeight:f}),ref:x},M)}),XN=function(t){return null};XN.displayName="Cell";function CS(e){"@babel/helpers - typeof";return CS=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},CS(e)}function qZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qZ(Object(r),!0).forEach(function(n){Nnt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qZ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nnt(e,t,r){return t=Int(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Int(e){var t=Dnt(e,"string");return CS(t)=="symbol"?t:t+""}function Dnt(e,t){if(CS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(CS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e1={widthCache:{},cacheCount:0},Lnt=2e3,jnt={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},KZ="recharts_measurement_span";function Rnt(e){var t=TF({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var lT=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Vh.isSsr)return{width:0,height:0};var n=Rnt(r),i=JSON.stringify({text:t,copyStyle:n});if(e1.widthCache[i])return e1.widthCache[i];try{var a=document.getElementById(KZ);a||(a=document.createElement("span"),a.setAttribute("id",KZ),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=TF(TF({},jnt),n);Object.assign(a.style,s),a.textContent="".concat(t);var o=a.getBoundingClientRect(),l={width:o.width,height:o.height};return e1.widthCache[i]=l,++e1.cacheCount>Lnt&&(e1.cacheCount=0,e1.widthCache={}),l}catch{return{width:0,height:0}}},$nt=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function PS(e){"@babel/helpers - typeof";return PS=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},PS(e)}function T3(e,t){return Unt(e)||znt(e,t)||Bnt(e,t)||Fnt()}function Fnt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 595In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bnt(e,t){if(e){if(typeof e=="string")return YZ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YZ(e,t)}}function YZ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function znt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Unt(e){if(Array.isArray(e))return e}function Wnt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XZ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hnt(n.key),n)}}function Vnt(e,t,r){return t&&XZ(e.prototype,t),r&&XZ(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hnt(e){var t=Gnt(e,"string");return PS(t)=="symbol"?t:t+""}function Gnt(e,t){if(PS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(PS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var QZ=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ZZ=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qnt=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Knt=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,E_e={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Ynt=Object.keys(E_e),R1="NaN";function Xnt(e,t){return e*E_e[t]}var aM=function(){function e(t,r){Wnt(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!qnt.test(r)&&(this.num=NaN,this.unit=""),Ynt.includes(r)&&(this.num=Xnt(t,r),this.unit="px")}return Vnt(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=Knt.exec(r))!==null&&n!==void 0?n:[],a=T3(i,3),s=a[1],o=a[2];return new e(parseFloat(s),o??"")}}])}();function T_e(e){if(e.includes(R1))return R1;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=QZ.exec(t))!==null&&r!==void 0?r:[],i=T3(n,4),a=i[1],s=i[2],o=i[3],l=aM.parse(a??""),u=aM.parse(o??""),c=s==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return R1;t=t.replace(QZ,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,f=(d=ZZ.exec(t))!==null&&d!==void 0?d:[],h=T3(f,4),p=h[1],m=h[2],_=h[3],y=aM.parse(p??""),v=aM.parse(_??""),b=m==="+"?y.add(v):y.subtract(v);if(b.isNaN())return R1;t=t.replace(ZZ,b.toString())}return t}var JZ=/\(([^()]*)\)/;function Qnt(e){for(var t=e;t.includes("(");){var r=JZ.exec(t),n=T3(r,2),i=n[1];t=t.replace(JZ,T_e(i))}return t}function Znt(e){var t=e.replace(/\s+/g,"");return t=Qnt(t),t=T_e(t),t}function Jnt(e){try{return Znt(e)}catch{return R1}}function aL(e){var t=Jnt(e.slice(5,-1));return t===R1?"":t}var eit=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],tit=["dx","dy","angle","className","breakAll"];function SF(){return SF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
595for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},SF.apply(this,arguments)}function eJ(e,t){if(e==null)return{};var r=rit(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rit(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tJ(e,t){return sit(e)||ait(e,t)||iit(e,t)||nit()}function nit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 596In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iit(e,t){if(e){if(typeof e=="string")return rJ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rJ(e,t)}}function rJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ait(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function sit(e){if(Array.isArray(e))return e}var S_e=/[ \f\n\r\t\v\u2028\u2029]+/,A_e=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Ln(r)||(n?a=r.toString().split(""):a=r.toString().split(S_e));var s=a.map(function(l){return{word:l,width:lT(l,i).width}}),o=n?0:lT(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}},oit=function(t,r,n,i,a){var s=t.maxLines,o=t.children,l=t.style,u=t.breakAll,c=ar(s),d=o,f=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(U,B){var z=B.word,q=B.width,L=U[U.length-1];if(L&&(i==null||a||L.width+q+n<Number(i)))L.words.push(z),L.width+=q+n;else{var K={words:[z],width:q};U.push(K)}return U},[])},h=f(r),p=function(V){return V.reduce(function(U,B){return U.width>B.width?U:B})};if(!c)return h;for(var m="â¦",_=function(V){var U=d.slice(0,V),B=A_e({breakAll:u,style:l,children:U+m}).wordsWithComputedWidth,z=f(B),q=z.length>s||p(z).width>Number(i);return[q,z]},y=0,v=d.length-1,b=0,w;y<=v&&b<=d.length-1;){var x=Math.floor((y+v)/2),E=x-1,T=_(E),S=tJ(T,2),A=S[0],C=S[1],k=_(x),M=tJ(k,1),D=M[0];if(!A&&!D&&(y=x+1),A&&D&&(v=x-1),!A&&D){w=C;break}b++}return w||h},nJ=function(t){var r=Ln(t)?[]:t.toString().split(S_e);return[{words:r}]},lit=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,o=t.maxLines;if((r||n)&&!Vh.isSsr){var l,u,c=A_e({breakAll:s,children:i,style:a});if(c){var d=c.wordsWithComputedWidth,f=c.spaceWidth;l=d,u=f}else return nJ(i);return oit({breakAll:s,children:i,maxLines:o,style:a},l,u,r,n)}return nJ(i)},iJ="#808080",zv=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,d=c===void 0?!1:c,f=t.textAnchor,h=f===void 0?"start":f,p=t.verticalAnchor,m=p===void 0?"end":p,_=t.fill,y=_===void 0?iJ:_,v=eJ(t,eit),b=R.useMemo(function(){return lit({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),w=v.dx,x=v.dy,E=v.angle,T=v.className,S=v.breakAll,A=eJ(v,tit);if(!Bo(n)||!Bo(a))return null;var C=n+(ar(w)?w:0),k=a+(ar(x)?x:0),M;switch(m){case"start":M=aL("calc(".concat(u,")"));break;case"middle":M=aL("calc(".concat((b.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:M=aL("calc(".concat(b.length-1," * -").concat(o,")"));break}var D=[];if(d){var $=b[0].width,V=v.width;D.push("scale(".concat((ar(V)?V/$:1)/$,")"))}return E&&D.push("rotate(".concat(E,", ").concat(C,", ").concat(k,")")),D.length&&(A.transform=D.join(" ")),_e.createElement("text",SF({},en(A,!0),{x:C,y:k,className:Dn("recharts-text",T),textAnchor:h,fill:y.includes("url")?iJ:y}),b.map(function(U,B){var z=U.words.join(S?"":" ");return _e.createElement("tspan",{x:C,dy:B===0?M:o,key:"".concat(z,"-").concat(B)},z)}))};function Wg(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function uit(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function s9(e){let t,r,n;e.length!==2?(t=Wg,r=(o,l)=>Wg(e(o),l),n=(o,l)=>e(o)-l):(t=e===Wg||e===uit?e:cit,r=e,n=e);function i(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;r(o[d],l)<0?u=d+1:c=d}while(u<c)}return u}function a(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;r(o[d],l)<=0?u=d+1:c=d}while(u<c)}return u}function s(o,l,u=0,c=o.length){const d=i(o,l,u,c-1);return d>u&&n(o[d-1],l)>-n(o[d],l)?d-1:d}return{left:i,center:s,right:a}}function cit(){return 0}function C_e(e){return e===null?NaN:+e}function*dit(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const fit=s9(Wg),JA=fit.right;s9(C_e).center;class aJ extends Map{constructor(t,r=mit){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(sJ(this,t))}has(t){return super.has(sJ(this,t))}set(t,r){return super.set(hit(this,t),r)}delete(t){return super.delete(pit(this,t))}}function sJ({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function hit({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function pit({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function mit(e){return e!==null&&typeof e=="object"?e.valueOf():e}function git(e=Wg){if(e===Wg)return P_e;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function P_e(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const yit=Math.sqrt(50),vit=Math.sqrt(10),_it=Math.sqrt(2);function S3(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=yit?10:a>=vit?5:a>=_it?2:1;let o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(e*u),l=Math.round(t*u),o/u<e&&++o,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(e/u),l=Math.round(t/u),o*u<e&&++o,l*u>
596t&&--l),l<o&&.5<=r&&r<2?S3(e,t,r*2):[o,l,u]}function AF(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,s]=n?S3(t,e,r):S3(e,t,r);if(!(a>=i))return[];const o=a-i+1,l=new Array(o);if(n)if(s<0)for(let u=0;u<o;++u)l[u]=(a-u)/-s;else for(let u=0;u<o;++u)l[u]=(a-u)*s;else if(s<0)for(let u=0;u<o;++u)l[u]=(i+u)/-s;else for(let u=0;u<o;++u)l[u]=(i+u)*s;return l}function CF(e,t,r){return t=+t,e=+e,r=+r,S3(e,t,r)[2]}function PF(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?CF(t,e,r):CF(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function oJ(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function lJ(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function M_e(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?P_e:git(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),d=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*d/l+f)),p=Math.min(n,Math.floor(t+(l-u)*d/l+f));M_e(e,t,h,p,i)}const a=e[t];let s=r,o=n;for(N2(e,r,t),i(e[n],a)>0&&N2(e,r,n);s<o;){for(N2(e,s,o),++s,--o;i(e[s],a)<0;)++s;for(;i(e[o],a)>0;)--o}i(e[r],a)===0?N2(e,r,o):(++o,N2(e,o,n)),o<=t&&(r=o+1),t<=o&&(n=o-1)}return e}function N2(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function bit(e,t,r){if(e=Float64Array.from(dit(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return lJ(e);if(t>=1)return oJ(e);var n,i=(n-1)*t,a=Math.floor(i),s=oJ(M_e(e,a).subarray(0,a+1)),o=lJ(e.subarray(a+1));return s+(o-s)*(i-a)}}function wit(e,t,r=C_e){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),o=+r(e[a+1],a+1,e);return s+(o-s)*(i-a)}}function xit(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function af(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function mm(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const MF=Symbol("implicit");function o9(){var e=new aJ,t=[],r=[],n=MF;function i(a){let s=e.get(a);if(s===void 0){if(n!==MF)return n;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new aJ;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return o9(t,r).unknown(n)},af.apply(i,arguments),i}function MS(){var e=o9().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,s,o=!1,l=0,u=0,c=.5;delete e.unknown;function d(){var f=t().length,h=i<n,p=h?i:n,m=h?n:i;a=(m-p)/Math.max(1,f-l+u*2),o&&(a=Math.floor(a)),p+=(m-p-a*(f-l))*c,s=a*(1-l),o&&(p=Math.round(p),s=Math.round(s));var _=xit(f).map(function(y){return p+a*y});return r(h?_.reverse():_)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([n,i]=f,n=+n,i=+i,d()):[n,i]},e.rangeRound=function(f){return[n,i]=f,n=+n,i=+i,o=!0,d()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(f){return arguments.length?(o=!!f,d()):o},e.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(u=+f,d()):u},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),d()):c},e.copy=function(){return MS(t(),[n,i]).round(o).paddingInner(l).paddingOuter(u).align(c)},af.apply(d(),arguments)}function k_e(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return k_e(t())},e}function uT(){return k_e(MS.apply(null,arguments).paddingInner(1))}function l9(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function O_e(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function eC(){}var kS=.7,A3=1/kS,hb="\\s*([+-]?\\d+)\\s*",OS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Eit=/^#([0-9a-f]{3,8})$/,Tit=new RegExp(`^rgb\\(${hb},${hb},${hb}\\)$`),Sit=new RegExp(`^rgb\\(${Hh},${Hh},${Hh}\\)$`),Ait=new RegExp(`^rgba\\(${hb},${hb},${hb},${OS}\\)$`),Cit=new RegExp(`^rgba\\(${Hh},${Hh},${Hh},${OS}\\)$`),Pit=new RegExp(`^hsl\\(${OS},${Hh},${Hh}\\)$`),Mit=new RegExp(`^hsla\\(${OS},${Hh},${Hh},${OS}\\)$`),uJ={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};l9(eC,NS,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cJ,formatHex:cJ,formatHex8:kit,formatHsl:Oit,formatRgb:dJ,toString:dJ});function cJ(){return this.rgb().formatHex()}function kit(){return this.rgb().formatHex8()}function Oit(){return N_e(this).formatHsl()}function dJ(){return this.rgb().formatRgb()}function NS(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Eit.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?fJ(t):r===3?new Ju(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?sM(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?sM(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Tit.exec(e))?new Ju(t[1],t[2],t[3],1):(t=Sit.exec(e))?new Ju(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ait.exec(e))?sM(t[1],t[2],t[3],t[4]):(t=Cit.exec(e))?sM(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Pit.exec(e))?mJ(t[1],t[2]/100,t[3]/100,1):(t=Mit.exec(e))?mJ(t[1],t[2]/100,t[3]/100,t[4]):uJ.hasOwnProperty(e)?fJ(uJ[e]):e==="transparent"?new Ju(NaN,NaN,NaN,0):null}function fJ(e){return new Ju(e>>16&255,e>>8&255,e&255,1)}function sM(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ju(e,t,r,n)}function Nit(e){return e instanceof eC||(e=NS(e)),e?(e=e.rgb(),new Ju(e.r,e.g,e.b,e.opacity)):new Ju}function kF(e,t,r,n){return arguments.length===1?Nit(e):new Ju(e,t,r,n??1)}function Ju(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}l9(Ju,kF,O_e(eC,{brighter(e){return e=e==null?A3:Math.pow(A3,e),new Ju(this.r*e,this.g*e,this.b*e,this.opacity)}
vendor: 6,006 bytes, line 596
596,darker(e){return e=e==null?kS:Math.pow(kS,e),new Ju(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ju(hv(this.r),hv(this.g),hv(this.b),C3(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hJ,formatHex:hJ,formatHex8:Iit,formatRgb:pJ,toString:pJ}));function hJ(){return`#${Ry(this.r)}${Ry(this.g)}${Ry(this.b)}`}function Iit(){return`#${Ry(this.r)}${Ry(this.g)}${Ry(this.b)}${Ry((isNaN(this.opacity)?1:this.opacity)*255)}`}function pJ(){const e=C3(this.opacity);return`${e===1?"rgb(":"rgba("}${hv(this.r)}, ${hv(this.g)}, ${hv(this.b)}${e===1?")":`, ${e})`}`}function C3(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hv(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ry(e){return e=hv(e),(e<16?"0":"")+e.toString(16)}function mJ(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new zf(e,t,r,n)}function N_e(e){if(e instanceof zf)return new zf(e.h,e.s,e.l,e.opacity);if(e instanceof eC||(e=NS(e)),!e)return new zf;if(e instanceof zf)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new zf(s,o,l,e.opacity)}function Dit(e,t,r,n){return arguments.length===1?N_e(e):new zf(e,t,r,n??1)}function zf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}l9(zf,Dit,O_e(eC,{brighter(e){return e=e==null?A3:Math.pow(A3,e),new zf(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?kS:Math.pow(kS,e),new zf(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ju(sL(e>=240?e-240:e+120,i,n),sL(e,i,n),sL(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new zf(gJ(this.h),oM(this.s),oM(this.l),C3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=C3(this.opacity);return`${e===1?"hsl(":"hsla("}${gJ(this.h)}, ${oM(this.s)*100}%, ${oM(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gJ(e){return e=(e||0)%360,e<0?e+360:e}function oM(e){return Math.max(0,Math.min(1,e||0))}function sL(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const u9=e=>()=>e;function Lit(e,t){return function(r){return e+r*t}}function jit(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Rit(e){return(e=+e)==1?I_e:function(t,r){return r-t?jit(t,r,e):u9(isNaN(t)?r:t)}}function I_e(e,t){var r=t-e;return r?Lit(e,r):u9(isNaN(e)?t:e)}const yJ=function e(t){var r=Rit(t);function n(i,a){var s=r((i=kF(i)).r,(a=kF(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),u=I_e(i.opacity,a.opacity);return function(c){return i.r=s(c),i.g=o(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function $it(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function Fit(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Bit(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=_x(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(o){for(s=0;s<n;++s)a[s]=i[s](o);return a}}function zit(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function P3(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Uit(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=_x(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var OF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oL=new RegExp(OF.source,"g");function Wit(e){return function(){return e}}function Vit(e){return function(t){return e(t)+""}}function Hit(e,t){var r=OF.lastIndex=oL.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(n=OF.exec(e))&&(i=oL.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:P3(n,i)})),r=oL.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?Vit(l[0].x):Wit(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)o[(d=l[c]).i]=d.x(u);return o.join("")})}function _x(e,t){var r=typeof t,n;return t==null||r==="boolean"?u9(t):(r==="number"?P3:r==="string"?(n=NS(t))?(t=n,yJ):Hit:t instanceof NS?yJ:t instanceof Date?zit:Fit(t)?$it:Array.isArray(t)?Bit:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Uit:P3)(e,t)}function c9(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Git(e,t){t===void 0&&(t=e,e=_x);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(s){var o=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[o](s-o)}}function qit(e){return function(){return e}}function M3(e){return+e}var vJ=[0,1];function Au(e){return e}function NF(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:qit(isNaN(t)?NaN:.5)}function Kit(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Yit(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i<n?(n=NF(i,n),a=r(s,a)):(n=NF(n,i),a=r(a,s)),function(o){return a(n(o))}}function Xit(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)i[s]=NF(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(o){var l=JA(e,o,1,n)-1;return a[l](i[l](o))}}function tC(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function QN(){var e=vJ,t=vJ,r=_x,n,i,a,s=Au,o,l,u;function c(){var f=Math.min(e.length,t.length);return s!==Au&&(s=Kit(e[0],e[f-1])),o=f>2?Xit:Yit,l=u=null,d}function d(f){return f==null||isNaN(f=+f)?a:(l||(l=o(e.map(n),t,r)))(n(s(f)))}
vendor: 6,349 bytes, line 596
596return d.invert=function(f){return s(i((u||(u=o(t,e.map(n),P3)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,M3),c()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),c()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),r=c9,c()},d.clamp=function(f){return arguments.length?(s=f?!0:Au,c()):s!==Au},d.interpolate=function(f){return arguments.length?(r=f,c()):r},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,h){return n=f,i=h,c()}}function d9(){return QN()(Au,Au)}function Qit(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function k3(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function pw(e){return e=k3(Math.abs(e)),e?e[1]:NaN}function Zit(e,t){return function(r,n){for(var i=r.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function Jit(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var eat=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function IS(e){if(!(t=eat.exec(e)))throw new Error("invalid format: "+e);var t;return new f9({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}IS.prototype=f9.prototype;function f9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}f9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function tat(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var D_e;function rat(e,t){var r=k3(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(D_e=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+k3(e,Math.max(0,t+a-1))[0]}function _J(e,t){var r=k3(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const bJ={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Qit,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_J(e*100,t),r:_J,s:rat,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wJ(e){return e}var xJ=Array.prototype.map,EJ=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nat(e){var t=e.grouping===void 0||e.thousands===void 0?wJ:Zit(xJ.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?wJ:Jit(xJ.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"â":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=IS(d);var f=d.fill,h=d.align,p=d.sign,m=d.symbol,_=d.zero,y=d.width,v=d.comma,b=d.precision,w=d.trim,x=d.type;x==="n"?(v=!0,x="g"):bJ[x]||(b===void 0&&(b=12),w=!0,x="g"),(_||f==="0"&&h==="=")&&(_=!0,f="0",h="=");var E=m==="$"?r:m==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",T=m==="$"?n:/[%p]/.test(x)?s:"",S=bJ[x],A=/[defgprs%]/.test(x);b=b===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function C(k){var M=E,D=T,$,V,U;if(x==="c")D=S(k)+D,k="";else{k=+k;var B=k<0||1/k<0;if(k=isNaN(k)?l:S(Math.abs(k),b),w&&(k=tat(k)),B&&+k==0&&p!=="+"&&(B=!1),M=(B?p==="("?p:o:p==="-"||p==="("?"":p)+M,D=(x==="s"?EJ[8+D_e/3]:"")+D+(B&&p==="("?")":""),A){for($=-1,V=k.length;++$<V;)if(U=k.charCodeAt($),48>U||U>57){D=(U===46?i+k.slice($+1):k.slice($))+D,k=k.slice(0,$);break}}}v&&!_&&(k=t(k,1/0));var z=M.length+k.length+D.length,q=z<y?new Array(y-z+1).join(f):"";switch(v&&_&&(k=t(q+k,q.length?y-D.length:1/0),q=""),h){case"<":k=M+k+D+q;break;case"=":k=M+q+k+D;break;case"^":k=q.slice(0,z=q.length>>1)+M+k+D+q.slice(z);break;default:k=q+M+k+D;break}return a(k)}return C.toString=function(){return d+""},C}function c(d,f){var h=u((d=IS(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(pw(f)/3)))*3,m=Math.pow(10,-p),_=EJ[8+p/3];return function(y){return h(m*y)+_}}return{format:u,formatPrefix:c}}var lM,h9,L_e;iat({thousands:",",grouping:[3],currency:["$",""]});function iat(e){return lM=nat(e),h9=lM.format,L_e=lM.formatPrefix,lM}function aat(e){return Math.max(0,-pw(Math.abs(e)))}function sat(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pw(t)/3)))*3-pw(Math.abs(e)))}function oat(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pw(t)-pw(e))+1}function j_e(e,t,r,n){var i=PF(e,t,r),a;switch(n=IS(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=sat(i,s))&&(n.precision=a),L_e(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=oat(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=aat(i))&&(n.precision=a-(n.type==="%")*2);break}}return h9(n)}function _0(e){var t=e.domain;return e.ticks=function(r){var n=t();return AF(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return j_e(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],o=n[a],l,u,c=10;for(o<s&&(u=s,s=o,o=u,u=i,i=a,a=u);c-- >0;){if(u=CF(s,o,r),u===l)return n[i]=s,n[a]=o,t(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function O3(){var e=d9();return e.copy=function(){return tC(e,O3())}
vendor: 5,155 bytes, line 596
596,af.apply(e,arguments),_0(e)}function R_e(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,M3),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return R_e(e).unknown(t)},e=arguments.length?Array.from(e,M3):[0,1],_0(r)}function $_e(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),e[r]=t.floor(i),e[n]=t.ceil(a),e}function TJ(e){return Math.log(e)}function SJ(e){return Math.exp(e)}function lat(e){return-Math.log(-e)}function uat(e){return-Math.exp(-e)}function cat(e){return isFinite(e)?+("1e"+e):e<0?0:e}function dat(e){return e===10?cat:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fat(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function AJ(e){return(t,r)=>-e(-t,r)}function p9(e){const t=e(TJ,SJ),r=t.domain;let n=10,i,a;function s(){return i=fat(n),a=dat(n),r()[0]<0?(i=AJ(i),a=AJ(a),e(lat,uat)):e(TJ,SJ),t}return t.base=function(o){return arguments.length?(n=+o,s()):n},t.domain=function(o){return arguments.length?(r(o),s()):r()},t.ticks=o=>{const l=r();let u=l[0],c=l[l.length-1];const d=c<u;d&&([u,c]=[c,u]);let f=i(u),h=i(c),p,m;const _=o==null?10:+o;let y=[];if(!(n%1)&&h-f<_){if(f=Math.floor(f),h=Math.ceil(h),u>0){for(;f<=h;++f)for(p=1;p<n;++p)if(m=f<0?p/a(-f):p*a(f),!(m<u)){if(m>c)break;y.push(m)}}else for(;f<=h;++f)for(p=n-1;p>=1;--p)if(m=f>0?p/a(-f):p*a(f),!(m<u)){if(m>c)break;y.push(m)}y.length*2<_&&(y=AF(u,c,_))}else y=AF(f,h,Math.min(h-f,_)).map(a);return d?y.reverse():y},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=IS(l)).precision==null&&(l.trim=!0),l=h9(l)),o===1/0)return l;const u=Math.max(1,n*o/t.ticks().length);return c=>{let d=c/a(Math.round(i(c)));return d*n<n-.5&&(d*=n),d<=u?l(c):""}},t.nice=()=>r($_e(r(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),t}function F_e(){const e=p9(QN()).domain([1,10]);return e.copy=()=>tC(e,F_e()).base(e.base()),af.apply(e,arguments),e}function CJ(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function PJ(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function m9(e){var t=1,r=e(CJ(t),PJ(t));return r.constant=function(n){return arguments.length?e(CJ(t=+n),PJ(t)):t},_0(r)}function B_e(){var e=m9(QN());return e.copy=function(){return tC(e,B_e()).constant(e.constant())},af.apply(e,arguments)}function MJ(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function hat(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pat(e){return e<0?-e*e:e*e}function g9(e){var t=e(Au,Au),r=1;function n(){return r===1?e(Au,Au):r===.5?e(hat,pat):e(MJ(r),MJ(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},_0(t)}function y9(){var e=g9(QN());return e.copy=function(){return tC(e,y9()).exponent(e.exponent())},af.apply(e,arguments),e}function mat(){return y9.apply(null,arguments).exponent(.5)}function kJ(e){return Math.sign(e)*e*e}function gat(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function z_e(){var e=d9(),t=[0,1],r=!1,n;function i(a){var s=gat(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(kJ(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,M3)).map(kJ)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return z_e(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},af.apply(i,arguments),_0(i)}function U_e(){var e=[],t=[],r=[],n;function i(){var s=0,o=Math.max(1,t.length);for(r=new Array(o-1);++s<o;)r[s-1]=wit(e,s/o);return a}function a(s){return s==null||isNaN(s=+s)?n:t[JA(r,s)]}return a.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?r[o-1]:e[0],o<r.length?r[o]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(Wg),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return U_e().domain(e).range(t).unknown(n)},af.apply(a,arguments)}function W_e(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function s(l){return l!=null&&l<=l?i[JA(n,l,0,r)]:a}function o(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,o()):i.slice()},s.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},s.unknown=function(l){return arguments.length&&(a=l),s},s.thresholds=function(){return n.slice()},s.copy=function(){return W_e().domain([e,t]).range(i).unknown(a)}
vendor: 4,288 bytes, line 596
596,af.apply(_0(s),arguments)}function V_e(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[JA(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return V_e().domain(e).range(t).unknown(r)},af.apply(i,arguments)}const lL=new Date,uL=new Date;function Uo(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let u;do l.push(u=new Date(+a)),t(a,o),e(a);while(u<a&&a<s);return l},i.filter=a=>Uo(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(lL.setTime(+a),uL.setTime(+s),e(lL),e(uL),Math.floor(r(lL,uL))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const N3=Uo(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);N3.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Uo(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):N3);N3.range;const Bp=1e3,Gd=Bp*60,zp=Gd*60,sm=zp*24,v9=sm*7,OJ=sm*30,cL=sm*365,$y=Uo(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Bp)},(e,t)=>(t-e)/Bp,e=>e.getUTCSeconds());$y.range;const _9=Uo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bp)},(e,t)=>{e.setTime(+e+t*Gd)},(e,t)=>(t-e)/Gd,e=>e.getMinutes());_9.range;const b9=Uo(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Gd)},(e,t)=>(t-e)/Gd,e=>e.getUTCMinutes());b9.range;const w9=Uo(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bp-e.getMinutes()*Gd)},(e,t)=>{e.setTime(+e+t*zp)},(e,t)=>(t-e)/zp,e=>e.getHours());w9.range;const x9=Uo(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zp)},(e,t)=>(t-e)/zp,e=>e.getUTCHours());x9.range;const rC=Uo(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Gd)/sm,e=>e.getDate()-1);rC.range;const ZN=Uo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sm,e=>e.getUTCDate()-1);ZN.range;const H_e=Uo(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/sm,e=>Math.floor(e/sm));H_e.range;function l_(e){return Uo(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Gd)/v9)}const JN=l_(0),I3=l_(1),yat=l_(2),vat=l_(3),mw=l_(4),_at=l_(5),bat=l_(6);JN.range;I3.range;yat.range;vat.range;mw.range;_at.range;bat.range;function u_(e){return Uo(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/v9)}const eI=u_(0),D3=u_(1),wat=u_(2),xat=u_(3),gw=u_(4),Eat=u_(5),Tat=u_(6);eI.range;D3.range;wat.range;xat.range;gw.range;Eat.range;Tat.range;const E9=Uo(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());E9.range;const T9=Uo(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());T9.range;const om=Uo(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());om.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Uo(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});om.range;const lm=Uo(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());lm.every=e=>
vendor: 9,856 bytes, line 596
596!isFinite(e=Math.floor(e))||!(e>0)?null:Uo(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});lm.range;function G_e(e,t,r,n,i,a){const s=[[$y,1,Bp],[$y,5,5*Bp],[$y,15,15*Bp],[$y,30,30*Bp],[a,1,Gd],[a,5,5*Gd],[a,15,15*Gd],[a,30,30*Gd],[i,1,zp],[i,3,3*zp],[i,6,6*zp],[i,12,12*zp],[n,1,sm],[n,2,2*sm],[r,1,v9],[t,1,OJ],[t,3,3*OJ],[e,1,cL]];function o(u,c,d){const f=c<u;f&&([u,c]=[c,u]);const h=d&&typeof d.range=="function"?d:l(u,c,d),p=h?h.range(u,+c+1):[];return f?p.reverse():p}function l(u,c,d){const f=Math.abs(c-u)/d,h=s9(([,,_])=>_).right(s,f);if(h===s.length)return e.every(PF(u/cL,c/cL,d));if(h===0)return N3.every(Math.max(PF(u,c,d),1));const[p,m]=s[f/s[h-1][2]<s[h][2]/f?h-1:h];return p.every(m)}return[o,l]}const[Sat,Aat]=G_e(lm,T9,eI,H_e,x9,b9),[Cat,Pat]=G_e(om,E9,JN,rC,w9,_9);function dL(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function fL(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function I2(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Mat(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=D2(i),c=L2(i),d=D2(a),f=L2(a),h=D2(s),p=L2(s),m=D2(o),_=L2(o),y=D2(l),v=L2(l),b={a:B,A:z,b:q,B:L,c:null,d:RJ,e:RJ,f:Zat,g:lst,G:cst,H:Yat,I:Xat,j:Qat,L:q_e,m:Jat,M:est,p:K,q:O,Q:BJ,s:zJ,S:tst,u:rst,U:nst,V:ist,w:ast,W:sst,x:null,X:null,y:ost,Y:ust,Z:dst,"%":FJ},w={a:N,A:X,b:ie,B:ee,c:null,d:$J,e:$J,f:mst,g:Sst,G:Cst,H:fst,I:hst,j:pst,L:Y_e,m:gst,M:yst,p:le,q:Te,Q:BJ,s:zJ,S:vst,u:_st,U:bst,V:wst,w:xst,W:Est,x:null,X:null,y:Tst,Y:Ast,Z:Pst,"%":FJ},x={a:C,A:k,b:M,B:D,c:$,d:LJ,e:LJ,f:Hat,g:DJ,G:IJ,H:jJ,I:jJ,j:zat,L:Vat,m:Bat,M:Uat,p:A,q:Fat,Q:qat,s:Kat,S:Wat,u:Dat,U:Lat,V:jat,w:Iat,W:Rat,x:V,X:U,y:DJ,Y:IJ,Z:$at,"%":Gat};b.x=E(r,b),b.X=E(n,b),b.c=E(t,b),w.x=E(r,w),w.X=E(n,w),w.c=E(t,w);function E(be,we){return function(ae){var H=[],fe=-1,Se=0,ne=be.length,$e,me,Ue;for(ae instanceof Date||(ae=new Date(+ae));++fe<ne;)be.charCodeAt(fe)===37&&(H.push(be.slice(Se,fe)),(me=NJ[$e=be.charAt(++fe)])!=null?$e=be.charAt(++fe):me=$e==="e"?" ":"0",(Ue=we[$e])&&($e=Ue(ae,me)),H.push($e),Se=fe+1);return H.push(be.slice(Se,fe)),H.join("")}}function T(be,we){return function(ae){var H=I2(1900,void 0,1),fe=S(H,be,ae+="",0),Se,ne;if(fe!=ae.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(we&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(Se=fL(I2(H.y,0,1)),ne=Se.getUTCDay(),Se=ne>4||ne===0?D3.ceil(Se):D3(Se),Se=ZN.offset(Se,(H.V-1)*7),H.y=Se.getUTCFullYear(),H.m=Se.getUTCMonth(),H.d=Se.getUTCDate()+(H.w+6)%7):(Se=dL(I2(H.y,0,1)),ne=Se.getDay(),Se=ne>4||ne===0?I3.ceil(Se):I3(Se),Se=rC.offset(Se,(H.V-1)*7),H.y=Se.getFullYear(),H.m=Se.getMonth(),H.d=Se.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),ne="Z"in H?fL(I2(H.y,0,1)).getUTCDay():dL(I2(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(ne+5)%7:H.w+H.U*7-(ne+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,fL(H)):dL(H)}}function S(be,we,ae,H){for(var fe=0,Se=we.length,ne=ae.length,$e,me;fe<Se;){if(H>=ne)return-1;if($e=we.charCodeAt(fe++),$e===37){if($e=we.charAt(fe++),me=x[$e in NJ?we.charAt(fe++):$e],!me||(H=me(be,ae,H))<0)return-1}else if($e!=ae.charCodeAt(H++))return-1}return H}function A(be,we,ae){var H=u.exec(we.slice(ae));return H?(be.p=c.get(H[0].toLowerCase()),ae+H[0].length):-1}function C(be,we,ae){var H=h.exec(we.slice(ae));return H?(be.w=p.get(H[0].toLowerCase()),ae+H[0].length):-1}function k(be,we,ae){var H=d.exec(we.slice(ae));return H?(be.w=f.get(H[0].toLowerCase()),ae+H[0].length):-1}function M(be,we,ae){var H=y.exec(we.slice(ae));return H?(be.m=v.get(H[0].toLowerCase()),ae+H[0].length):-1}function D(be,we,ae){var H=m.exec(we.slice(ae));return H?(be.m=_.get(H[0].toLowerCase()),ae+H[0].length):-1}function $(be,we,ae){return S(be,t,we,ae)}function V(be,we,ae){return S(be,r,we,ae)}function U(be,we,ae){return S(be,n,we,ae)}function B(be){return s[be.getDay()]}function z(be){return a[be.getDay()]}function q(be){return l[be.getMonth()]}function L(be){return o[be.getMonth()]}function K(be){return i[+(be.getHours()>=12)]}function O(be){return 1+~~(be.getMonth()/3)}function N(be){return s[be.getUTCDay()]}function X(be){return a[be.getUTCDay()]}function ie(be){return l[be.getUTCMonth()]}function ee(be){return o[be.getUTCMonth()]}function le(be){return i[+(be.getUTCHours()>=12)]}function Te(be){return 1+~~(be.getUTCMonth()/3)}return{format:function(be){var we=E(be+="",b);return we.toString=function(){return be},we},parse:function(be){var we=T(be+="",!1);return we.toString=function(){return be},we},utcFormat:function(be){var we=E(be+="",w);return we.toString=function(){return be},we},utcParse:function(be){var we=T(be+="",!0);return we.toString=function(){return be},we}}}var NJ={"-":"",_:" ",0:"0"},al=/^\s*\d+/,kat=/^%/,Oat=/[\\^$*+?|[\]().{}]/g;function Li(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function Nat(e){return e.replace(Oat,"\\$&")}function D2(e){return new RegExp("^(?:"+e.map(Nat).join("|")+")","i")}function L2(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Iat(e,t,r){var n=al.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Dat(e,t,r){var n=al.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Lat(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function jat(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Rat(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function IJ(e,t,r){var n=al.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function DJ(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function $at(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Fat(e,t,r){var n=al.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Bat(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function LJ(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zat(e,t,r){var n=al.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function jJ(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Uat(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Wat(e,t,r){var n=al.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Vat(e,t,r){var n=al.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Hat(e,t,r){var n=al.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Gat(e,t,r){var n=kat.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function qat(e,t,r){var n=al.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Kat(e,t,r){var n=al.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function RJ(e,t){return Li(e.getDate(),t,2)}function Yat(e,t){return Li(e.getHours(),t,2)}function Xat(e,t){return Li(e.getHours()%12||12,t,2)}function Qat(e,t){return Li(1+rC.count(om(e),e),t,3)}function q_e(e,t){return Li(e.getMilliseconds(),t,3)}function Zat(e,t){return q_e(e,t)+"000"}function Jat(e,t){return Li(e.getMonth()+1,t,2)}function est(e,t){return Li(e.getMinutes(),t,2)}function tst(e,t){return Li(e.getSeconds(),t,2)}function rst(e){var t=e.getDay();return t===0?7:t}function nst(e,t){return Li(JN.count(om(e)-1,e),t,2)}function K_e(e){var t=e.getDay();return t>=4||t===0?mw(e):mw.ceil(e)}function ist(e,t){return e=K_e(e),Li(mw.count(om(e),e)+(om(e).getDay()===4),t,2)}function ast(e){return e.getDay()}function sst(e,t){return Li(I3.count(om(e)-1,e),t,2)}function ost(e,t){return Li(e.getFullYear()%100,t,2)}function lst(e,t){return e=K_e(e),Li(e.getFullYear()%100,t,2)}function ust(e,t){return Li(e.getFullYear()%1e4,t,4)}function cst(e,t){var r=e.getDay();return e=r>=4||r===0?mw(e):mw.ceil(e),Li(e.getFullYear()%1e4,t,4)}function dst(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Li(t/60|0,"0",2)+Li(t%60,"0",2)}function $J(e,t){return Li(e.getUTCDate(),t,2)}function fst(e,t){return Li(e.getUTCHours(),t,2)}function hst(e,t){return Li(e.getUTCHours()%12||12,t,2)}function pst(e,t){return Li(1+ZN.count(lm(e),e),t,3)}function Y_e(e,t){return Li(e.getUTCMilliseconds(),t,3)}function mst(e,t){return Y_e(e,t)+"000"}function gst(e,t){return Li(e.getUTCMonth()+1,t,2)}function yst(e,t){return Li(e.getUTCMinutes(),t,2)}function vst(e,t){return Li(e.getUTCSeconds(),t,2)}function _st(e){var t=e.getUTCDay();return t===0?7:t}function bst(e,t){return Li(eI.count(lm(e)-1,e),t,2)}function X_e(e){var t=e.getUTCDay();return t>=4||t===0?gw(e):gw.ceil(e)}function wst(e,t){return e=X_e(e),Li(gw.count(lm(e),e)+(lm(e).getUTCDay()===4),t,2)}function xst(e){return e.getUTCDay()}function Est(e,t){return Li(D3.count(lm(e)-1,e),t,2)}function Tst(e,t){return Li(e.getUTCFullYear()%100,t,2)}function Sst(e,t){return e=X_e(e),Li(e.getUTCFullYear()%100,t,2)}function Ast(e,t){return Li(e.getUTCFullYear()%1e4,t,4)}function Cst(e,t){var r=e.getUTCDay();return e=r>=4||r===0?gw(e):gw.ceil(e),Li(e.getUTCFullYear()%1e4,t,4)}function Pst(){return"+0000"}function FJ(){return"%"}function BJ(e){return+e}function zJ(e){return Math.floor(+e/1e3)}var t1,Q_e,Z_e;Mst({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
596ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Mst(e){return t1=Mat(e),Q_e=t1.format,t1.parse,Z_e=t1.utcFormat,t1.utcParse,t1}function kst(e){return new Date(e)}function Ost(e){return e instanceof Date?+e:+new Date(+e)}function S9(e,t,r,n,i,a,s,o,l,u){var c=d9(),d=c.invert,f=c.domain,h=u(".%L"),p=u(":%S"),m=u("%I:%M"),_=u("%I %p"),y=u("%a %d"),v=u("%b %d"),b=u("%B"),w=u("%Y");function x(E){return(l(E)<E?h:o(E)<E?p:s(E)<E?m:a(E)<E?_:n(E)<E?i(E)<E?y:v:r(E)<E?b:w)(E)}return c.invert=function(E){return new Date(d(E))},c.domain=function(E){return arguments.length?f(Array.from(E,Ost)):f().map(kst)},c.ticks=function(E){var T=f();return e(T[0],T[T.length-1],E??10)},c.tickFormat=function(E,T){return T==null?x:u(T)},c.nice=function(E){var T=f();return(!E||typeof E.range!="function")&&(E=t(T[0],T[T.length-1],E??10)),E?f($_e(T,E)):c},c.copy=function(){return tC(c,S9(e,t,r,n,i,a,s,o,l,u))},c}function Nst(){return af.apply(S9(Cat,Pat,om,E9,JN,rC,w9,_9,$y,Q_e).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ist(){return af.apply(S9(Sat,Aat,lm,T9,eI,ZN,x9,b9,$y,Z_e).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function tI(){var e=0,t=1,r,n,i,a,s=Au,o=!1,l;function u(d){return d==null||isNaN(d=+d)?l:s(i===0?.5:(d=(a(d)-r)*i,o?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(d){return arguments.length?(o=!!d,u):o},u.interpolator=function(d){return arguments.length?(s=d,u):s};function c(d){return function(f){var h,p;return arguments.length?([h,p]=f,s=d(h,p),u):[s(0),s(1)]}}return u.range=c(_x),u.rangeRound=c(c9),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return a=d,r=d(e),n=d(t),i=r===n?0:1/(n-r),u}}function b0(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function J_e(){var e=_0(tI()(Au));return e.copy=function(){return b0(e,J_e())},mm.apply(e,arguments)}function e1e(){var e=p9(tI()).domain([1,10]);return e.copy=function(){return b0(e,e1e()).base(e.base())},mm.apply(e,arguments)}function t1e(){var e=m9(tI());return e.copy=function(){return b0(e,t1e()).constant(e.constant())},mm.apply(e,arguments)}function A9(){var e=g9(tI());return e.copy=function(){return b0(e,A9()).exponent(e.exponent())},mm.apply(e,arguments)}function Dst(){return A9.apply(null,arguments).exponent(.5)}function r1e(){var e=[],t=Au;function r(n){if(n!=null&&!isNaN(n=+n))return t((JA(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Wg),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>bit(e,a/n))},r.copy=function(){return r1e(t).domain(e)},mm.apply(r,arguments)}function rI(){var e=0,t=.5,r=1,n=1,i,a,s,o,l,u=Au,c,d=!1,f;function h(m){return isNaN(m=+m)?f:(m=.5+((m=+c(m))-a)*(n*m<n*a?o:l),u(d?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,r]=m,i=c(e=+e),a=c(t=+t),s=c(r=+r),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(m){return arguments.length?(d=!!m,h):d},h.interpolator=function(m){return arguments.length?(u=m,h):u};function p(m){return function(_){var y,v,b;return arguments.length?([y,v,b]=_,u=Git(m,[y,v,b]),h):[u(0),u(.5),u(1)]}}return h.range=p(_x),h.rangeRound=p(c9),h.unknown=function(m){return arguments.length?(f=m,h):f},function(m){return c=m,i=m(e),a=m(t),s=m(r),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),n=a<i?-1:1,h}}function n1e(){var e=_0(rI()(Au));return e.copy=function(){return b0(e,n1e())},mm.apply(e,arguments)}function i1e(){var e=p9(rI()).domain([.1,1,10]);return e.copy=function(){return b0(e,i1e()).base(e.base())},mm.apply(e,arguments)}function a1e(){var e=m9(rI());return e.copy=function(){return b0(e,a1e()).constant(e.constant())},mm.apply(e,arguments)}function C9(){var e=g9(rI());return e.copy=function(){return b0(e,C9()).exponent(e.exponent())},mm.apply(e,arguments)}function Lst(){return C9.apply(null,arguments).exponent(.5)}const UJ=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:MS,scaleDiverging:n1e,scaleDivergingLog:i1e,scaleDivergingPow:C9,scaleDivergingSqrt:Lst,scaleDivergingSymlog:a1e,scaleIdentity:R_e,scaleImplicit:
vendor: 68,158 bytes, lines 596-623
596MF,scaleLinear:O3,scaleLog:F_e,scaleOrdinal:o9,scalePoint:uT,scalePow:y9,scaleQuantile:U_e,scaleQuantize:W_e,scaleRadial:z_e,scaleSequential:J_e,scaleSequentialLog:e1e,scaleSequentialPow:A9,scaleSequentialQuantile:r1e,scaleSequentialSqrt:Dst,scaleSequentialSymlog:t1e,scaleSqrt:mat,scaleSymlog:B_e,scaleThreshold:V_e,scaleTime:Nst,scaleUtc:Ist,tickFormat:j_e},Symbol.toStringTag,{value:"Module"}));var jst=ux;function Rst(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],s=t(a);if(s!=null&&(o===void 0?s===s&&!jst(s):r(s,o)))var o=s,l=a}return l}var nI=Rst;function $st(e,t){return e>t}var s1e=$st,Fst=nI,Bst=s1e,zst=vx;function Ust(e){return e&&e.length?Fst(e,zst,Bst):void 0}var Wst=Ust;const Eg=mi(Wst);function Vst(e,t){return e<t}var o1e=Vst,Hst=nI,Gst=o1e,qst=vx;function Kst(e){return e&&e.length?Hst(e,qst,Gst):void 0}var Yst=Kst;const iI=mi(Yst);var Xst=BU,Qst=v0,Zst=m_e,Jst=dc;function eot(e,t){var r=Jst(e)?Xst:Zst;return r(e,Qst(t))}var tot=eot,rot=h_e,not=tot;function iot(e,t){return rot(not(e,t),1)}var aot=iot;const sot=mi(aot);var oot=r9;function lot(e,t){return oot(e,t)}var uot=lot;const yw=mi(uot);var bx=1e9,cot={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},M9,os=!0,Jd="[DecimalError] ",pv=Jd+"Invalid argument: ",P9=Jd+"Exponent out of range: ",wx=Math.floor,vy=Math.pow,dot=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Uc,Jo=1e7,Ka=7,l1e=9007199254740991,L3=wx(l1e/Ka),Nr={};Nr.absoluteValue=Nr.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Nr.comparedTo=Nr.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Nr.decimalPlaces=Nr.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ka;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Nr.dividedBy=Nr.div=function(e){return Kp(this,new this.constructor(e))};Nr.dividedToIntegerBy=Nr.idiv=function(e){var t=this,r=t.constructor;return xa(Kp(t,new r(e),0,1),r.precision)};Nr.equals=Nr.eq=function(e){return!this.cmp(e)};Nr.exponent=function(){return go(this)};Nr.greaterThan=Nr.gt=function(e){return this.cmp(e)>0};Nr.greaterThanOrEqualTo=Nr.gte=function(e){return this.cmp(e)>=0};Nr.isInteger=Nr.isint=function(){return this.e>this.d.length-2};Nr.isNegative=Nr.isneg=function(){return this.s<0};Nr.isPositive=Nr.ispos=function(){return this.s>0};Nr.isZero=function(){return this.s===0};Nr.lessThan=Nr.lt=function(e){return this.cmp(e)<0};Nr.lessThanOrEqualTo=Nr.lte=function(e){return this.cmp(e)<1};Nr.logarithm=Nr.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Uc))throw Error(Jd+"NaN");if(r.s<1)throw Error(Jd+(r.s?"NaN":"-Infinity"));return r.eq(Uc)?new n(0):(os=!1,t=Kp(DS(r,a),DS(e,a),a),os=!0,xa(t,i))};Nr.minus=Nr.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?d1e(t,e):u1e(t,(e.s=-e.s,e))};Nr.modulo=Nr.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Jd+"NaN");return r.s?(os=!1,t=Kp(r,e,0,1).times(e),os=!0,r.minus(t)):xa(new n(r),i)};Nr.naturalExponential=Nr.exp=function(){return c1e(this)};Nr.naturalLogarithm=Nr.ln=function(){return DS(this)};Nr.negated=Nr.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Nr.plus=Nr.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?u1e(t,e):d1e(t,(e.s=-e.s,e))};Nr.precision=Nr.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(pv+e);if(t=go(i)+1,n=i.d.length-1,r=n*Ka+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Nr.squareRoot=Nr.sqrt=function(){var e,t,r,n,i,a,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Jd+"NaN")}for(e=go(o),os=!1,i=Math.sqrt(+o),i==0||i==1/0?(t=jh(o.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=wx((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=s=r+3;;)if(a=n,n=a.plus(Kp(o,a,s+2)).times(.5),jh(a.d).slice(0,s)===(t=jh(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(xa(a,r+1,0),a.times(a).eq(o)){n=a;break}}else if(t!="9999")break;s+=4}return os=!0,xa(n,r)};Nr.times=Nr.mul=function(e){var t,r,n,i,a,s,o,l,u,c=this,d=c.constructor,f=c.d,h=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,r=c.e+e.e,l=f.length,u=h.length,l<u&&(a=f,f=h,h=a,s=l,l=u,u=s),a=[],s=l+u,n=s;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)o=a[i]+h[n]*f[i-n-1]+t,a[i--]=o%Jo|0,t=o/Jo|0;a[i]=(a[i]+t)%Jo|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,os?xa(e,d.precision):e};Nr.toDecimalPlaces=Nr.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Jh(e,0,bx),t===void 0?t=n.rounding:Jh(t,0,8),xa(r,e+go(r)+1,t))};Nr.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Uv(n,!0):(Jh(e,0,bx),t===void 0?t=i.rounding:Jh(t,0,8),n=xa(new i(n),e+1,t),r=Uv(n,!0,e+1)),r};Nr.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Uv(i):(Jh(e,0,bx),t===void 0?t=a.rounding:Jh(t,0,8),n=xa(new a(i),e+go(i)+1,t),r=Uv(n.abs(),!1,e+go(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Nr.toInteger=Nr.toint=function(){var e=this,t=e.constructor;return xa(new t(e),go(e)+1,t.rounding)};Nr.toNumber=function(){return+this};Nr.toPower=Nr.pow=function(e){var t,r,n,i,a,s,o=this,l=o.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(Uc);if(o=new l(o),!o.s){if(e.s<1)throw Error(Jd+"Infinity");return o}if(o.eq(Uc))return o;if(n=l.precision,e.eq(Uc))return xa(o,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=o.s,s){if((r=c<0?-c:c)<=l1e){for(i=new l(Uc),t=Math.ceil(n/Ka+4),os=!1;r%2&&(i=i.times(o),VJ(i.d,t)),r=wx(r/2),r!==0;)o=o.times(o),VJ(o.d,t);return os=!0,e.s<0?new l(Uc).div(i):xa(i,n)}}else if(a<0)throw Error(Jd+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,o.s=1,os=!1,i=e.times(DS(o,n+u)),os=!0,i=c1e(i),i.s=a,i};Nr.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=go(i),n=Uv(i,r<=a.toExpNeg||r>=a.toExpPos)):(Jh(e,1,bx),t===void 0?t=a.rounding:Jh(t,0,8),i=xa(new a(i),e,t),r=go(i),n=Uv(i,e<=r||r<=a.toExpNeg,e)),n};Nr.toSignificantDigits=Nr.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Jh(e,1,bx),t===void 0?t=n.rounding:Jh(t,0,8)),xa(new n(r),e,t)};Nr.toString=Nr.valueOf=Nr.val=Nr.toJSON=Nr[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=go(e),r=e.constructor;return Uv(e,t<=r.toExpNeg||t>=r.toExpPos)};function u1e(e,t){var r,n,i,a,s,o,l,u,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),os?xa(t,d):t;if(l=e.d,u=t.d,s=e.e,i=t.e,l=l.slice(),a=s-i,a){for(a<0?(n=l,a=-a,o=u.length):(n=u,i=s,o=l.length),s=Math.ceil(d/Ka),o=s>o?s+1:o+1,a>o&&(a=o,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(o=l.length,a=u.length,o-a<0&&(a=o,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/Jo|0,l[a]%=Jo;for(r&&(l.unshift(r),++i),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=i,os?xa(t,d):t}function Jh(e,t,r){if(e!==~~e||e<t||e>r)throw Error(pv+e)}function jh(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)n=e[t]+"",r=Ka-n.length,r&&(a+=Qm(r)),a+=n;s=e[t],n=s+"",r=Ka-n.length,r&&(a+=Qm(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var Kp=function(){function e(n,i){var a,s=0,o=n.length;for(n=n.slice();o--;)a=n[o]*i+s,n[o]=a%Jo|0,s=a/Jo|0;return s&&n.unshift(s),n}function t(n,i,a,s){var o,l;if(a!=s)l=a>s?1:-1;else for(o=l=0;o<a;o++)if(n[o]!=i[o]){l=n[o]>i[o]?1:-1;break}return l}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*Jo+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var o,l,u,c,d,f,h,p,m,_,y,v,b,w,x,E,T,S,A=n.constructor,C=n.s==i.s?1:-1,k=n.d,M=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(Jd+"Division by zero");for(l=n.e-i.e,T=M.length,x=k.length,h=new A(C),p=h.d=[],u=0;M[u]==(k[u]||0);)++u;if(M[u]>(k[u]||0)&&--l,a==null?v=a=A.precision:s?v=a+(go(n)-go(i))+1:v=a,v<0)return new A(0);if(v=v/Ka+2|0,u=0,T==1)for(c=0,M=M[0],v++;(u<x||c)&&v--;u++)b=c*Jo+(k[u]||0),p[u]=b/M|0,c=b%M|0;else{for(c=Jo/(M[0]+1)|0,c>1&&(M=e(M,c),k=e(k,c),T=M.length,x=k.length),w=T,m=k.slice(0,T),_=m.length;_<T;)m[_++]=0;S=M.slice(),S.unshift(0),E=M[0],M[1]>=Jo/2&&++E;do c=0,o=t(M,m,T,_),o<0?(y=m[0],T!=_&&(y=y*Jo+(m[1]||0)),c=y/E|0,c>1?(c>=Jo&&(c=Jo-1),d=e(M,c),f=d.length,_=m.length,o=t(d,m,f,_),o==1&&(c--,r(d,T<f?S:M,f))):(c==0&&(o=c=1),d=M.slice()),f=d.length,f<_&&d.unshift(0),r(m,d,_),o==-1&&(_=m.length,o=t(M,m,T,_),o<1&&(c++,r(m,T<_?S:M,_))),_=m.length):o===0&&(c++,m=[0]),p[u++]=c,o&&m[0]?m[_++]=k[w]||0:(m=[k[w]],_=1);while((w++<x||m[0]!==void 0)&&v--)}return p[0]||p.shift(),h.e=l,xa(h,s?a+go(h)+1:a)}}();function c1e(e,t){var r,n,i,a,s,o,l=0,u=0,c=e.constructor,d=c.precision;if(go(e)>16)throw Error(P9+go(e));if(!e.s)return new c(Uc);for(t==null?(os=!1,o=d):o=t,s=new c(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(n=Math.log(vy(2,u))/Math.LN10*2+5|0,o+=n,r=i=a=new c(Uc),c.precision=o;;){if(i=xa(i.times(e),o),r=r.times(++l),s=a.plus(Kp(i,r,o)),jh(s.d).slice(0,o)===jh(a.d).slice(0,o)){for(;u--;)a=xa(a.times(a),o);return c.precision=d,t==null?(os=!0,xa(a,d)):a}a=s}}function go(e){for(var t=e.e*Ka,r=e.d[0];r>=10;r/=10)t++;return t}function hL(e,t,r){if(t>e.LN10.sd())throw os=!0,r&&(e.precision=r),Error(Jd+"LN10 precision limit exceeded");return xa(new e(e.LN10),t)}function Qm(e){for(var t="";e--;)t+="0";return t}function DS(e,t){var r,n,i,a,s,o,l,u,c,d=1,f=10,h=e,p=h.d,m=h.constructor,_=m.precision;if(h.s<1)throw Error(Jd+(h.s?"NaN":"-Infinity"));if(h.eq(Uc))return new m(0);if(t==null?(os=!1,u=_):u=t,h.eq(10))return t==null&&(os=!0),hL(m,u);if(u+=f,m.precision=u,r=jh(p),n=r.charAt(0),a=go(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=jh(h.d),n=r.charAt(0),d++;a=go(h),n>1?(h=new m("0."+r),a++):h=new m(n+"."+r.slice(1))}else return l=hL(m,u+2,_).times(a+""),h=DS(new m(n+"."+r.slice(1)),u-f).plus(l),m.precision=_,t==null?(os=!0,xa(h,_)):h;for(o=s=h=Kp(h.minus(Uc),h.plus(Uc),u),c=xa(h.times(h),u),i=3;;){if(s=xa(s.times(c),u),l=o.plus(Kp(s,new m(i),u)),jh(l.d).slice(0,u)===jh(o.d).slice(0,u))return o=o.times(2),a!==0&&(o=o.plus(hL(m,u+2,_).times(a+""))),o=Kp(o,new m(d),u),m.precision=_,t==null?(os=!0,xa(o,_)):o;o=l,i+=2}}function WJ(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=wx(r/Ka),e.d=[],n=(r+1)%Ka,r<0&&(n+=Ka),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Ka;n<i;)e.d.push(+t.slice(n,n+=Ka));t=t.slice(n),n=Ka-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),os&&(e.e>L3||e.e<-L3))throw Error(P9+r)}else e.s=0,e.e=0,e.d=[0];return e}function xa(e,t,r){var n,i,a,s,o,l,u,c,d=e.d;for(s=1,a=d[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=Ka,i=t,u=d[c=0];else{if(c=Math.ceil((n+1)/Ka),a=d.length,c>=a)return e;for(u=a=d[c],s=1;a>=10;a/=10)s++;n%=Ka,i=n-Ka+s}if(r!==void 0&&(a=vy(10,s-i-1),o=u/a%10|0,l=t<0||d[c+1]!==void 0||u%a,l=r<4?(o||l)&&(r==0||r==(e.s<0?3:2)):o>5||o==5&&(r==4||l||r==6&&(n>0?i>0?u/vy(10,s-i):0:d[c-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return l?(a=go(e),d.length=1,t=t-a-1,d[0]=vy(10,(Ka-t%Ka)%Ka),e.e=wx(-t/Ka)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=c,a=1,c--):(d.length=c+1,a=vy(10,Ka-n),d[c]=i>0?(u/vy(10,s-i)%vy(10,i)|0)*a:0),l)for(;;)if(c==0){(d[0]+=a)==Jo&&(d[0]=1,++e.e);break}else{if(d[c]+=a,d[c]!=Jo)break;d[c--]=0,a=1}for(n=d.length;d[--n]===0;)d.pop();if(os&&(e.e>L3||e.e<-L3))throw Error(P9+go(e));return e}function d1e(e,t){var r,n,i,a,s,o,l,u,c,d,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),os?xa(t,h):t;if(l=e.d,d=t.d,n=t.e,u=e.e,l=l.slice(),s=u-n,s){for(c=s<0,c?(r=l,s=-s,o=d.length):(r=d,n=u,o=l.length),i=Math.max(Math.ceil(h/Ka),o)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=l.length,o=d.length,c=i<o,c&&(o=i),i=0;i<o;i++)if(l[i]!=d[i]){c=l[i]<d[i];break}s=0}for(c&&(r=l,l=d,d=r,t.s=-t.s),o=l.length,i=d.length-o;i>0;--i)l[o++]=0;for(i=d.length;i>s;){if(l[--i]<d[i]){for(a=i;a&&l[--a]===0;)l[a]=Jo-1;--l[a],l[i]+=Jo}l[i]-=d[i]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,os?xa(t,h):t):new f(0)}function Uv(e,t,r){var n,i=go(e),a=jh(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Qm(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Qm(-i-1)+a,r&&(n=r-s)>0&&(a+=Qm(n))):i>=s?(a+=Qm(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Qm(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Qm(n))),e.s<0?"-"+a:a}function VJ(e,t){if(e.length>t)return e.length=t,!0}function f1e(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(pv+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return WJ(s,a.toString())}else if(typeof a!="string")throw Error(pv+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,dot.test(a))WJ(s,a);else throw Error(pv+a)}if(i.prototype=Nr,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=f1e,i.config=i.set=fot,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function fot(e){if(!e||typeof e!="object")throw Error(Jd+"Object expected");var t,r,n,i=["precision",1,bx,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(wx(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(pv+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(pv+r+": "+n);return this}var M9=f1e(cot);Uc=new M9(1);const da=M9;function hot(e){return yot(e)||got(e)||mot(e)||pot()}function pot(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 597In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mot(e,t){if(e){if(typeof e=="string")return IF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IF(e,t)}}function got(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function yot(e){if(Array.isArray(e))return IF(e)}function IF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var vot=function(t){return t},h1e={"@@functional/placeholder":!0},p1e=function(t){return t===h1e},HJ=function(t){return function r(){return arguments.length===0||arguments.length===1&&p1e(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},_ot=function e(t,r){return t===1?r:HJ(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=i.filter(function(o){return o!==h1e}).length;return s>=t?r.apply(void 0,i):e(t-s,HJ(function(){for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];var c=i.map(function(d){return p1e(d)?l.shift():d});return r.apply(void 0,hot(c).concat(l))}))})},aI=function(t){return _ot(t.length,t)},DF=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},bot=aI(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),wot=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return vot;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(o,l){return l(o)},a.apply(void 0,arguments))}},LF=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},m1e=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&a.every(function(o,l){return o===r[l]})||(r=a,n=t.apply(void 0,a)),n}};function xot(e){var t;return e===0?t=1:t=Math.floor(new da(e).abs().log(10).toNumber())+1,t}function Eot(e,t,r){for(var n=new da(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var Tot=aI(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),Sot=aI(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),Aot=aI(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const sI={rangeStep:Eot,getDigitCount:xot,interpolateNumber:Tot,uninterpolateNumber:Sot,uninterpolateTruncation:Aot};function jF(e){return Mot(e)||Pot(e)||g1e(e)||Cot()}function Cot(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 598In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pot(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Mot(e){if(Array.isArray(e))return RF(e)}function LS(e,t){return Not(e)||Oot(e,t)||g1e(e,t)||kot()}function kot(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 599In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g1e(e,t){if(e){if(typeof e=="string")return RF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RF(e,t)}}function RF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Oot(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),o;!(n=(o=s.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function Not(e){if(Array.isArray(e))return e}function y1e(e){var t=LS(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function v1e(e,t,r){if(e.lte(0))return new da(0);var n=sI.getDigitCount(e.toNumber()),i=new da(10).pow(n),a=e.div(i),s=n!==1?.05:.1,o=new da(Math.ceil(a.div(s).toNumber())).add(r).mul(s),l=o.mul(i);return t?l:new da(Math.ceil(l))}function Iot(e,t,r){var n=1,i=new da(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new da(10).pow(sI.getDigitCount(e)-1),i=new da(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new da(Math.floor(e)))}else e===0?i=new da(Math.floor((t-1)/2)):r||(i=new da(Math.floor(e)));var s=Math.floor((t-1)/2),o=wot(bot(function(l){return i.add(new da(l-s).mul(n)).toNumber()}),DF);return o(0,t)}function _1e(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new da(0),tickMin:new da(0),tickMax:new da(0)};var a=v1e(new da(t).sub(e).div(r-1),n,i),s;e<=0&&t>=0?s=new da(0):(s=new da(e).add(t).div(2),s=s.sub(new da(s).mod(a)));var o=Math.ceil(s.sub(e).div(a).toNumber()),l=Math.ceil(new da(t).sub(s).div(a).toNumber()),u=o+l+1;return u>r?_1e(e,t,r,n,i+1):(u<r&&(l=t>0?l+(r-u):l,o=t>0?o:o+(r-u)),{step:a,tickMin:s.sub(new da(o).mul(a)),tickMax:s.add(new da(l).mul(a))})}function Dot(e){var t=LS(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),o=y1e([r,n]),l=LS(o,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var d=c===1/0?[u].concat(jF(DF(0,i-1).map(function(){return 1/0}))):[].concat(jF(DF(0,i-1).map(function(){return-1/0})),[c]);return r>n?LF(d):d}if(u===c)return Iot(u,i,a);var f=_1e(u,c,s,a),h=f.step,p=f.tickMin,m=f.tickMax,_=sI.rangeStep(p,m.add(new da(.1).mul(h)),h);return r>n?LF(_):_}function Lot(e,t){var r=LS(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=y1e([n,i]),o=LS(s,2),l=o[0],u=o[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),d=v1e(new da(u).sub(l).div(c-1),a,0),f=[].concat(jF(sI.rangeStep(new da(l),new da(u).sub(new da(.99).mul(d)),d)),[u]);return n>i?LF(f):f}var jot=m1e(Dot),Rot=m1e(Lot),$ot="Invariant failed";function Wv(e,t){throw new Error($ot)}var Fot=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function vw(e){"@babel/helpers - typeof";return vw=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},vw(e)}function j3(){return j3=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},j3.apply(this,arguments)}function Bot(e,t){return Vot(e)||Wot(e,t)||Uot(e,t)||zot()}function zot(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 600In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uot(e,t){if(e){if(typeof e=="string")return GJ(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GJ(e,t)}}function GJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Wot(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Vot(e){if(Array.isArray(e))return e}function Hot(e,t){if(e==null)return{};var r=Got(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Got(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function qot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kot(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,x1e(n.key),n)}}function Yot(e,t,r){return t&&Kot(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xot(e,t,r){return t=R3(t),Qot(e,b1e()?Reflect.construct(t,r||[],R3(e).constructor):t.apply(e,r))}function Qot(e,t){if(t&&(vw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zot(e)}function Zot(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b1e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b1e=function(){return!!e})()}function R3(e){return R3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},R3(e)}function Jot(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$F(e,t)}function $F(e,t){return $F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$F(e,t)}function w1e(e,t,r){return t=x1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x1e(e){var t=elt(e,"string");return vw(t)=="symbol"?t:t+""}function elt(e,t){if(vw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oI=function(e){function t(){return qot(this,t),Xot(this,t,arguments)}return Jot(t,e),Yot(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,s=n.width,o=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,d=n.yAxis,f=Hot(n,Fot),h=en(f,!1);this.props.direction==="x"&&c.type!=="number"&&Wv();var p=l.map(function(m){var _=u(m,o),y=_.x,v=_.y,b=_.value,w=_.errorVal;if(!w)return null;var x=[],E,T;if(Array.isArray(w)){var S=Bot(w,2);E=S[0],T=S[1]}else E=T=w;if(a==="vertical"){var A=c.scale,C=v+i,k=C+s,M=C-s,D=A(b-E),$=A(b+T);x.push({x1:$,y1:k,x2:$,y2:M}),x.push({x1:D,y1:C,x2:$,y2:C}),x.push({x1:D,y1:k,x2:D,y2:M})}else if(a==="horizontal"){var V=d.scale,U=y+i,B=U-s,z=U+s,q=V(b-E),L=V(b+T);x.push({x1:B,y1:L,x2:z,y2:L}),x.push({x1:U,y1:q,x2:U,y2:L}),x.push({x1:B,y1:q,x2:z,y2:q})}return _e.createElement(bi,j3({className:"recharts-errorBar",key:"bar-".concat(x.map(function(K){return"".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))},h),x.map(function(K){return _e.createElement("line",j3({},K,{key:"line-".concat(K.x1,"-").concat(K.x2,"-").concat(K.y1,"-").concat(K.y2)}))}))});return _e.createElement(bi,{className:"recharts-errorBars"},p)}}])}(_e.Component);w1e(oI,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});w1e(oI,"displayName","ErrorBar");function jS(e){"@babel/helpers - typeof";return jS=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},jS(e)}function qJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ty(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qJ(Object(r),!0).forEach(function(n){tlt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qJ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tlt(e,t,r){return t=rlt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rlt(e){var t=nlt(e,"string");return jS(t)=="symbol"?t:t+""}function nlt(e,t){if(jS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E1e=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,s=Nc(r,fb);if(!s)return null;var o=fb.defaultProps,l=o!==void 0?ty(ty({},o),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:a==="children"?u=(n||[]).reduce(function(c,d){var f=d.item,h=d.props,p=h.sectors||h.data||[];return c.concat(p.map(function(m){return{type:s.props.iconType||f.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(n||[]).map(function(c){var d=c.item,f=d.type.defaultProps,h=f!==void 0?ty(ty({},f),d.props):{},p=h.dataKey,m=h.name,_=h.legendType,y=h.hide;return{inactive:y,dataKey:p,type:l.iconType||_||"square",color:k9(d),value:m||p,payload:h}}),ty(ty(ty({},l),fb.getWithHeight(s,i)),{},{payload:u,item:s})};function RS(e){"@babel/helpers - typeof";return RS=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},RS(e)}function KJ(e){return olt(e)||slt(e)||alt(e)||ilt()}function ilt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 601In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function alt(e,t){if(e){if(typeof e=="string")return FF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FF(e,t)}}function slt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function olt(e){if(Array.isArray(e))return FF(e)}function FF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function js(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YJ(Object(r),!0).forEach(function(n){pb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YJ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pb(e,t,r){return t=llt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function llt(e){var t=ult(e,"string");return RS(t)=="symbol"?t:t+""}function ult(e,t){if(RS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(RS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $o(e,t,r){return Ln(e)||Ln(t)?r:Bo(t)?Zc(e,t,r):wn(t)?t(e):r}function cT(e,t,r,n){var i=sot(e,function(o){return $o(o,t)});if(r==="number"){var a=i.filter(function(o){return ar(o)||parseFloat(o)});return a.length?[iI(a),Eg(a)]:[1/0,-1/0]}var s=n?i.filter(function(o){return!Ln(o)}):i;return s.map(function(o){return Bo(o)||o instanceof Date?o:""})}var clt=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,o=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(o<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u<o;u++){var c=u>0?i[u-1].coordinate:i[o-1].coordinate,d=i[u].coordinate,f=u>=o-1?i[0].coordinate:i[u+1].coordinate,h=void 0;if(Tu(d-c)!==Tu(f-d)){var p=[];if(Tu(f-d)===Tu(l[1]-l[0])){h=f;var m=d+l[1]-l[0];p[0]=Math.min(m,(m+c)/2),p[1]=Math.max(m,(m+c)/2)}else{h=c;var _=f+l[1]-l[0];p[0]=Math.min(d,(_+d)/2),p[1]=Math.max(d,(_+d)/2)}var y=[Math.min(d,(h+d)/2),Math.max(d,(h+d)/2)];if(t>y[0]&&t<=y[1]||t>=p[0]&&t<=p[1]){s=i[u].index;break}}else{var v=Math.min(c,f),b=Math.max(c,f);if(t>(v+d)/2&&t<=(b+d)/2){s=i[u].index;break}}}else for(var w=0;w<o;w++)if(w===0&&t<=(n[w].coordinate+n[w+1].coordinate)/2||w>0&&w<o-1&&t>(n[w].coordinate+n[w-1].coordinate)/2&&t<=(n[w].coordinate+n[w+1].coordinate)/2||w===o-1&&t>(n[w].coordinate+n[w-1].coordinate)/2){s=n[w].index;break}return s},k9=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?js(js({},t.type.defaultProps),t.props):t.props,s=a.stroke,o=a.fill,l;switch(i){case"Line":l=s;break;case"Area":case"Radar":l=s&&s!=="none"?s:o;break;default:l=o;break}return l},dlt=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},o=Object.keys(a),l=0,u=o.length;l<u;l++)for(var c=a[o[l]].stackGroups,d=Object.keys(c),f=0,h=d.length;f<h;f++){var p=c[d[f]],m=p.items,_=p.cateAxisId,y=m.filter(function(T){return Gp(T.type).indexOf("Bar")>=0});if(y&&y.length){var v=y[0].type.defaultProps,b=v!==void 0?js(js({},v),y[0].props):y[0].props,w=b.barSize,x=b[_];s[x]||(s[x]=[]);var E=Ln(w)?r:w;s[x].push({item:y[0],stackList:y.slice(1),barSize:Ln(E)?void 0:Su(E,n,0)})}}return s},flt=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,s=a===void 0?[]:a,o=t.maxBarSize,l=s.length;if(l<1)return null;var u=Su(r,i,0,!0),c,d=[];if(s[0].barSize===+s[0].barSize){var f=!1,h=i/l,p=s.reduce(function(w,x){return w+x.barSize||0},0);p+=(l-1)*u,p>=i&&(p-=(l-1)*u,u=0),p>=i&&h>0&&(f=!0,h*=.9,p=l*h);var m=(i-p)/2>>0,_={offset:m-u,size:0};c=s.reduce(function(w,x){var E={item:x.item,position:{offset:_.offset+_.size+u,size:f?h:x.barSize}},T=[].concat(KJ(w),[E]);return _=T[T.length-1].position,x.stackList&&x.stackList.length&&x.stackList.forEach(function(S){T.push({item:S,position:_})}),T},d)}else{var y=Su(n,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var v=(i-2*y-(l-1)*u)/l;v>1&&(v>>=0);var b=o===+o?Math.min(v,o):v;c=s.reduce(function(w,x,E){var T=[].concat(KJ(w),[{item:x.item,position:{offset:y+(v+u)*E+(v-b)/2,size:b}}]);return x.stackList&&x.stackList.length&&x.stackList.forEach(function(S){T.push({item:S,position:T[T.length-1].position})}),T},d)}return c},hlt=function(t,r,n,i){var a=n.children,s=n.width,o=n.margin,l=s-(o.left||0)-(o.right||0),u=E1e({children:a,legendWidth:l});if(u){var c=i||{},d=c.width,f=c.height,h=u.align,p=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&p==="middle")&&h!=="center"&&ar(t[h]))return js(js({},t),{},pb({},h,t[h]+(d||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&p!=="middle"&&ar(t[p]))return js(js({},t),{},pb({},p,t[p]+(f||0)))}return t},plt=function(t,r,n){return Ln(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},T1e=function(t,r,n,i,a){var s=r.props.children,o=Yd(s,oI).filter(function(u){return plt(i,a,u.props.direction)});if(o&&o.length){var l=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var d=$o(c,n);if(Ln(d))return u;var f=Array.isArray(d)?[iI(d),Eg(d)]:[d,d],h=l.reduce(function(p,m){var _=$o(c,m,0),y=f[0]-Math.abs(Array.isArray(_)?_[0]:_),v=f[1]+Math.abs(Array.isArray(_)?_[1]:_);return[Math.min(y,p[0]),Math.max(v,p[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},mlt=function(t,r,n,i,a){var s=r.map(function(o){return T1e(t,o,n,a,i)}).filter(function(o){return!Ln(o)});return s&&s.length?s.reduce(function(o,l){return[Math.min(o[0],l[0]),Math.max(o[1],l[1])]},[1/0,-1/0]):null},S1e=function(t,r,n,i,a){var s=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&T1e(t,l,u,i)||cT(t,u,n,a)});if(n==="number")return s.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var o={};return s.reduce(function(l,u){for(var c=0,d=u.length;c<d;c++)o[u[c]]||(o[u[c]]=!0,l.push(u[c]));return l},[])},A1e=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Fy=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,s=t.type,o=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&s==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?Tu(o[0]-o[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var f=a?a.indexOf(d):d;return{coordinate:i(f)+u,value:d,offset:u}});return c.filter(function(d){return!px(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:i(d)+u,value:d,index:f,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,f){return{coordinate:i(d)+u,value:a?a[d]:d,index:f,offset:u}})},pL=new WeakMap,uM=function(t,r){if(typeof r!="function")return t;pL.has(t)||pL.set(t,new WeakMap);var n=pL.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},C1e=function(t,r,n){var i=t.scale,a=t.type,s=t.layout,o=t.axisType;if(i==="auto")return s==="radial"&&o==="radiusAxis"?{scale:MS(),realScaleType:"band"}:s==="radial"&&o==="angleAxis"?{scale:O3(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:uT(),realScaleType:"point"}:a==="category"?{scale:MS(),realScaleType:"band"}:{scale:O3(),realScaleType:"linear"};if(Fv(i)){var l="scale".concat(WN(i));return{scale:(UJ[l]||uT)(),realScaleType:UJ[l]?l:"point"}}return wn(i)?{scale:i}:{scale:uT(),realScaleType:"point"}},XJ=1e-4,P1e=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-XJ,s=Math.max(i[0],i[1])+XJ,o=t(r[0]),l=t(r[n-1]);(o<a||o>s||l<a||l>s)&&t.domain([r[0],r[n-1]])}},glt=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},ylt=function(t,r){if(!r||r.length!==2||!ar(r[0])||!ar(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!ar(t[0])||t[0]<n)&&(a[0]=n),(!ar(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},vlt=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,s=0,o=0;o<r;++o){var l=px(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=a,t[o][n][1]=a+l,a=t[o][n][1]):(t[o][n][0]=s,t[o][n][1]=s+l,s=t[o][n][1])}},_lt=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,s=0;s<r;++s){var o=px(t[s][n][1])?t[s][n][0]:t[s][n][1];o>=0?(t[s][n][0]=a,t[s][n][1]=a+o,a=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},blt={sign:vlt,expand:LKe,none:uw,silhouette:jKe,wiggle:RKe,positive:_lt},wlt=function(t,r,n){var i=r.map(function(o){return o.props.dataKey}),a=blt[n],s=DKe().keys(i).value(function(o,l){return+$o(o,l,0)}).order(cF).offset(a);return s(t)},xlt=function(t,r,n,i,a,s){if(!t)return null;var o=s?r.reverse():r,l={},u=o.reduce(function(d,f){var h,p=(h=f.type)!==null&&h!==void 0&&h.defaultProps?js(js({},f.type.defaultProps),f.props):f.props,m=p.stackId,_=p.hide;if(_)return d;var y=p[n],v=d[y]||{hasStack:!1,stackGroups:{}};if(Bo(m)){var b=v.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};b.items.push(f),v.hasStack=!0,v.stackGroups[m]=b}else v.stackGroups[mx("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[f]};return js(js({},d),{},pb({},y,v))},l),c={};return Object.keys(u).reduce(function(d,f){var h=u[f];if(h.hasStack){var p={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,_){var y=h.stackGroups[_];return js(js({},m),{},pb({},_,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:wlt(t,y.items,a)}))},p)}return js(js({},d),{},pb({},f,h))},c)},M1e=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,o=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=jot(u,a,o);return t.domain([iI(c),Eg(c)]),{niceTicks:c}}if(a&&i==="number"){var d=t.domain(),f=Rot(d,a,o);return{niceTicks:f}}return null};function QJ(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ln(i[t.dataKey])){var o=c3(r,"value",i[t.dataKey]);if(o)return o.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=$o(i,Ln(s)?t.dataKey:s);return Ln(l)?null:t.scale(l)}var ZJ=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,s=t.entry,o=t.index;if(r.type==="category")return n[o]?n[o].coordinate+i:null;var l=$o(s,r.dataKey,r.domain[o]);return Ln(l)?null:r.scale(l)-a/2+i},Elt=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},Tlt=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?js(js({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Bo(a)){var s=r[a];if(s){var o=s.items.indexOf(t);return o>=0?s.stackedData[o]:null}}return null},Slt=function(t){return t.reduce(function(r,n){return[iI(n.concat([r[0]]).filter(ar)),Eg(n.concat([r[1]]).filter(ar))]},[1/0,-1/0])},k1e=function(t,r,n){return Object.keys(t).reduce(function(i,a){var s=t[a],o=s.stackedData,l=o.reduce(function(u,c){var d=Slt(c.slice(r,n+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},JJ=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,eee=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,BF=function(t,r,n){if(wn(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(ar(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(JJ.test(t[0])){var a=+JJ.exec(t[0])[1];i[0]=r[0]-a}else wn(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(ar(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(eee.test(t[1])){var s=+eee.exec(t[1])[1];i[1]=r[1]+s}else wn(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},$3=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=i9(r,function(d){return d.coordinate}),s=1/0,o=1,l=a.length;o<l;o++){var u=a[o],c=a[o-1];s=Math.min((u.coordinate||0)-(c.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},tee=function(t,r,n){return!t||!t.length||yw(t,Zc(n,"type.defaultProps.domain"))?r:t},O1e=function(t,r){var n=t.type.defaultProps?js(js({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,s=n.unit,o=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return js(js({},en(t,!1)),{},{dataKey:i,unit:s,formatter:o,name:a||i,color:k9(t),value:$o(r,i),type:l,payload:r,chartType:u,hide:c})};function $S(e){"@babel/helpers - typeof";return $S=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},$S(e)}function ree(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ree(Object(r),!0).forEach(function(n){N1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ree(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N1e(e,t,r){return t=Alt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Alt(e){var t=Clt(e,"string");return $S(t)=="symbol"?t:t+""}function Clt(e,t){if($S(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($S(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Plt(e,t){return Nlt(e)||Olt(e,t)||klt(e,t)||Mlt()}function Mlt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 602In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function klt(e,t){if(e){if(typeof e=="string")return nee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nee(e,t)}}function nee(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Olt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Nlt(e){if(Array.isArray(e))return e}var F3=Math.PI/180,Ilt=function(t){return t*180/Math.PI},La=function(t,r,n,i){return{x:t+Math.cos(-F3*i)*n,y:r+Math.sin(-F3*i)*n}},I1e=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Dlt=function(t,r,n,i,a){var s=t.width,o=t.height,l=t.startAngle,u=t.endAngle,c=Su(t.cx,s,s/2),d=Su(t.cy,o,o/2),f=I1e(s,o,n),h=Su(t.innerRadius,f,0),p=Su(t.outerRadius,f,f*.8),m=Object.keys(r);return m.reduce(function(_,y){var v=r[y],b=v.domain,w=v.reversed,x;if(Ln(v.range))i==="angleAxis"?x=[l,u]:i==="radiusAxis"&&(x=[h,p]),w&&(x=[x[1],x[0]]);else{x=v.range;var E=x,T=Plt(E,2);l=T[0],u=T[1]}var S=C1e(v,a),A=S.realScaleType,C=S.scale;C.domain(b).range(x),P1e(C);var k=M1e(C,Sp(Sp({},v),{},{realScaleType:A})),M=Sp(Sp(Sp({},v),k),{},{range:x,radius:p,realScaleType:A,scale:C,cx:c,cy:d,innerRadius:h,outerRadius:p,startAngle:l,endAngle:u});return Sp(Sp({},_),{},N1e({},y,M))},{})},Llt=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},jlt=function(t,r){var n=t.x,i=t.y,a=r.cx,s=r.cy,o=Llt({x:n,y:i},{x:a,y:s});if(o<=0)return{radius:o};var l=(n-a)/o,u=Math.acos(l);return i>s&&(u=2*Math.PI-u),{radius:o,angle:Ilt(u),angleInRadian:u}},Rlt=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},$lt=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),o=Math.min(a,s);return t+o*360},iee=function(t,r){var n=t.x,i=t.y,a=jlt({x:n,y:i},r),s=a.radius,o=a.angle,l=r.innerRadius,u=r.outerRadius;if(s<l||s>u)return!1;if(s===0)return!0;var c=Rlt(r),d=c.startAngle,f=c.endAngle,h=o,p;if(d<=f){for(;h>f;)h-=360;for(;h<d;)h+=360;p=h>=d&&h<=f}else{for(;h>d;)h-=360;for(;h<f;)h+=360;p=h>=f&&h<=d}return p?Sp(Sp({},r),{},{radius:s,angle:$lt(h,r)}):null},D1e=function(t){return!R.isValidElement(t)&&!wn(t)&&typeof t!="boolean"?t.className:""};function FS(e){"@babel/helpers - typeof";return FS=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},FS(e)}var Flt=["offset"];function Blt(e){return Vlt(e)||Wlt(e)||Ult(e)||zlt()}function zlt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 603In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ult(e,t){if(e){if(typeof e=="string")return zF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zF(e,t)}}function Wlt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vlt(e){if(Array.isArray(e))return zF(e)}function zF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Hlt(e,t){if(e==null)return{};var r=Glt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Glt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function aee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aee(Object(r),!0).forEach(function(n){qlt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qlt(e,t,r){return t=Klt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Klt(e){var t=Ylt(e,"string");return FS(t)=="symbol"?t:t+""}function Ylt(e,t){if(FS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(FS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BS(){return BS=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},BS.apply(this,arguments)}var Xlt=function(t){var r=t.value,n=t.formatter,i=Ln(t.children)?r:t.children;return wn(n)?n(i):i},Qlt=function(t,r){var n=Tu(r-t),i=Math.min(Math.abs(r-t),360);return n*i},Zlt=function(t,r,n){var i=t.position,a=t.viewBox,s=t.offset,o=t.className,l=a,u=l.cx,c=l.cy,d=l.innerRadius,f=l.outerRadius,h=l.startAngle,p=l.endAngle,m=l.clockWise,_=(d+f)/2,y=Qlt(h,p),v=y>=0?1:-1,b,w;i==="insideStart"?(b=h+v*s,w=m):i==="insideEnd"?(b=p-v*s,w=!m):i==="end"&&(b=p+v*s,w=m),w=y<=0?w:!w;var x=La(u,c,_,b),E=La(u,c,_,b+(w?1:-1)*359),T="M".concat(x.x,",").concat(x.y,` 604 A`).concat(_,",").concat(_,",0,1,").concat(w?0:1,`, 605 `).concat(E.x,",").concat(E.y),S=Ln(t.id)?mx("recharts-radial-line-"):t.id;return _e.createElement("text",BS({},n,{dominantBaseline:"central",className:Dn("recharts-radial-bar-label",o)}),_e.createElement("defs",null,_e.createElement("path",{id:S,d:T})),_e.createElement("textPath",{xlinkHref:"#".concat(S)},r))},Jlt=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,s=a.cx,o=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,d=a.endAngle,f=(c+d)/2;if(i==="outside"){var h=La(s,o,u+n,f),p=h.x,m=h.y;return{x:p,y:m,textAnchor:p>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"end"};var _=(l+u)/2,y=La(s,o,_,f),v=y.x,b=y.y;return{x:v,y:b,textAnchor:"middle",verticalAnchor:"middle"}},eut=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,s=r,o=s.x,l=s.y,u=s.width,c=s.height,d=c>=0?1:-1,f=d*i,h=d>0?"end":"start",p=d>0?"start":"end",m=u>=0?1:-1,_=m*i,y=m>0?"end":"start",v=m>0?"start":"end";if(a==="top"){var b={x:o+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:h};return Mo(Mo({},b),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var w={x:o+u/2,y:l+c+f,textAnchor:"middle",verticalAnchor:p};return Mo(Mo({},w),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var x={x:o-_,y:l+c/2,textAnchor:y,verticalAnchor:"middle"};return Mo(Mo({},x),n?{width:Math.max(x.x-n.x,0),height:c}:{})}if(a==="right"){var E={x:o+u+_,y:l+c/2,textAnchor:v,verticalAnchor:"middle"};return Mo(Mo({},E),n?{width:Math.max(n.x+n.width-E.x,0),height:c}:{})}var T=n?{width:u,height:c}:{};return a==="insideLeft"?Mo({x:o+_,y:l+c/2,textAnchor:v,verticalAnchor:"middle"},T):a==="insideRight"?Mo({x:o+u-_,y:l+c/2,textAnchor:y,verticalAnchor:"middle"},T):a==="insideTop"?Mo({x:o+u/2,y:l+f,textAnchor:"middle",verticalAnchor:p},T):a==="insideBottom"?Mo({x:o+u/2,y:l+c-f,textAnchor:"middle",verticalAnchor:h},T):a==="insideTopLeft"?Mo({x:o+_,y:l+f,textAnchor:v,verticalAnchor:p},T):a==="insideTopRight"?Mo({x:o+u-_,y:l+f,textAnchor:y,verticalAnchor:p},T):a==="insideBottomLeft"?Mo({x:o+_,y:l+c-f,textAnchor:v,verticalAnchor:h},T):a==="insideBottomRight"?Mo({x:o+u-_,y:l+c-f,textAnchor:y,verticalAnchor:h},T):cx(a)&&(ar(a.x)||jy(a.x))&&(ar(a.y)||jy(a.y))?Mo({x:o+Su(a.x,u),y:l+Su(a.y,c),textAnchor:"end",verticalAnchor:"end"},T):Mo({x:o+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},T)},tut=function(t){return"cx"in t&&ar(t.cx)};function tl(e){var t=e.offset,r=t===void 0?5:t,n=Hlt(e,Flt),i=Mo({offset:r},n),a=i.viewBox,s=i.position,o=i.value,l=i.children,u=i.content,c=i.className,d=c===void 0?"":c,f=i.textBreakAll;if(!a||Ln(o)&&Ln(l)&&!R.isValidElement(u)&&!wn(u))return null;if(R.isValidElement(u))return R.cloneElement(u,i);var h;if(wn(u)){if(h=R.createElement(u,i),R.isValidElement(h))return h}else h=Xlt(i);var p=tut(a),m=en(i,!0);if(p&&(s==="insideStart"||s==="insideEnd"||s==="end"))return Zlt(i,h,m);var _=p?Jlt(i):eut(i);return _e.createElement(zv,BS({className:Dn("recharts-label",d)},m,_,{breakAll:f}),h)}tl.displayName="Label";var L1e=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,s=t.endAngle,o=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,d=t.x,f=t.y,h=t.top,p=t.left,m=t.width,_=t.height,y=t.clockWise,v=t.labelViewBox;if(v)return v;if(ar(m)&&ar(_)){if(ar(d)&&ar(f))return{x:d,y:f,width:m,height:_};if(ar(h)&&ar(p))return{x:h,y:p,width:m,height:_}}return ar(d)&&ar(f)?{x:d,y:f,width:0,height:0}:ar(r)&&ar(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:u||0,outerRadius:c||l||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},rut=function(t,r){return t?t===!0?_e.createElement(tl,{key:"label-implicit",viewBox:r}):Bo(t)?_e.createElement(tl,{key:"label-implicit",viewBox:r,value:t}):R.isValidElement(t)?t.type===tl?R.cloneElement(t,{key:"label-implicit",viewBox:r}):_e.createElement(tl,{key:"label-implicit",content:t,viewBox:r}):wn(t)?_e.createElement(tl,{key:"label-implicit",content:t,viewBox:r}):cx(t)?_e.createElement(tl,BS({viewBox:r},t,{key:"label-implicit"})):null:null},nut=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=L1e(t),s=Yd(i,tl).map(function(l,u){return R.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return s;var o=rut(t.label,r||a);return[o].concat(Blt(s))};tl.parseViewBox=L1e;tl.renderCallByParent=nut;function iut(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var aut=iut;const sut=mi(aut);function zS(e){"@babel/helpers - typeof";return zS=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},zS(e)}var out=["valueAccessor"],lut=["data","dataKey","clockWise","id","textBreakAll"];function uut(e){return hut(e)||fut(e)||dut(e)||cut()}function cut(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 606In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dut(e,t){if(e){if(typeof e=="string")return UF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UF(e,t)}}function fut(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hut(e){if(Array.isArray(e))return UF(e)}function UF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function B3(){return B3=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},B3.apply(this,arguments)}function see(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?see(Object(r),!0).forEach(function(n){put(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):see(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function put(e,t,r){return t=mut(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mut(e){var t=gut(e,"string");return zS(t)=="symbol"?t:t+""}function gut(e,t){if(zS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lee(e,t){if(e==null)return{};var r=yut(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yut(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var vut=function(t){return Array.isArray(t.value)?sut(t.value):t.value};function Yp(e){var t=e.valueAccessor,r=t===void 0?vut:t,n=lee(e,out),i=n.data,a=n.dataKey,s=n.clockWise,o=n.id,l=n.textBreakAll,u=lee(n,lut);return!i||!i.length?null:_e.createElement(bi,{className:"recharts-label-list"},i.map(function(c,d){var f=Ln(a)?r(c,d):$o(c&&c.payload,a),h=Ln(o)?{}:{id:"".concat(o,"-").concat(d)};return _e.createElement(tl,B3({},en(c,!0),u,h,{parentViewBox:c.parentViewBox,value:f,textBreakAll:l,viewBox:tl.parseViewBox(Ln(s)?c:oee(oee({},c),{},{clockWise:s})),key:"label-".concat(d),index:d}))}))}Yp.displayName="LabelList";function _ut(e,t){return e?e===!0?_e.createElement(Yp,{key:"labelList-implicit",data:t}):_e.isValidElement(e)||wn(e)?_e.createElement(Yp,{key:"labelList-implicit",data:t,content:e}):cx(e)?_e.createElement(Yp,B3({data:t},e,{key:"labelList-implicit"})):null:null}function but(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Yd(n,Yp).map(function(s,o){return R.cloneElement(s,{data:t,key:"labelList-".concat(o)})});if(!r)return i;var a=_ut(e.label,t);return[a].concat(uut(i))}Yp.renderCallByParent=but;function US(e){"@babel/helpers - typeof";return US=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},US(e)}function WF(){return WF=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},WF.apply(this,arguments)}function uee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uee(Object(r),!0).forEach(function(n){wut(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wut(e,t,r){return t=xut(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xut(e){var t=Eut(e,"string");return US(t)=="symbol"?t:t+""}function Eut(e,t){if(US(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(US(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tut=function(t,r){var n=Tu(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},cM=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,s=t.sign,o=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(o?1:-1)+i,d=Math.asin(l/c)/F3,f=u?a:a+s*d,h=La(r,n,c,f),p=La(r,n,i,f),m=u?a-s*d:a,_=La(r,n,c*Math.cos(d*F3),m);return{center:h,circleTangency:p,lineTangency:_,theta:d}},j1e=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.startAngle,o=t.endAngle,l=Tut(s,o),u=s+l,c=La(r,n,a,s),d=La(r,n,a,u),f="M ".concat(c.x,",").concat(c.y,` 607 A `).concat(a,",").concat(a,`,0, 608 `).concat(+(Math.abs(l)>180),",").concat(+(s>u),`, 609 `).concat(d.x,",").concat(d.y,` 610 `);if(i>0){var h=La(r,n,i,s),p=La(r,n,i,u);f+="L ".concat(p.x,",").concat(p.y,` 611 A `).concat(i,",").concat(i,`,0, 612 `).concat(+(Math.abs(l)>180),",").concat(+(s<=u),`, 613 `).concat(h.x,",").concat(h.y," Z")}else f+="L ".concat(r,",").concat(n," Z");return f},Sut=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.cornerRadius,o=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,d=Tu(c-u),f=cM({cx:r,cy:n,radius:a,angle:u,sign:d,cornerRadius:s,cornerIsExternal:l}),h=f.circleTangency,p=f.lineTangency,m=f.theta,_=cM({cx:r,cy:n,radius:a,angle:c,sign:-d,cornerRadius:s,cornerIsExternal:l}),y=_.circleTangency,v=_.lineTangency,b=_.theta,w=l?Math.abs(u-c):Math.abs(u-c)-m-b;if(w<0)return o?"M ".concat(p.x,",").concat(p.y,` 614 a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 615 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 616 `):j1e({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var x="M ".concat(p.x,",").concat(p.y,` 617 A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(h.x,",").concat(h.y,` 618 A`).concat(a,",").concat(a,",0,").concat(+(w>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,` 619 A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` 620 `);if(i>0){var E=cM({cx:r,cy:n,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),T=E.circleTangency,S=E.lineTangency,A=E.theta,C=cM({cx:r,cy:n,radius:i,angle:c,sign:-d,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),k=C.circleTangency,M=C.lineTangency,D=C.theta,$=l?Math.abs(u-c):Math.abs(u-c)-A-D;if($<0&&s===0)return"".concat(x,"L").concat(r,",").concat(n,"Z");x+="L".concat(M.x,",").concat(M.y,` 621 A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,` 622 A`).concat(i,",").concat(i,",0,").concat(+($>180),",").concat(+(d>0),",").concat(T.x,",").concat(T.y,` 623 A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(S.x,",").concat(S.y,"Z")}else x+="L".concat(r,",").concat(n,"Z");return x},Aut={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},R1e=function(t){var r=cee(cee({},Aut),t),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,o=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,d=r.endAngle,f=r.className;if(s<a||c===d)return null;var h=Dn("recharts-sector",f),p=s-a,m=Su(o,p,0,!0),_;return m>0&&Math.abs(c-d)<360?_=Sut({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(m,p/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:d}):_=j1e({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:c,endAngle:d}),_e.createElement("path",WF({},en(r,!0),{className:h,d:_,role:"img"}))};function WS(e){"@babel/helpers - typeof";return WS=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},WS(e)}function VF(){return VF=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},VF.apply(this,arguments)}function dee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dee(Object(r),!0).forEach(function(n){Cut(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cut(e,t,r){return t=Put(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Put(e){var t=Mut(e,"string");return WS(t)=="symbol"?t:t+""}function Mut(e,t){if(WS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(WS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hee={curveBasisClosed:EKe,curveBasisOpen:TKe,curveBasis:xKe,curveBumpX:lKe,curveBumpY:uKe,curveLinearClosed:SKe,curveLinear:HN,curveMonotoneX:AKe,curveMonotoneY:CKe,curveNatural:PKe,curveStep:MKe,curveStepAfter:OKe,curveStepBefore:kKe},dM=function(t){return t.x===+t.x&&t.y===+t.y},j2=function(t){return t.x},R2=function(t){return t.y},kut=function(t,r){if(wn(t))return t;var n="curve".concat(WN(t));return(n==="curveMonotone"||n==="curveBump")&&r?hee["".concat(n).concat(r==="vertical"?"Y":"X")]:hee[n]||HN},Out=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,s=t.baseLine,o=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=kut(n,o),d=u?a.filter(function(m){return dM(m)}):a,f;if(Array.isArray(s)){var h=u?s.filter(function(m){return dM(m)}):s,p=d.map(function(m,_){return fee(fee({},m),{},{base:h[_]})});return o==="vertical"?f=tM().y(R2).x1(j2).x0(function(m){return m.base.x}):f=tM().x(j2).y1(R2).y0(function(m){return m.base.y}),f.defined(dM).curve(c),f(p)}return o==="vertical"&&ar(s)?f=tM().y(R2).x1(j2).x0(s):ar(s)?f=tM().x(j2).y1(R2).y0(s):f=Ive().x(j2).y(R2),f.defined(dM).curve(c),f(d)},mb=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var s=n&&n.length?Out(t):i;return R.createElement("path",VF({},en(t,!1),d3(t),{className:Dn("recharts-curve",r),d:s,ref:a}))},$1e={exports:{}},Nut="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Iut=Nut,Dut=Iut;function F1e(){}function B1e(){}B1e.resetWarningCache=F1e;var Lut=function(){function e(n,i,a,s,o,l){if(l!==Dut){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:B1e,resetWarningCache:F1e};return r.PropTypes=r,r};$1e.exports=Lut();var jut=$1e.exports;const Hi=mi(jut);var Rut=Object.getOwnPropertyNames,$ut=Object.getOwnPropertySymbols,Fut=Object.prototype.hasOwnProperty;function pee(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function fM(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,s=a.get(r),o=a.get(n);if(s&&o)return s===n&&o===r;a.set(r,n),a.set(n,r);var l=e(r,n,i);return a.delete(r),a.delete(n),l}}function mee(e){return Rut(e).concat($ut(e))}var But=Object.hasOwn||function(e,t){return Fut.call(e,t)};function c_(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var zut="__v",Uut="__o",Wut="_owner",gee=Object.getOwnPropertyDescriptor,yee=Object.keys;function Vut(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Hut(e,t){return c_(e.getTime(),t.getTime())}function Gut(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function qut(e,t){return e===t}function vee(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),s,o,l=0;(s=a.next())&&!s.done;){for(var u=t.entries(),c=!1,d=0;(o=u.next())&&!o.done;){if(i[d]){d++;continue}var f=s.value,h=o.value;if(r.equals(f[0],h[0],l,d,e,t,r)&&r.equals(f[1],h[1],f[0],h[0],e,t,r)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}var Kut=c_;function Yut(e,t,r){var n=yee(e),i=n.length;if(yee(t).length!==i)return!1;for(;i-- >0;)if(!z1e(e,t,r,n[i]))return!1;return!0}function $2(e,t,r){var n=mee(e),i=n.length;if(mee(t).length!==i)return!1;for(var a,s,o;
623i-- >0;)if(a=n[i],!z1e(e,t,r,a)||(s=gee(e,a),o=gee(t,a),(s||o)&&(!s||!o||s.configurable!==o.configurable||s.enumerable!==o.enumerable||s.writable!==o.writable)))return!1;return!0}function Xut(e,t){return c_(e.valueOf(),t.valueOf())}function Qut(e,t){return e.source===t.source&&e.flags===t.flags}function _ee(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),s,o;(s=a.next())&&!s.done;){for(var l=t.values(),u=!1,c=0;(o=l.next())&&!o.done;){if(!i[c]&&r.equals(s.value,o.value,s.value,o.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function Zut(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Jut(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function z1e(e,t,r,n){return(n===Wut||n===Uut||n===zut)&&(e.$$typeof||t.$$typeof)?!0:But(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var ect="[object Arguments]",tct="[object Boolean]",rct="[object Date]",nct="[object Error]",ict="[object Map]",act="[object Number]",sct="[object Object]",oct="[object RegExp]",lct="[object Set]",uct="[object String]",cct="[object URL]",dct=Array.isArray,bee=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,wee=Object.assign,fct=Object.prototype.toString.call.bind(Object.prototype.toString);function hct(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,s=e.areNumbersEqual,o=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(p,m,_){if(p===m)return!0;if(p==null||m==null)return!1;var y=typeof p;if(y!==typeof m)return!1;if(y!=="object")return y==="number"?s(p,m,_):y==="function"?i(p,m,_):!1;var v=p.constructor;if(v!==m.constructor)return!1;if(v===Object)return o(p,m,_);if(dct(p))return t(p,m,_);if(bee!=null&&bee(p))return d(p,m,_);if(v===Date)return r(p,m,_);if(v===RegExp)return u(p,m,_);if(v===Map)return a(p,m,_);if(v===Set)return c(p,m,_);var b=fct(p);return b===rct?r(p,m,_):b===oct?u(p,m,_):b===ict?a(p,m,_):b===lct?c(p,m,_):b===sct?typeof p.then!="function"&&typeof m.then!="function"&&o(p,m,_):b===cct?f(p,m,_):b===nct?n(p,m,_):b===ect?o(p,m,_):b===tct||b===act||b===uct?l(p,m,_):!1}}function pct(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?$2:Vut,areDatesEqual:Hut,areErrorsEqual:Gut,areFunctionsEqual:qut,areMapsEqual:n?pee(vee,$2):vee,areNumbersEqual:Kut,areObjectsEqual:n?$2:Yut,arePrimitiveWrappersEqual:Xut,areRegExpsEqual:Qut,areSetsEqual:n?pee(_ee,$2):_ee,areTypedArraysEqual:n?$2:Zut,areUrlsEqual:Jut};if(r&&(i=wee({},i,r(i))),t){var a=fM(i.areArraysEqual),s=fM(i.areMapsEqual),o=fM(i.areObjectsEqual),l=fM(i.areSetsEqual);i=wee({},i,{areArraysEqual:a,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:l})}return i}function mct(e){return function(t,r,n,i,a,s,o){return e(t,r,o)}}function gct(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(l,u){var c=n(),d=c.cache,f=d===void 0?t?new WeakMap:void 0:d,h=c.meta;return r(l,u,{cache:f,equals:i,meta:h,strict:a})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var s={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,u){return r(l,u,s)}}var yct=w0();w0({strict:!0});w0({circular:!0});w0({circular:!0,strict:!0});w0({createInternalComparator:function(){return c_}});w0({strict:!0,createInternalComparator:function(){return c_}});w0({circular:!0,createInternalComparator:function(){return c_}});w0({circular:!0,createInternalComparator:function(){return c_},strict:!0});function w0(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,s=a===void 0?!1:a,o=pct(e),l=hct(o),u=n?n(l):mct(l);return gct({circular:r,comparator:l,createState:i,equals:u,strict:s})}function vct(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function xee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>
vendor: 11,832 bytes, lines 623-629
623t?(e(a),r=-1):vct(i)};requestAnimationFrame(n)}function HF(e){"@babel/helpers - typeof";return HF=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},HF(e)}function _ct(e){return Ect(e)||xct(e)||wct(e)||bct()}function bct(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 624In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wct(e,t){if(e){if(typeof e=="string")return Eee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Eee(e,t)}}function Eee(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xct(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ect(e){if(Array.isArray(e))return e}function Tct(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,o=_ct(s),l=o[0],u=o.slice(1);if(typeof l=="number"){xee(i.bind(null,u),l);return}i(l),xee(i.bind(null,u));return}HF(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function VS(e){"@babel/helpers - typeof";return VS=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},VS(e)}function Tee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function See(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tee(Object(r),!0).forEach(function(n){U1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function U1e(e,t,r){return t=Sct(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sct(e){var t=Act(e,"string");return VS(t)==="symbol"?t:String(t)}function Act(e,t){if(VS(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(VS(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cct=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},Pct=function(t){return t},Mct=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},dT=function(t,r){return Object.keys(r).reduce(function(n,i){return See(See({},n),{},U1e({},i,t(i,r[i])))},{})},Aee=function(t,r,n){return t.map(function(i){return"".concat(Mct(i)," ").concat(r,"ms ").concat(n)}).join(",")};function kct(e,t){return Ict(e)||Nct(e,t)||W1e(e,t)||Oct()}function Oct(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 625In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nct(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Ict(e){if(Array.isArray(e))return e}function Dct(e){return Rct(e)||jct(e)||W1e(e)||Lct()}function Lct(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 626In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W1e(e,t){if(e){if(typeof e=="string")return GF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GF(e,t)}}function jct(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rct(e){if(Array.isArray(e))return GF(e)}function GF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var z3=1e-4,V1e=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},H1e=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},Cee=function(t,r){return function(n){var i=V1e(t,r);return H1e(i,n)}},$ct=function(t,r){return function(n){var i=V1e(t,r),a=[].concat(Dct(i.map(function(s,o){return s*o}).slice(1)),[0]);return H1e(a,n)}},Pee=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],s=r[2],o=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,s=1,o=1;break;case"ease":i=.25,a=.1,s=.25,o=1;break;case"ease-in":i=.42,a=0,s=1,o=1;break;case"ease-out":i=.42,a=0,s=.58,o=1;break;case"ease-in-out":i=0,a=0,s=.58,o=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(_){return parseFloat(_)}),c=kct(u,4);i=c[0],a=c[1],s=c[2],o=c[3]}}}var d=Cee(i,s),f=Cee(a,o),h=$ct(i,s),p=function(y){return y>1?1:y<0?0:y},m=function(y){for(var v=y>1?1:y,b=v,w=0;w<8;++w){var x=d(b)-v,E=h(b);if(Math.abs(x-v)<z3||E<z3)return f(b);b=p(b-x/E)}return f(b)};return m.isStepper=!1,m},Fct=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,s=t.dt,o=s===void 0?17:s,l=function(c,d,f){var h=-(c-d)*n,p=f*a,m=f+(h-p)*o/1e3,_=f*o/1e3+c;return Math.abs(_-d)<z3&&Math.abs(m)<z3?[d,0]:[_,m]};return l.isStepper=!0,l.dt=o,l},Bct=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Pee(i);case"spring":return Fct();default:if(i.split("(")[0]==="cubic-bezier")return Pee(i)}return typeof i=="function"?i:null};function HS(e){"@babel/helpers - typeof";return HS=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},HS(e)}function Mee(e){return Wct(e)||Uct(e)||G1e(e)||zct()}function zct(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 627In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uct(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wct(e){if(Array.isArray(e))return KF(e)}function kee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kee(Object(r),!0).forEach(function(n){qF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qF(e,t,r){return t=Vct(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vct(e){var t=Hct(e,"string");return HS(t)==="symbol"?t:String(t)}function Hct(e,t){if(HS(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(HS(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gct(e,t){return Yct(e)||Kct(e,t)||G1e(e,t)||qct()}function qct(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 628In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G1e(e,t){if(e){if(typeof e=="string")return KF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KF(e,t)}}function KF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kct(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Yct(e){if(Array.isArray(e))return e}var U3=function(t,r,n){return t+(r-t)*n},YF=function(t){var r=t.from,n=t.to;return r!==n},Xct=function e(t,r,n){var i=dT(function(a,s){if(YF(s)){var o=t(s.from,s.to,s.velocity),l=Gct(o,2),u=l[0],c=l[1];return pl(pl({},s),{},{from:u,velocity:c})}return s},r);return n<1?dT(function(a,s){return YF(s)?pl(pl({},s),{},{velocity:U3(s.velocity,i[a].velocity,n),from:U3(s.from,i[a].from,n)}):s},r):e(t,i,n-1)};const Qct=function(e,t,r,n,i){var a=Cct(e,t),s=a.reduce(function(_,y){return pl(pl({},_),{},qF({},y,[e[y],t[y]]))},{}),o=a.reduce(function(_,y){return pl(pl({},_),{},qF({},y,{from:e[y],velocity:0,to:t[y]}))},{}),l=-1,u,c,d=function(){return null},f=function(){return dT(function(y,v){return v.from},o)},h=function(){return!Object.values(o).filter(YF).length},p=function(y){u||(u=y);var v=y-u,b=v/r.dt;o=Xct(r,o,b),i(pl(pl(pl({},e),t),f())),u=y,h()||(l=requestAnimationFrame(d))},m=function(y){c||(c=y);var v=(y-c)/n,b=dT(function(x,E){return U3.apply(void 0,Mee(E).concat([r(v)]))},s);if(i(pl(pl(pl({},e),t),b)),v<1)l=requestAnimationFrame(d);else{var w=dT(function(x,E){return U3.apply(void 0,Mee(E).concat([r(1)]))},s);i(pl(pl(pl({},e),t),w))}};return d=r.isStepper?p:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}};function _w(e){"@babel/helpers - typeof";return _w=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},_w(e)}var Zct=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Jct(e,t){if(e==null)return{};var r=edt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function edt(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function mL(e){return idt(e)||ndt(e)||rdt(e)||tdt()}function tdt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 629In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rdt(e,t){if(e){if(typeof e=="string")return XF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XF(e,t)}}
629function ndt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function idt(e){if(Array.isArray(e))return XF(e)}function XF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Oee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oee(Object(r),!0).forEach(function(n){TE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TE(e,t,r){return t=q1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function adt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sdt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,q1e(n.key),n)}}
vendor: 47,914 bytes, lines 629-642
629function odt(e,t,r){return t&&sdt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q1e(e){var t=ldt(e,"string");return _w(t)==="symbol"?t:String(t)}function ldt(e,t){if(_w(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_w(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function udt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QF(e,t)}function QF(e,t){return QF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},QF(e,t)}function cdt(e){var t=ddt();return function(){var n=W3(e),i;if(t){var a=W3(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return ZF(this,i)}}function ZF(e,t){if(t&&(_w(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JF(e)}function JF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ddt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function W3(e){return W3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},W3(e)}var ep=function(e){udt(r,e);var t=cdt(r);function r(n,i){var a;adt(this,r),a=t.call(this,n,i);var s=a.props,o=s.isActive,l=s.attributeName,u=s.from,c=s.to,d=s.steps,f=s.children,h=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(JF(a)),a.changeStyle=a.changeStyle.bind(JF(a)),!o||h<=0)return a.state={style:{}},typeof f=="function"&&(a.state={style:c}),ZF(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof f=="function")return a.state={style:u},ZF(a);a.state={style:l?TE({},l,u):u}}else a.state={style:{}};return a}return odt(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,o=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,d=a.from,f=this.state.style;if(o){if(!s){var h={style:l?TE({},l,c):c};this.state&&f&&(l&&f[l]!==c||!l&&f!==c)&&this.setState(h);return}if(!(yct(i.to,c)&&i.canBegin&&i.isActive)){var p=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=p||u?d:i.to;if(this.state&&f){var _={style:l?TE({},l,m):m};(l&&f[l]!==m||!l&&f!==m)&&this.setState(_)}this.runAnimation(bf(bf({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,o=i.to,l=i.duration,u=i.easing,c=i.begin,d=i.onAnimationEnd,f=i.onAnimationStart,h=Qct(s,o,Bct(u),l,this.changeStyle),p=function(){a.stopJSAnimation=h()};this.manager.start([f,c,p,l,d])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,o=i.begin,l=i.onAnimationStart,u=s[0],c=u.style,d=u.duration,f=d===void 0?0:d,h=function(m,_,y){if(y===0)return m;var v=_.duration,b=_.easing,w=b===void 0?"ease":b,x=_.style,E=_.properties,T=_.onAnimationEnd,S=y>0?s[y-1]:_,A=E||Object.keys(x);if(typeof w=="function"||w==="spring")return[].concat(mL(m),[a.runJSAnimation.bind(a,{from:S.style,to:x,duration:v,easing:w}),v]);var C=Aee(A,v,w),k=bf(bf(bf({},S.style),x),{},{transition:C});return[].concat(mL(m),[k,v,T]).filter(Pct)};return this.manager.start([l].concat(mL(s.reduce(h,[c,Math.max(f,o)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Tct());var a=i.begin,s=i.duration,o=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,d=i.onAnimationEnd,f=i.steps,h=i.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(f.length>1){this.runStepAnimation(i);return}var m=o?TE({},o,l):l,_=Aee(Object.keys(m),s,u);p.start([c,a,bf(bf({},m),{},{transition:_}),s,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var o=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Jct(i,Zct),u=R.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!o||u===0||s<=0)return a;var d=function(h){var p=h.props,m=p.style,_=m===void 0?{}:m,y=p.className,v=R.cloneElement(h,bf(bf({},l),{},{style:bf(bf({},_),c),className:y}));return v};return u===1?d(R.Children.only(a)):_e.createElement("div",null,R.Children.map(a,function(f){return d(f)}))}}]),r}(R.PureComponent);ep.displayName="Animate";ep.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ep.propTypes={from:Hi.oneOfType([Hi.object,Hi.string]),to:Hi.oneOfType([Hi.object,Hi.string]),attributeName:Hi.string,duration:Hi.number,begin:Hi.number,easing:Hi.oneOfType([Hi.string,Hi.func]),steps:Hi.arrayOf(Hi.shape({duration:Hi.number.isRequired,style:Hi.object.isRequired,easing:Hi.oneOfType([Hi.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Hi.func]),properties:Hi.arrayOf("string"),onAnimationEnd:Hi.func})),children:Hi.oneOfType([Hi.node,Hi.func]),isActive:Hi.bool,canBegin:Hi.bool,onAnimationEnd:Hi.func,shouldReAnimate:Hi.bool,onAnimationStart:Hi.func,onAnimationReStart:Hi.func};function GS(e){"@babel/helpers - typeof";return GS=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},GS(e)}function V3(){return V3=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},V3.apply(this,arguments)}function fdt(e,t){return gdt(e)||mdt(e,t)||pdt(e,t)||hdt()}function hdt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 630In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pdt(e,t){if(e){if(typeof e=="string")return Nee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nee(e,t)}}function Nee(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mdt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function gdt(e){if(Array.isArray(e))return e}function Iee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iee(Object(r),!0).forEach(function(n){ydt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ydt(e,t,r){return t=vdt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vdt(e){var t=_dt(e,"string");return GS(t)=="symbol"?t:t+""}function _dt(e,t){if(GS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(GS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lee=function(t,r,n,i,a){var s=Math.min(Math.abs(n)/2,Math.abs(i)/2),o=i>=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(s>0&&a instanceof Array){for(var d=[0,0,0,0],f=0,h=4;f<h;f++)d[f]=a[f]>s?s:a[f];c="M".concat(t,",").concat(r+o*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(r)),c+="L ".concat(t+n-l*d[1],",").concat(r),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, 631 `).concat(t+n,",").concat(r+o*d[1])),c+="L ".concat(t+n,",").concat(r+i-o*d[2]),d[2]>0&&(c+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, 632 `).concat(t+n-l*d[2],",").concat(r+i)),c+="L ".concat(t+l*d[3],",").concat(r+i),d[3]>0&&(c+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, 633 `).concat(t,",").concat(r+i-o*d[3])),c+="Z"}else if(s>0&&a===+a&&a>0){var p=Math.min(s,a);c="M ".concat(t,",").concat(r+o*p,` 634 A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+l*p,",").concat(r,` 635 L `).concat(t+n-l*p,",").concat(r,` 636 A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+n,",").concat(r+o*p,` 637 L `).concat(t+n,",").concat(r+i-o*p,` 638 A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+n-l*p,",").concat(r+i,` 639 L `).concat(t+l*p,",").concat(r+i,` 640 A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t,",").concat(r+i-o*p," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},bdt=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,s=r.y,o=r.width,l=r.height;if(Math.abs(o)>0&&Math.abs(l)>0){var u=Math.min(a,a+o),c=Math.max(a,a+o),d=Math.min(s,s+l),f=Math.max(s,s+l);return n>=u&&n<=c&&i>=d&&i<=f}return!1},wdt={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},O9=function(t){var r=Dee(Dee({},wdt),t),n=R.useRef(),i=R.useState(-1),a=fdt(i,2),s=a[0],o=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&o(w)}catch{}},[]);var l=r.x,u=r.y,c=r.width,d=r.height,f=r.radius,h=r.className,p=r.animationEasing,m=r.animationDuration,_=r.animationBegin,y=r.isAnimationActive,v=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||d!==+d||c===0||d===0)return null;var b=Dn("recharts-rectangle",h);return v?_e.createElement(ep,{canBegin:s>0,from:{width:c,height:d,x:l,y:u},to:{width:c,height:d,x:l,y:u},duration:m,animationEasing:p,isActive:v},function(w){var x=w.width,E=w.height,T=w.x,S=w.y;return _e.createElement(ep,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:_,duration:m,isActive:y,easing:p},_e.createElement("path",V3({},en(r,!0),{className:b,d:Lee(T,S,x,E,f),ref:n})))}):_e.createElement("path",V3({},en(r,!0),{className:b,d:Lee(l,u,c,d,f)}))},xdt=["points","className","baseLinePoints","connectNulls"];function $1(){return $1=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},$1.apply(this,arguments)}function Edt(e,t){if(e==null)return{};var r=Tdt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tdt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jee(e){return Pdt(e)||Cdt(e)||Adt(e)||Sdt()}function Sdt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 641In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Adt(e,t){if(e){if(typeof e=="string")return e8(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e8(e,t)}}function Cdt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pdt(e){if(Array.isArray(e))return e8(e)}function e8(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ree=function(t){return t&&t.x===+t.x&&t.y===+t.y},Mdt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Ree(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Ree(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},fT=function(t,r){var n=Mdt(t);r&&(n=[n.reduce(function(a,s){return[].concat(jee(a),jee(s))},[])]);var i=n.map(function(a){return a.reduce(function(s,o,l){return"".concat(s).concat(l===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},kdt=function(t,r,n){var i=fT(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(fT(r.reverse(),n).slice(1))},Odt=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,s=Edt(t,xdt);if(!r||!r.length)return null;var o=Dn("recharts-polygon",n);if(i&&i.length){var l=s.stroke&&s.stroke!=="none",u=kdt(r,i,a);return _e.createElement("g",{className:o},_e.createElement("path",$1({},en(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),l?_e.createElement("path",$1({},en(s,!0),{fill:"none",d:fT(r,a)})):null,l?_e.createElement("path",$1({},en(s,!0),{fill:"none",d:fT(i,a)})):null)}var c=fT(r,a);return _e.createElement("path",$1({},en(s,!0),{fill:c.slice(-1)==="Z"?s.fill:"none",className:o,d:c}))};function t8(){return t8=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},t8.apply(this,arguments)}var lI=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,s=Dn("recharts-dot",a);return r===+r&&n===+n&&i===+i?R.createElement("circle",t8({},en(t,!1),d3(t),{className:s,cx:r,cy:n,r:i})):null};function qS(e){"@babel/helpers - typeof";return qS=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},qS(e)}var Ndt=["x","y","top","left","width","height","className"];function r8(){return r8=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},r8.apply(this,arguments)}function $ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Idt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$ee(Object(r),!0).forEach(function(n){Ddt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$ee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ddt(e,t,r){return t=Ldt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ldt(e){var t=jdt(e,"string");return qS(t)=="symbol"?t:t+""}function jdt(e,t){if(qS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rdt(e,t){if(e==null)return{};var r=$dt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $dt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Fdt=function(t,r,n,i,a,s){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},Bdt=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.top,o=s===void 0?0:s,l=t.left,u=l===void 0?0:l,c=t.width,d=c===void 0?0:c,f=t.height,h=f===void 0?0:f,p=t.className,m=Rdt(t,Ndt),_=Idt({x:n,y:a,top:o,left:u,width:d,height:h},m);return!ar(n)||!ar(a)||!ar(d)||!ar(h)||!ar(o)||!ar(u)?null:_e.createElement("path",r8({},en(_,!0),{className:Dn("recharts-cross",p),d:Fdt(n,a,d,h,o,u)}))},zdt=nI,Udt=s1e,Wdt=v0;function Vdt(e,t){return e&&e.length?zdt(e,Wdt(t),Udt):void 0}var Hdt=Vdt;const Gdt=mi(Hdt);var qdt=nI,Kdt=v0,Ydt=o1e;function Xdt(e,t){return e&&e.length?qdt(e,Kdt(t),Ydt):void 0}var Qdt=Xdt;const Zdt=mi(Qdt);var Jdt=["cx","cy","angle","ticks","axisLine"],eft=["ticks","tick","angle","tickFormatter","stroke"];function bw(e){"@babel/helpers - typeof";return bw=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},bw(e)}function hT(){return hT=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},hT.apply(this,arguments)}function Fee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ry(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fee(Object(r),!0).forEach(function(n){uI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bee(e,t){if(e==null)return{};var r=tft(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tft(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y1e(n.key),n)}}function nft(e,t,r){return t&&zee(e.prototype,t),r&&zee(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ift(e,t,r){return t=H3(t),aft(e,K1e()?Reflect.construct(t,r||[],H3(e).constructor):t.apply(e,r))}function aft(e,t){if(t&&(bw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sft(e)}function sft(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K1e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K1e=function(){return!!e})()}function H3(e){return H3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},H3(e)}function oft(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n8(e,t)}function n8(e,t){return n8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},n8(e,t)}function uI(e,t,r){return t=Y1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y1e(e){var t=lft(e,"string");return bw(t)=="symbol"?t:t+""}function lft(e,t){if(bw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cI=function(e){function t(){return rft(this,t),ift(this,t,arguments)}return oft(t,e),nft(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,s=a.angle,o=a.cx,l=a.cy;return La(o,l,i,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,o=n.ticks,l=Gdt(o,function(c){return c.coordinate||0}),u=Zdt(o,function(c){return c.coordinate||0});return{cx:i,cy:a,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,o=n.ticks,l=n.axisLine,u=Bee(n,Jdt),c=o.reduce(function(p,m){return[Math.min(p[0],m.coordinate),Math.max(p[1],m.coordinate)]},[1/0,-1/0]),d=La(i,a,c[0],s),f=La(i,a,c[1],s),h=ry(ry(ry({},en(u,!1)),{},{fill:"none"},en(l,!1)),{},{x1:d.x,y1:d.y,x2:f.x,y2:f.y});return _e.createElement("line",hT({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,o=i.angle,l=i.tickFormatter,u=i.stroke,c=Bee(i,eft),d=this.getTickTextAnchor(),f=en(c,!1),h=en(s,!1),p=a.map(function(m,_){var y=n.getTickValueCoord(m),v=ry(ry(ry(ry({textAnchor:d,transform:"rotate(".concat(90-o,", ").concat(y.x,", ").concat(y.y,")")},f),{},{stroke:"none",fill:u},h),{},{index:_},y),{},{payload:m});return _e.createElement(bi,hT({className:Dn("recharts-polar-radius-axis-tick",D1e(s)),key:"tick-".concat(m.coordinate)},Bv(n.props,m,_)),t.renderTickItem(s,v,l?l(m.value,_):m.value))});return _e.createElement(bi,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,s=n.tick;return!i||!i.length?null:_e.createElement(bi,{className:Dn("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),tl.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var s;return _e.isValidElement(n)?s=_e.cloneElement(n,i):wn(n)?s=n(i):s=_e.createElement(zv,hT({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])}(R.PureComponent);uI(cI,"displayName","PolarRadiusAxis");uI(cI,"axisType","radiusAxis");uI(cI,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function ww(e){"@babel/helpers - typeof";return ww=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},ww(e)}function Ey(){return Ey=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},Ey.apply(this,arguments)}function Uee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ny(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uee(Object(r),!0).forEach(function(n){dI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Q1e(n.key),n)}}function cft(e,t,r){return t&&Wee(e.prototype,t),r&&Wee(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dft(e,t,r){return t=G3(t),fft(e,X1e()?Reflect.construct(t,r||[],G3(e).constructor):t.apply(e,r))}function fft(e,t){if(t&&(ww(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hft(e)}function hft(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X1e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X1e=function(){return!!e})()}function G3(e){return G3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},G3(e)}function pft(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i8(e,t)}function i8(e,t){return i8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},i8(e,t)}function dI(e,t,r){return t=Q1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q1e(e){var t=mft(e,"string");return ww(t)=="symbol"?t:t+""}function mft(e,t){if(ww(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ww(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gft=Math.PI/180,Vee=1e-5,fI=function(e){function t(){return uft(this,t),dft(this,t,arguments)}return pft(t,e),cft(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,s=i.cy,o=i.radius,l=i.orientation,u=i.tickSize,c=u||8,d=La(a,s,o,n.coordinate),f=La(a,s,o+(l==="inner"?-1:1)*c,n.coordinate);return{x1:d.x,y1:d.y,x2:f.x,y2:f.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*gft),s;return a>Vee?s=i==="outer"?"start":"end":a<-Vee?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.radius,o=n.axisLine,l=n.axisLineType,u=ny(ny({},en(this.props,!1)),{},{fill:"none"},en(o,!1));if(l==="circle")return _e.createElement(lI,Ey({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:s}));var c=this.props.ticks,d=c.map(function(f){return La(i,a,s,f.coordinate)});return _e.createElement(Odt,Ey({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,o=i.tickLine,l=i.tickFormatter,u=i.stroke,c=en(this.props,!1),d=en(s,!1),f=ny(ny({},c),{},{fill:"none"},en(o,!1)),h=a.map(function(p,m){var _=n.getTickLineCoord(p),y=n.getTickTextAnchor(p),v=ny(ny(ny({textAnchor:y},c),{},{stroke:"none",fill:u},d),{},{index:m,payload:p,x:_.x2,y:_.y2});return _e.createElement(bi,Ey({className:Dn("recharts-polar-angle-axis-tick",D1e(s)),key:"tick-".concat(p.coordinate)},Bv(n.props,p,m)),o&&_e.createElement("line",Ey({className:"recharts-polar-angle-axis-tick-line"},f,_)),s&&t.renderTickItem(s,v,l?l(p.value,m):p.value))});return _e.createElement(bi,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,s=n.axisLine;return a<=0||!i||!i.length?null:_e.createElement(bi,{className:Dn("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return _e.isValidElement(n)?s=_e.cloneElement(n,i):wn(n)?s=n(i):s=_e.createElement(zv,Ey({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])}(R.PureComponent);dI(fI,"displayName","PolarAngleAxis");dI(fI,"axisType","angleAxis");dI(fI,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var yft=n_e,vft=yft(Object.getPrototypeOf,Object),_ft=vft,bft=hm,wft=_ft,xft=pm,Eft="[object Object]",Tft=Function.prototype,Sft=Object.prototype,Z1e=Tft.toString,Aft=Sft.hasOwnProperty,Cft=Z1e.call(Object);function Pft(e){if(!xft(e)||bft(e)!=Eft)return!1;var t=wft(e);if(t===null)return!0;var r=Aft.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Z1e.call(r)==Cft}var Mft=Pft;const kft=mi(Mft);var Oft=hm,Nft=pm,Ift="[object Boolean]";function Dft(e){return e===!0||e===!1||Nft(e)&&Oft(e)==Ift}var Lft=Dft;const jft=mi(Lft);function KS(e){"@babel/helpers - typeof";return KS=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},KS(e)}function q3(){return q3=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},q3.apply(this,arguments)}function Rft(e,t){return zft(e)||Bft(e,t)||Fft(e,t)||$ft()}function $ft(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 642In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fft(e,t){if(e){if(typeof e=="string")return Hee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hee(e,t)}}function Hee(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bft(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function zft(e){if(Array.isArray(e))return e}function Gee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gee(Object(r),!0).forEach(function(n){Uft(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uft(e,t,r){return t=Wft(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wft(e){var t=Vft(e,"string");return KS(t)=="symbol"?t:t+""}function Vft(e,t){if(KS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(KS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kee=function(t,r,n,i,a){var s=n-i,o;return o="M ".concat(t,",").concat(r),o+="L ".concat(t+n,",").concat(r),o+="L ".concat(t+n-s/2,",").concat(r+a),o+="L ".concat(t+n-s/2-i,",").concat(r+a),o+="L ".concat(t,",").concat(r," Z"),o},Hft={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Gft=function(t){var r=qee(qee({},Hft),t),n=R.useRef(),i=R.useState(-1),a=Rft(i,2),s=a[0],o=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var b=n.current.getTotalLength();b&&o(b)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,d=r.lowerWidth,f=r.height,h=r.className,p=r.animationEasing,m=r.animationDuration,_=r.animationBegin,y=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||d!==+d||f!==+f||c===0&&d===0||f===0)return null;var v=Dn("recharts-trapezoid",h);return y?_e.createElement(ep,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:u},to:{upperWidth:c,lowerWidth:d,height:f,x:l,y:u},duration:m,animationEasing:p,isActive:y},function(b){var w=b.upperWidth,x=b.lowerWidth,E=b.height,T=b.x,S=b.y;return _e.createElement(ep,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:_,duration:m,easing:p},_e.createElement("path",q3({},en(r,!0),{className:v,d:Kee(T,S,w,x,E),ref:n})))}):_e.createElement("g",null,_e.createElement("path",q3({},en(r,!0),{className:v,d:Kee(l,u,c,d,f)})))},qft=["option","shapeType","propTransformer","activeClassName","isActive"];function YS(e){"@babel/helpers - typeof";return YS=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},YS(e)}function Kft(e,t){if(e==null)return{};var r=Yft(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Yft(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Yee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yee(Object(r),!0).forEach(function(n){Xft(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xft(e,t,r){return t=Qft(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qft(e){var t=Zft(e,"string");return YS(t)=="symbol"?t:t+""}function Zft(e,t){if(YS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(YS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jft(e,t){return K3(K3({},t),e)}function eht(e,t){return e==="symbols"}function Xee(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return _e.createElement(O9,r);case"trapezoid":return _e.createElement(Gft,r);case"sector":return _e.createElement(R1e,r);case"symbols":if(eht(t))return _e.createElement(YU,r);break;default:return null}}function tht(e){return R.isValidElement(e)?e.props:e}function J1e(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Jft:n,a=e.activeClassName,s=a===void 0?"recharts-active-shape":a,o=e.isActive,l=Kft(e,qft),u;if(R.isValidElement(t))u=R.cloneElement(t,K3(K3({},l),tht(t)));else if(wn(t))u=t(l);else if(kft(t)&&!jft(t)){var c=i(t,l);u=_e.createElement(Xee,{shapeType:r,elementProps:c})}else{var d=l;u=_e.createElement(Xee,{shapeType:r,elementProps:d})}return o?_e.createElement(bi,{className:s},u):u}function hI(e,t){return t!=null&&"trapezoids"in e.props}function pI(e,t){return t!=null&&"sectors"in e.props}function XS(e,t){return t!=null&&"points"in e.props}function rht(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function nht(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function iht(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function aht(e,t){var r;return hI(e,t)?r=rht:pI(e,t)?r=nht:XS(e,t)&&(r=iht),r}function sht(e,t){var r;return hI(e,t)?r="trapezoids":pI(e,t)?r="sectors":XS(e,t)&&(r="points"),r}function oht(e,t){if(hI(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(pI(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return XS(e,t)?t.payload:{}}function lht(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=sht(r,t),a=oht(r,t),s=n.filter(function(l,u){var c=yw(a,l),d=r.props[i].filter(function(p){var m=aht(r,t);return m(p,t)}),f=r.props[i].indexOf(d[d.length-1]),h=u===f;return c&&h}),o=n.indexOf(s[s.length-1]);return o}var Pk;function xw(e){"@babel/helpers - typeof";return xw=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},xw(e)}function F1(){return F1=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},F1.apply(this,arguments)}function Qee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qee(Object(r),!0).forEach(function(n){Bd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tbe(n.key),n)}}function cht(e,t,r){return t&&Zee(e.prototype,t),r&&Zee(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dht(e,t,r){return t=Y3(t),fht(e,ebe()?Reflect.construct(t,r||[],Y3(e).constructor):t.apply(e,r))}function fht(e,t){if(t&&(xw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hht(e)}function hht(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ebe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ebe=function(){return!!e})()}function Y3(e){return Y3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Y3(e)}function pht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a8(e,t)}function a8(e,t){return a8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},a8(e,t)}function Bd(e,t,r){return t=tbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tbe(e){var t=mht(e,"string");return xw(t)=="symbol"?t:t+""}function mht(e,t){if(xw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gm=function(e){function t(r){var n;return uht(this,t),n=dht(this,t,[r]),Bd(n,"pieRef",null),Bd(n,"sectorRefs",[]),Bd(n,"id",mx("recharts-pie-")),Bd(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),wn(i)&&i()}),Bd(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),wn(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return pht(t,e),cht(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.label,o=a.labelLine,l=a.dataKey,u=a.valueKey,c=en(this.props,!1),d=en(s,!1),f=en(o,!1),h=s&&s.offsetRadius||20,p=n.map(function(m,_){var y=(m.startAngle+m.endAngle)/2,v=La(m.cx,m.cy,m.outerRadius+h,y),b=Na(Na(Na(Na({},c),m),{},{stroke:"none"},d),{},{index:_,textAnchor:t.getTextAnchor(v.x,m.cx)},v),w=Na(Na(Na(Na({},c),m),{},{fill:"none",stroke:m.fill},f),{},{index:_,points:[La(m.cx,m.cy,m.outerRadius,y),v]}),x=l;return Ln(l)&&Ln(u)?x="value":Ln(l)&&(x=u),_e.createElement(bi,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(_)},o&&t.renderLabelLineItem(o,w,"line"),t.renderLabelItem(s,b,$o(m,x)))});return _e.createElement(bi,{className:"recharts-pie-labels"},p)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,s=a.activeShape,o=a.blendStroke,l=a.inactiveShape;return n.map(function(u,c){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&n.length!==1)return null;var d=i.isActiveIndex(c),f=l&&i.hasActiveIndex()?l:null,h=d?s:f,p=Na(Na({},u),{},{stroke:o?u.fill:u.stroke,tabIndex:-1});return _e.createElement(bi,F1({ref:function(_){_&&!i.sectorRefs.includes(_)&&i.sectorRefs.push(_)},tabIndex:-1,className:"recharts-pie-sector"},Bv(i.props,u,c),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(c)}),_e.createElement(J1e,F1({option:h,isActive:d,shapeType:"sector"},p)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,s=i.isAnimationActive,o=i.animationBegin,l=i.animationDuration,u=i.animationEasing,c=i.animationId,d=this.state,f=d.prevSectors,h=d.prevIsAnimationActive;return _e.createElement(ep,{begin:o,duration:l,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(c,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(p){var m=p.t,_=[],y=a&&a[0],v=y.startAngle;return a.forEach(function(b,w){var x=f&&f[w],E=w>0?Zc(b,"paddingAngle",0):0;if(x){var T=Ku(x.endAngle-x.startAngle,b.endAngle-b.startAngle),S=Na(Na({},b),{},{startAngle:v+E,endAngle:v+T(m)+E});_.push(S),v=S.endAngle}else{var A=b.endAngle,C=b.startAngle,k=Ku(0,A-C),M=k(m),D=Na(Na({},b),{},{startAngle:v+E,endAngle:v+M+E});_.push(D),v=D.endAngle}}),_e.createElement(bi,null,n.renderSectorsStatically(_))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var o=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!yw(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,s=i.sectors,o=i.className,l=i.label,u=i.cx,c=i.cy,d=i.innerRadius,f=i.outerRadius,h=i.isAnimationActive,p=this.state.isAnimationFinished;if(a||!s||!s.length||!ar(u)||!ar(c)||!ar(d)||!ar(f))return null;var m=Dn("recharts-pie",o);return _e.createElement(bi,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){n.pieRef=y}},this.renderSectors(),l&&this.renderLabels(s),tl.renderCallByParent(this.props,null,!1),(!h||p)&&Yp.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(_e.isValidElement(n))return _e.cloneElement(n,i);if(wn(n))return n(i);var s=Dn("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return _e.createElement(mb,F1({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,i,a){if(_e.isValidElement(n))return _e.cloneElement(n,i);var s=a;if(wn(n)&&(s=n(i),_e.isValidElement(s)))return s;var o=Dn("recharts-pie-label-text",typeof n!="boolean"&&!wn(n)?n.className:"");return _e.createElement(zv,F1({},i,{alignmentBaseline:"middle",className:o}),s)}}])}(R.PureComponent);Pk=gm;Bd(gm,"displayName","Pie");Bd(gm,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Vh.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Bd(gm,"parseDeltaAngle",function(e,t){var r=Tu(t-e),n=Math.min(Math.abs(t-e),360);return r*n});Bd(gm,"getRealPieData",function(e){var t=e.data,r=e.children,n=en(e,!1),i=Yd(r,XN);return t&&t.length?t.map(function(a,s){return Na(Na(Na({payload:a},n),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return Na(Na({},n),a.props)}):[]});Bd(gm,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,s=I1e(i,a),o=n+Su(e.cx,i,i/2),l=r+Su(e.cy,a,a/2),u=Su(e.innerRadius,s,0),c=Su(e.outerRadius,s,s*.8),d=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:o,cy:l,innerRadius:u,outerRadius:c,maxRadius:d}});Bd(gm,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?Na(Na({},t.type.defaultProps),t.props):t.props,i=Pk.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,s=n.startAngle,o=n.endAngle,l=n.paddingAngle,u=n.dataKey,c=n.nameKey,d=n.valueKey,f=n.tooltipType,h=Math.abs(n.minAngle),p=Pk.parseCoordinateOfPie(n,r),m=Pk.parseDeltaAngle(s,o),_=Math.abs(m),y=u;Ln(u)&&Ln(d)?(qp(!1,`Use "dataKey" to specify the value of pie,
643 the props "valueKey" will be deprecated in 1.1.0`),y="value"):Ln(u)&&(qp(!1,`Use "dataKey" to specify the value of pie, 644 the props "valueKey" will be deprecated in 1.1.0`),y=d);var v=i.filter(function(S){return $o(S,y,0)!==0}).length,b=(_>=360?v:v-1)*l,w=_-v*h-b,x=i.reduce(function(S,A){var C=$o(A,y,0);return S+(ar(C)?C:0)},0),E;if(x>0){var T;E=i.map(function(S,A){var C=$o(S,y,0),k=$o(S,c,A),M=(ar(C)?C:0)/x,D;A?D=T.endAngle+Tu(m)*l*(C!==0?1:0):D=s;var $=D+Tu(m)*((C!==0?h:0)+M*w),V=(D+$)/2,U=(p.innerRadius+p.outerRadius)/2,B=[{name:k,value:C,payload:S,dataKey:y,type:f}],z=La(p.cx,p.cy,U,V);return T=Na(Na(Na({percent:M,cornerRadius:a,name:k,tooltipPayload:B,midAngle:V,middleRadius:U,tooltipPosition:z},S),p),{},{value:$o(S,y),startAngle:D,endAngle:$,payload:S,paddingAngle:Tu(m)*l}),T})}return Na(Na({},p),{},{sectors:E,data:i})});var ght=Math.ceil,yht=Math.max;function vht(e,t,r,n){for(var i=-1,a=yht(ght((t-e)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=e,e+=r;return s}var _ht=vht,bht=w_e,Jee=1/0,wht=17976931348623157e292;function xht(e){if(!e)return e===0?e:0;if(e=bht(e),e===Jee||e===-Jee){var t=e<0?-1:1;return t*wht}return e===e?e:0}var Eht=xht,Tht=_ht,Sht=YN,gL=Eht;function Aht(e){return function(t,r,n){return n&&typeof n!="number"&&Sht(t,r,n)&&(r=n=void 0),t=gL(t),r===void 0?(r=t,t=0):r=gL(r),n=n===void 0?t<r?1:-1:gL(n),Tht(t,r,n,e)}}var Cht=Aht,Pht=Cht,Mht=Pht(),kht=Mht;const X3=mi(kht);function QS(e){"@babel/helpers - typeof";return QS=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},QS(e)}function ete(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tte(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ete(Object(r),!0).forEach(function(n){rbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ete(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rbe(e,t,r){return t=Oht(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oht(e){var t=Nht(e,"string");return QS(t)=="symbol"?t:t+""}function Nht(e,t){if(QS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(QS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iht=["Webkit","Moz","O","ms"],Dht=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=Iht.reduce(function(a,s){return tte(tte({},a),{},rbe({},s+n,r))},{});return i[t]=r,i};function Ew(e){"@babel/helpers - typeof";return Ew=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},Ew(e)}function Q3(){return Q3=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},Q3.apply(this,arguments)}function rte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rte(Object(r),!0).forEach(function(n){Cc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nte(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ibe(n.key),n)}}function jht(e,t,r){return t&&nte(e.prototype,t),r&&nte(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rht(e,t,r){return t=Z3(t),$ht(e,nbe()?Reflect.construct(t,r||[],Z3(e).constructor):t.apply(e,r))}function $ht(e,t){if(t&&(Ew(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fht(e)}function Fht(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nbe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nbe=function(){return!!e})()}function Z3(e){return Z3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z3(e)}function Bht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s8(e,t)}function s8(e,t){return s8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},s8(e,t)}function Cc(e,t,r){return t=ibe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ibe(e){var t=zht(e,"string");return Ew(t)=="symbol"?t:t+""}function zht(e,t){if(Ew(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ew(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uht=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,s=t.width,o=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=uT().domain(X3(0,l)).range([a,a+s-o]),c=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:c}},ite=function(t){return t.changedTouches&&!!t.changedTouches.length},Tw=function(e){function t(r){var n;return Lht(this,t),n=Rht(this,t,[r]),Cc(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Cc(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Cc(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,o=i.startIndex;s==null||s({endIndex:a,startIndex:o})}),n.detachDragEndListener()}),Cc(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Cc(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Cc(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Cc(n,"handleSlideDragStart",function(i){var a=ite(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}
vendor: 117,305 bytes, lines 644-654
644return Bht(t,e),jht(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,o=this.props,l=o.gap,u=o.data,c=u.length-1,d=Math.min(i,a),f=Math.max(i,a),h=t.getIndexInRange(s,d),p=t.getIndexInRange(s,f);return{startIndex:h-h%l,endIndex:p===c?c:p-p%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,o=i.dataKey,l=$o(a[n],o,n);return wn(s)?s(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,o=i.endX,l=this.props,u=l.x,c=l.width,d=l.travellerWidth,f=l.startIndex,h=l.endIndex,p=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+c-d-o,u+c-d-s):m<0&&(m=Math.max(m,u-s,u-o));var _=this.getIndex({startX:s+m,endX:o+m});(_.startIndex!==f||_.endIndex!==h)&&p&&p(_),this.setState({startX:s+m,endX:o+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=ite(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,o=i.endX,l=i.startX,u=this.state[s],c=this.props,d=c.x,f=c.width,h=c.travellerWidth,p=c.onChange,m=c.gap,_=c.data,y={startX:this.state.startX,endX:this.state.endX},v=n.pageX-a;v>0?v=Math.min(v,d+f-h-u):v<0&&(v=Math.max(v,d-u)),y[s]=u+v;var b=this.getIndex(y),w=b.startIndex,x=b.endIndex,E=function(){var S=_.length-1;return s==="startX"&&(o>l?w%m===0:x%m===0)||o<l&&x===S||s==="endX"&&(o>l?x%m===0:w%m===0)||o>l&&x===S};this.setState(Cc(Cc({},s,u+v),"brushMoveStartX",n.pageX),function(){p&&E()&&p(b)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,o=s.scaleValues,l=s.startX,u=s.endX,c=this.state[i],d=o.indexOf(c);if(d!==-1){var f=d+n;if(!(f===-1||f>=o.length)){var h=o[f];i==="startX"&&h>=u||i==="endX"&&h<=l||this.setState(Cc({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,o=n.height,l=n.fill,u=n.stroke;return _e.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:s,height:o})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,o=n.height,l=n.data,u=n.children,c=n.padding,d=R.Children.only(u);return d?_e.cloneElement(d,{x:i,y:a,width:s,height:o,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,o=this,l=this.props,u=l.y,c=l.travellerWidth,d=l.height,f=l.traveller,h=l.ariaLabel,p=l.data,m=l.startIndex,_=l.endIndex,y=Math.max(n,this.props.x),v=yL(yL({},en(this.props,!1)),{},{x:y,y:u,width:c,height:d}),b=h||"Min value: ".concat((a=p[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=p[_])===null||s===void 0?void 0:s.name);return _e.createElement(bi,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(x){["ArrowLeft","ArrowRight"].includes(x.key)&&(x.preventDefault(),x.stopPropagation(),o.handleTravellerMoveKeyboard(x.key==="ArrowRight"?1:-1,i))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,v))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,o=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,d=Math.max(Math.abs(i-n)-u,0);return _e.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:s,width:d,height:o})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,o=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,d=c.startX,f=c.endX,h=5,p={pointerEvents:"none",fill:u};return _e.createElement(bi,{className:"recharts-brush-texts"},_e.createElement(zv,Q3({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-h,y:s+o/2},p),this.getTextOfTick(i)),_e.createElement(zv,Q3({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+h,y:s+o/2},p),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,o=n.x,l=n.y,u=n.width,c=n.height,d=n.alwaysShowText,f=this.state,h=f.startX,p=f.endX,m=f.isTextActive,_=f.isSlideMoving,y=f.isTravellerMoving,v=f.isTravellerFocused;if(!i||!i.length||!ar(o)||!ar(l)||!ar(u)||!ar(c)||u<=0||c<=0)return null;var b=Dn("recharts-brush",a),w=_e.Children.count(s)===1,x=Dht("userSelect","none");return _e.createElement(bi,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:x},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(h,p),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(p,"endX"),(m||_||y||v||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,o=n.height,l=n.stroke,u=Math.floor(a+o/2)-1;return _e.createElement(_e.Fragment,null,_e.createElement("rect",{x:i,y:a,width:s,height:o,fill:l,stroke:"none"}),_e.createElement("line",{x1:i+1,y1:u,x2:i+s-1,y2:u,fill:"none",stroke:"#fff"}),_e.createElement("line",{x1:i+1,y1:u+2,x2:i+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return _e.isValidElement(n)?a=_e.cloneElement(n,i):wn(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,o=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,d=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return yL({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:o,prevWidth:s},a&&a.length?Uht({data:a,width:s,x:o,travellerWidth:l,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||o!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([o,o+s-l]);var f=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:o,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,o=a-1;o-s>1;){var l=Math.floor((s+o)/2);n[l]>i?o=l:s=l}return i>=n[o]?o:s}}])}(R.PureComponent);Cc(Tw,"displayName","Brush");Cc(Tw,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Wht=n9;function Vht(e,t){var r;return Wht(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Hht=Vht,Ght=Yve,qht=v0,Kht=Hht,Yht=dc,Xht=YN;function Qht(e,t,r){var n=Yht(e)?Ght:Kht;return r&&Xht(e,t,r)&&(t=void 0),n(e,qht(t))}var Zht=Qht;const Jht=mi(Zht);var Gh=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},ate=g_e;function ept(e,t,r){t=="__proto__"&&ate?ate(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var tpt=ept,rpt=tpt,npt=p_e,ipt=v0;function apt(e,t){var r={};return t=ipt(t),npt(e,function(n,i,a){rpt(r,i,t(n,i,a))}),r}var spt=apt;const opt=mi(spt);function lpt(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var upt=lpt,cpt=n9;function dpt(e,t){var r=!0;return cpt(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var fpt=dpt,hpt=upt,ppt=fpt,mpt=v0,gpt=dc,ypt=YN;function vpt(e,t,r){var n=gpt(e)?hpt:ppt;return r&&ypt(e,t,r)&&(t=void 0),n(e,mpt(t))}var _pt=vpt;const bpt=mi(_pt);var wpt=["x","y"];function ZS(e){"@babel/helpers - typeof";return ZS=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},ZS(e)}function o8(){return o8=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},o8.apply(this,arguments)}function ste(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ste(Object(r),!0).forEach(function(n){xpt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ste(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xpt(e,t,r){return t=Ept(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ept(e){var t=Tpt(e,"string");return ZS(t)=="symbol"?t:t+""}function Tpt(e,t){if(ZS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ZS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Spt(e,t){if(e==null)return{};var r=Apt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Apt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Cpt(e,t){var r=e.x,n=e.y,i=Spt(e,wpt),a="".concat(r),s=parseInt(a,10),o="".concat(n),l=parseInt(o,10),u="".concat(t.height||i.height),c=parseInt(u,10),d="".concat(t.width||i.width),f=parseInt(d,10);return F2(F2(F2(F2(F2({},t),i),s?{x:s}:{}),l?{y:l}:{}),{},{height:c,width:f,name:t.name,radius:t.radius})}function ote(e){return _e.createElement(J1e,o8({shapeType:"rectangle",propTransformer:Cpt,activeClassName:"recharts-active-bar"},e))}var Ppt=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=ar(n)||qGe(n);return a?t(n,i):(a||Wv(),r)}},Mpt=["value","background"],abe;function Sw(e){"@babel/helpers - typeof";return Sw=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},Sw(e)}function kpt(e,t){if(e==null)return{};var r=Opt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Opt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function J3(){return J3=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},J3.apply(this,arguments)}function lte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function so(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lte(Object(r),!0).forEach(function(n){Tg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Npt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ute(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,obe(n.key),n)}}function Ipt(e,t,r){return t&&ute(e.prototype,t),r&&ute(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dpt(e,t,r){return t=eO(t),Lpt(e,sbe()?Reflect.construct(t,r||[],eO(e).constructor):t.apply(e,r))}function Lpt(e,t){if(t&&(Sw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jpt(e)}function jpt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sbe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sbe=function(){return!!e})()}function eO(e){return eO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},eO(e)}function Rpt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l8(e,t)}function l8(e,t){return l8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},l8(e,t)}function Tg(e,t,r){return t=obe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function obe(e){var t=$pt(e,"string");return Sw(t)=="symbol"?t:t+""}function $pt(e,t){if(Sw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d_=function(e){function t(){var r;Npt(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Dpt(this,t,[].concat(i)),Tg(r,"state",{isAnimationFinished:!1}),Tg(r,"id",mx("recharts-bar-")),Tg(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),Tg(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return Rpt(t,e),Ipt(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,s=a.shape,o=a.dataKey,l=a.activeIndex,u=a.activeBar,c=en(this.props,!1);return n&&n.map(function(d,f){var h=f===l,p=h?u:s,m=so(so(so({},c),d),{},{isActive:h,option:p,index:f,dataKey:o,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return _e.createElement(bi,J3({className:"recharts-bar-rectangle"},Bv(i.props,d,f),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(f)}),_e.createElement(ote,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,s=i.layout,o=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,c=i.animationEasing,d=i.animationId,f=this.state.prevData;return _e.createElement(ep,{begin:l,duration:u,isActive:o,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var p=h.t,m=a.map(function(_,y){var v=f&&f[y];if(v){var b=Ku(v.x,_.x),w=Ku(v.y,_.y),x=Ku(v.width,_.width),E=Ku(v.height,_.height);return so(so({},_),{},{x:b(p),y:w(p),width:x(p),height:E(p)})}if(s==="horizontal"){var T=Ku(0,_.height),S=T(p);return so(so({},_),{},{y:_.y+_.height-S,height:S})}var A=Ku(0,_.width),C=A(p);return so(so({},_),{},{width:C})});return _e.createElement(bi,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!yw(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,s=i.dataKey,o=i.activeIndex,l=en(this.props.background,!1);return a.map(function(u,c){u.value;var d=u.background,f=kpt(u,Mpt);if(!d)return null;var h=so(so(so(so(so({},f),{},{fill:"#eee"},d),l),Bv(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:c,className:"recharts-bar-background-rectangle"});return _e.createElement(ote,J3({key:"background-bar-".concat(c),option:n.props.background,isActive:c===o},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,o=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,d=Yd(c,oI);if(!d)return null;var f=u==="vertical"?s[0].height/2:s[0].width/2,h=function(_,y){var v=Array.isArray(_.value)?_.value[1]:_.value;return{x:_.x,y:_.y,value:v,errorVal:$o(_,y)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return _e.createElement(bi,p,d.map(function(m){return _e.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:s,xAxis:o,yAxis:l,layout:u,offset:f,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,s=n.className,o=n.xAxis,l=n.yAxis,u=n.left,c=n.top,d=n.width,f=n.height,h=n.isAnimationActive,p=n.background,m=n.id;if(i||!a||!a.length)return null;var _=this.state.isAnimationFinished,y=Dn("recharts-bar",s),v=o&&o.allowDataOverflow,b=l&&l.allowDataOverflow,w=v||b,x=Ln(m)?this.id:m;return _e.createElement(bi,{className:y},v||b?_e.createElement("defs",null,_e.createElement("clipPath",{id:"clipPath-".concat(x)},_e.createElement("rect",{x:v?u:u-d/2,y:b?c:c-f/2,width:v?d:d*2,height:b?f:f*2}))):null,_e.createElement(bi,{className:"recharts-bar-rectangles",clipPath:w?"url(#clipPath-".concat(x,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(w,x),(!h||_)&&Yp.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(R.PureComponent);abe=d_;Tg(d_,"displayName","Bar");Tg(d_,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Vh.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Tg(d_,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,s=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,d=e.displayedData,f=e.offset,h=glt(n,r);if(!h)return null;var p=t.layout,m=r.type.defaultProps,_=m!==void 0?so(so({},m),r.props):r.props,y=_.dataKey,v=_.children,b=_.minPointSize,w=p==="horizontal"?s:a,x=u?w.scale.domain():null,E=Elt({numericAxis:w}),T=Yd(v,XN),S=d.map(function(A,C){var k,M,D,$,V,U;u?k=ylt(u[c+C],x):(k=$o(A,y),Array.isArray(k)||(k=[E,k]));var B=Ppt(b,abe.defaultProps.minPointSize)(k[1],C);if(p==="horizontal"){var z,q=[s.scale(k[0]),s.scale(k[1])],L=q[0],K=q[1];M=ZJ({axis:a,ticks:o,bandSize:i,offset:h.offset,entry:A,index:C}),D=(z=K??L)!==null&&z!==void 0?z:void 0,$=h.size;var O=L-K;if(V=Number.isNaN(O)?0:O,U={x:M,y:s.y,width:$,height:s.height},Math.abs(B)>0&&Math.abs(V)<Math.abs(B)){var N=Tu(V||B)*(Math.abs(B)-Math.abs(V));D-=N,V+=N}}else{var X=[a.scale(k[0]),a.scale(k[1])],ie=X[0],ee=X[1];if(M=ie,D=ZJ({axis:s,ticks:l,bandSize:i,offset:h.offset,entry:A,index:C}),$=ee-ie,V=h.size,U={x:a.x,y:D,width:a.width,height:V},Math.abs(B)>0&&Math.abs($)<Math.abs(B)){var le=Tu($||B)*(Math.abs(B)-Math.abs($));$+=le}}return so(so(so({},A),{},{x:M,y:D,width:$,height:V,value:u?k:k[1],payload:A,background:U},T&&T[C]&&T[C].props),{},{tooltipPayload:[O1e(r,A)],tooltipPosition:{x:M+$/2,y:D+V/2}})});return so({data:S,layout:p},f)});function JS(e){"@babel/helpers - typeof";return JS=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},JS(e)}function Fpt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cte(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lbe(n.key),n)}}function Bpt(e,t,r){return t&&cte(e.prototype,t),r&&cte(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dte(Object(r),!0).forEach(function(n){mI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mI(e,t,r){return t=lbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lbe(e){var t=zpt(e,"string");return JS(t)=="symbol"?t:t+""}function zpt(e,t){if(JS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(JS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ube=function(t,r,n,i,a){var s=t.width,o=t.height,l=t.layout,u=t.children,c=Object.keys(r),d={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},f=!!Nc(u,d_);return c.reduce(function(h,p){var m=r[p],_=m.orientation,y=m.domain,v=m.padding,b=v===void 0?{}:v,w=m.mirror,x=m.reversed,E="".concat(_).concat(w?"Mirror":""),T,S,A,C,k;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var M=y[1]-y[0],D=1/0,$=m.categoricalDomain.sort(XGe);if($.forEach(function(X,ie){ie>0&&(D=Math.min((X||0)-($[ie-1]||0),D))}),Number.isFinite(D)){var V=D/M,U=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(T=V*U/2),m.padding==="no-gap"){var B=Su(t.barCategoryGap,V*U),z=V*U/2;T=z-B-(z-B)/U*B}}}i==="xAxis"?S=[n.left+(b.left||0)+(T||0),n.left+n.width-(b.right||0)-(T||0)]:i==="yAxis"?S=l==="horizontal"?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(T||0),n.top+n.height-(b.bottom||0)-(T||0)]:S=m.range,x&&(S=[S[1],S[0]]);var q=C1e(m,a,f),L=q.scale,K=q.realScaleType;L.domain(y).range(S),P1e(L);var O=M1e(L,jf(jf({},m),{},{realScaleType:K}));i==="xAxis"?(k=_==="top"&&!w||_==="bottom"&&w,A=n.left,C=d[E]-k*m.height):i==="yAxis"&&(k=_==="left"&&!w||_==="right"&&w,A=d[E]-k*m.width,C=n.top);var N=jf(jf(jf({},m),O),{},{realScaleType:K,x:A,y:C,scale:L,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return N.bandSize=$3(N,O),!m.hide&&i==="xAxis"?d[E]+=(k?-1:1)*N.height:m.hide||(d[E]+=(k?-1:1)*N.width),jf(jf({},h),{},mI({},p,N))},{})},cbe=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},Upt=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return cbe({x:r,y:n},{x:i,y:a})},dbe=function(){function e(t){Fpt(this,e),this.scale=t}return Bpt(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(r)+o}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();mI(dbe,"EPS",1e-4);var N9=function(t){var r=Object.keys(t).reduce(function(n,i){return jf(jf({},n),{},mI({},i,dbe.create(t[i])))},{});return jf(jf({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,o=a.position;return opt(i,function(l,u){return r[u].apply(l,{bandAware:s,position:o})})},isInRange:function(i){return bpt(i,function(a,s){return r[s].isInRange(a)})}})};function Wpt(e){return(e%180+180)%180}var Vpt=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Wpt(i),s=a*Math.PI/180,o=Math.atan(n/r),l=s>o&&s<Math.PI-o?n/Math.sin(s):r/Math.cos(s);return Math.abs(l)},Hpt=QHe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),fbe=R.createContext(void 0),hbe=R.createContext(void 0),pbe=R.createContext(void 0),Gpt=R.createContext({}),mbe=R.createContext(void 0),gbe=R.createContext(0),ybe=R.createContext(0),fte=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=t.clipPathId,o=t.children,l=t.width,u=t.height,c=Hpt(a);return _e.createElement(fbe.Provider,{value:n},_e.createElement(hbe.Provider,{value:i},_e.createElement(Gpt.Provider,{value:a},_e.createElement(pbe.Provider,{value:c},_e.createElement(mbe.Provider,{value:s},_e.createElement(gbe.Provider,{value:u},_e.createElement(ybe.Provider,{value:l},o)))))))},qpt=function(){return R.useContext(mbe)},vbe=function(t){var r=R.useContext(fbe);r==null&&Wv();var n=r[t];return n==null&&Wv(),n},_be=function(t){var r=R.useContext(hbe);r==null&&Wv();var n=r[t];return n==null&&Wv(),n},Kpt=function(){var t=R.useContext(pbe);return t},bbe=function(){return R.useContext(ybe)},wbe=function(){return R.useContext(gbe)};function Aw(e){"@babel/helpers - typeof";return Aw=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},Aw(e)}function Ypt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xpt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ebe(n.key),n)}}function Qpt(e,t,r){return t&&Xpt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zpt(e,t,r){return t=tO(t),Jpt(e,xbe()?Reflect.construct(t,r||[],tO(e).constructor):t.apply(e,r))}function Jpt(e,t){if(t&&(Aw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return emt(e)}function emt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xbe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xbe=function(){return!!e})()}function tO(e){return tO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tO(e)}function tmt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u8(e,t)}function u8(e,t){return u8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},u8(e,t)}function hte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pte(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hte(Object(r),!0).forEach(function(n){I9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I9(e,t,r){return t=Ebe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ebe(e){var t=rmt(e,"string");return Aw(t)=="symbol"?t:t+""}function rmt(e,t){if(Aw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Aw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nmt(e,t){return omt(e)||smt(e,t)||amt(e,t)||imt()}function imt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 645In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function amt(e,t){if(e){if(typeof e=="string")return mte(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mte(e,t)}}function mte(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function smt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function omt(e){if(Array.isArray(e))return e}function c8(){return c8=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},c8.apply(this,arguments)}var lmt=function(t,r){var n;return _e.isValidElement(t)?n=_e.cloneElement(t,r):wn(t)?n=t(r):n=_e.createElement("line",c8({},r,{className:"recharts-reference-line-line"})),n},umt=function(t,r,n,i,a,s,o,l,u){var c=a.x,d=a.y,f=a.width,h=a.height;if(n){var p=u.y,m=t.y.apply(p,{position:s});if(Gh(u,"discard")&&!t.y.isInRange(m))return null;var _=[{x:c+f,y:m},{x:c,y:m}];return l==="left"?_.reverse():_}if(r){var y=u.x,v=t.x.apply(y,{position:s});if(Gh(u,"discard")&&!t.x.isInRange(v))return null;var b=[{x:v,y:d+h},{x:v,y:d}];return o==="top"?b.reverse():b}if(i){var w=u.segment,x=w.map(function(E){return t.apply(E,{position:s})});return Gh(u,"discard")&&Jht(x,function(E){return!t.isInRange(E)})?null:x}return null};function cmt(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,s=e.shape,o=e.className,l=e.alwaysShow,u=qpt(),c=vbe(i),d=_be(a),f=Kpt();if(!u||!f)return null;qp(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=N9({x:c.scale,y:d.scale}),p=Bo(t),m=Bo(r),_=n&&n.length===2,y=umt(h,p,m,_,f,e.position,c.orientation,d.orientation,e);if(!y)return null;var v=nmt(y,2),b=v[0],w=b.x,x=b.y,E=v[1],T=E.x,S=E.y,A=Gh(e,"hidden")?"url(#".concat(u,")"):void 0,C=pte(pte({clipPath:A},en(e,!0)),{},{x1:w,y1:x,x2:T,y2:S});return _e.createElement(bi,{className:Dn("recharts-reference-line",o)},lmt(s,C),tl.renderCallByParent(e,Upt({x1:w,y1:x,x2:T,y2:S})))}var D9=function(e){function t(){return Ypt(this,t),Zpt(this,t,arguments)}return tmt(t,e),Qpt(t,[{key:"render",value:function(){return _e.createElement(cmt,this.props)}}])}(_e.Component);I9(D9,"displayName","ReferenceLine");I9(D9,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function d8(){return d8=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},d8.apply(this,arguments)}function Cw(e){"@babel/helpers - typeof";return Cw=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},Cw(e)}function gte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yte(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gte(Object(r),!0).forEach(function(n){gI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dmt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fmt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sbe(n.key),n)}}function hmt(e,t,r){return t&&fmt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pmt(e,t,r){return t=rO(t),mmt(e,Tbe()?Reflect.construct(t,r||[],rO(e).constructor):t.apply(e,r))}function mmt(e,t){if(t&&(Cw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gmt(e)}function gmt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tbe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Tbe=function(){return!!e})()}function rO(e){return rO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rO(e)}function ymt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f8(e,t)}function f8(e,t){return f8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},f8(e,t)}function gI(e,t,r){return t=Sbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sbe(e){var t=vmt(e,"string");return Cw(t)=="symbol"?t:t+""}function vmt(e,t){if(Cw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _mt=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,s=N9({x:i.scale,y:a.scale}),o=s.apply({x:r,y:n},{bandAware:!0});return Gh(t,"discard")&&!s.isInRange(o)?null:o},yI=function(e){function t(){return dmt(this,t),pmt(this,t,arguments)}return ymt(t,e),hmt(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,s=n.r,o=n.alwaysShow,l=n.clipPathId,u=Bo(i),c=Bo(a);if(qp(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var d=_mt(this.props);if(!d)return null;var f=d.x,h=d.y,p=this.props,m=p.shape,_=p.className,y=Gh(this.props,"hidden")?"url(#".concat(l,")"):void 0,v=yte(yte({clipPath:y},en(this.props,!0)),{},{cx:f,cy:h});return _e.createElement(bi,{className:Dn("recharts-reference-dot",_)},t.renderDot(m,v),tl.renderCallByParent(this.props,{x:f-s,y:h-s,width:2*s,height:2*s}))}}])}(_e.Component);gI(yI,"displayName","ReferenceDot");gI(yI,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});gI(yI,"renderDot",function(e,t){var r;return _e.isValidElement(e)?r=_e.cloneElement(e,t):wn(e)?r=e(t):r=_e.createElement(lI,d8({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function h8(){return h8=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},h8.apply(this,arguments)}function Pw(e){"@babel/helpers - typeof";return Pw=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},Pw(e)}function vte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vte(Object(r),!0).forEach(function(n){vI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bmt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wmt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Cbe(n.key),n)}}function xmt(e,t,r){return t&&wmt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Emt(e,t,r){return t=nO(t),Tmt(e,Abe()?Reflect.construct(t,r||[],nO(e).constructor):t.apply(e,r))}function Tmt(e,t){if(t&&(Pw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Smt(e)}function Smt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Abe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Abe=function(){return!!e})()}function nO(e){return nO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nO(e)}function Amt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p8(e,t)}function p8(e,t){return p8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},p8(e,t)}function vI(e,t,r){return t=Cbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cbe(e){var t=Cmt(e,"string");return Pw(t)=="symbol"?t:t+""}function Cmt(e,t){if(Pw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pmt=function(t,r,n,i,a){var s=a.x1,o=a.x2,l=a.y1,u=a.y2,c=a.xAxis,d=a.yAxis;if(!c||!d)return null;var f=N9({x:c.scale,y:d.scale}),h={x:t?f.x.apply(s,{position:"start"}):f.x.rangeMin,y:n?f.y.apply(l,{position:"start"}):f.y.rangeMin},p={x:r?f.x.apply(o,{position:"end"}):f.x.rangeMax,y:i?f.y.apply(u,{position:"end"}):f.y.rangeMax};return Gh(a,"discard")&&(!f.isInRange(h)||!f.isInRange(p))?null:cbe(h,p)},_I=function(e){function t(){return bmt(this,t),Emt(this,t,arguments)}return Amt(t,e),xmt(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,s=n.y1,o=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;qp(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Bo(i),f=Bo(a),h=Bo(s),p=Bo(o),m=this.props.shape;if(!d&&!f&&!h&&!p&&!m)return null;var _=Pmt(d,f,h,p,this.props);if(!_&&!m)return null;var y=Gh(this.props,"hidden")?"url(#".concat(c,")"):void 0;return _e.createElement(bi,{className:Dn("recharts-reference-area",l)},t.renderRect(m,_te(_te({clipPath:y},en(this.props,!0)),_)),tl.renderCallByParent(this.props,_))}}])}(_e.Component);vI(_I,"displayName","ReferenceArea");vI(_I,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});vI(_I,"renderRect",function(e,t){var r;return _e.isValidElement(e)?r=_e.cloneElement(e,t):wn(e)?r=e(t):r=_e.createElement(O9,h8({},t,{className:"recharts-reference-area-rect"})),r});function Pbe(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function Mmt(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Vpt(n,r)}function kmt(e,t,r){var n=r==="width",i=e.x,a=e.y,s=e.width,o=e.height;return t===1?{start:n?i:a,end:n?i+s:a+o}:{start:n?i+s:a+o,end:n?i:a}}function iO(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Omt(e,t){return Pbe(e,t+1)}function Nmt(e,t,r,n,i){for(var a=(n||[]).slice(),s=t.start,o=t.end,l=0,u=1,c=s,d=function(){var p=n==null?void 0:n[l];if(p===void 0)return{v:Pbe(n,u)};var m=l,_,y=function(){return _===void 0&&(_=r(p,m)),_},v=p.coordinate,b=l===0||iO(e,v,y,c,o);b||(l=0,c=s,u+=1),b&&(c=v+e*(y()/2+i),l+=u)},f;u<=a.length;)if(f=d(),f)return f.v;return[]}function eA(e){"@babel/helpers - typeof";return eA=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},eA(e)}function bte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bte(Object(r),!0).forEach(function(n){Imt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Imt(e,t,r){return t=Dmt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dmt(e){var t=Lmt(e,"string");return eA(t)=="symbol"?t:t+""}function Lmt(e,t){if(eA(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(eA(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jmt(e,t,r,n,i){for(var a=(n||[]).slice(),s=a.length,o=t.start,l=t.end,u=function(f){var h=a[f],p,m=function(){return p===void 0&&(p=r(h,f)),p};if(f===s-1){var _=e*(h.coordinate+e*m()/2-l);a[f]=h=Ul(Ul({},h),{},{tickCoord:_>0?h.coordinate-_*e:h.coordinate})}else a[f]=h=Ul(Ul({},h),{},{tickCoord:h.coordinate});var y=iO(e,h.tickCoord,m,o,l);y&&(l=h.tickCoord-e*(m()/2+i),a[f]=Ul(Ul({},h),{},{isShow:!0}))},c=s-1;c>=0;c--)u(c);return a}function Rmt(e,t,r,n,i,a){var s=(n||[]).slice(),o=s.length,l=t.start,u=t.end;if(a){var c=n[o-1],d=r(c,o-1),f=e*(c.coordinate+e*d/2-u);s[o-1]=c=Ul(Ul({},c),{},{tickCoord:f>0?c.coordinate-f*e:c.coordinate});var h=iO(e,c.tickCoord,function(){return d},l,u);h&&(u=c.tickCoord-e*(d/2+i),s[o-1]=Ul(Ul({},c),{},{isShow:!0}))}for(var p=a?o-1:o,m=function(v){var b=s[v],w,x=function(){return w===void 0&&(w=r(b,v)),w};if(v===0){var E=e*(b.coordinate-e*x()/2-l);s[v]=b=Ul(Ul({},b),{},{tickCoord:E<0?b.coordinate-E*e:b.coordinate})}else s[v]=b=Ul(Ul({},b),{},{tickCoord:b.coordinate});var T=iO(e,b.tickCoord,x,l,u);T&&(l=b.tickCoord+e*(x()/2+i),s[v]=Ul(Ul({},b),{},{isShow:!0}))},_=0;_<p;_++)m(_);return s}function $mt(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,s=e.minTickGap,o=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,d=e.angle;if(!i||!i.length||!n)return[];if(ar(l)||Vh.isSsr)return Omt(i,typeof l=="number"&&ar(l)?l:0);var f=[],h=o==="top"||o==="bottom"?"width":"height",p=c&&h==="width"?lT(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(b,w){var x=wn(u)?u(b.value,w):b.value;return h==="width"?Mmt(lT(x,{fontSize:t,letterSpacing:r}),p,d):lT(x,{fontSize:t,letterSpacing:r})[h]},_=i.length>=2?Tu(i[1].coordinate-i[0].coordinate):1,y=kmt(a,_,h);return l==="equidistantPreserveStart"?Nmt(_,y,m,i,s):(l==="preserveStart"||l==="preserveStartEnd"?f=Rmt(_,y,m,i,s,l==="preserveStartEnd"):f=jmt(_,y,m,i,s),f.filter(function(v){return v.isShow}))}var Fmt=["viewBox"],Bmt=["viewBox"],zmt=["ticks"];function Mw(e){"@babel/helpers - typeof";return Mw=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},Mw(e)}function B1(){return B1=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},B1.apply(this,arguments)}function wte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Po(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wte(Object(r),!0).forEach(function(n){L9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vL(e,t){if(e==null)return{};var r=Umt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Umt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Wmt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xte(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kbe(n.key),n)}}function Vmt(e,t,r){return t&&xte(e.prototype,t),r&&xte(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hmt(e,t,r){return t=aO(t),Gmt(e,Mbe()?Reflect.construct(t,r||[],aO(e).constructor):t.apply(e,r))}function Gmt(e,t){if(t&&(Mw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qmt(e)}function qmt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mbe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mbe=function(){return!!e})()}function aO(e){return aO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},aO(e)}function Kmt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m8(e,t)}function m8(e,t){return m8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},m8(e,t)}function L9(e,t,r){return t=kbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kbe(e){var t=Ymt(e,"string");return Mw(t)=="symbol"?t:t+""}function Ymt(e,t){if(Mw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Mw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bI=function(e){function t(r){var n;return Wmt(this,t),n=Hmt(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Kmt(t,e),Vmt(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,s=vL(n,Fmt),o=this.props,l=o.viewBox,u=vL(o,Bmt);return!db(a,l)||!db(s,u)||!db(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,s=i.y,o=i.width,l=i.height,u=i.orientation,c=i.tickSize,d=i.mirror,f=i.tickMargin,h,p,m,_,y,v,b=d?-1:1,w=n.tickSize||c,x=ar(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=p=n.coordinate,_=s+ +!d*l,m=_-b*w,v=m-b*f,y=x;break;case"left":m=_=n.coordinate,p=a+ +!d*o,h=p-b*w,y=h-b*f,v=x;break;case"right":m=_=n.coordinate,p=a+ +d*o,h=p+b*w,y=h+b*f,v=x;break;default:h=p=n.coordinate,_=s+ +d*l,m=_+b*w,v=m+b*f,y=x;break}return{line:{x1:h,y1:m,x2:p,y2:_},tick:{x:y,y:v}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,o=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,d=Po(Po(Po({},en(this.props,!1)),en(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var f=+(l==="top"&&!u||l==="bottom"&&u);d=Po(Po({},d),{},{x1:i,y1:a+f*o,x2:i+s,y2:a+f*o})}else{var h=+(l==="left"&&!u||l==="right"&&u);d=Po(Po({},d),{},{x1:i+h*s,y1:a,x2:i+h*s,y2:a+o})}return _e.createElement("line",B1({},d,{className:Dn("recharts-cartesian-axis-line",Zc(c,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var s=this,o=this.props,l=o.tickLine,u=o.stroke,c=o.tick,d=o.tickFormatter,f=o.unit,h=$mt(Po(Po({},this.props),{},{ticks:n}),i,a),p=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),_=en(this.props,!1),y=en(c,!1),v=Po(Po({},_),{},{fill:"none"},en(l,!1)),b=h.map(function(w,x){var E=s.getTickLineCoord(w),T=E.line,S=E.tick,A=Po(Po(Po(Po({textAnchor:p,verticalAnchor:m},_),{},{stroke:"none",fill:u},y),S),{},{index:x,payload:w,visibleTicksCount:h.length,tickFormatter:d});return _e.createElement(bi,B1({className:"recharts-cartesian-axis-tick",key:"tick-".concat(w.value,"-").concat(w.coordinate,"-").concat(w.tickCoord)},Bv(s.props,w,x)),l&&_e.createElement("line",B1({},v,T,{className:Dn("recharts-cartesian-axis-tick-line",Zc(l,"className"))})),c&&t.renderTickItem(c,A,"".concat(wn(d)?d(w.value,x):w.value).concat(f||"")))});return _e.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,s=i.width,o=i.height,l=i.ticksGenerator,u=i.className,c=i.hide;if(c)return null;var d=this.props,f=d.ticks,h=vL(d,zmt),p=f;return wn(l)&&(p=f&&f.length>0?l(this.props):l(h)),s<=0||o<=0||!p||!p.length?null:_e.createElement(bi,{className:Dn("recharts-cartesian-axis",u),ref:function(_){n.layerReference=_}},a&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),tl.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,o=Dn(i.className,"recharts-cartesian-axis-tick-value");return _e.isValidElement(n)?s=_e.cloneElement(n,Po(Po({},i),{},{className:o})):wn(n)?s=n(Po(Po({},i),{},{className:o})):s=_e.createElement(zv,B1({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])}(R.Component);L9(bI,"displayName","CartesianAxis");L9(bI,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Xmt=["layout","type","stroke","connectNulls","isRange","ref"],Qmt=["key"],Obe;function kw(e){"@babel/helpers - typeof";return kw=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},kw(e)}function Nbe(e,t){if(e==null)return{};var r=Zmt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Zmt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function By(){return By=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},By.apply(this,arguments)}function Ete(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ete(Object(r),!0).forEach(function(n){Rh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ete(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jmt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tte(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Dbe(n.key),n)}}function egt(e,t,r){return t&&Tte(e.prototype,t),r&&Tte(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tgt(e,t,r){return t=sO(t),rgt(e,Ibe()?Reflect.construct(t,r||[],sO(e).constructor):t.apply(e,r))}function rgt(e,t){if(t&&(kw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ngt(e)}function ngt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ibe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ibe=function(){return!!e})()}function sO(e){return sO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sO(e)}function igt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g8(e,t)}function g8(e,t){return g8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},g8(e,t)}function Rh(e,t,r){return t=Dbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dbe(e){var t=agt(e,"string");return kw(t)=="symbol"?t:t+""}function agt(e,t){if(kw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x0=function(e){function t(){var r;Jmt(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=tgt(this,t,[].concat(i)),Rh(r,"state",{isAnimationFinished:!0}),Rh(r,"id",mx("recharts-area-")),Rh(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),wn(s)&&s()}),Rh(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),wn(s)&&s()}),r}return igt(t,e),egt(t,[{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive,o=this.state.isAnimationFinished;if(s&&!o)return null;var l=this.props,u=l.dot,c=l.points,d=l.dataKey,f=en(this.props,!1),h=en(u,!0),p=c.map(function(_,y){var v=Hm(Hm(Hm({key:"dot-".concat(y),r:3},f),h),{},{index:y,cx:_.x,cy:_.y,dataKey:d,value:_.value,payload:_.payload,points:c});return t.renderDotItem(u,v)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return _e.createElement(bi,By({className:"recharts-area-dots"},m),p)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,o=i.strokeWidth,l=s[0].x,u=s[s.length-1].x,c=n*Math.abs(l-u),d=Eg(s.map(function(f){return f.y||0}));return ar(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(Eg(a.map(function(f){return f.y||0})),d)),ar(d)?_e.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(d+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,o=i.strokeWidth,l=s[0].y,u=s[s.length-1].y,c=n*Math.abs(l-u),d=Eg(s.map(function(f){return f.x||0}));return ar(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(Eg(a.map(function(f){return f.x||0})),d)),ar(d)?_e.createElement("rect",{x:0,y:l<u?l:l-c,width:d+(o?parseInt("".concat(o),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,s){var o=this.props,l=o.layout,u=o.type,c=o.stroke,d=o.connectNulls,f=o.isRange;o.ref;var h=Nbe(o,Xmt);return _e.createElement(bi,{clipPath:a?"url(#clipPath-".concat(s,")"):null},_e.createElement(mb,By({},en(h,!0),{points:n,connectNulls:d,type:u,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&_e.createElement(mb,By({},en(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:n})),c!=="none"&&f&&_e.createElement(mb,By({},en(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,s=this.props,o=s.points,l=s.baseLine,u=s.isAnimationActive,c=s.animationBegin,d=s.animationDuration,f=s.animationEasing,h=s.animationId,p=this.state,m=p.prevPoints,_=p.prevBaseLine;return _e.createElement(ep,{begin:c,duration:d,isActive:u,easing:f,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var v=y.t;if(m){var b=m.length/o.length,w=o.map(function(S,A){var C=Math.floor(A*b);if(m[C]){var k=m[C],M=Ku(k.x,S.x),D=Ku(k.y,S.y);return Hm(Hm({},S),{},{x:M(v),y:D(v)})}return S}),x;if(ar(l)&&typeof l=="number"){var E=Ku(_,l);x=E(v)}else if(Ln(l)||px(l)){var T=Ku(_,0);x=T(v)}else x=l.map(function(S,A){var C=Math.floor(A*b);if(_[C]){var k=_[C],M=Ku(k.x,S.x),D=Ku(k.y,S.y);return Hm(Hm({},S),{},{x:M(v),y:D(v)})}return S});return a.renderAreaStatically(w,x,n,i)}return _e.createElement(bi,null,_e.createElement("defs",null,_e.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(v))),_e.createElement(bi,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(o,l,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,s=a.points,o=a.baseLine,l=a.isAnimationActive,u=this.state,c=u.prevPoints,d=u.prevBaseLine,f=u.totalLength;return l&&s&&s.length&&(!c&&f>0||!yw(c,s)||!yw(d,o))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(s,o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,o=i.points,l=i.className,u=i.top,c=i.left,d=i.xAxis,f=i.yAxis,h=i.width,p=i.height,m=i.isAnimationActive,_=i.id;if(a||!o||!o.length)return null;var y=this.state.isAnimationFinished,v=o.length===1,b=Dn("recharts-area",l),w=d&&d.allowDataOverflow,x=f&&f.allowDataOverflow,E=w||x,T=Ln(_)?this.id:_,S=(n=en(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=S.r,C=A===void 0?3:A,k=S.strokeWidth,M=k===void 0?2:k,D=aqe(s)?s:{},$=D.clipDot,V=$===void 0?!0:$,U=C*2+M;return _e.createElement(bi,{className:b},w||x?_e.createElement("defs",null,_e.createElement("clipPath",{id:"clipPath-".concat(T)},_e.createElement("rect",{x:w?c:c-h/2,y:x?u:u-p/2,width:w?h:h*2,height:x?p:p*2})),!V&&_e.createElement("clipPath",{id:"clipPath-dots-".concat(T)},_e.createElement("rect",{x:c-U/2,y:u-U/2,width:h+U,height:p+U}))):null,v?null:this.renderArea(E,T),(s||v)&&this.renderDots(E,V,T),(!m||y)&&Yp.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(R.PureComponent);Obe=x0;Rh(x0,"displayName","Area");Rh(x0,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Vh.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Rh(x0,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,s=t.props.baseValue,o=s??a;if(ar(o)&&typeof o=="number")return o;var l=i==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return o==="dataMin"?d:o==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]});Rh(x0,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,s=e.yAxisTicks,o=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,d=e.displayedData,f=e.offset,h=t.layout,p=u&&u.length,m=Obe.getBaseValue(t,r,n,i),_=h==="horizontal",y=!1,v=d.map(function(w,x){var E;p?E=u[c+x]:(E=$o(w,l),Array.isArray(E)?y=!0:E=[m,E]);var T=E[1]==null||p&&$o(w,l)==null;return _?{x:QJ({axis:n,ticks:a,bandSize:o,entry:w,index:x}),y:T?null:i.scale(E[1]),value:E,payload:w}:{x:T?null:n.scale(E[1]),y:QJ({axis:i,ticks:s,bandSize:o,entry:w,index:x}),value:E,payload:w}}),b;return p||y?b=v.map(function(w){var x=Array.isArray(w.value)?w.value[0]:null;return _?{x:w.x,y:x!=null&&w.y!=null?i.scale(x):null}:{x:x!=null?n.scale(x):null,y:w.y}}):b=_?i.scale(m):n.scale(m),Hm({points:v,baseLine:b,layout:h,isRange:y},f)});Rh(x0,"renderDotItem",function(e,t){var r;if(_e.isValidElement(e))r=_e.cloneElement(e,t);else if(wn(e))r=e(t);else{var n=Dn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=Nbe(t,Qmt);r=_e.createElement(lI,By({},a,{key:i,className:n}))}return r});function Ow(e){"@babel/helpers - typeof";return Ow=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},Ow(e)}function sgt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ogt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rbe(n.key),n)}}function lgt(e,t,r){return t&&ogt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ugt(e,t,r){return t=oO(t),cgt(e,Lbe()?Reflect.construct(t,r||[],oO(e).constructor):t.apply(e,r))}function cgt(e,t){if(t&&(Ow(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dgt(e)}function dgt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lbe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lbe=function(){return!!e})()}function oO(e){return oO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oO(e)}function fgt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y8(e,t)}function y8(e,t){return y8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},y8(e,t)}function jbe(e,t,r){return t=Rbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rbe(e){var t=hgt(e,"string");return Ow(t)=="symbol"?t:t+""}function hgt(e,t){if(Ow(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ow(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v8(){return v8=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},v8.apply(this,arguments)}function pgt(e){var t=e.xAxisId,r=bbe(),n=wbe(),i=vbe(t);return i==null?null:R.createElement(bI,v8({},i,{className:Dn("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Fy(s,!0)}}))}var Nw=function(e){function t(){return sgt(this,t),ugt(this,t,arguments)}return fgt(t,e),lgt(t,[{key:"render",value:function(){return R.createElement(pgt,this.props)}}])}(R.Component);jbe(Nw,"displayName","XAxis");jbe(Nw,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Iw(e){"@babel/helpers - typeof";return Iw=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},Iw(e)}function mgt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ggt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bbe(n.key),n)}}function ygt(e,t,r){return t&&ggt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vgt(e,t,r){return t=lO(t),_gt(e,$be()?Reflect.construct(t,r||[],lO(e).constructor):t.apply(e,r))}function _gt(e,t){if(t&&(Iw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bgt(e)}function bgt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($be=function(){return!!e})()}function lO(e){return lO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lO(e)}function wgt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_8(e,t)}function _8(e,t){return _8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},_8(e,t)}function Fbe(e,t,r){return t=Bbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bbe(e){var t=xgt(e,"string");return Iw(t)=="symbol"?t:t+""}function xgt(e,t){if(Iw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Iw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b8(){return b8=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},b8.apply(this,arguments)}var Egt=function(t){var r=t.yAxisId,n=bbe(),i=wbe(),a=_be(r);return a==null?null:R.createElement(bI,b8({},a,{className:Dn("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(o){return Fy(o,!0)}}))},Dw=function(e){function t(){return mgt(this,t),vgt(this,t,arguments)}return wgt(t,e),ygt(t,[{key:"render",value:function(){return R.createElement(Egt,this.props)}}])}(R.Component);Fbe(Dw,"displayName","YAxis");Fbe(Dw,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function Ste(e){return Cgt(e)||Agt(e)||Sgt(e)||Tgt()}function Tgt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 646In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sgt(e,t){if(e){if(typeof e=="string")return w8(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w8(e,t)}}function Agt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cgt(e){if(Array.isArray(e))return w8(e)}function w8(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var x8=function(t,r,n,i,a){var s=Yd(t,D9),o=Yd(t,yI),l=[].concat(Ste(s),Ste(o)),u=Yd(t,_I),c="".concat(i,"Id"),d=i[0],f=r;if(l.length&&(f=l.reduce(function(m,_){if(_.props[c]===n&&Gh(_.props,"extendDomain")&&ar(_.props[d])){var y=_.props[d];return[Math.min(m[0],y),Math.max(m[1],y)]}return m},f)),u.length){var h="".concat(d,"1"),p="".concat(d,"2");f=u.reduce(function(m,_){if(_.props[c]===n&&Gh(_.props,"extendDomain")&&ar(_.props[h])&&ar(_.props[p])){var y=_.props[h],v=_.props[p];return[Math.min(m[0],y,v),Math.max(m[1],y,v)]}return m},f)}return a&&a.length&&(f=a.reduce(function(m,_){return ar(_)?[Math.min(m[0],_),Math.max(m[1],_)]:m},f)),f},zbe={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function a(l,u,c,d,f){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,d||l,f),p=r?r+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],h]:l._events[p].push(h):(l._events[p]=h,l._eventsCount++),l}function s(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],c,d;if(this._eventsCount===0)return u;for(d in c=this._events)t.call(c,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},o.prototype.listeners=function(u){var c=r?r+u:u,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,p=new Array(h);f<h;f++)p[f]=d[f].fn;return p},o.prototype.listenerCount=function(u){var c=r?r+u:u,d=this._events[c];return d?d.fn?1:d.length:0},o.prototype.emit=function(u,c,d,f,h,p){var m=r?r+u:u;if(!this._events[m])return!1;var _=this._events[m],y=arguments.length,v,b;if(_.fn){switch(_.once&&this.removeListener(u,_.fn,void 0,!0),y){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,c),!0;case 3:return _.fn.call(_.context,c,d),!0;case 4:return _.fn.call(_.context,c,d,f),!0;case 5:return _.fn.call(_.context,c,d,f,h),!0;case 6:return _.fn.call(_.context,c,d,f,h,p),!0}for(b=1,v=new Array(y-1);b<y;b++)v[b-1]=arguments[b];_.fn.apply(_.context,v)}else{var w=_.length,x;for(b=0;b<w;b++)switch(_[b].once&&this.removeListener(u,_[b].fn,void 0,!0),y){case 1:_[b].fn.call(_[b].context);break;case 2:_[b].fn.call(_[b].context,c);break;case 3:_[b].fn.call(_[b].context,c,d);break;case 4:_[b].fn.call(_[b].context,c,d,f);break;default:if(!v)for(x=1,v=new Array(y-1);x<y;x++)v[x-1]=arguments[x];_[b].fn.apply(_[b].context,v)}}return!0},o.prototype.on=function(u,c,d){return a(this,u,c,d,!1)},o.prototype.once=function(u,c,d){return a(this,u,c,d,!0)},o.prototype.removeListener=function(u,c,d,f){var h=r?r+u:u;if(!this._events[h])return this;if(!c)return s(this,h),this;var p=this._events[h];if(p.fn)p.fn===c&&(!f||p.once)&&(!d||p.context===d)&&s(this,h);else{for(var m=0,_=[],y=p.length;m<y;m++)(p[m].fn!==c||f&&!p[m].once||d&&p[m].context!==d)&&_.push(p[m]);_.length?this._events[h]=_.length===1?_[0]:_:s(this,h)}return this},o.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&s(this,c)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(zbe);var Pgt=zbe.exports;const Mgt=mi(Pgt);var _L=new Mgt,bL="recharts.syncMouseEvents";function tA(e){"@babel/helpers - typeof";return tA=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},tA(e)}function kgt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ogt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ube(n.key),n)}}function Ngt(e,t,r){return t&&Ogt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wL(e,t,r){return t=Ube(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ube(e){var t=Igt(e,"string");return tA(t)=="symbol"?t:t+""}function Igt(e,t){if(tA(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tA(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Dgt=function(){function e(){kgt(this,e),wL(this,"activeIndex",0),wL(this,"coordinateList",[]),wL(this,"layout","horizontal")}return Ngt(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,s=r.container,o=s===void 0?null:s,l=r.layout,u=l===void 0?null:l,c=r.offset,d=c===void 0?null:c,f=r.mouseHandlerCallback,h=f===void 0?null:f;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,o=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=a+l+u,f=s+this.offset.top+o/2+c;this.mouseHandlerCallback({pageX:d,pageY:f})}}}])}();function Lgt(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&ar(n)&&ar(i))return!0}return!1}function jgt(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Wbe(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,s=La(t,r,n,i),o=La(t,r,n,a);return{points:[s,o],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function Rgt(e,t,r){var n,i,a,s;if(e==="horizontal")n=t.x,a=n,i=r.top,s=r.top+r.height;else if(e==="vertical")i=t.y,s=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,d=t.angle,f=La(o,l,u,d),h=La(o,l,c,d);n=f.x,i=f.y,a=h.x,s=h.y}else return Wbe(t);return[{x:n,y:i},{x:a,y:s}]}function rA(e){"@babel/helpers - typeof";return rA=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},rA(e)}function Ate(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ate(Object(r),!0).forEach(function(n){$gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ate(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $gt(e,t,r){return t=Fgt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fgt(e){var t=Bgt(e,"string");return rA(t)=="symbol"?t:t+""}function Bgt(e,t){if(rA(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rA(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zgt(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,s=e.activeCoordinate,o=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,d=e.layout,f=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!a||!s||f!=="ScatterChart"&&i!=="axis")return null;var p,m=mb;if(f==="ScatterChart")p=s,m=Bdt;else if(f==="BarChart")p=jgt(d,s,l,c),m=O9;else if(d==="radial"){var _=Wbe(s),y=_.cx,v=_.cy,b=_.radius,w=_.startAngle,x=_.endAngle;p={cx:y,cy:v,startAngle:w,endAngle:x,innerRadius:b,outerRadius:b},m=R1e}else p={points:Rgt(d,s,l)},m=mb;var E=hM(hM(hM(hM({stroke:"#ccc",pointerEvents:"none"},l),p),en(h,!1)),{},{payload:o,payloadIndex:u,className:Dn("recharts-tooltip-cursor",h.className)});return R.isValidElement(h)?R.cloneElement(h,E):R.createElement(m,E)}var Ugt=["item"],Wgt=["children","className","width","height","style","compact","title","desc"];function Lw(e){"@babel/helpers - typeof";return Lw=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},Lw(e)}function z1(){return z1=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},z1.apply(this,arguments)}function Cte(e,t){return Ggt(e)||Hgt(e,t)||Hbe(e,t)||Vgt()}function Vgt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 647In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hgt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Ggt(e){if(Array.isArray(e))return e}function Pte(e,t){if(e==null)return{};var r=qgt(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qgt(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Kgt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ygt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gbe(n.key),n)}}function Xgt(e,t,r){return t&&Ygt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qgt(e,t,r){return t=uO(t),Zgt(e,Vbe()?Reflect.construct(t,r||[],uO(e).constructor):t.apply(e,r))}function Zgt(e,t){if(t&&(Lw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jgt(e)}function Jgt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vbe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vbe=function(){return!!e})()}function uO(e){return uO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uO(e)}function e0t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E8(e,t)}function E8(e,t){return E8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},E8(e,t)}function jw(e){return n0t(e)||r0t(e)||Hbe(e)||t0t()}function t0t(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 648In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hbe(e,t){if(e){if(typeof e=="string")return T8(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T8(e,t)}}function r0t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n0t(e){if(Array.isArray(e))return T8(e)}function T8(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mte(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mte(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fn(e,t,r){return t=Gbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gbe(e){var t=i0t(e,"string");return Lw(t)=="symbol"?t:t+""}function i0t(e,t){if(Lw(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Lw(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var a0t={xAxis:["bottom","top"],yAxis:["left","right"]},s0t={width:"100%",height:"100%"},qbe={x:0,y:0};function pM(e){return e}var o0t=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},l0t=function(t,r,n,i){var a=r.find(function(c){return c&&c.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var s=a.coordinate,o=i.radius;return At(At(At({},i),La(i.cx,i.cy,o,s)),{},{angle:s,radius:o})}var l=a.coordinate,u=i.angle;return At(At(At({},i),La(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return qbe},wI=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,s=(n??[]).reduce(function(o,l){var u=l.props.data;return u&&u.length?[].concat(jw(o),jw(u)):o},[]);return s.length>0?s:t&&t.length&&ar(i)&&ar(a)?t.slice(i,a+1):[]};function Kbe(e){return e==="number"?[0,"auto"]:void 0}var S8=function(t,r,n,i){var a=t.graphicalItems,s=t.tooltipAxis,o=wI(r,t);return n<0||!a||!a.length||n>=o.length?null:a.reduce(function(l,u){var c,d=(c=u.props.data)!==null&&c!==void 0?c:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(s.dataKey&&!s.allowDuplicatedCategory){var h=d===void 0?o:d;f=c3(h,s.dataKey,i)}else f=d&&d[n]||o[n];return f?[].concat(jw(l),[O1e(u,f)]):l},[])},kte=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},s=o0t(a,n),o=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=clt(s,o,u,l);if(c>=0&&u){var d=u[c]&&u[c].value,f=S8(t,r,c,d),h=l0t(n,o,c,a);return{activeTooltipIndex:c,activeLabel:d,activePayload:f,activeCoordinate:h}}return null},u0t=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,o=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,d=t.children,f=t.stackOffset,h=A1e(c,a);return n.reduce(function(p,m){var _,y=m.type.defaultProps!==void 0?At(At({},m.type.defaultProps),m.props):m.props,v=y.type,b=y.dataKey,w=y.allowDataOverflow,x=y.allowDuplicatedCategory,E=y.scale,T=y.ticks,S=y.includeHidden,A=y[s];if(p[A])return p;var C=wI(t.data,{graphicalItems:i.filter(function(O){var N,X=s in O.props?O.props[s]:(N=O.type.defaultProps)===null||N===void 0?void 0:N[s];return X===A}),dataStartIndex:l,dataEndIndex:u}),k=C.length,M,D,$;Lgt(y.domain,w,v)&&(M=BF(y.domain,null,w),h&&(v==="number"||E!=="auto")&&($=cT(C,b,"category")));var V=Kbe(v);if(!M||M.length===0){var U,B=(U=y.domain)!==null&&U!==void 0?U:V;if(b){if(M=cT(C,b,v),v==="category"&&h){var z=YGe(M);x&&z?(D=M,M=X3(0,k)):x||(M=tee(B,M,m).reduce(function(O,N){return O.indexOf(N)>=0?O:[].concat(jw(O),[N])},[]))}else if(v==="category")x?M=M.filter(function(O){return O!==""&&!Ln(O)}):M=tee(B,M,m).reduce(function(O,N){return O.indexOf(N)>=0||N===""||Ln(N)?O:[].concat(jw(O),[N])},[]);else if(v==="number"){var q=mlt(C,i.filter(function(O){var N,X,ie=s in O.props?O.props[s]:(N=O.type.defaultProps)===null||N===void 0?void 0:N[s],ee="hide"in O.props?O.props.hide:(X=O.type.defaultProps)===null||X===void 0?void 0:X.hide;return ie===A&&(S||!ee)}),b,a,c);q&&(M=q)}h&&(v==="number"||E!=="auto")&&($=cT(C,b,"category"))}else h?M=X3(0,k):o&&o[A]&&o[A].hasStack&&v==="number"?M=f==="expand"?[0,1]:k1e(o[A].stackGroups,l,u):M=S1e(C,i.filter(function(O){var N=s in O.props?O.props[s]:O.type.defaultProps[s],X="hide"in O.props?O.props.hide:O.type.defaultProps.hide;return N===A&&(S||!X)}),v,c,!0);if(v==="number")M=x8(d,M,A,a,T),B&&(M=BF(B,M,w));else if(v==="category"&&B){var L=B,K=M.every(function(O){return L.indexOf(O)>=0});K&&(M=L)}}return At(At({},p),{},fn({},A,At(At({},y),{},{axisType:a,domain:M,categoricalDomain:$,duplicateDomain:D,originalDomain:(_=y.domain)!==null&&_!==void 0?_:V,isCategorical:h,layout:c})))},{})},c0t=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,o=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,d=t.children,f=wI(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=f.length,p=A1e(c,a),m=-1;return n.reduce(function(_,y){var v=y.type.defaultProps!==void 0?At(At({},y.type.defaultProps),y.props):y.props,b=v[s],w=Kbe("number");if(!_[b]){m++;var x;return p?x=X3(0,h):o&&o[b]&&o[b].hasStack?(x=k1e(o[b].stackGroups,l,u),x=x8(d,x,b,a)):(x=BF(w,S1e(f,n.filter(function(E){var T,S,A=s in E.props?E.props[s]:(T=E.type.defaultProps)===null||T===void 0?void 0:T[s],C="hide"in E.props?E.props.hide:(S=E.type.defaultProps)===null||S===void 0?void 0:S.hide;return A===b&&!C}),"number",c),i.defaultProps.allowDataOverflow),x=x8(d,x,b,a)),At(At({},_),{},fn({},b,At(At({axisType:a},i.defaultProps),{},{hide:!0,orientation:Zc(a0t,"".concat(a,".").concat(m%2),null),domain:x,originalDomain:w,isCategorical:p,layout:c})))}return _},{})},d0t=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,o=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,d="".concat(i,"Id"),f=Yd(c,a),h={};return f&&f.length?h=u0t(t,{axes:f,graphicalItems:s,axisType:i,axisIdKey:d,stackGroups:o,dataStartIndex:l,dataEndIndex:u}):s&&s.length&&(h=c0t(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:d,stackGroups:o,dataStartIndex:l,dataEndIndex:u})),h},f0t=function(t){var r=p1(t),n=Fy(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:i9(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:$3(r,n)}},Ote=function(t){var r=t.children,n=t.defaultShowTooltip,i=Nc(r,Tw),a=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},h0t=function(t){return!t||!t.length?!1:t.some(function(r){var n=Gp(r&&r.type);return n&&n.indexOf("Bar")>=0})},Nte=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},p0t=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,o=t.yAxisMap,l=o===void 0?{}:o,u=n.width,c=n.height,d=n.children,f=n.margin||{},h=Nc(d,Tw),p=Nc(d,fb),m=Object.keys(l).reduce(function(x,E){var T=l[E],S=T.orientation;return!T.mirror&&!T.hide?At(At({},x),{},fn({},S,x[S]+T.width)):x},{left:f.left||0,right:f.right||0}),_=Object.keys(s).reduce(function(x,E){var T=s[E],S=T.orientation;return!T.mirror&&!T.hide?At(At({},x),{},fn({},S,Zc(x,"".concat(S))+T.height)):x},{top:f.top||0,bottom:f.bottom||0}),y=At(At({},_),m),v=y.bottom;h&&(y.bottom+=h.props.height||Tw.defaultProps.height),p&&r&&(y=hlt(y,i,n,r));var b=u-y.left-y.right,w=c-y.top-y.bottom;return At(At({brushBottom:v},y),{},{width:Math.max(b,0),height:Math.max(w,0)})},m0t=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},j9=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,o=s===void 0?["axis"]:s,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,f=function(y,v){var b=v.graphicalItems,w=v.stackGroups,x=v.offset,E=v.updateId,T=v.dataStartIndex,S=v.dataEndIndex,A=y.barSize,C=y.layout,k=y.barGap,M=y.barCategoryGap,D=y.maxBarSize,$=Nte(C),V=$.numericAxisName,U=$.cateAxisName,B=h0t(b),z=[];return b.forEach(function(q,L){var K=wI(y.data,{graphicalItems:[q],dataStartIndex:T,dataEndIndex:S}),O=q.type.defaultProps!==void 0?At(At({},q.type.defaultProps),q.props):q.props,N=O.dataKey,X=O.maxBarSize,ie=O["".concat(V,"Id")],ee=O["".concat(U,"Id")],le={},Te=l.reduce(function(ve,Re){var De=v["".concat(Re.axisType,"Map")],tt=O["".concat(Re.axisType,"Id")];De&&De[tt]||Re.axisType==="zAxis"||Wv();var Ge=De[tt];return At(At({},ve),{},fn(fn({},Re.axisType,Ge),"".concat(Re.axisType,"Ticks"),Fy(Ge)))},le),be=Te[U],we=Te["".concat(U,"Ticks")],ae=w&&w[ie]&&w[ie].hasStack&&Tlt(q,w[ie].stackGroups),H=Gp(q.type).indexOf("Bar")>=0,fe=$3(be,we),Se=[],ne=B&&dlt({barSize:A,stackGroups:w,totalSize:m0t(Te,U)});if(H){var $e,me,Ue=Ln(X)?D:X,ke=($e=(me=$3(be,we,!0))!==null&&me!==void 0?me:Ue)!==null&&$e!==void 0?$e:0;Se=flt({barGap:k,barCategoryGap:M,bandSize:ke!==fe?ke:fe,sizeList:ne[ee],maxBarSize:Ue}),ke!==fe&&(Se=Se.map(function(ve){return At(At({},ve),{},{position:At(At({},ve.position),{},{offset:ve.position.offset-ke/2})})}))}var ce=q&&q.type&&q.type.getComposedData;ce&&z.push({props:At(At({},ce(At(At({},Te),{},{displayedData:K,props:y,dataKey:N,item:q,bandSize:fe,barPosition:Se,offset:x,stackedData:ae,layout:C,dataStartIndex:T,dataEndIndex:S}))),{},fn(fn(fn({key:q.key||"item-".concat(L)},V,Te[V]),U,Te[U]),"animationId",E)),childIndex:lqe(q,y.children),item:q})}),z},h=function(y,v){var b=y.props,w=y.dataStartIndex,x=y.dataEndIndex,E=y.updateId;if(!KQ({props:b}))return null;var T=b.children,S=b.layout,A=b.stackOffset,C=b.data,k=b.reverseStackOrder,M=Nte(S),D=M.numericAxisName,$=M.cateAxisName,V=Yd(T,n),U=xlt(C,V,"".concat(D,"Id"),"".concat($,"Id"),A,k),B=l.reduce(function(O,N){var X="".concat(N.axisType,"Map");return At(At({},O),{},fn({},X,d0t(b,At(At({},N),{},{graphicalItems:V,stackGroups:N.axisType===D&&U,dataStartIndex:w,dataEndIndex:x}))))},{}),z=p0t(At(At({},B),{},{props:b,graphicalItems:V}),v==null?void 0:v.legendBBox);Object.keys(B).forEach(function(O){B[O]=c(b,B[O],z,O.replace("Map",""),r)});var q=B["".concat($,"Map")],L=f0t(q),K=f(b,At(At({},B),{},{dataStartIndex:w,dataEndIndex:x,updateId:E,graphicalItems:V,stackGroups:U,offset:z}));return At(At({formattedGraphicalItems:K,graphicalItems:V,offset:z,stackGroups:U},L),B)},p=function(_){function y(v){var b,w,x;return Kgt(this,y),x=Qgt(this,y,[v]),fn(x,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),fn(x,"accessibilityManager",new Dgt),fn(x,"handleLegendBBoxUpdate",function(E){if(E){var T=x.state,S=T.dataStartIndex,A=T.dataEndIndex,C=T.updateId;x.setState(At({legendBBox:E},h({props:x.props,dataStartIndex:S,dataEndIndex:A,updateId:C},At(At({},x.state),{},{legendBBox:E}))))}}),fn(x,"handleReceiveSyncEvent",function(E,T,S){if(x.props.syncId===E){if(S===x.eventEmitterSymbol&&typeof x.props.syncMethod!="function")return;x.applySyncEvent(T)}}),fn(x,"handleBrushChange",function(E){var T=E.startIndex,S=E.endIndex;if(T!==x.state.dataStartIndex||S!==x.state.dataEndIndex){var A=x.state.updateId;x.setState(function(){return At({dataStartIndex:T,dataEndIndex:S},h({props:x.props,dataStartIndex:T,dataEndIndex:S,updateId:A},x.state))}),x.triggerSyncEvent({dataStartIndex:T,dataEndIndex:S})}}),fn(x,"handleMouseEnter",function(E){var T=x.getMouseInfo(E);if(T){var S=At(At({},T),{},{isTooltipActive:!0});x.setState(S),x.triggerSyncEvent(S);var A=x.props.onMouseEnter;wn(A)&&A(S,E)}}),fn(x,"triggeredAfterMouseMove",function(E){var T=x.getMouseInfo(E),S=T?At(At({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};x.setState(S),x.triggerSyncEvent(S);var A=x.props.onMouseMove;wn(A)&&A(S,E)}),fn(x,"handleItemMouseEnter",function(E){x.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),fn(x,"handleItemMouseLeave",function(){x.setState(function(){return{isTooltipActive:!1}})}),fn(x,"handleMouseMove",function(E){E.persist(),x.throttleTriggeredAfterMouseMove(E)}),fn(x,"handleMouseLeave",function(E){x.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};x.setState(T),x.triggerSyncEvent(T);var S=x.props.onMouseLeave;wn(S)&&S(T,E)}),fn(x,"handleOuterEvent",function(E){var T=oqe(E),S=Zc(x.props,"".concat(T));if(T&&wn(S)){var A,C;/.*touch.*/i.test(T)?C=x.getMouseInfo(E.changedTouches[0]):C=x.getMouseInfo(E),S((A=C)!==null&&A!==void 0?A:{},E)}}),fn(x,"handleClick",function(E){var T=x.getMouseInfo(E);if(T){var S=At(At({},T),{},{isTooltipActive:!0});x.setState(S),x.triggerSyncEvent(S);var A=x.props.onClick;wn(A)&&A(S,E)}}),fn(x,"handleMouseDown",function(E){var T=x.props.onMouseDown;if(wn(T)){var S=x.getMouseInfo(E);T(S,E)}}),fn(x,"handleMouseUp",function(E){var T=x.props.onMouseUp;if(wn(T)){var S=x.getMouseInfo(E);T(S,E)}}),fn(x,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&x.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),fn(x,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&x.handleMouseDown(E.changedTouches[0])}),fn(x,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&x.handleMouseUp(E.changedTouches[0])}),fn(x,"handleDoubleClick",function(E){var T=x.props.onDoubleClick;if(wn(T)){var S=x.getMouseInfo(E);T(S,E)}}),fn(x,"handleContextMenu",function(E){var T=x.props.onContextMenu;if(wn(T)){var S=x.getMouseInfo(E);T(S,E)}}),fn(x,"triggerSyncEvent",function(E){x.props.syncId!==void 0&&_L.emit(bL,x.props.syncId,E,x.eventEmitterSymbol)}),fn(x,"applySyncEvent",function(E){var T=x.props,S=T.layout,A=T.syncMethod,C=x.state.updateId,k=E.dataStartIndex,M=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)x.setState(At({dataStartIndex:k,dataEndIndex:M},h({props:x.props,dataStartIndex:k,dataEndIndex:M,updateId:C},x.state)));else if(E.activeTooltipIndex!==void 0){var D=E.chartX,$=E.chartY,V=E.activeTooltipIndex,U=x.state,B=U.offset,z=U.tooltipTicks;if(!B)return;if(typeof A=="function")V=A(z,E);else if(A==="value"){V=-1;for(var q=0;q<z.length;q++)if(z[q].value===E.activeLabel){V=q;break}}var L=At(At({},B),{},{x:B.left,y:B.top}),K=Math.min(D,L.x+L.width),O=Math.min($,L.y+L.height),N=z[V]&&z[V].value,X=S8(x.state,x.props.data,V),ie=z[V]?{x:S==="horizontal"?z[V].coordinate:K,y:S==="horizontal"?O:z[V].coordinate}:qbe;x.setState(At(At({},E),{},{activeLabel:N,activeCoordinate:ie,activePayload:X,activeTooltipIndex:V}))}else x.setState(E)}),fn(x,"renderCursor",function(E){var T,S=x.state,A=S.isTooltipActive,C=S.activeCoordinate,k=S.activePayload,M=S.offset,D=S.activeTooltipIndex,$=S.tooltipAxisBandSize,V=x.getTooltipEventType(),U=(T=E.props.active)!==null&&T!==void 0?T:A,B=x.props.layout,z=E.key||"_recharts-cursor";return _e.createElement(zgt,{key:z,activeCoordinate:C,activePayload:k,activeTooltipIndex:D,chartName:r,element:E,isActive:U,layout:B,offset:M,tooltipAxisBandSize:$,tooltipEventType:V})}),fn(x,"renderPolarAxis",function(E,T,S){var A=Zc(E,"type.axisType"),C=Zc(x.state,"".concat(A,"Map")),k=E.type.defaultProps,M=k!==void 0?At(At({},k),E.props):E.props,D=C&&C[M["".concat(A,"Id")]];return R.cloneElement(E,At(At({},D),{},{className:Dn(A,D.className),key:E.key||"".concat(T,"-").concat(S),ticks:Fy(D,!0)}))}),fn(x,"renderPolarGrid",function(E){var T=E.props,S=T.radialLines,A=T.polarAngles,C=T.polarRadius,k=x.state,M=k.radiusAxisMap,D=k.angleAxisMap,$=p1(M),V=p1(D),U=V.cx,B=V.cy,z=V.innerRadius,q=V.outerRadius;return R.cloneElement(E,{polarAngles:Array.isArray(A)?A:Fy(V,!0).map(function(L){return L.coordinate}),polarRadius:Array.isArray(C)?C:Fy($,!0).map(function(L){return L.coordinate}),cx:U,cy:B,innerRadius:z,outerRadius:q,key:E.key||"polar-grid",radialLines:S})}),fn(x,"renderLegend",function(){var E=x.state.formattedGraphicalItems,T=x.props,S=T.children,A=T.width,C=T.height,k=x.props.margin||{},M=A-(k.left||0)-(k.right||0),D=E1e({children:S,formattedGraphicalItems:E,legendWidth:M,legendContent:u});if(!D)return null;var $=D.item,V=Pte(D,Ugt);return R.cloneElement($,At(At({},V),{},{chartWidth:A,chartHeight:C,margin:k,onBBoxUpdate:x.handleLegendBBoxUpdate}))}),fn(x,"renderTooltip",function(){var E,T=x.props,S=T.children,A=T.accessibilityLayer,C=Nc(S,Eh);if(!C)return null;var k=x.state,M=k.isTooltipActive,D=k.activeCoordinate,$=k.activePayload,V=k.activeLabel,U=k.offset,B=(E=C.props.active)!==null&&E!==void 0?E:M;return R.cloneElement(C,{viewBox:At(At({},U),{},{x:U.left,y:U.top}),active:B,label:V,payload:B?$:[],coordinate:D,accessibilityLayer:A})}),fn(x,"renderBrush",function(E){var T=x.props,S=T.margin,A=T.data,C=x.state,k=C.offset,M=C.dataStartIndex,D=C.dataEndIndex,$=C.updateId;return R.cloneElement(E,{key:E.key||"_recharts-brush",onChange:uM(x.handleBrushChange,E.props.onChange),data:A,x:ar(E.props.x)?E.props.x:k.left,y:ar(E.props.y)?E.props.y:k.top+k.height+k.brushBottom-(S.bottom||0),width:ar(E.props.width)?E.props.width:k.width,startIndex:M,endIndex:D,updateId:"brush-".concat($)})}),fn(x,"renderReferenceElement",function(E,T,S){if(!E)return null;var A=x,C=A.clipPathId,k=x.state,M=k.xAxisMap,D=k.yAxisMap,$=k.offset,V=E.type.defaultProps||{},U=E.props,B=U.xAxisId,z=B===void 0?V.xAxisId:B,q=U.yAxisId,L=q===void 0?V.yAxisId:q;return R.cloneElement(E,{key:E.key||"".concat(T,"-").concat(S),xAxis:M[z],yAxis:D[L],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:C})}),fn(x,"renderActivePoints",function(E){var T=E.item,S=E.activePoint,A=E.basePoint,C=E.childIndex,k=E.isRange,M=[],D=T.props.key,$=T.item.type.defaultProps!==void 0?At(At({},T.item.type.defaultProps),T.item.props):T.item.props,V=$.activeDot,U=$.dataKey,B=At(At({index:C,dataKey:U,cx:S.x,cy:S.y,r:4,fill:k9(T.item),strokeWidth:2,stroke:"#fff",payload:S.payload,value:S.value},en(V,!1)),d3(V));return M.push(y.renderActiveDot(V,B,"".concat(D,"-activePoint-").concat(C))),A?M.push(y.renderActiveDot(V,At(At({},B),{},{cx:A.x,cy:A.y}),"".concat(D,"-basePoint-").concat(C))):k&&M.push(null),M}),fn(x,"renderGraphicChild",function(E,T,S){var A=x.filterFormatItem(E,T,S);if(!A)return null;var C=x.getTooltipEventType(),k=x.state,M=k.isTooltipActive,D=k.tooltipAxis,$=k.activeTooltipIndex,V=k.activeLabel,U=x.props.children,B=Nc(U,Eh),z=A.props,q=z.points,L=z.isRange,K=z.baseLine,O=A.item.type.defaultProps!==void 0?At(At({},A.item.type.defaultProps),A.item.props):A.item.props,N=O.activeDot,X=O.hide,ie=O.activeBar,ee=O.activeShape,le=!!(!X&&M&&B&&(N||ie||ee)),Te={};C!=="axis"&&B&&B.props.trigger==="click"?Te={onClick:uM(x.handleItemMouseEnter,E.props.onClick)}:C!=="axis"&&(Te={onMouseLeave:uM(x.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:uM(x.handleItemMouseEnter,E.props.onMouseEnter)});var be=R.cloneElement(E,At(At({},A.props),Te));function we(Re){return typeof D.dataKey=="function"?D.dataKey(Re.payload):null}if(le)if($>=0){var ae,H;if(D.dataKey&&!D.allowDuplicatedCategory){var fe=typeof D.dataKey=="function"?we:"payload.".concat(D.dataKey.toString());ae=c3(q,fe,V),H=L&&K&&c3(K,fe,V)}else ae=q==null?void 0:q[$],H=L&&K&&K[$];if(ee||ie){var Se=E.props.activeIndex!==void 0?E.props.activeIndex:$;return[R.cloneElement(E,At(At(At({},A.props),Te),{},{activeIndex:Se})),null,null]}if(!Ln(ae))return[be].concat(jw(x.renderActivePoints({item:A,activePoint:ae,basePoint:H,childIndex:$,isRange:L})))}else{var ne,$e=(ne=x.getItemByXY(x.state.activeCoordinate))!==null&&ne!==void 0?ne:{graphicalItem:be},me=$e.graphicalItem,Ue=me.item,ke=Ue===void 0?E:Ue,ce=me.childIndex,ve=At(At(At({},A.props),Te),{},{activeIndex:ce});return[R.cloneElement(ke,ve),null,null]}return L?[be,null,null]:[be,null]}),fn(x,"renderCustomized",function(E,T,S){return R.cloneElement(E,At(At({key:"recharts-customized-".concat(S)},x.props),x.state))}),fn(x,"renderMap",{CartesianGrid:{handler:pM,once:!0},ReferenceArea:{handler:x.renderReferenceElement},ReferenceLine:{handler:pM},ReferenceDot:{handler:x.renderReferenceElement},XAxis:{handler:pM},YAxis:{handler:pM},Brush:{handler:x.renderBrush,once:!0},Bar:{handler:x.renderGraphicChild},Line:{handler:x.renderGraphicChild},Area:{handler:x.renderGraphicChild},Radar:{handler:x.renderGraphicChild},RadialBar:{handler:x.renderGraphicChild},Scatter:{handler:x.renderGraphicChild},Pie:{handler:x.renderGraphicChild},Funnel:{handler:x.renderGraphicChild},Tooltip:{handler:x.renderCursor,once:!0},PolarGrid:{handler:x.renderPolarGrid,once:!0},PolarAngleAxis:{handler:x.renderPolarAxis},PolarRadiusAxis:{handler:x.renderPolarAxis},Customized:{handler:x.renderCustomized}}),x.clipPathId="".concat((b=v.id)!==null&&b!==void 0?b:mx("recharts"),"-clip"),x.throttleTriggeredAfterMouseMove=x_e(x.triggeredAfterMouseMove,(w=v.throttleDelay)!==null&&w!==void 0?w:1e3/60),x.state={},x}return e0t(y,_),Xgt(y,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,x=b.data,E=b.height,T=b.layout,S=Nc(w,Eh);if(S){var A=S.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,k=S8(this.state,x,A,C),M=this.state.tooltipTicks[A].coordinate,D=(this.state.offset.top+E)/2,$=T==="horizontal",V=$?{x:M,y:D}:{y:M,x:D},U=this.state.formattedGraphicalItems.find(function(z){var q=z.item;return q.type.name==="Scatter"});U&&(V=At(At({},V),U.props.points[A].tooltipPosition),k=U.props.points[A].tooltipPayload);var B={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:C,activePayload:k,activeCoordinate:V};this.setState(B),this.renderCursor(S),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var x,E;this.accessibilityManager.setDetails({offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(b){tF([Nc(b.children,Eh)],[Nc(this.props.children,Eh)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Nc(this.props.children,Eh);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return o.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,x=w.getBoundingClientRect(),E=$nt(x),T={chartX:Math.round(b.pageX-E.left),chartY:Math.round(b.pageY-E.top)},S=x.width/w.offsetWidth||1,A=this.inRange(T.chartX,T.chartY,S);if(!A)return null;var C=this.state,k=C.xAxisMap,M=C.yAxisMap,D=this.getTooltipEventType(),$=kte(this.state,this.props.data,this.props.layout,A);if(D!=="axis"&&k&&M){var V=p1(k).scale,U=p1(M).scale,B=V&&V.invert?V.invert(T.chartX):null,z=U&&U.invert?U.invert(T.chartY):null;return At(At({},T),{},{xValue:B,yValue:z},$)}return $?At(At({},T),$):null}},{key:"inRange",value:function(b,w){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,T=b/x,S=w/x;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,C=T>=A.left&&T<=A.left+A.width&&S>=A.top&&S<=A.top+A.height;return C?{x:T,y:S}:null}var k=this.state,M=k.angleAxisMap,D=k.radiusAxisMap;if(M&&D){var $=p1(M);return iee({x:T,y:S},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),x=Nc(b,Eh),E={};x&&w==="axis"&&(x.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=d3(this.props,this.handleOuterEvent);return At(At({},T),E)}},{key:"addListener",value:function(){_L.on(bL,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){_L.removeListener(bL,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,x){for(var E=this.state.formattedGraphicalItems,T=0,S=E.length;T<S;T++){var A=E[T];if(A.item===b||A.props.key===b.key||w===Gp(A.item.type)&&x===A.childIndex)return A}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,w=this.state.offset,x=w.left,E=w.top,T=w.height,S=w.width;return _e.createElement("defs",null,_e.createElement("clipPath",{id:b},_e.createElement("rect",{x,y:E,height:T,width:S})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(w,x){var E=Cte(x,2),T=E[0],S=E[1];return At(At({},w),{},fn({},T,S.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(w,x){var E=Cte(x,2),T=E[0],S=E[1];return At(At({},w),{},fn({},T,S.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(b){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[b])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(b){var w=this.state,x=w.formattedGraphicalItems,E=w.activeItem;if(x&&x.length)for(var T=0,S=x.length;T<S;T++){var A=x[T],C=A.props,k=A.item,M=k.type.defaultProps!==void 0?At(At({},k.type.defaultProps),k.props):k.props,D=Gp(k.type);if(D==="Bar"){var $=(C.data||[]).find(function(z){return bdt(b,z)});if($)return{graphicalItem:A,payload:$}}else if(D==="RadialBar"){var V=(C.data||[]).find(function(z){return iee(b,z)});if(V)return{graphicalItem:A,payload:V}}else if(hI(A,E)||pI(A,E)||XS(A,E)){var U=lht({graphicalItem:A,activeTooltipItem:E,itemData:M.data}),B=M.activeIndex===void 0?U:M.activeIndex;return{graphicalItem:At(At({},A),{},{childIndex:B}),payload:XS(A,E)?M.data[U]:A.props.data[U]}}}return null}},{key:"render",value:function(){var b=this;if(!KQ(this))return null;var w=this.props,x=w.children,E=w.className,T=w.width,S=w.height,A=w.style,C=w.compact,k=w.title,M=w.desc,D=Pte(w,Wgt),$=en(D,!1);if(C)return _e.createElement(fte,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_e.createElement(nF,z1({},$,{width:T,height:S,title:k,desc:M}),this.renderClipPath(),XQ(x,this.renderMap)));if(this.props.accessibilityLayer){var V,U;$.tabIndex=(V=this.props.tabIndex)!==null&&V!==void 0?V:0,$.role=(U=this.props.role)!==null&&U!==void 0?U:"application",$.onKeyDown=function(z){b.accessibilityManager.keyboardEvent(z)},$.onFocus=function(){b.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return _e.createElement(fte,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_e.createElement("div",z1({className:Dn("recharts-wrapper",E),style:At({position:"relative",cursor:"default",width:T,height:S},A)},B,{ref:function(q){b.container=q}}),_e.createElement(nF,z1({},$,{width:T,height:S,title:k,desc:M,style:s0t}),this.renderClipPath(),XQ(x,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(R.Component);fn(p,"displayName",r),fn(p,"defaultProps",At({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),fn(p,"getDerivedStateFromProps",function(_,y){var v=_.dataKey,b=_.data,w=_.children,x=_.width,E=_.height,T=_.layout,S=_.stackOffset,A=_.margin,C=y.dataStartIndex,k=y.dataEndIndex;if(y.updateId===void 0){var M=Ote(_);return At(At(At({},M),{},{updateId:0},h(At(At({props:_},M),{},{updateId:0}),y)),{},{prevDataKey:v,prevData:b,prevWidth:x,prevHeight:E,prevLayout:T,prevStackOffset:S,prevMargin:A,prevChildren:w})}if(v!==y.prevDataKey||b!==y.prevData||x!==y.prevWidth||E!==y.prevHeight||T!==y.prevLayout||S!==y.prevStackOffset||!db(A,y.prevMargin)){var D=Ote(_),$={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},V=At(At({},kte(y,b,T)),{},{updateId:y.updateId+1}),U=At(At(At({},D),$),V);return At(At(At({},U),h(At({props:_},U),y)),{},{prevDataKey:v,prevData:b,prevWidth:x,prevHeight:E,prevLayout:T,prevStackOffset:S,prevMargin:A,prevChildren:w})}if(!tF(w,y.prevChildren)){var B,z,q,L,K=Nc(w,Tw),O=K&&(B=(z=K.props)===null||z===void 0?void 0:z.startIndex)!==null&&B!==void 0?B:C,N=K&&(q=(L=K.props)===null||L===void 0?void 0:L.endIndex)!==null&&q!==void 0?q:k,X=O!==C||N!==k,ie=!Ln(b),ee=ie&&!X?y.updateId:y.updateId+1;return At(At({updateId:ee},h(At(At({props:_},y),{},{updateId:ee,dataStartIndex:O,dataEndIndex:N}),y)),{},{prevChildren:w,dataStartIndex:O,dataEndIndex:N})}return null}),fn(p,"renderActiveDot",function(_,y,v){var b;return R.isValidElement(_)?b=R.cloneElement(_,y):wn(_)?b=_(y):b=_e.createElement(lI,y),_e.createElement(bi,{className:"recharts-active-dot",key:v},b)});var m=R.forwardRef(function(y,v){return _e.createElement(p,z1({},y,{ref:v}))});return m.displayName=p.displayName,m},g0t=j9({chartName:"BarChart",GraphicalChild:d_,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Nw},{axisType:"yAxis",AxisComp:Dw}],formatAxisMap:ube}),y0t=j9({chartName:"PieChart",GraphicalChild:gm,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:fI},{axisType:"radiusAxis",AxisComp:cI}],formatAxisMap:Dlt,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),v0t=j9({chartName:"AreaChart",GraphicalChild:x0,axisComponents:[{axisType:"xAxis",AxisComp:Nw},{axisType:"yAxis",AxisComp:Dw}],formatAxisMap:ube});const _0t={light:"",dark:".dark"},Ybe=R.createContext(null);function Xbe(){const e=R.useContext(Ybe);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Mk=R.forwardRef(({id:e,className:t,children:r,config:n,...i},a)=>{const s=R.useId(),o=`chart-${e||s.replace(/:/g,"")}`;return g.jsx(Ybe.Provider,{value:{config:n},children:g.jsxs("div",{"data-chart":o,ref:a,className:Xt("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...i,children:[g.jsx(b0t,{id:o,config:n}),g.jsx(Ont,{children:r})]})})});Mk.displayName="Chart";const b0t=({id:e,config:t})=>{const r=Object.entries(t).filter(([n,i])=>i.theme||i.color);return r.length?g.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(_0t).map(([n,i])=>` 649${i} [data-chart=${e}] { 650${r.map(([a,s])=>{var l;const o=((l=s.theme)==null?void 0:l[n])||s.color;return o?` --color-${a}: ${o};`:null}).join(` 651`)} 652} 653`).join(` 654`)}}):null},xL=Eh,Qbe=R.forwardRef(({active:e,payload:t,className:r,indicator:n="dot",hideLabel:i=!1,hideIndicator:a=!1,label:s,labelFormatter:o,labelClassName:l,formatter:u,color:c,nameKey:d,labelKey:f},h)=>{const{config:p}=Xbe(),m=R.useMemo(()=>{var x;if(i||!(t!=null&&t.length))return null;const[y]=t,v=`${f||y.dataKey||y.name||"value"}`,b=A8(p,y,v),w=!f&&typeof s=="string"?((x=p[s])==null?void 0:x.label)||s:b==null?void 0:b.label;return o?g.jsx("div",{className:Xt("font-medium",l),children:o(w,t)}):w?g.jsx("div",{className:Xt("font-medium",l),children:w}):null},[s,o,t,i,l,p,f]);if(!e||!(t!=null&&t.length))return null;const _=t.length===1&&n!=="dot";return g.jsxs("div",{ref:h,className:Xt("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",r),children:[_?null:m,g.jsx("div",{className:"grid gap-1.5",children:t.map((y,v)=>{const b=`${d||y.name||y.dataKey||"value"}`,w=A8(p,y,b),x=c||y.payload.fill||y.color;return g.jsx("div",{className:Xt("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",n==="dot"&&"items-center"),children:u&&(y==null?void 0:y.value)!==void 0&&y.name?u(y.value,y.name,y,v,y.payload):g.jsxs(g.Fragment,{children:[w!=null&&w.icon?g.jsx(w.icon,{}):!a&&g.jsx("div",{className:Xt("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent":n==="dashed","my-0.5":_&&n==="dashed"}),style:{"--color-bg":x,"--color-border":x}}),g.jsxs("div",{className:Xt("flex flex-1 justify-between leading-none",_?"items-end":"items-center"),children:[g.jsxs("div",{className:"grid gap-1.5",children:[_?m:null,g.jsx("span",{className:"text-muted-foreground",children:(w==null?void 0:w.label)||y.name})]}),y.value&&g.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:y.value.toLocaleStr
654ing()})]})]})},y.dataKey)})})]})});Qbe.displayName="ChartTooltip";const w0t=R.forwardRef(({className:e,hideIcon:t=!1,payload:r,verticalAlign:n="bottom",nameKey:i},a)=>{const{config:s}=Xbe();return r!=null&&r.length?g.jsx("div",{ref:a,className:Xt("flex items-center justify-center gap-4",n==="top"?"pb-3":"pt-3",e),children:r.map(o=>{const l=`${i||o.dataKey||"value"}`,u=A8(s,o,l);return g.jsxs("div",{className:Xt("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!t?g.jsx(u.icon,{}):g.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:o.color}}),u==null?void 0:u.label]},o.value)})}):null});w0t.displayName="ChartLegend";function A8(e,t,r){if(typeof t!="object"||t===null)return;const n="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=r;return r in t&&typeof t[r]=="string"?i=t[r]:n&&r in n&&typeof n[r]=="string"&&(i=n[r]),i in e?e[i]:e[r]}const x0t=()=>{let e=sessionStorage.getItem("analytics_session_id");return e||(e=crypto.randomUUID(),sessionStorage.setItem("analytics_session_id",e)),e},E0t=e=>e.includes("Firefox")?"Firefox":e.includes("SamsungBrowser")?"Samsung Browser":e.includes("Opera")||e.includes("OPR")?"Opera":e.includes("Edge")?"Edge":e.includes("Chrome")?"Chrome":e.includes("Safari")?"Safari":"Other",T0t=e=>/tablet|ipad|playbook|silk/i.test(e)?"tablet":/mobile|iphone|ipod|android|blackberry|opera mini|iemobile/i.test(e)?"mobile":"desktop",S0t=e=>{if(!e)return"direct";try{const r=new URL(e).hostname.replace("www.","");return r.includes("lovable")||r.includes("google")?"Google":r.includes("facebook")||r.includes("fb.")?"Facebook":r.includes("twitter")||r.includes("t.co")?"Twitter/X":r.includes("instagram")?"Instagram":r.includes("linkedin")?"LinkedIn":r.includes("youtube")?"YouTube":r.includes("bing")?"Bing":r.includes("yahoo")?"Yahoo":r}catch{return"direct"}},Ite=e=>e?e.toLowerCase().includes("lovable")?"Google":e:"direct",A0t=async e=>{try{const t=navigator.userAgent,r=document.referrer,n=r?S0t(r):"direct";await nn.from("page_views").insert({page_path:e,referrer:r||null,referrer_host:n,user_agent:t,browser:E0t(t),device_type:T0t(t),session_id:x0t()})}catch(t){console.error("Analytics tracking error:",t)}},Dte=e=>e==="/"?"Home":e.split("/").filter(Boolean).map(t=>t.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")).join(" ⺠"),C0t=()=>{const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(t);r.setDate(r.getDate()-1);const n=new Date(t);n.setDate(n.getDate()-7);const i=new Date(t);i.setDate(i.getDate()-30);const a=new Date(t);return a.setFullYear(a.getFullYear()-1),{today:t.toISOString(),yesterday:r.toISOString(),weekAgo:n.toISOString(),monthAgo:i.toISOString(),yearAgo:a.toISOString()}};function ra(e){"@babel/helpers - typeof";return ra=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},ra(e)}var th=Uint8Array,Gc=Uint16Array,R9=Int32Array,$9=new th([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),F9=new th([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Lte=new th([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zbe=function(e,t){for(var r=new Gc(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new R9(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return{b:r,r:i}},Jbe=Zbe($9,2),P0t=Jbe.b,C8=Jbe.r;P0t[28]=258,C8[258]=28;var M0t=Zbe(F9,0),jte=M0t.r,P8=new Gc(32768);for(var Xa=0;Xa<32768;++Xa){var Lm=(Xa&43690)>>1|(Xa&21845)<<1;Lm=(Lm&52428)>>2|(Lm&13107)<<2,Lm=(Lm&61680)>>4|(Lm&3855)<<4,P8[Xa]=((Lm&65280)>>8|(Lm&255)<<8)>>1}var pT=function(e,t,r){for(var n=e.length,i=0,a=new Gc(t);i<n;++i)e[i]&&++a[e[i]-1];var s=new Gc(t);for(i=1;i<t;++i)s[i]=s[i-1]+a[i-1]<<1;var o;if(r){o=new Gc(1<<t);var l=15-t;for(i=0;i<n;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],d=s[e[i]-1]++<<c,f=d|(1<<c)-1;d<=f;++d)o[P8[d]>>l]=u}else for(o=new Gc(n),i=0;i<n;++i)e[i]&&(o[i]=P8[s[e[i]-1]++]>>15-e[i]);return o},Vv=new th(288);for(var Xa=0;Xa<144;++Xa)Vv[Xa]=8;for(var Xa=144;Xa<256;++Xa)Vv[Xa]=9;for(var Xa=256;Xa<280;++Xa)Vv[Xa]=7;for(var Xa=280;Xa<288;++Xa)Vv[Xa]=8;var cO=new th(32);for(var Xa=0;Xa<32;++Xa)cO[Xa]=5;var k0t=pT(Vv,9,0),O0t=pT(cO,5,0),ewe=function(e){return(e+7)/8|0},N0t=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new th(e.subarray(t,r))},yp=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},B2=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},EL=function(e,t){for(var r=[],n=0;n<e.length;
vendor: 11,972 bytes, lines 654-655
654++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,a=r.slice();if(!i)return{t:rwe,l:0};if(i==1){var s=new th(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(x,E){return x.f-E.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],u=0,c=1,d=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=i-1;)o=r[r[u].f<r[d].f?u++:d++],l=r[u!=c&&r[u].f<r[d].f?u++:d++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};for(var f=a[0].s,n=1;n<i;++n)a[n].s>f&&(f=a[n].s);var h=new Gc(f+1),p=M8(r[c-1],h,0);if(p>t){var n=0,m=0,_=p-t,y=1<<_;for(a.sort(function(E,T){return h[T.s]-h[E.s]||E.f-T.f});n<i;++n){var v=a[n].s;if(h[v]>t)m+=y-(1<<p-h[v]),h[v]=t;else break}for(m>>=_;m>0;){var b=a[n].s;h[b]<t?m-=1<<t-h[b]++-1:++n}for(;n>=0&&m;--n){var w=a[n].s;h[w]==t&&(--h[w],++m)}p=t}return{t:new th(h),l:p}},M8=function(e,t,r){return e.s==-1?Math.max(M8(e.l,t,r+1),M8(e.r,t,r+1)):t[e.s]=r},Rte=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Gc(++t),n=0,i=e[0],a=1,s=function(l){r[n++]=l},o=1;o<=t;++o)if(e[o]==i&&o!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=e[o]}return{c:r.subarray(0,n),n:t}},z2=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},twe=function(e,t,r){var n=r.length,i=ewe(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<n;++a)e[i+a+4]=r[a];return(i+4+n)*8},$te=function(e,t,r,n,i,a,s,o,l,u,c){yp(t,c++,r),++i[256];for(var d=EL(i,15),f=d.t,h=d.l,p=EL(a,15),m=p.t,_=p.l,y=Rte(f),v=y.c,b=y.n,w=Rte(m),x=w.c,E=w.n,T=new Gc(19),S=0;S<v.length;++S)++T[v[S]&31];for(var S=0;S<x.length;++S)++T[x[S]&31];for(var A=EL(T,7),C=A.t,k=A.l,M=19;M>4&&!C[Lte[M-1]];--M);var D=u+5<<3,$=z2(i,Vv)+z2(a,cO)+s,V=z2(i,f)+z2(a,m)+s+14+3*M+z2(T,C)+2*T[16]+3*T[17]+7*T[18];if(l>=0&&D<=$&&D<=V)return twe(t,c,e.subarray(l,l+u));var U,B,z,q;if(yp(t,c,1+(V<$)),c+=2,V<$){U=pT(f,h,0),B=f,z=pT(m,_,0),q=m;var L=pT(C,k,0);yp(t,c,b-257),yp(t,c+5,E-1),yp(t,c+10,M-4),c+=14;for(var S=0;S<M;++S)yp(t,c+3*S,C[Lte[S]]);c+=3*M;for(var K=[v,x],O=0;O<2;++O)for(var N=K[O],S=0;S<N.length;++S){var X=N[S]&31;yp(t,c,L[X]),c+=C[X],X>15&&(yp(t,c,N[S]>>5&127),c+=N[S]>>12)}}else U=k0t,B=Vv,z=O0t,q=cO;for(var S=0;S<o;++S){var ie=n[S];if(ie>255){var X=ie>>18&31;B2(t,c,U[X+257]),c+=B[X+257],X>7&&(yp(t,c,ie>>23&31),c+=$9[X]);var ee=ie&31;B2(t,c,z[ee]),c+=q[ee],ee>3&&(B2(t,c,ie>>5&8191),c+=F9[ee])}else B2(t,c,U[ie]),c+=B[ie]}return B2(t,c,U[256]),c+B[256]},I0t=new R9([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),rwe=new th(0),D0t=function(e,t,r,n,i,a){var s=a.z||e.length,o=new th(n+s+5*(1+Math.ceil(s/7e3))+i),l=o.subarray(n,o.length-i),u=a.l,c=(a.r||0)&7;if(t){c&&(l[0]=a.r>>3);for(var d=I0t[t-1],f=d>>13,h=d&8191,p=(1<<r)-1,m=a.p||new Gc(32768),_=a.h||new Gc(p+1),y=Math.ceil(r/3),v=2*y,b=function(Se){return(e[Se]^e[Se+1]<<y^e[Se+2]<<v)&p},w=new R9(25e3),x=new Gc(288),E=new Gc(32),T=0,S=0,A=a.i||0,C=0,k=a.w||0,M=0;A+2<s;++A){var D=b(A),$=A&32767,V=_[D];if(m[$]=V,_[D]=$,k<=A){var U=s-A;if((T>7e3||C>24576)&&(U>423||!u)){c=$te(e,l,0,w,x,E,S,C,M,A-M,c),C=T=S=0,M=A;for(var B=0;B<286;++B)x[B]=0;for(var B=0;B<30;++B)E[B]=0}var z=2,q=0,L=h,K=$-V&32767;if(U>2&&D==b(A-K))for(var O=Math.min(f,U)-1,N=Math.min(32767,A),X=Math.min(258,U);K<=N&&--L&&$!=V;){if(e[A+z]==e[A+z-K]){for(var ie=0;ie<X&&e[A+ie]==e[A+ie-K];++ie);if(ie>z){if(z=ie,q=K,ie>O)break;for(var ee=Math.min(K,ie-2),le=0,B=0;B<ee;++B){var Te=A-K+B&32767,be=m[Te],we=Te-be&32767;we>le&&(le=we,V=Te)}}}$=V,V=m[$],K+=$-V&32767}if(q){w[C++]=268435456|C8[z]<<18|jte[q];var ae=C8[z]&31,H=jte[q]&31;S+=$9[ae]+F9[H],++x[257+ae],++E[H],k=A+z,++T}else w[C++]=e[A],++x[e[A]]}}for(A=Math.max(A,k);A<s;++A)w[C++]=e[A],++x[e[A]];c=$te(e,l,u,w,x,E,S,C,M,A-M,c),u||(a.r=c&7|l[c/8|0]<<3,c-=7,a.h=_,a.p=m,a.i=A,a.w=k)}else{for(var A=a.w||0;A<s+u;A+=65535){var fe=A+65535;fe>=s&&(l[c/8|0]=u,fe=s),c=twe(l,c+1,e.subarray(A,fe))}a.i=s}return N0t(o,0,n+ewe(c)+i)},nwe=function(){var e=1,t=0;return{p:function(r){for(var n=e,i=t,a=r.length|0,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=n+=r[s];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}e=n,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},L0t=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),s=new th(a.length+e.length);s.set(a),s.set(e,a.length),e=s,i.w=a.length}return D0t(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},iwe=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},j0t=function(e,t){var r=t.level,n=r==0?0:r<6?1:r==9?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=nwe();i.p(t.dictionary),iwe(e,2,i.d())}};function k8(e,t){t||(t={});var r=nwe();r.p(e);var n=L0t(e,t,t.dictionary?6:2,4);return j0t(n,t),iwe(n,n.length-4,r.d()),n}var R0t=typeof TextDecoder<"u"&&new TextDecoder,$0t=0;try{R0t.decode(rwe,{stream:!0}),$0t=1}catch{}function F0t(e){if(Array.isArray(e))return e}function B0t(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Fte(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function z0t(e,t){if(e){if(typeof e=="string")return Fte(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fte(e,t):void 0}}function U0t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 655In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bte(e,t){return F0t(e)||B0t(e,t)||z0t(e,t)||U0t()}function zte(e,t="utf8"){return new TextDecoder(t).decode(e)}const W0t=new TextEncoder;function V0t(e){return W0t.encode(e)}const H0t=1024*8,G0t=(()=>{const e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),TL={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class B9{constructor(t=H0t,r={}){Le(this,"buffer");Le(this,"byteLength");Le(this,"byteOffset");Le(this,"length");Le(this,"offset");Le(this,"lastWrittenByte");Le(this,"littleEndian");Le(this,"_data");Le(this,"_mark");Le(this,"_marks");let n=!1;typeof t=="number"?t=new ArrayBuffer(t):(n=!0,this.lastWrittenByte=t.byteLength);const i=r.offset?r.offset>>>0:0,a=t.byteLength-i;let s=i;(ArrayBuffer.isView(t)||t instanceof B9)&&(t.byteLength!==t.buffer.byteLength&&(s=t.byteOffset+i),t=t.buffer),n?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=s,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,s,a),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const n=(this.offset+t)*2,i=new Uint8Array(n);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=n,this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,r){const n=TL[r].BYTES_PER_ELEMENT*t,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+n);if(this.littleEndian===G0t&&r!=="uint8"&&r!=="int8"){const o=new Uint8Array(this.buffer.slice(i,i+n));o.reverse();const l=new TL[r](o.buffer);return this.offset+=n,l.reverse(),l}const s=new TL[r](a);return this.offset+=n,s}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let n=0;n<t;n++)r+=this.readChar();return r}readUtf8(t=1){return zte(this.readBytes(t))}decodeText(t=1,r="utf8"){return zte(this.readBytes(t),r)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let r=0;r<t.length;r++)this._data.setUint8(this.offset++,t[r]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));return this}writeUtf8(t){return this.writeBytes(V0t(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const q0t=4,Ute=0,Wte=1,K0t=2;function xx(e){let t=e.length;for(;--t>=0;)e[t]=0}const Y0t=0,awe=1,X0t=2,Q0t=3,Z0t=258,z9=29,nC=256,nA=nC+1+z9,gb
vendor: 28,340 bytes, line 655
655=30,U9=19,swe=2*nA+1,zy=15,SL=16,J0t=7,W9=256,owe=16,lwe=17,uwe=18,O8=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),kk=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),eyt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),cwe=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tyt=512,Pp=new Array((nA+2)*2);xx(Pp);const mT=new Array(gb*2);xx(mT);const iA=new Array(tyt);xx(iA);const aA=new Array(Z0t-Q0t+1);xx(aA);const V9=new Array(z9);xx(V9);const dO=new Array(gb);xx(dO);function AL(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}let dwe,fwe,hwe;function CL(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const pwe=e=>e<256?iA[e]:iA[256+(e>>>7)],sA=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},ec=(e,t,r)=>{e.bi_valid>SL-r?(e.bi_buf|=t<<e.bi_valid&65535,sA(e,e.bi_buf),e.bi_buf=t>>SL-e.bi_valid,e.bi_valid+=r-SL):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},kh=(e,t,r)=>{ec(e,r[t*2],r[t*2+1])},mwe=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},ryt=e=>{e.bi_valid===16?(sA(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},nyt=(e,t)=>{const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,c,d,f,h,p,m=0;for(f=0;f<=zy;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<swe;u++)c=e.heap[u],f=r[r[c*2+1]*2+1]+1,f>l&&(f=l,m++),r[c*2+1]=f,!(c>n)&&(e.bl_count[f]++,h=0,c>=o&&(h=s[c-o]),p=r[c*2],e.opt_len+=p*(f+h),a&&(e.static_len+=p*(i[c*2+1]+h)));if(m!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(f=l;f!==0;f--)for(c=e.bl_count[f];c!==0;)d=e.heap[--u],!(d>n)&&(r[d*2+1]!==f&&(e.opt_len+=(f-r[d*2+1])*r[d*2],r[d*2+1]=f),c--)}},gwe=(e,t,r)=>{const n=new Array(zy+1);let i=0,a,s;for(a=1;a<=zy;a++)i=i+r[a-1]<<1,n[a]=i;for(s=0;s<=t;s++){let o=e[s*2+1];o!==0&&(e[s*2]=mwe(n[o]++,o))}},iyt=()=>{let e,t,r,n,i;const a=new Array(zy+1);for(r=0,n=0;n<z9-1;n++)for(V9[n]=r,e=0;e<1<<O8[n];e++)aA[r++]=n;for(aA[r-1]=n,i=0,n=0;n<16;n++)for(dO[n]=i,e=0;e<1<<kk[n];e++)iA[i++]=n;for(i>>=7;n<gb;n++)for(dO[n]=i<<7,e=0;e<1<<kk[n]-7;e++)iA[256+i++]=n;for(t=0;t<=zy;t++)a[t]=0;for(e=0;e<=143;)Pp[e*2+1]=8,e++,a[8]++;for(;e<=255;)Pp[e*2+1]=9,e++,a[9]++;for(;e<=279;)Pp[e*2+1]=7,e++,a[7]++;for(;e<=287;)Pp[e*2+1]=8,e++,a[8]++;for(gwe(Pp,nA+1,a),e=0;e<gb;e++)mT[e*2+1]=5,mT[e*2]=mwe(e,5);dwe=new AL(Pp,O8,nC+1,nA,zy),fwe=new AL(mT,kk,0,gb,zy),hwe=new AL(new Array(0),eyt,0,U9,J0t)},ywe=e=>{let t;for(t=0;t<nA;t++)e.dyn_ltree[t*2]=0;for(t=0;t<gb;t++)e.dyn_dtree[t*2]=0;for(t=0;t<U9;t++)e.bl_tree[t*2]=0;e.dyn_ltree[W9*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},vwe=e=>{e.bi_valid>8?sA(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Vte=(e,t,r,n)=>{const i=t*2,a=r*2;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]},PL=(e,t,r)=>{const n=e.heap[r];let i=r<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Vte(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Vte(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n},Hte=(e,t,r)=>{let n,i,a=0,s,o;if(e.sym_next!==0)do n=e.pending_buf[e.sym_buf+a++]&255,n+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],n===0?kh(e,i,t):(s=aA[i],kh(e,s+nC+1,t),o=O8[s],o!==0&&(i-=V9[s],ec(e,i,o)),n--,s=pwe(n),kh(e,s,r),o=kk[s],o!==0&&(n-=dO[s],ec(e,n,o)));while(a<e.sym_next);kh(e,W9,t)},N8=(e,t)=>{const r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems;let s,o,l=-1,u;for(e.heap_len=0,e.heap_max=swe,s=0;s<a;s++)r[s*2]!==0?(e.heap[++e.heap_len]=l=s,e.depth[s]=0):r[s*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=l<2?++l:0,r[u*2]=1,e.depth[u]=0,e.opt_len--,i&&(e.static_len-=n[u*2+1]);for(t.max_code=l,s=e.heap_len>>1;s>=1;s--)PL(e,r,s);u=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],PL(e,r,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,r[u*2]=r[s*2]+r[o*2],e.depth[u]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,r[s*2+1]=r[o*2+1]=u,e.heap[1]=u++,PL(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],nyt(e,t),gwe(r,l,e.bl_count)},Gte=(e,t,r)=>{let n,i=-1,a,s=t[0*2+1],o=0,l=7,u=4;for(s===0&&(l=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=t[(n+1)*2+1],!(++o<l&&a===s)&&(o<u?e.bl_tree[a*2]+=o:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[owe*2]++):o<=10?e.bl_tree[lwe*2]++:e.bl_tree[uwe*2]++,o=0,i=a,s===0?(l=138,u=3):a===s?(l=6,u=3):(l=7,u=4))},qte=(e,t,r)=>{let n,i=-1,a,s=t[0*2+1],o=0,l=7,u=4;for(s===0&&(l=138,u=3),n=0;n<=r;n++)if(a=s,s=t[(n+1)*2+1],!(++o<l&&a===s)){if(o<u)do kh(e,a,e.bl_tree);while(--o!==0);else a!==0?(a!==i&&(kh(e,a,e.bl_tree),o--),kh(e,owe,e.bl_tree),ec(e,o-3,2)):o<=10?(kh(e,lwe,e.bl_tree),ec(e,o-3,3)):(kh(e,uwe,e.bl_tree),ec(e,o-11,7));o=0,i=a,s===0?(l=138,u=3):a===s?(l=6,u=3):(l=7,u=4)}},ayt=e=>{let t;for(Gte(e,e.dyn_ltree,e.l_desc.max_code),Gte(e,e.dyn_dtree,e.d_desc.max_code),N8(e,e.bl_desc),t=U9-1;t>=3&&e.bl_tree[cwe[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},syt=(e,t,r,n)=>{let i;for(ec(e,t-257,5),ec(e,r-1,5),ec(e,n-4,4),i=0;i<n;i++)ec(e,e.bl_tree[cwe[i]*2+1],3);qte(e,e.dyn_ltree,t-1),qte(e,e.dyn_dtree,r-1)},oyt=e=>{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Ute;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Wte;for(r=32;r<nC;r++)if(e.dyn_ltree[r*2]!==0)return Wte;return Ute};let Kte=!1;const lyt=e=>{Kte||(iyt(),Kte=!0),e.l_desc=new CL(e.dyn_ltree,dwe),e.d_desc=new CL(e.dyn_dtree,fwe),e.bl_desc=new CL(e.bl_tree,hwe),e.bi_buf=0,e.bi_valid=0,ywe(e)},_we=(e,t,r,n)=>{ec(e,(Y0t<<1)+(n?1:0),3),vwe(e),sA(e,r),sA(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},uyt=e=>{ec(e,awe<<1,3),kh(e,W9,Pp),ryt(e)},cyt=(e,t,r,n)=>{let i,a,s=0;e.level>0?(e.strm.data_type===K0t&&(e.strm.data_type=oyt(e)),N8(e,e.l_desc),N8(e,e.d_desc),s=ayt(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?_we(e,t,r,n):e.strategy===q0t||a===i?(ec(e,(awe<<1)+(n?1:0),3),Hte(e,Pp,mT)):(ec(e,(X0t<<1)+(n?1:0),3),syt(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Hte(e,e.dyn_ltree,e.dyn_dtree)),ywe(e),n&&vwe(e)},dyt=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(aA[r]+nC+1)*2]++,e.dyn_dtree[pwe(t)*2]++),e.sym_next===e.sym_end);var fyt=lyt,hyt=_we,pyt=cyt,myt=dyt,gyt=uyt,yyt={_tr_init:fyt,_tr_stored_block:hyt,_tr_flush_block:pyt,_tr_tally:myt,_tr_align:gyt};const vyt=(e,t,r,n)=>{let i=e&65535|0,a=e>>>16&65535|0,s=0;for(;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+t[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0};var oA=vyt;const _yt=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},byt=new Uint32Array(_yt()),wyt=(e,t,r,n)=>{const i=byt,a=n+r;e^=-1;for(let s=n;s<a;s++)e=e>>>8^i[(e^t[s])&255];return e^-1};var Qo=wyt,Rw={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},iC={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:xyt,_tr_stored_block:I8,_tr_flush_block:Eyt,_tr_tally:Vg,_tr_align:Tyt}=yyt,{Z_NO_FLUSH:Hg,Z_PARTIAL_FLUSH:Syt,Z_FULL_FLUSH:Ayt,Z_FINISH:zd,Z_BLOCK:Yte,Z_OK:gl,Z_STREAM_END:Xte,Z_STREAM_ERROR:qh,Z_DATA_ERROR:Cyt,Z_BUF_ERROR:ML,Z_DEFAULT_COMPRESSION:Pyt,Z_FILTERED:Myt,Z_HUFFMAN_ONLY:mM,Z_RLE:kyt,Z_FIXED:Oyt,Z_DEFAULT_STRATEGY:Nyt,Z_UNKNOWN:Iyt,Z_DEFLATED:xI}=iC,Dyt=9,Lyt=15,jyt=8,Ryt=29,$yt=256,D8=$yt+1+Ryt,Fyt=30,Byt=19,zyt=2*D8+1,Uyt=15,hi=3,Sg=258,Kh=Sg+hi+1,Wyt=32,$w=42,H9=57,L8=69,j8=73,R8=91,$8=103,Uy=113,SE=666,Cu=1,Ex=2,Hv=3,Tx=4,Vyt=3,Wy=(e,t)=>(e.msg=Rw[t],t),Qte=e=>e*2-(e>4?9:0),tg=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Hyt=e=>{let t,r,n,i=e.w_size;t=e.hash_size,n=t;do r=e.head[--n],e.head[n]=r>=i?r-i:0;while(--t);t=i,n=t;do r=e.prev[--n],e.prev[n]=r>=i?r-i:0;while(--t)};let Gyt=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask,Gg=Gyt;const Pc=e=>{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},qc=(e,t)=>{Eyt(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Pc(e.strm)},Fi=(e,t)=>{e.pending_buf[e.pending++]=t},U2=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},F8=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),e.state.wrap===1?e.adler=oA(e.adler,t,i,r):e.state.wrap===2&&(e.adler=Qo(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},bwe=(e,t)=>{let r=e.max_chain_length,n=e.strstart,i,a,s=e.prev_length,o=e.nice_match;const l=e.strstart>e.w_size-Kh?e.strstart-(e.w_size-Kh):0,u=e.window,c=e.w_mask,d=e.prev,f=e.strstart+Sg;let h=u[n+s-1],p=u[n+s];e.prev_length>=e.good_match&&(r>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=t,!(u[i+s]!==p||u[i+s-1]!==h||u[i]!==u[n]||u[++i]!==u[n+1])){n+=2,i++;do;while(u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&n<f);if(a=Sg-(f-n),n=f-Sg,a>s){if(e.match_start=t,s=a,a>=o)break;h=u[n+s-1],p=u[n+s]}}while((t=d[t&c])>l&&--r!==0);return s<=e.lookahead?s:e.lookahead},Fw=e=>{const t=e.w_size;let r,n,i;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Kh)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Hyt(e),n+=t),e.strm.avail_in===0)break;if(r=F8(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=hi)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Gg(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Gg(e,e.ins_h,e.window[i+hi-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<hi)););}while(e.lookahead<Kh&&e.strm.avail_in!==0)},wwe=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,i,a,s=0,o=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,n>i+e.strm.avail_in&&(n=i+e.strm.avail_in),n>a&&(n=a),n<r&&(n===0&&t!==zd||t===Hg||n!==i+e.strm.avail_in)))break;s=t===zd&&n===i+e.strm.avail_in?1:0,I8(e,0,0,s),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Pc(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(F8(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(s===0);return o-=e.strm.avail_in,o&&(o>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=o&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-o,e.strm.next_in),e.strstart),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?Tx:t!==Hg&&t!==zd&&e.strm.avail_in===0&&e.strstart===e.block_start?Ex:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(F8(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,r=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=r||(i||t===zd)&&t!==Hg&&e.strm.avail_in===0&&i<=a)&&(n=i>a?a:i,s=t===zd&&e.strm.avail_in===0&&n===i?1:0,I8(e,e.block_start,n,s),e.block_start+=n,Pc(e.strm)),s?Hv:Cu)},kL=(e,t)=>{let r,n;for(;;){if(e.lookahead<Kh){if(Fw(e),e.lookahead<Kh&&t===Hg)return Cu;if(e.lookahead===0)break}if(r=0,e.lookahead>=hi&&(e.ins_h=Gg(e,e.ins_h,e.window[e.strstart+hi-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Kh&&(e.match_length=bwe(e,r)),e.match_length>=hi)if(n=Vg(e,e.strstart-e.match_start,e.match_length-hi),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=hi){e.match_length--;do e.strstart++,e.ins_h=Gg(e,e.ins_h,e.window[e.strstart+hi-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Gg(e,e.ins_h,e.window[e.strstart+1]);else n=Vg(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(qc(e,!1),e.strm.avail_out===0))return Cu}return e.insert=e.strstart<hi-1?e.strstart:hi-1,t===zd?(qc(e,!0),e.strm.avail_out===0?Hv:Tx):e.sym_next&&(qc(e,!1),e.strm.avail_out===0)?Cu:Ex},r1=(e,t)=>{let r,n,i;for(;;){if(e.lookahead<Kh){if(Fw(e),e.lookahead<Kh&&t===Hg)return Cu;if(e.lookahead===0)break}if(r=0,e.lookahead>=hi&&(e.ins_h=Gg(e,e.ins_h,e.window[e.strstart+hi-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=hi-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Kh&&(e.match_length=bwe(e,r),e.match_length<=5&&(e.strategy===Myt||e.match_length===hi&&e.strstart-e.match_start>4096)&&(e.match_length=hi-1)),e.prev_length>=hi&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-hi,n=Vg(e,e.strstart-1-e.prev_match,e.prev_length-hi),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Gg(e,e.ins_h,e.window[e.strstart+hi-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=hi-1,e.strstart++,n&&(qc(e,!1),e.strm.avail_out===0))return Cu}else if(e.match_available){if(n=Vg(e,0,e.window[e.strstart-1]),n&&qc(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Cu}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Vg(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<hi-1?e.strstart:hi-1,t===zd?(qc(e,!0),e.strm.avail_out===0?Hv:Tx):e.sym_next&&(qc(e,!1),e.strm.avail_out===0)?Cu:Ex},qyt=(e,t)=>{let r,n,i,a;const s=e.window;for(;;){if(e.lookahead<=Sg){if(Fw(e),e.lookahead<=Sg&&t===Hg)return Cu;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=hi&&e.strstart>0&&(i=e.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=e.strstart+Sg;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);e.match_length=Sg-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=hi?(r=Vg(e,1,e.match_length-hi),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Vg(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(qc(e,!1),e.strm.avail_out===0))return Cu}return e.insert=0,t===zd?(qc(e,!0),e.strm.avail_out===0?Hv:Tx):e.sym_next&&(qc(e,!1),e.strm.avail_out===0)?Cu:Ex},Kyt=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(Fw(e),e.lookahead===0)){if(t===Hg)return Cu;break}if(e.match_length=0,r=Vg(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(qc(e,!1),e.strm.avail_out===0))return Cu}return e.insert=0,t===zd?(qc(e,!0),e.strm.avail_out===0?Hv:Tx):e.sym_next&&(qc(e,!1),e.strm.avail_out===0)?Cu:Ex};function mh(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}const AE=[new mh(0,0,0,0,wwe),new mh(4,4,8,4,kL),new mh(4,5,16,8,kL),new mh(4,6,32,32,kL),new mh(4,4,16,16,r1),new mh(8,16,32,32,r1),new mh(8,16,128,128,r1),new mh(8,32,128,256,r1),new mh(32,128,258,1024,r1),new mh(32,258,258,4096,r1)],Yyt=e=>{e.window_size=2*e.w_size,tg(e.head),e.max_lazy_match=AE[e.level].max_lazy,e.good_match=AE[e.level].good_length,e.nice_match=AE[e.level].nice_length,e.max_chain_length=AE[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=hi-1,e.match_available=0,e.ins_h=0};function Xyt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=xI,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(zyt*2),this.dyn_dtree=new Uint16Array((2*Fyt+1)*2),this.bl_tree=new Uint16Array((2*Byt+1)*2),tg(this.dyn_ltree),tg(this.dyn_dtree),tg(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Uyt+1),this.heap=new Uint16Array(2*D8+1),tg(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*D8+1),tg(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const aC=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==$w&&t.status!==H9&&t.status!==L8&&t.status!==j8&&t.status!==R8&&t.status!==$8&&t.status!==Uy&&t.status!==SE?1:0},xwe=e=>{if(aC(e))return Wy(e,qh);e.total_in=e.total_out=0,e.data_type=Iyt;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?H9:t.wrap?$w:Uy,e.adler=t.wrap===2?0:1,t.last_flush=-2,xyt(t),gl},Ewe=e=>{const t=xwe(e);return t===gl&&Yyt(e.state),t},Qyt=(e,t)=>aC(e)||e.state.wrap!==2?qh:(e.state.gzhead=t,gl),Twe=(e,t,r,n,i,a)=>{if(!e)return qh;let s=1;if(t===Pyt&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>Dyt||r!==xI||n<8||n>15||t<0||t>9||a<0||a>Oyt||n===8&&s!==1)return Wy(e,qh);n===8&&(n=9);const o=new Xyt;return e.state=o,o.strm=e,o.status=$w,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+hi-1)/hi),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=t,o.strategy=a,o.method=r,Ewe(e)},Zyt=(e,t)=>Twe(e,t,xI,Lyt,jyt,Nyt),Jyt=(e,t)=>{if(aC(e)||t>Yte||t<0)return e?Wy(e,qh):qh;const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===SE&&t!==zd)return Wy(e,e.avail_out===0?ML:qh);const n=r.last_flush;if(r.last_flush=t,r.pending!==0){if(Pc(e),e.avail_out===0)return r.last_flush=-1,gl}else if(e.avail_in===0&&Qte(t)<=Qte(n)&&t!==zd)return Wy(e,ML);if(r.status===SE&&e.avail_in!==0)return Wy(e,ML);if(r.status===$w&&r.wrap===0&&(r.status=Uy),r.status===$w){let i=xI+(r.w_bits-8<<4)<<8,a=-1;if(r.strategy>=mM||r.level<2?a=0:r.level<6?a=1:r.level===6?a=2:a=3,i|=a<<6,r.strstart!==0&&(i|=Wyt),i+=31-i%31,U2(r,i),r.strstart!==0&&(U2(r,e.adler>>>16),U2(r,e.adler&65535)),e.adler=1,r.status=Uy,Pc(e),r.pending!==0)return r.last_flush=-1,gl}if(r.status===H9){if(e.adler=0,Fi(r,31),Fi(r,139),Fi(r,8),r.gzhead)Fi(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Fi(r,r.gzhead.time&255),Fi(r,r.gzhead.time>>8&255),Fi(r,r.gzhead.time>>16&255),Fi(r,r.gzhead.time>>24&255),Fi(r,r.level===9?2:r.strategy>=mM||r.level<2?4:0),Fi(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Fi(r,r.gzhead.extra.length&255),Fi(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Qo(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=L8;else if(Fi(r,0),Fi(r,0),Fi(r,0),Fi(r,0),Fi(r,0),Fi(r,r.level===9?2:r.strategy>=mM||r.level<2?4:0),Fi(r,Vyt),r.status=Uy,Pc(e),r.pending!==0)return r.last_flush=-1,gl}if(r.status===L8){if(r.gzhead.extra){let i=r.pending,a=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+a>r.pending_buf_size;){let o=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>i&&(e.adler=Qo(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex+=o,Pc(e),r.pending!==0)return r.last_flush=-1,gl;i=0,a-=o}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+a),r.pending),r.pending+=a,r.gzhead.hcrc&&r.pending>i&&(e.adler=Qo(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=j8}if(r.status===j8){if(r.gzhead.name){let i=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=Qo(e.adler,r.pending_buf,r.pending-i,i)),Pc(e),r.pending!==0)return r.last_flush=-1,gl;i=0}r.gzindex<r.gzhead.name.length?a=r.gzhead.name.charCodeAt(r.gzindex++)&255:a=0,Fi(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Qo(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=R8}if(r.status===R8){if(r.gzhead.comment){let i=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=Qo(e.adler,r.pending_buf,r.pending-i,i)),Pc(e),r.pending!==0)return r.last_flush=-1,gl;i=0}r.gzindex<r.gzhead.comment.length?a=r.gzhead.comment.charCodeAt(r.gzindex++)&255:a=0,Fi(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Qo(e.adler,r.pending_buf,r.pending-i,i))}r.status=$8}if(r.status===$8){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Pc(e),r.pending!==0))return r.last_flush=-1,gl;Fi(r,e.adler&255),Fi(r,e.adler>>8&255),e.adler=0}if(r.status=Uy,Pc(e),r.pending!==0)return r.last_flush=-1,gl}if(e.avail_in!==0||r.lookahead!==0||t!==Hg&&r.status!==SE){let i=r.level===0?wwe(r,t):r.strategy===mM?Kyt(r,t):r.strategy===kyt?qyt(r,t):AE[r.level].func(r,t);if((i===Hv||i===Tx)&&(r.status=SE),i===Cu||i===Hv)return e.avail_out===0&&(r.last_flush=-1),gl;if(i===Ex&&(t===Syt?Tyt(r):t!==Yte&&(I8(r,0,0,!1),t===Ayt&&(tg(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Pc(e),e.avail_out===0))return r.last_flush=-1,gl}return t!==zd?gl:r.wrap<=0?Xte:(r.wrap===2?(Fi(r,e.adler&255),Fi(r,e.adler>>8&255),Fi(r,e.adler>>16&255),Fi(r,e.adler>>24&255),Fi(r,e.total_in&255),Fi(r,e.total_in>>8&255),Fi(r,e.total_in>>16&255),Fi(r,e.total_in>>24&255)):(U2(r,e.adler>>>16),U2(r,e.adler&65535)),Pc(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?gl:Xte)},evt=e=>{if(aC(e))return qh;const t=e.state.status;return e.state=null,t===Uy?Wy(e,Cyt):gl},tvt=(e,t)=>{let r=t.length;if(aC(e))return qh;const n=e.state,i=n.wrap;if(i===2||i===1&&n.status!==$w||n.lookahead)return qh;if(i===1&&(e.adler=oA(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){i===0&&(tg(n.head),n.strstart=0,n.block_start=0,n.insert=0);let l=new Uint8Array(n.w_size);l.set(t.subarray(r-n.w_size,r),0),t=l,r=n.w_size}const a=e.avail_in,s=e.next_in,o=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Fw(n);n.lookahead>=hi;){let l=n.strstart,u=n.lookahead-(hi-1);do n.ins_h=Gg(n,n.ins_h,n.window[l+hi-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++;while(--u);n.strstart=l,n.lookahead=hi-1,Fw(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=hi-1,n.match_available=0,e.next_in=s,e.input=o,e.avail_in=a,n.wrap=i,gl};var rvt=Zyt,nvt=Twe,ivt=Ewe,avt=xwe,svt=Qyt,ovt=Jyt,lvt=evt,uvt=tvt,cvt="pako deflate (from Nodeca project)",gT={deflateInit:rvt,deflateInit2:nvt,deflateReset:ivt,deflateResetKeep:avt,deflateSetHeader:svt,deflate:ovt,deflateEnd:lvt,deflateSetDictionary:uvt,deflateInfo:cvt};const dvt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var fvt=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const n in r)dvt(r,n)&&(e[n]=r[n])}}return e},hvt=e=>{let t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].length;const r=new Uint8Array(t);for(let n=0,i=0,a=e.length;n<a;n++){let s=e[n];r.set(s,i),i+=s.length}return r},EI={assign:fvt,flattenChunks:hvt};let Swe=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Swe=!1}const lA=new Uint8Array(256);for(let e=0;e<256;e++)lA[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;lA[254]=lA[254]=1;var pvt=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,i,a,s=e.length,o=0;for(i=0;i<s;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<s&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(o),a=0,i=0;a<o;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<s&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};const mvt=(e,t)=>{if(t<65534&&e.subarray&&Swe)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r};var gvt=(e,t)=>{const r=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let n,i;const a=new Array(r*2);for(i=0,n=0;n<r;){let s=e[n++];if(s<128){a[i++]=s;continue}let o=lA[s];if(o>4){a[i++]=65533,n+=o-1;continue}for(s&=o===2?31:o===3?15:7;o>1&&n<r;)s=s<<6|e[n++]&63,o--;if(o>1){a[i++]=65533;continue}s<65536?a[i++]=s:(s-=65536,a[i++]=55296|s>>10&1023,a[i++]=56320|s&1023)}return mvt(a,i)},yvt=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+lA[e[r]]>t?r:t},uA={string2buf:pvt,buf2string:gvt,utf8border:yvt};function vvt(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Awe=vvt;const Cwe=Object.prototype.toString,{Z_NO_FLUSH:_vt,Z_SYNC_FLUSH:bvt,Z_FULL_FLUSH:wvt,Z_FINISH:xvt,Z_OK:fO,Z_STREAM_END:Evt,Z_DEFAULT_COMPRESSION:Tvt,Z_DEFAULT_STRATEGY:Svt,Z_DEFLATED:Avt}=iC;function G9(e){this.options=EI.assign({level:Tvt,method:Avt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Svt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Awe,this.strm.avail_out=0;let r=gT.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==fO)throw new Error(Rw[r]);if(t.header&&gT.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=uA.string2buf(t.dictionary):Cwe.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=gT.deflateSetDictionary(this.strm,n),r!==fO)throw new Error(Rw[r]);this._dict_set=!0}}G9.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let i,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?xvt:_vt,typeof e=="string"?r.input=uA.string2buf(e):Cwe.call(e)==="[object ArrayBuffer]"?r.input
vendor: 1,122 bytes, line 655
655=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(a===bvt||a===wvt)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(i=gT.deflate(r,a),i===Evt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=gT.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===fO;if(r.avail_out===0){this.onData(r.output);continue}if(a>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};G9.prototype.onData=function(e){this.chunks.push(e)};G9.prototype.onEnd=function(e){e===fO&&(this.result=EI.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const gM=16209,Cvt=16191;var Pvt=function(t,r){let n,i,a,s,o,l,u,c,d,f,h,p,m,_,y,v,b,w,x,E,T,S,A,C;const k=t.state;n=t.next_in,A=t.input,i=n+(t.avail_in-5),a=t.next_out,C=t.output,s=a-(r-t.avail_out),o=a+(t.avail_out-257),l=k.dmax,u=k.wsize,c=k.whave,d=k.wnext,f=k.window,h=k.hold,p=k.bits,m=k.lencode,_=k.distcode,y=(1<<k.lenbits)-1,v=(1<<k.distbits)-1;
vendor: 16,806 bytes, line 655
655e:do{p<15&&(h+=A[n++]<<p,p+=8,h+=A[n++]<<p,p+=8),b=m[h&y];t:for(;;){if(w=b>>>24,h>>>=w,p-=w,w=b>>>16&255,w===0)C[a++]=b&65535;else if(w&16){x=b&65535,w&=15,w&&(p<w&&(h+=A[n++]<<p,p+=8),x+=h&(1<<w)-1,h>>>=w,p-=w),p<15&&(h+=A[n++]<<p,p+=8,h+=A[n++]<<p,p+=8),b=_[h&v];r:for(;;){if(w=b>>>24,h>>>=w,p-=w,w=b>>>16&255,w&16){if(E=b&65535,w&=15,p<w&&(h+=A[n++]<<p,p+=8,p<w&&(h+=A[n++]<<p,p+=8)),E+=h&(1<<w)-1,E>l){t.msg="invalid distance too far back",k.mode=gM;break e}if(h>>>=w,p-=w,w=a-s,E>w){if(w=E-w,w>c&&k.sane){t.msg="invalid distance too far back",k.mode=gM;break e}if(T=0,S=f,d===0){if(T+=u-w,w<x){x-=w;do C[a++]=f[T++];while(--w);T=a-E,S=C}}else if(d<w){if(T+=u+d-w,w-=d,w<x){x-=w;do C[a++]=f[T++];while(--w);if(T=0,d<x){w=d,x-=w;do C[a++]=f[T++];while(--w);T=a-E,S=C}}}else if(T+=d-w,w<x){x-=w;do C[a++]=f[T++];while(--w);T=a-E,S=C}for(;x>2;)C[a++]=S[T++],C[a++]=S[T++],C[a++]=S[T++],x-=3;x&&(C[a++]=S[T++],x>1&&(C[a++]=S[T++]))}else{T=a-E;do C[a++]=C[T++],C[a++]=C[T++],C[a++]=C[T++],x-=3;while(x>2);x&&(C[a++]=C[T++],x>1&&(C[a++]=C[T++]))}}else if(w&64){t.msg="invalid distance code",k.mode=gM;break e}else{b=_[(b&65535)+(h&(1<<w)-1)];continue r}break}}else if(w&64)if(w&32){k.mode=Cvt;break e}else{t.msg="invalid literal/length code",k.mode=gM;break e}else{b=m[(b&65535)+(h&(1<<w)-1)];continue t}break}}while(n<i&&a<o);x=p>>3,n-=x,p-=x<<3,h&=(1<<p)-1,t.next_in=n,t.next_out=a,t.avail_in=n<i?5+(i-n):5-(n-i),t.avail_out=a<o?257+(o-a):257-(a-o),k.hold=h,k.bits=p};const n1=15,Zte=852,Jte=592,ere=0,OL=1,tre=2,Mvt=new Uint16Array([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,0,0]),kvt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Ovt=new Uint16Array([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,0,0]),Nvt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Ivt=(e,t,r,n,i,a,s,o)=>{const l=o.bits;let u=0,c=0,d=0,f=0,h=0,p=0,m=0,_=0,y=0,v=0,b,w,x,E,T,S=null,A;const C=new Uint16Array(n1+1),k=new Uint16Array(n1+1);let M=null,D,$,V;for(u=0;u<=n1;u++)C[u]=0;for(c=0;c<n;c++)C[t[r+c]]++;for(h=l,f=n1;f>=1&&C[f]===0;f--);if(h>f&&(h=f),f===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,o.bits=1,0;for(d=1;d<f&&C[d]===0;d++);for(h<d&&(h=d),_=1,u=1;u<=n1;u++)if(_<<=1,_-=C[u],_<0)return-1;if(_>0&&(e===ere||f!==1))return-1;for(k[1]=0,u=1;u<n1;u++)k[u+1]=k[u]+C[u];for(c=0;c<n;c++)t[r+c]!==0&&(s[k[t[r+c]]++]=c);if(e===ere?(S=M=s,A=20):e===OL?(S=Mvt,M=kvt,A=257):(S=Ovt,M=Nvt,A=0),v=0,c=0,u=d,T=a,p=h,m=0,x=-1,y=1<<h,E=y-1,e===OL&&y>Zte||e===tre&&y>Jte)return 1;for(;;){D=u-m,s[c]+1<A?($=0,V=s[c]):s[c]>=A?($=M[s[c]-A],V=S[s[c]-A]):($=96,V=0),b=1<<u-m,w=1<<p,d=w;do w-=b,i[T+(v>>m)+w]=D<<24|$<<16|V|0;while(w!==0);for(b=1<<u-1;v&b;)b>>=1;if(b!==0?(v&=b-1,v+=b):v=0,c++,--C[u]===0){if(u===f)break;u=t[r+s[c]]}if(u>h&&(v&E)!==x){for(m===0&&(m=h),T+=d,p=u-m,_=1<<p;p+m<f&&(_-=C[p+m],!(_<=0));)p++,_<<=1;if(y+=1<<p,e===OL&&y>Zte||e===tre&&y>Jte)return 1;x=v&E,i[x]=h<<24|p<<16|T-a|0}}return v!==0&&(i[T+v]=u-m<<24|64<<16|0),o.bits=h,0};var yT=Ivt;const Dvt=0,Pwe=1,Mwe=2,{Z_FINISH:rre,Z_BLOCK:Lvt,Z_TREES:yM,Z_OK:Gv,Z_STREAM_END:jvt,Z_NEED_DICT:Rvt,Z_STREAM_ERROR:ef,Z_DATA_ERROR:kwe,Z_MEM_ERROR:Owe,Z_BUF_ERROR:$vt,Z_DEFLATED:nre}=iC,TI=16180,ire=16181,are=16182,sre=16183,ore=16184,lre=16185,ure=16186,cre=16187,dre=16188,fre=16189,hO=16190,vp=16191,NL=16192,hre=16193,IL=16194,pre=16195,mre=16196,gre=16197,yre=16198,vM=16199,_M=16200,vre=16201,_re=16202,bre=16203,wre=16204,xre=16205,DL=16206,Ere=16207,Tre=16208,rs=16209,Nwe=16210,Iwe=16211,Fvt=852,Bvt=592,zvt=15,Uvt=zvt,Sre=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function Wvt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const f_=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<TI||t.mode>Iwe?1:0},Dwe=e=>{if(f_(e))return ef;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=TI,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(Fvt),t.distcode=t.distdyn=new Int32Array(Bvt),t.sane=1,t.back=-1,Gv},Lwe=e=>{if(f_(e))return ef;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Dwe(e)},jwe=(e,t)=>{let r;if(f_(e))return ef;const n=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?ef:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Lwe(e))},Rwe=(e,t)=>{if(!e)return ef;const r=new Wvt;e.state=r,r.strm=e,r.window=null,r.mode=TI;const n=jwe(e,t);return n!==Gv&&(e.state=null),n},Vvt=e=>Rwe(e,Uvt);let Are=!0,LL,jL;const Hvt=e=>{if(Are){LL=new Int32Array(512),jL=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(yT(Pwe,e.lens,0,288,LL,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;yT(Mwe,e.lens,0,32,jL,0,e.work,{bits:5}),Are=!1}e.lencode=LL,e.lenbits=9,e.distcode=jL,e.distbits=5},$we=(e,t,r,n)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),a.window.set(t.subarray(r-n,r-n+i),a.wnext),n-=i,n?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},Gvt=(e,t)=>{let r,n,i,a,s,o,l,u,c,d,f,h,p,m,_=0,y,v,b,w,x,E,T,S;const A=new Uint8Array(4);let C,k;const M=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(f_(e)||!e.output||!e.input&&e.avail_in!==0)return ef;r=e.state,r.mode===vp&&(r.mode=NL),s=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,u=r.hold,c=r.bits,d=o,f=l,S=Gv;e:for(;;)switch(r.mode){case TI:if(r.wrap===0){r.mode=NL;break}for(;c<16;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(r.wrap&2&&u===35615){r.wbits===0&&(r.wbits=15),r.check=0,A[0]=u&255,A[1]=u>>>8&255,r.check=Qo(r.check,A,2,0),u=0,c=0,r.mode=ire;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=rs;break}if((u&15)!==nre){e.msg="unknown compression method",r.mode=rs;break}if(u>>>=4,c-=4,T=(u&15)+8,r.wbits===0&&(r.wbits=T),T>15||T>r.wbits){e.msg="invalid window size",r.mode=rs;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=u&512?fre:vp,u=0,c=0;break;case ire:for(;c<16;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(r.flags=u,(r.flags&255)!==nre){e.msg="unknown compression method",r.mode=rs;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=rs;break}r.head&&(r.head.text=u>>8&1),r.flags&512&&r.wrap&4&&(A[0]=u&255,A[1]=u>>>8&255,r.check=Qo(r.check,A,2,0)),u=0,c=0,r.mode=are;case are:for(;c<32;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}r.head&&(r.head.time=u),r.flags&512&&r.wrap&4&&(A[0]=u&255,A[1]=u>>>8&255,A[2]=u>>>16&255,A[3]=u>>>24&255,r.check=Qo(r.check,A,4,0)),u=0,c=0,r.mode=sre;case sre:for(;c<16;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}r.head&&(r.head.xflags=u&255,r.head.os=u>>8),r.flags&512&&r.wrap&4&&(A[0]=u&255,A[1]=u>>>8&255,r.check=Qo(r.check,A,2,0)),u=0,c=0,r.mode=ore;case ore:if(r.flags&1024){for(;c<16;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}r.length=u,r.head&&(r.head.extra_len=u),r.flags&512&&r.wrap&4&&(A[0]=u&255,A[1]=u>>>8&255,r.check=Qo(r.check,A,2,0)),u=0,c=0}else r.head&&(r.head.extra=null);r.mode=lre;case lre:if(r.flags&1024&&(h=r.length,h>o&&(h=o),h&&(r.head&&(T=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(a,a+h),T)),r.flags&512&&r.wrap&4&&(r.check=Qo(r.check,n,h,a)),o-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=ure;case ure:if(r.flags&2048){if(o===0)break e;h=0;do T=n[a+h++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T));while(T&&h<o);if(r.flags&512&&r.wrap&4&&(r.check=Qo(r.check,n,h,a)),o-=h,a+=h,T)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=cre;case cre:if(r.flags&4096){if(o===0)break e;h=0;do T=n[a+h++],r.head&&T&&r.length<65536&&(r.head.comment+=String.fromCharCode(T));while(T&&h<o);if(r.flags&512&&r.wrap&4&&(r.check=Qo(r.check,n,h,a)),o-=h,a+=h,T)break e}else r.head&&(r.head.comment=null);r.mode=dre;case dre:if(r.flags&512){for(;c<16;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(r.wrap&4&&u!==(r.check&65535)){e.msg="header crc mismatch",r.mode=rs;break}u=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=vp;break;case fre:for(;c<32;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}e.adler=r.check=Sre(u),u=0,c=0,r.mode=hO;case hO:if(r.havedict===0)return e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=o,r.hold=u,r.bits=c,Rvt;e.adler=r.check=1,r.mode=vp;case vp:if(t===Lvt||t===yM)break e;case NL:if(r.last){u>>>=c&7,c-=c&7,r.mode=DL;break}for(;c<3;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}switch(r.last=u&1,u>>>=1,c-=1,u&3){case 0:r.mode=hre;break;case 1:if(Hvt(r),r.mode=vM,t===yM){u>>>=2,c-=2;break e}break;case 2:r.mode=mre;break;case 3:e.msg="invalid block type",r.mode=rs}u>>>=2,c-=2;break;case hre:for(u>>>=c&7,c-=c&7;c<32;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=rs;break}if(r.length=u&65535,u=0,c=0,r.mode=IL,t===yM)break e;case IL:r.mode=pre;case pre:if(h=r.length,h){if(h>o&&(h=o),h>l&&(h=l),h===0)break e;i.set(n.subarray(a,a+h),s),o-=h,a+=h,l-=h,s+=h,r.length-=h;break}r.mode=vp;break;case mre:for(;c<14;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(r.nlen=(u&31)+257,u>>>=5,c-=5,r.ndist=(u&31)+1,u>>>=5,c-=5,r.ncode=(u&15)+4,u>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=rs;break}r.have=0,r.mode=gre;case gre:for(;r.have<r.ncode;){for(;c<3;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}r.lens[M[r.have++]]=u&7,u>>>=3,c-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,C={bits:r.lenbits},S=yT(Dvt,r.lens,0,19,r.lencode,0,r.work,C),r.lenbits=C.bits,S){e.msg="invalid code lengths set",r.mode=rs;break}r.have=0,r.mode=yre;case yre:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[u&(1<<r.lenbits)-1],y=_>>>24,v=_>>>16&255,b=_&65535,!(y<=c);){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(b<16)u>>>=y,c-=y,r.lens[r.have++]=b;else{if(b===16){for(k=y+2;c<k;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(u>>>=y,c-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=rs;break}T=r.lens[r.have-1],h=3+(u&3),u>>>=2,c-=2}else if(b===17){for(k=y+3;c<k;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}u>>>=y,c-=y,T=0,h=3+(u&7),u>>>=3,c-=3}else{for(k=y+7;c<k;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}u>>>=y,c-=y,T=0,h=11+(u&127),u>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=rs;break}for(;h--;)r.lens[r.have++]=T}}if(r.mode===rs)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=rs;break}if(r.lenbits=9,C={bits:r.lenbits},S=yT(Pwe,r.lens,0,r.nlen,r.lencode,0,r.work,C),r.lenbits=C.bits,S){e.msg="invalid literal/lengths set",r.mode=rs;break}if(r.distbits=6,r.distcode=r.distdyn,C={bits:r.distbits},S=yT(Mwe,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,C),r.distbits=C.bits,S){e.msg="invalid distances set",r.mode=rs;break}if(r.mode=vM,t===yM)break e;case vM:r.mode=_M;case _M:if(o>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=o,r.hold=u,r.bits=c,Pvt(e,f),s=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,u=r.hold,c=r.bits,r.mode===vp&&(r.back=-1);break}for(r.back=0;_=r.lencode[u&(1<<r.lenbits)-1],y=_>>>24,v=_>>>16&255,b=_&65535,!(y<=c);){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(v&&!(v&240)){for(w=y,x=v,E=b;_=r.lencode[E+((u&(1<<w+x)-1)>>w)],y=_>>>24,v=_>>>16&255,b=_&65535,!(w+y<=c);){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}u>>>=w,c-=w,r.back+=w}if(u>>>=y,c-=y,r.back+=y,r.length=b,v===0){r.mode=xre;break}if(v&32){r.back=-1,r.mode=vp;break}if(v&64){e.msg="invalid literal/length code",r.mode=rs;break}r.extra=v&15,r.mode=vre;case vre:if(r.extra){for(k=r.extra;c<k;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=_re;case _re:for(;_=r.distcode[u&(1<<r.distbits)-1],y=_>>>24,v=_>>>16&255,b=_&65535,!(y<=c);){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(!(v&240)){for(w=y,x=v,E=b;_=r.distcode[E+((u&(1<<w+x)-1)>>w)],y=_>>>24,v=_>>>16&255,b=_&65535,!(w+y<=c);){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}u>>>=w,c-=w,r.back+=w}if(u>>>=y,c-=y,r.back+=y,v&64){e.msg="invalid distance code",r.mode=rs;break}r.offset=b,r.extra=v&15,r.mode=bre;case bre:if(r.extra){for(k=r.extra;c<k;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=rs;break}r.mode=wre;case wre:if(l===0)break e;if(h=f-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=rs;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=i,p=s-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[s++]=m[p++];while(--h);r.length===0&&(r.mode=_M);break;case xre:if(l===0)break e;i[s++]=r.length,l--,r.mode=_M;break;case DL:if(r.wrap){for(;c<32;){if(o===0)break e;o--,u|=n[a++]<<c,c+=8}if(f-=l,e.total_out+=f,r.total+=f,r.wrap&4&&f&&(e.adler=r.check=r.flags?Qo(r.check,i,f,s-f):oA(r.check,i,f,s-f)),f=l,r.wrap&4&&(r.flags?u:Sre(u))!==r.check){e.msg="incorrect data check",r.mode=rs;break}u=0,c=0}r.mode=Ere;case Ere:if(r.wrap&&r.flags){for(;c<32;){if(o===0)break e;o--,u+=n[a++]<<c,c+=8}if(r.wrap&4&&u!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=rs;break}u=0,c=0}r.mode=Tre;case Tre:S=jvt;break e;case rs:S=kwe;break e;case Nwe:return Owe;case Iwe:default:return ef}return e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=o,r.hold=u,r.bits=c,(r.wsize||f!==e.avail_out&&r.mode<rs&&(r.mode<DL||t!==rre))&&$we(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,r.total+=f,r.wrap&4&&f&&(e.adler=r.check=r.flags?Qo(r.check,i,f,e.next_out-f):oA(r.check,i,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===vp?128:0)+(r.mode===vM||r.mode===IL?256:0),(d===0&&f===0||t===rre)&&S===Gv&&(S=$vt),S},qvt=e=>{if(f_(e))return ef;let t=e.state;return t.window&&(t.window=null),e.state=null,Gv},Kvt=(e,t)=>{if(f_(e))return ef;const r=e.state;return r.wrap&2?(r.head=t,t.done=!1,Gv):ef},Yvt=(e,t)=>{const r=t.length;let n,i,a;return f_(e)||(n=e.state,n.wrap!==0&&n.mode!==hO)?ef:n.mode===hO&&(i=1,i=oA(i,t,r,0),i!==n.check)?kwe:(a=$we(e,t,r,r),a?(n.mode=Nwe,Owe):(n.havedict=1,Gv))};var Xvt=Lwe,Qvt=jwe,Zvt=Dwe,Jvt=Vvt,e_t=Rwe,t_t=Gvt,r_t=qvt,n_t=Kvt,i_t=Yvt,a_t="pako inflate (from Nodeca project)",Mp={inflateReset:Xvt,inflateReset2:Qvt,inflateResetKeep:Zvt,inflateInit:Jvt,inflateInit2:e_t,inflate:t_t,inflateEnd:r_t,inflateGetHeader:n_t,inflateSetDictionary:i_t,inflateInfo:a_t};function s_t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var o_t=s_t;const Fwe=Object.prototype.toString,{Z_NO_FLUSH:l_t,Z_FINISH:u_t,Z_OK:cA,Z_STREAM_END:RL,Z_NEED_DICT:$L,Z_STREAM_ERROR:c_t,Z_DATA_ERROR:Cre,Z_MEM_ERROR:d_t}=iC;function sC(e){this.options=EI.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Awe,this.strm.avail_out=0;let r=Mp.inflateInit2(this.strm,t.windowBits);if(r!==cA)throw new Error(Rw[r]);if(this.header=new o_t,Mp.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=uA.string2buf(t.dictionary):Fwe.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Mp.inflateSetDictionary(this.strm,t.dictionary),r!==cA)))throw new Error(Rw[r])}sC.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let a,s,o;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?u_t:l_t,Fwe.call(e)==="[object ArrayBuffer]"?r.input
vendor: 10,187 bytes, line 655
655=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),a=Mp.inflate(r,s),a===$L&&i&&(a=Mp.inflateSetDictionary(r,i),a===cA?a=Mp.inflate(r,s):a===Cre&&(a=$L));r.avail_in>0&&a===RL&&r.state.wrap>0&&e[r.next_in]!==0;)Mp.inflateReset(r),a=Mp.inflate(r,s);switch(a){case c_t:case Cre:case $L:case d_t:return this.onEnd(a),this.ended=!0,!1}if(o=r.avail_out,r.next_out&&(r.avail_out===0||a===RL))if(this.options.to==="string"){let l=uA.utf8border(r.output,r.next_out),u=r.next_out-l,c=uA.buf2string(r.output,l);r.next_out=u,r.avail_out=n-u,u&&r.output.set(r.output.subarray(l,l+u),0),this.onData(c)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(a===cA&&o===0)){if(a===RL)return a=Mp.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};sC.prototype.onData=function(e){this.chunks.push(e)};sC.prototype.onEnd=function(e){e===cA&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=EI.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function q9(e,t){const r=new sC(t);if(r.push(e),r.err)throw r.msg||Rw[r.err];return r.result}function f_t(e,t){return t=t||{},t.raw=!0,q9(e,t)}var h_t=sC,p_t=q9,m_t=f_t,g_t=q9,y_t=iC,v_t={Inflate:h_t,inflate:p_t,inflateRaw:m_t,ungzip:g_t,constants:y_t};const{Inflate:__t,inflate:b_t,inflateRaw:_5t,ungzip:b5t}=v_t;var Pre=__t,w_t=b_t;const Bwe=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t&1?t=3988292384^t>>>1:t=t>>>1;Bwe[e]=t}const Mre=4294967295;function x_t(e,t,r){let n=e;for(let i=0;i<r;i++)n=Bwe[(n^t[i])&255]^n>>>8;return n}function E_t(e,t){return(x_t(Mre,e,t)^Mre)>>>0}function kre(e,t,r){const n=e.readUint32(),i=E_t(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==n)throw new Error(`CRC mismatch for chunk ${r}. Expected ${n}, found ${i}`)}function zwe(e,t,r){for(let n=0;n<r;n++)t[n]=e[n]}function Uwe(e,t,r,n){let i=0;for(;i<n;i++)t[i]=e[i];for(;i<r;i++)t[i]=e[i]+t[i-n]&255}function Wwe(e,t,r,n){let i=0;if(r.length===0)for(;i<n;i++)t[i]=e[i];else for(;i<n;i++)t[i]=e[i]+r[i]&255}function Vwe(e,t,r,n,i){let a=0;if(r.length===0){for(;a<i;a++)t[a]=e[a];for(;a<n;a++)t[a]=e[a]+(t[a-i]>>1)&255}else{for(;a<i;a++)t[a]=e[a]+(r[a]>>1)&255;for(;a<n;a++)t[a]=e[a]+(t[a-i]+r[a]>>1)&255}}function Hwe(e,t,r,n,i){let a=0;if(r.length===0){for(;a<i;a++)t[a]=e[a];for(;a<n;a++)t[a]=e[a]+t[a-i]&255}else{for(;a<i;a++)t[a]=e[a]+r[a]&255;for(;a<n;a++)t[a]=e[a]+T_t(t[a-i],r[a],r[a-i])&255}}function T_t(e,t,r){const n=e+t-r,i=Math.abs(n-e),a=Math.abs(n-t),s=Math.abs(n-r);return i<=a&&i<=s?e:a<=s?t:r}function S_t(e,t,r,n,i,a){switch(e){case 0:zwe(t,r,i);break;case 1:Uwe(t,r,i,a);break;case 2:Wwe(t,r,n,i);break;case 3:Vwe(t,r,n,i,a);break;case 4:Hwe(t,r,n,i,a);break;default:throw new Error(`Unsupported filter: ${e}`)}}const A_t=new Uint16Array([255]),C_t=new Uint8Array(A_t.buffer),P_t=C_t[0]===255;function M_t(e){const{data:t,width:r,height:n,channels:i,depth:a}=e,s=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],o=Math.ceil(a/8)*i,l=new Uint8Array(n*r*o);let u=0;for(let c=0;c<7;c++){const d=s[c],f=Math.ceil((r-d.x)/d.xStep),h=Math.ceil((n-d.y)/d.yStep);if(f<=0||h<=0)continue;const p=f*o,m=new Uint8Array(p);for(let _=0;_<h;_++){const y=t[u++],v=t.subarray(u,u+p);u+=p;const b=new Uint8Array(p);S_t(y,v,b,m,p,o),m.set(b);for(let w=0;w<f;w++){const x=d.x+w*d.xStep,E=d.y+_*d.yStep;if(!(x>=r||E>=n))for(let T=0;T<o;T++)l[(E*r+x)*o+T]=b[w*o+T]}}}if(a===16){const c=new Uint16Array(l.buffer);if(P_t)for(let d=0;d<c.length;d++)c[d]=k_t(c[d]);return c}else return l}function k_t(e){return(e&255)<<8|e>>8&255}const O_t=new Uint16Array([255]),N_t=new Uint8Array(O_t.buffer),I_t=N_t[0]===255,D_t=new Uint8Array(0);function Ore(e){const{data:t,width:r,height:n,channels:i,depth:a}=e,s=Math.ceil(a/8)*i,o=Math.ceil(a/8*i*r),l=new Uint8Array(n*o);let u=D_t,c=0,d,f;for(let h=0;h<n;h++){switch(d=t.subarray(c+1,c+1+o),f=l.subarray(h*o,(h+1)*o),t[c]){case 0:zwe(d,f,o);break;case 1:Uwe(d,f,o,s);break;case 2:Wwe(d,f,u,o);break;case 3:Vwe(d,f,u,o,s);break;case 4:Hwe(d,f,u,o,s);break;default:throw new Error(`Unsupported filter: ${t[c]}`)}u=f,c+=o+1}if(a===16){const h=new Uint16Array(l.buffer);if(I_t)for(let p=0;p<h.length;p++)h[p]=L_t(h[p]);return h}else return l}function L_t(e){return(e&255)<<8|e>>8&255}const Ok=Uint8Array.of(137,80,78,71,13,10,26,10);function Nre(e){if(!j_t(e.readBytes(Ok.length)))throw new Error("wrong PNG signature")}function j_t(e){if(e.length<Ok.length)return!1;for(let t=0;t<Ok.length;t++)if(e[t]!==Ok[t])return!1;return!0}const R_t="tEXt",$_t=0,Gwe=new TextDecoder("latin1");function F_t(e){if(z_t(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const B_t=/^[\u0000-\u00FF]*$/;function z_t(e){if(!B_t.test(e))throw new Error("invalid latin1 text")}function U_t(e,t,r){const n=qwe(t);e[n]=W_t(t,r-n.length-1)}function qwe(e){for(e.mark();e.readByte()!==$_t;);const t=e.offset;e.reset();const r=Gwe.decode(e.readBytes(t-e.offset-1));return e.skip(1),F_t(r),r}function W_t(e,t){return Gwe.decode(e.readBytes(t))}const Ec={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},FL={UNKNOWN:-1,DEFLATE:0},Ire={UNKNOWN:-1,ADAPTIVE:0},BL={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},bM={NONE:0,BACKGROUND:1,PREVIOUS:2},zL={SOURCE:0,OVER:1};class V_t extends B9{constructor(r,n={}){super(r);Le(this,"_checkCrc");Le(this,"_inflator");Le(this,"_png");Le(this,"_apng");Le(this,"_end");Le(this,"_hasPalette");Le(this,"_palette");Le(this,"_hasTransparency");Le(this,"_transparency");Le(this,"_compressionMethod");Le(this,"_filterMethod");Le(this,"_interlaceMethod");Le(this,"_colorType");Le(this,"_isAnimated");Le(this,"_numberOfFrames");Le(this,"_numberOfPlays");Le(this,"_frames");Le(this,"_writingDataChunks");const{checkCrc:i=!1}=n;this._checkCrc=i,this._inflator=new Pre,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=FL.UNKNOWN,this._filterMethod=Ire.UNKNOWN,this._interlaceMethod=BL.UNKNOWN,this._colorType=Ec.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Nre(this);!this._end;){const r=this.readUint32(),n=this.readChars(4);this.decodeChunk(r,n)}return this.decodeImage(),this._png}decodeApng(){for(Nre(this);!this._end;){const r=this.readUint32(),n=this.readChars(4);this.decodeApngChunk(r,n)}return this.decodeApngImage(),this._apng}decodeChunk(r,n){const i=this.offset;switch(n){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(r);break;case"IDAT":this.decodeIDAT(r);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(r);break;case"iCCP":this.decodeiCCP(r);break;case R_t:U_t(this._png.text,this,r);break;case"pHYs":this.decodepHYs();break;default:this.skip(r);break}if(this.offset-i!==r)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?kre(this,r+4,n):this.skip(4)}decodeApngChunk(r,n){const i=this.offset;switch(n!=="fdAT"&&n!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),n){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(r);break;default:this.decodeChunk(r,n),this.offset=i+r;break}if(this.offset-i!==r)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?kre(this,r+4,n):this.skip(4)}decodeIHDR(){const r=this._png;r.width=this.readUint32(),r.height=this.readUint32(),r.depth=H_t(this.readUint8());const n=this.readUint8();this._colorType=n;let i;switch(n){case Ec.GREYSCALE:i=1;break;case Ec.TRUECOLOUR:i=3;break;case Ec.INDEXED_COLOUR:i=1;break;case Ec.GREYSCALE_ALPHA:i=2;break;case Ec.TRUECOLOUR_ALPHA:i=4;break;case Ec.UNKNOWN:default:throw new Error(`Unknown color type: ${n}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==FL.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const r={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(r)}decodePLTE(r){if(r%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${r}`);const n=r/3;this._hasPalette=!0;const i=[];this._palette=i;for(let a=0;a<n;a++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(r){this._writingDataChunks=!0;const n=r,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,n)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(r)}decodeFDAT(r){this._writingDataChunks=!0;let n=r,i=this.offset+this.byteOffset;if(i+=4,n-=4,this._inflator.push(new Uint8Array(this.buffer,i,n)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(r)}decodetRNS(r){switch(this._colorType){case Ec.GREYSCALE:case Ec.TRUECOLOUR:{if(r%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${r}`);if(r/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${r/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(r/2);for(let n=0;n<r/2;n++)this._transparency[n]=this.readUint16();break}case Ec.INDEXED_COLOUR:{if(r>this._palette.length)throw new Error(`tRNS chunk contains more alph
655a values than there are palette colors (${r} vs ${this._palette.length})`);let n=0;for(;n<r;n++){const i=this.readByte();this._palette[n].push(i)}for(;n<this._palette.length;n++)this._palette[n].push(255);break}case Ec.UNKNOWN:case Ec.GREYSCALE_ALPHA:case Ec.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(r){const n=qwe(this),i=this.readUint8();if(i!==FL.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const a=this.readBytes(r-n.length-2);this._png.iccEmbeddedProfile={name:n,profile:w_t(a)}}decodepHYs(){const r=this.readUint32(),n=this.readUint32(),i=this.readByte();this._png.resolution={x:r,y:n,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let r=0;r<this._numberOfFrames;r++){const n={sequenceNumber:this._frames[r].sequenceNumber,delayNumber:this._frames[r].delayNumber,delayDenominator:this._frames[r].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(r);if(i){if(i.data=Ore({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),r===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)n.data=i.data;else{const a=this._apng.frames.at(r-1);this.disposeFrame(i,a,n),this.addFrameDataToCanvas(n,i)}this._apng.frames.push(n)}}return this._apng}disposeFrame(r,n,i){switch(r.disposeOp){case bM.NONE:break;case bM.BACKGROUND:for(let a=0;a<this._png.height;a++)for(let s=0;s<this._png.width;s++){const o=(a*r.width+s)*this._png.channels;for(let l=0;l<this._png.channels;l++)i.data[o+l]=0}break;case bM.PREVIOUS:i.data.set(n.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(r,n){const i=1<<this._png.depth,a=(s,o)=>{const l=((s+n.yOffset)*this._png.width+n.xOffset+o)*this._png.channels,u=(s*n.width+o)*this._png.channels;return{index:l,frameIndex:u}};switch(n.blendOp){case zL.SOURCE:for(let s=0;s<n.height;s++)for(let o=0;o<n.width;o++){const{index:l,frameIndex:u}=a(s,o);for(let c=0;c<this._png.channels;c++)r.data[l+c]=n.data[u+c]}break;case zL.OVER:for(let s=0;s<n.height;s++)for(let o=0;o<n.width;o++){const{index:l,frameIndex:u}=a(s,o);for(let c=0;c<this._png.channels;c++){const d=n.data[u+this._png.channels-1]/i,f=c%(this._png.channels-1)===0?1:n.data[u+c],h=Math.floor(d*f+(1-d)*r.data[l+c]);r.data[l+c]+=h}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var n;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const r=this._isAnimated?((n=this._frames)==null?void 0:n.at(0)).data:this._inflator.result;if(this._filterMethod!==Ire.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===BL.NO_INTERLACE)this._png.data=Ore({data:r,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===BL.ADAM7)this._png.data=M_t({data:r,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const r=this._inflator.result,n=this._frames.at(-1);n?n.data=r:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:bM.NONE,blendOp:zL.SOURCE,data:r}),this._inflator=new Pre,this._writingDataChunks=!1}}function H_t(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var Dre;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(Dre||(Dre={}));function G_t(e,t){return new V_t(e,t).decode()}var vn=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function UL(){vn.console&&typeof vn.console.log=="function"&&vn.console.log.apply(vn.console,arguments)}var ya={log:UL,warn:function(e){vn.console&&(typeof vn.console.warn=="function"?vn.console.warn.apply(vn.console,arguments):UL.call(null,arguments))},error:function(e){vn.console&&(typeof vn.console.error=="function"?vn.console.error.apply(vn.console,arguments):UL(e))}};function WL(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){_y(n.response,t,r)},n.onerror=function(){ya.error("could not download file")},n.send()}function Lre(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function wM(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");
vendor: 3,410 bytes, lines 655-660
655t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var _y=vn.saveAs||((typeof window>"u"?"undefined":ra(window))!=="object"||window!==vn?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,r){var n=vn.URL||vn.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener",typeof e=="string"?(i.href=e,i.origin!==location.origin?Lre(i.href)?WL(e,t,r):wM(i,i.target="_blank"):wM(i)):(i.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){wM(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e=="string")if(Lre(e))WL(e,t,r);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){wM(n)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:ra(a)!=="object"&&(ya.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(e,r),t)}:function(e,t,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return WL(e,t,r);var i=e.type==="application/octet-stream",a=/constructor/i.test(vn.HTMLElement)||vn.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||i&&a)&&(typeof FileReader>"u"?"undefined":ra(FileReader))==="object"){var o=new FileReader;o.onloadend=function(){var c=o.result;c=s?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=c:location=c,n=null},o.readAsDataURL(e)}else{var l=vn.URL||vn.webkitURL,u=l.createObjectURL(e);n?n.location=u:location.href=u,n=null,setTimeout(function(){l.revokeObjectURL(u)},4e4)}});/** 656 * A class to parse color values 657 * @author Stoyan Stefanov <[email protected]> 658 * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} 659 * @license Use it if you like it 660 */function Kwe(e){var t;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
6600",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,a=r[n].process,s=i.exec(e);s&&(t=a(s),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),u=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),"#"+o+l+u}}var Nk=vn.atob.bind(vn),jre=vn.btoa.bind(vn);/** 661 * @license 662 * Joseph Myers does not specify a particular license for his work. 663 * 664 * Author: Joseph Myers 665 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js 666 * 667 * Modified by: Owen Leong 668 */function VL(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];r=Ll(r,n,i,a,t[0],7,-680876936),a=Ll(a,r,n,i,t[1],12,-389564586),i=Ll(i,a,r,n,t[2],17,606105819),n=Ll(n,i,a,r,t[3],22,-1044525330),r=Ll(r,n,i,a,t[4],7,-176418897),a=Ll(a,r,n,i,t[5],12,1200080426),i=Ll(i,a,r,n,t[6],17,-1473231341),n=Ll(n,i,a,r,t[7],22,-45705983),r=Ll(r,n,i,a,t[8],7,1770035416),a=Ll(a,r,n,i,t[9],12,-1958414417),i=Ll(i,a,r,n,t[10],17,-42063),n=Ll(n,i,a,r,t[11],22,-1990404162),r=Ll(r,n,i,a,t[12],7,1804603682),a=Ll(a,r,n,i,t[13],12,-40341101),i=Ll(i,a,r,n,t[14],17,-1502002290),r=jl(r,n=Ll(n,i,a,r,t[15],22,1236535329),i,a,t[1],5,-165796510),a=jl(a,r,n,i,t[6],9,-1069501632),i=jl(i,a,r,n,t[11],14,643717713),n=jl(n,i,a,r,t[0],20,-373897302),r=jl(r,n,i,a,t[5],5,-701558691),a=jl(a,r,n,i,t[10],9,38016083),i=jl(i,a,r,n,t[15],14,-660478335),n=jl(n,i,a,r,t[4],20,-405537848),r=jl(r,n,i,a,t[9],5,568446438),a=jl(a,r,n,i,t[14],9,-1019803690),i=jl(i,a,r,n,t[3],14,-187363961),n=jl(n,i,a,r,t[8],20,1163531501),r=jl(r,n,i,a,t[13],5,-1444681467),a=jl(a,r,n,i,t[2],9,-51403784),i=jl(i,a,r,n,t[7],14,1735328473),r=Rl(r,n=jl(n,i,a,r,t[12],20,-1926607734),i,a,t[5],4,-378558),a=Rl(a,r,n,i,t[8],11,-2022574463),i=Rl(i,a,r,n,t[11],16,1839030562),n=Rl(n,i,a,r,t[14],23,-35309556),r=Rl(r,n,i,a,t[1],4,-1530992060),a=Rl(a,r,n,i,t[4],11,1272893353),i=Rl(i,a,r,n,t[7],16,-155497632),n=Rl(n,i,a,r,t[10],23,-1094730640),r=Rl(r,n,i,a,t[13],4,681279174),a=Rl(a,r,n,i,t[0],11,-358537222),i=Rl(i,a,r,n,t[3],16,-722521979),n=Rl(n,i,a,r,t[6],23,76029189),r=Rl(r,n,i,a,t[9],4,-640364487),a=Rl(a,r,n,i,t[12],11,-421815835),i=Rl(i,a,r,n,t[15],16,530742520),r=$l(r,n=Rl(n,i,a,r,t[2],23,-995338651),i,a,t[0],6,-198630844),a=$l(a,r,n,i,t[7],10,1126891415),i=$l(i,a,r,n,t[14],15,-1416354905),n=$l(n,i,a,r,t[5],21,-57434055),r
vendor: 8,369 bytes, lines 668-685
668=$l(r,n,i,a,t[12],6,1700485571),a=$l(a,r,n,i,t[3],10,-1894986606),i=$l(i,a,r,n,t[10],15,-1051523),n=$l(n,i,a,r,t[1],21,-2054922799),r=$l(r,n,i,a,t[8],6,1873313359),a=$l(a,r,n,i,t[15],10,-30611744),i=$l(i,a,r,n,t[6],15,-1560198380),n=$l(n,i,a,r,t[13],21,1309151649),r=$l(r,n,i,a,t[4],6,-145523070),a=$l(a,r,n,i,t[11],10,-1120210379),i=$l(i,a,r,n,t[2],15,718787259),n=$l(n,i,a,r,t[9],21,-343485551),e[0]=Ag(r,e[0]),e[1]=Ag(n,e[1]),e[2]=Ag(i,e[2]),e[3]=Ag(a,e[3])}function SI(e,t,r,n,i,a){return t=Ag(Ag(t,e),Ag(n,a)),Ag(t<<i|t>>>32-i,r)}function Ll(e,t,r,n,i,a,s){return SI(t&r|~t&n,e,t,i,a,s)}function jl(e,t,r,n,i,a,s){return SI(t&n|r&~n,e,t,i,a,s)}function Rl(e,t,r,n,i,a,s){return SI(t^r^n,e,t,i,a,s)}function $l(e,t,r,n,i,a,s){return SI(r^(t|~n),e,t,i,a,s)}function Ywe(e){var t,r=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)VL(n,q_t(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(VL(n,i),t=0;t<16;t++)i[t]=0;return i[14]=8*r,VL(n,i),n}function q_t(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}var Rre="0123456789abcdef".split("");function K_t(e){for(var t="",r=0;r<4;r++)t+=Rre[e>>8*r+4&15]+Rre[e>>8*r&15];return t}function Y_t(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function B8(e){return Ywe(e).map(Y_t).join("")}var X_t=function(e){for(var t=0;t<e.length;t++)e[t]=K_t(e[t]);return e.join("")}(Ywe("hello"))!="5d41402abc4b2a76b9719d911017c592";function Ag(e,t){if(X_t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}return e+t&4294967295}/** 669 * @license 670 * FPDF is released under a permissive license: there is no usage restriction. 671 * You may embed it freely in your application (commercial or not), with or 672 * without modifications. 673 * 674 * Reference: http://www.fpdf.org/en/script/script37.php 675 */function z8(e,t){var r,n,i,a;if(e!==r){for(var s=(i=e,a=1+(256/e.length|0),new Array(a+1).join(i)),o=[],l=0;l<256;l++)o[l]=l;var u=0;for(l=0;l<256;l++){var c=o[l];u=(u+c+s.charCodeAt(l))%256,o[l]=o[u],o[u]=c}r=e,n=o}else o=n;var d=t.length,f=0,h=0,p="";for(l=0;l<d;l++)h=(h+(c=o[f=(f+1)%256]))%256,o[f]=o[h],o[h]=c,s=o[(o[f]+o[h])%256],p+=String.fromCharCode(t.charCodeAt(l)^s);return p}/** 676 * @license 677 * Licensed under the MIT License. 678 * http://opensource.org/licenses/mit-license 679 * Author: Owen Leong (@owenl131) 680 * Date: 15 Oct 2020 681 * References: 682 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt 683 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js 684 * http://www.fpdf.org/en/script/script37.php 685 */var $re={print:4,modify:8,copy:16,"annot-forms":32};function m1(e,t,r,n){this.v=1,this.r=2;var i=192;e.forEach(function(o){if($re.perm!==void 0)throw new Error("Invalid permission: "+o);i+=$re[o]}),this.padding="(¿N^NuÂAd\0NVÿú�\b..\0¶Ãh>Â/\f©þdSiz";var a=(t+this.padding).substr(0,32),s=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,s),this.P=-(1+(255^i)),this.encryptionKey=B8(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=z8(this.encryptionKey,this.padding)}function g1(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):e[n]}return t}function Fre(e){if(ra(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(r,n,i){if(i=i||!1,typeof r!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(r)||(t[r]={});var a=Math.random().toString(35);return t[r][a]=[n,!!i],a},this.unsubscribe=function(r){for(var n in t)if(t[n][r])return delete t[n][r],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[r]){var s=t[r][a];try{s[0].apply(e,n)}catch(o){vn.console&&ya.error("jsPDF PubSub Error",o.message,o)}s[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function dA(e){if(!(this instanceof dA))return new dA(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function Xwe(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function rg(e,t,r,n,i){if(!(this instanceof rg))return new rg(e,t,r,n,i);this.type=e==="axial"?2:3,this.coords=t,this.colors=r,Xwe.call(this,n,i)}function Vy(e,t,r,n,i){if(!(this instanceof Vy))return new Vy(e,t,r,n,i);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,Xwe.call(this,n,i)}function qr(e){var t,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],a=arguments[3],s=[],o=1,l=16,u="S",c=null;ra(e=e||{})==="object"&&(r=e.orientation,n=e.unit||n,i=e.format||i,a=e.compress||e.compressPdf||a,(c=e.encryption||null)!==null&&(c.userPassword=c.userPassword||"",c.ownerPassword=c.ownerPassword||"",c.userPermissions=c.userPermissions||[]),o=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(l=e.floatPrecision),u=e.defaultPathOperation||"S"),s=e.filters||(a===!0?["FlateEncode"]:s),n=n||"mm",r=(""+(r||"P")).toLowerCase();var d=e.putOnlyUsedFonts||!1,f={},h={internal:{},__private__:{}};h.__private__.PubSub=Fre;var p="1.3",m=h.__private__.getPdfVersion=function(){return p};h.__private__.setPdfVersion=function(G){p=G};var _={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};h.__private__.getPageFormats=function(){return _};var y=h.__private__.getPageFormat=function(G){return _[G]};i=i||"a4";var v="compat",b="advanced",w=v;function x(){this.saveGraphicsState(),ne(new Z(mt,0,0,-mt,0,dd()*mt).toString()+" cm"),this.setFontSize(this.getFontSize()/mt),u="n",w=b}function E(){this.restoreGraphicsState(),u="S",w=v}var T=h.__private__.combineFontStyleAndFontWeight=function(G,de){if(G=="bold"&&de=="normal"||G=="bold"&&de==400||G=="normal"&&de=="italic"||G=="bold"&&de=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return de&&(G=de==400||de==="normal"?G==="italic"?"italic":"normal":de!=700&&de!=="bold"||G!=="normal"?(de==700?"bold":de)+""+G:"bold"),G};h.advancedAPI=function(G){var de=w===v;return de&&x.call(this),typeof G!="function"||(G(this),de&&E.call(this)),this},h.compatAPI=function(G){var de=w===b;return de&&E.call(this),typeof G!="function"||(G(this),de&&x.call(this)),this},h.isAdvancedAPI=function(){return w===b};var S,A=function(G){if(w!==b)throw new Error(G+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},C=h.roundToPrecision=h.__private__.roundToPrecision=function(G,de){var Fe=t||de;if(isNaN(G)||isNaN(Fe))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return G.toFixed(Fe).replace(/0+$/,"")};S=h.hpf=h.__private__.hpf=typeof l=="number"?function(G){if(isNaN(G))throw new Error("Invalid argument passed to jsPDF.hpf");return C(G,l)}:l==="smart"?function(G){if(isNaN(G))throw new Error("Invalid argument passed to jsPDF.hpf");return C(G,G>-1&&G<1?16:5)}:function(G){if(isNaN(G))throw new Error("Invalid argument passed to
685jsPDF.hpf");return C(G,16)};var k=h.f2=h.__private__.f2=function(G){if(isNaN(G))throw new Error("Invalid argument passed to jsPDF.f2");return C(G,2)},M=h.__private__.f3=function(G){if(isNaN(G))throw new Error("Invalid argument passed to jsPDF.f3");return C(G,3)},D=h.scale=h.__private__.scale=function(G){if(isNaN(G))throw new Error("Invalid argument passed to jsPDF.scale");return w===v?G*mt:w===b?G:void 0},$=function(G){return D(function(de){return w===v?dd()-de:w===b?de:void 0}(G))};h.__private__.setPrecision=h.setPrecision=function(G){typeof parseInt(G,10)=="number"&&(t=parseInt(G,10))};var V,U="00000000000000000000000000000000",B=h.__private__.getFileId=function(){return U},z=h.__private__.setFileId=function(G){return U=G!==void 0&&/^[a-fA-F0-9]{32}$/.test(G)?G.toUpperCase():U.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),c!==null&&(ha=new m1(c.userPermissions,c.userPassword,c.ownerPassword,U)),U};h.setFileId=function(G){return z(G),this},h.getFileId=function(){return B()};var q=h.__private__.convertDateToPDFDate=function(G){var de=G.getTimezoneOffset(),Fe=de<0?"+":"-",Qe=Math.floor(Math.abs(de/60)),ot=Math.abs(de%60),Tt=[Fe,X(Qe),"'",X(ot),"'"].join("");return["D:",G.getFullYear(),X(G.getMonth()+1),X(G.getDate()),X(G.getHours()),X(G.getMinutes()),X(G.getSeconds()),Tt].join("")},L=h.__private__.convertPDFDateToDate=function(G){var de=parseInt(G.substr(2,4),10),Fe=parseInt(G.substr(6,2),10)-1,Qe=parseInt(G.substr(8,2),10),ot=parseInt(G.substr(10,2),10),Tt=parseInt(G.substr(12,2),10),Nt=parseInt(G.substr(14,2),10);return new Date(de,Fe,Qe,ot,Tt,Nt,0)},K=h.__private__.setCreationDate=function(G){var de;if(G===void 0&&(G=new Date),G instanceof Date)de=q(G);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(G))throw new Error("Invalid argument passed to jsPDF.setCreationDate");de=G}return V=de},O=h.__private__.getCreationDate=function(G){var de=V;return G==="jsDate"&&(de=L(V)),de};h.setCreationDate=function(G){return K(G),this},h.getCreationDate=function(G){return O(G)};var N,X=h.__private__.padd2=function(G){return("0"+parseInt(G)).slice(-2)},ie=h.__private__.padd2Hex=function(G){return("00"+(G=G.toString())).substr(G.length)},ee=0,le=[],Te=[],be=0,we=[],ae=[],H=!1,fe=Te;h.__private__.setCustomOutputDestination=function(G){H=!0,fe=G};var Se=function(G){H||(fe=G)};h.__private__.resetCustomOutputDestination=function(){H=!1,fe=Te};var ne=h.__private__.out=function(G){return G=G.toString(),be+=G.length+1,fe.push(G),fe},$e=h.__private__.write=function(G){return ne(arguments.length===1?G.toString():Array.prototype.join.call(arguments," "))},me=h.__private__.getArrayBuffer=function(G){for(var de=G.length,Fe=new ArrayBuffer(de),Qe=new Uint8Array(Fe);de--;)Qe[de]=G.charCodeAt(de);return Fe},Ue=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];h.__private__.getStandardFonts=function(){return Ue};var ke=e.fontSize||16;h.__private__.setFontSize=h.setFontSize=function(G){return ke=w===b?G/mt:G,this};var ce,ve=h.__private__.getFontSize=h.getFontSize=function(){return w===v?ke:ke*mt},Re=e.R2L||!1;h.__private__.setR2L=h.setR2L=function(G){return Re=G,this},h.__private__.getR2L=h.getR2L=function(){return Re};var De,tt=h.__private__.setZoomMode=function(G){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(G))ce=G;else if(isNaN(G)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(G)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+G+'" is not recognized.');ce=G}else ce=parseInt(G,10)};h.__private__.getZoomMode=function(){return ce};var Ge,Ie=h.__private__.setPageMode=function(G){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(G)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+G+'" is not recognized.');De=G};h.__private__.getPageMode=function(){return De};var He=h.__private__.setLayoutMode=function(G){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(G)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+G+'" is not recognized.');Ge=G};h.__private__.getLayoutMode=function(){return Ge},h.__private__.setDisplayMode=h.setDisplayMode=function(G,de,Fe){return tt(G),He(de),Ie(Fe),this};var Ke={title:"",subject:"",author:"",keywords:"",creator:""};h.__private__.getDocumentProperty=function(G){if(Object.keys(Ke).indexOf(G)===-1)throw new Error("Invalid argument passed to
685jsPDF.getDocumentProperty");return Ke[G]},h.__private__.getDocumentProperties=function(){return Ke},h.__private__.setDocumentProperties=h.setProperties=h.setDocumentProperties=function(G){for(var de in Ke)Ke.hasOwnProperty(de)&&G[de]&&(Ke[de]=G[de]);return this},h.__private__.setDocumentProperty=function(G,de){if(Object.keys(Ke).indexOf(G)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Ke[G]=de};var Xe,mt,gt,$t,kt,Zt={},fr={},yr=[],Kt={},pr={},Ot={},Ir={},cn=null,kr=0,rr=[],Ut=new Fre(h),wr=e.hotfixes||[],Ar={},Jt={},Ht=[],Z=function G(de,Fe,Qe,ot,Tt,Nt){if(!(this instanceof G))return new G(de,Fe,Qe,ot,Tt,Nt);isNaN(de)&&(de=1),isNaN(Fe)&&(Fe=0),isNaN(Qe)&&(Qe=0),isNaN(ot)&&(ot=1),isNaN(Tt)&&(Tt=0),isNaN(Nt)&&(Nt=0),this._matrix=[de,Fe,Qe,ot,Tt,Nt]};Object.defineProperty(Z.prototype,"sx",{get:function(){return this._matrix[0]},set:function(G){this._matrix[0]=G}}),Object.defineProperty(Z.prototype,"shy",{get:function(){return this._matrix[1]},set:function(G){this._matrix[1]=G}}),Object.defineProperty(Z.prototype,"shx",{get:function(){return this._matrix[2]},set:function(G){this._matrix[2]=G}}),Object.defineProperty(Z.prototype,"sy",{get:function(){return this._matrix[3]},set:function(G){this._matrix[3]=G}}),Object.defineProperty(Z.prototype,"tx",{get:function(){return this._matrix[4]},set:function(G){this._matrix[4]=G}}),Object.defineProperty(Z.prototype,"ty",{get:function(){return this._matrix[5]},set:function(G){this._matrix[5]=G}}),Object.defineProperty(Z.prototype,"a",{get:function(){return this._matrix[0]},set:function(G){this._matrix[0]=G}}),Object.defineProperty(Z.prototype,"b",{get:function(){return this._matrix[1]},set:function(G){this._matrix[1]=G}}),Object.defineProperty(Z.prototype,"c",{get:function(){return this._matrix[2]},set:function(G){this._matrix[2]=G}}),Object.defineProperty(Z.prototype,"d",{get:function(){return this._matrix[3]},set:function(G){this._matrix[3]=G}}),Object.defineProperty(Z.prototype,"e",{get:function(){return this._matrix[4]},set:function(G){this._matrix[4]=G}}),Object.defineProperty(Z.prototype,"f",{get:function(){return this._matrix[5]},set:function(G){this._matrix[5]=G}}),Object.defineProperty(Z.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Z.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Z.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Z.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Z.prototype.join=function(G){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(S).join(G)},Z.prototype.multiply=function(G){var de=G.sx*this.sx+G.shy*this.shx,Fe=G.sx*this.shy+G.shy*this.sy,Qe=G.shx*this.sx+G.sy*this.shx,ot=G.shx*this.shy+G.sy*this.sy,Tt=G.tx*this.sx+G.ty*this.shx+this.tx,Nt=G.tx*this.shy+G.ty*this.sy+this.ty;return new Z(de,Fe,Qe,ot,Tt,Nt)},Z.prototype.decompose=function(){var G=this.sx,de=this.shy,Fe=this.shx,Qe=this.sy,ot=this.tx,Tt=this.ty,Nt=Math.sqrt(G*G+de*de),Er=(G/=Nt)*Fe+(de/=Nt)*Qe;Fe-=G*Er,Qe-=de*Er;var $r=Math.sqrt(Fe*Fe+Qe*Qe);return Er/=$r,G*(Qe/=$r)<de*(Fe/=$r)&&(G=-G,de=-de,Er=-Er,Nt=-Nt),{scale:new Z(Nt,0,0,$r,0,0),translate:new Z(1,0,0,1,ot,Tt),rotate:new Z(G,de,-de,G,0,0),skew:new Z(1,0,Er,1,0,0)}},Z.prototype.toString=function(G){return this.join(" ")},Z.prototype.inversed=function(){var G=this.sx,de=this.shy,Fe=this.shx,Qe=this.sy,ot=this.tx,Tt=this.ty,Nt=1/(G*Qe-de*Fe),Er=Qe*Nt,$r=-de*Nt,sn=-Fe*Nt,hn=G*Nt;return new Z(Er,$r,sn,hn,-Er*ot-sn*Tt,-$r*ot-hn*Tt)},Z.prototype.applyToPoint=function(G){var de=G.x*this.sx+G.y*this.shx+this.tx,Fe=G.x*this.shy+G.y*this.sy+this.ty;return new Ba(de,Fe)},Z.prototype.applyToRectangle=function(G){var de=this.applyToPoint(G),Fe=this.applyToPoint(new Ba(G.x+G.w,G.y+G.h));return new Jl(de.x,de.y,Fe.x-de.x,Fe.y-de.y)},Z.prototype.clone=function(){var G=this.sx,de=this.shy,Fe=this.shx,Qe=this.sy,ot=this.tx,Tt=this.ty;return new Z(G,de,Fe,Qe,ot,Tt)},h.Matrix=Z;var Pe=h.matrixMult=function(G,de){return de.multiply(G)},ue=new Z(1,0,0,1,0,0);h.unitMatrix=h.identityMatrix=ue;var Ee=function(G,de){if(!pr[G]){var Fe=(de instanceof rg?"Sh":"P")+(Object.keys(Kt).length+1).toString(10);de.id=Fe,pr[G]=Fe,Kt[Fe]=de,Ut.publish("addPattern",de)}};h.ShadingPattern=rg,h.TilingPattern=Vy,h.addShadingPattern=function(G,de){return A("addShadingPattern()"),Ee(G,de),this},h.beginTilingPattern=function(G){A("beginTilingPattern()"),ch(G.boundingBox[0],G.boundingBox[1],G.boundingBox[2]-G.boundingBox[0],G.boundingBox[3]-G.boundingBox[1],G.matrix)},h.endTilingPattern=function(G,de){A("endTilingPattern()"),de.stream=ae[N].join(`
686`),Ee(G,de),Ut.publish("endTilingPattern",de),Ht.pop().restore()};var Oe,Ye=h.__private__.newObject=function(){var G=ct();return Ct(G,!0),G},ct=h.__private__.newObjectDeferred=function(){return ee++,le[ee]=function(){return be},ee},Ct=function(G,de){return de=typeof de=="boolean"&&de,le[G]=be,de&&ne(G+" 0 obj"),G},sr=h.__private__.newAdditionalObject=function(){var G={objId:ct(),content:""};return we.push(G),G},ir=ct(),or=ct(),It=h.__private__.decodeColorString=function(G){var de=G.split(" ");if(de.length!==2||de[1]!=="g"&&de[1]!=="G")de.length!==5||de[4]!=="k"&&de[4]!=="K"||(de=[(1-de[0])*(1-de[3]),(1-de[1])*(1-de[3]),(1-de[2])*(1-de[3]),"r"]);else{var Fe=parseFloat(de[0]);de=[Fe,Fe,Fe,"r"]}for(var Qe="#",ot=0;ot<3;ot++)Qe+=("0"+Math.floor(255*parseFloat(de[ot])).toString(16)).slice(-2);return Qe},cr=h.__private__.encodeColorString=function(G){var de;typeof G=="string"&&(G={ch1:G});var Fe=G.ch1,Qe=G.ch2,ot=G.ch3,Tt=G.ch4,Nt=G.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Fe=="string"&&Fe.charAt(0)!=="#"){var Er=new Kwe(Fe);if(Er.ok)Fe=Er.toHex();else if(!/^\d*\.?\d*$/.test(Fe))throw new Error('Invalid color "'+Fe+'" passed to jsPDF.encodeColorString.')}if(typeof Fe=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Fe)&&(Fe="#"+Fe[1]+Fe[1]+Fe[2]+Fe[2]+Fe[3]+Fe[3]),typeof Fe=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Fe)){var $r=parseInt(Fe.substr(1),16);Fe=$r>>16&255,Qe=$r>>8&255,ot=255&$r}if(Qe===void 0||Tt===void 0&&Fe===Qe&&Qe===ot)de=typeof Fe=="string"?Fe+" "+Nt[0]:G.precision===2?k(Fe/255)+" "+Nt[0]:M(Fe/255)+" "+Nt[0];else if(Tt===void 0||ra(Tt)==="object"){if(Tt&&!isNaN(Tt.a)&&Tt.a===0)return["1.","1.","1.",Nt[1]].join(" ");de=typeof Fe=="string"?[Fe,Qe,ot,Nt[1]].join(" "):G.precision===2?[k(Fe/255),k(Qe/255),k(ot/255),Nt[1]].join(" "):[M(Fe/255),M(Qe/255),M(ot/255),Nt[1]].join(" ")}else de=typeof Fe=="string"?[Fe,Qe,ot,Tt,Nt[2]].join(" "):G.precision===2?[k(Fe),k(Qe),k(ot),k(Tt),Nt[2]].join(" "):[M(Fe),M(Qe),M(ot),M(Tt),Nt[2]].join(" ");return de},Qr=h.__private__.getFilters=function(){return s},Zr=h.__private__.putStream=function(G){var de=(G=G||{}).data||"",Fe=G.filters||Qr(),Qe=G.alreadyAppliedFilters||[],ot=G.addLength1||!1,Tt=de.length,Nt=G.objectId,Er=function(fs){return fs};if(c!==null&&Nt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");c!==null&&(Er=ha.encryptor(Nt,0));var $r={};Fe===!0&&(Fe=["FlateEncode"]);var sn=G.additionalKeyValues||[],hn=($r=qr.API.processDataByFilters!==void 0?qr.API.processDataByFilters(de,Fe):{data:de,reverseChain:[]}).reverseChain+(Array.isArray(Qe)?Qe.join(" "):Qe.toString());if($r.data.length!==0&&(sn.push({key:"Length",value:$r.data.length}),ot===!0&&sn.push({key:"Length1",value:Tt})),hn.length!=0)if(hn.split("/").length-1==1)sn.push({key:"Filter",value:hn});else{sn.push({key:"Filter",value:"["+hn+"]"});for(var Wn=0;Wn<sn.length;Wn+=1)if(sn[Wn].key==="DecodeParms"){for(var Ti=[],za=0;za<$r.reverseChain.split("/").length-1;za+=1)Ti.push("null");Ti.push(sn[Wn].value),sn[Wn].value="["+Ti.join(" ")+"]"}}ne("<<");for(var Si=0;Si<sn.length;Si++)ne("/"+sn[Si].key+" "+sn[Si].value);ne(">>"),$r.data.length!==0&&(ne("stream"),ne(Er($r.data)),ne("endstream"))},Jn=h.__private__.putPage=function(G){var de=G.number,Fe=G.data,Qe=G.objId,ot=G.contentsObjId;Ct(Qe,!0),ne("<</Type /Page"),ne("/Parent "+G.rootDictionaryObjId+" 0 R"),ne("/Resources "+G.resourceDictionaryObjId+" 0 R"),ne("/MediaBox ["+parseFloat(S(G.mediaBox.bottomLeftX))+" "+parseFloat(S(G.mediaBox.bottomLeftY))+" "+S(G.mediaBox.topRightX)+" "+S(G.mediaBox.topRightY)+"]"),G.cropBox!==null&&ne("/CropBox ["+S(G.cropBox.bottomLeftX)+" "+S(G.cropBox.bottomLeftY)+" "+S(G.cropBox.topRightX)+" "+S(G.cropBox.topRightY)+"]"),G.bleedBox!==null&&ne("/BleedBox ["+S(G.bleedBox.bottomLeftX)+" "+S(G.bleedBox.bottomLeftY)+" "+S(G.bleedBox.topRightX)+" "+S(G.bleedBox.topRightY)+"]"),G.trimBox!==null&&ne("/TrimBox ["+S(G.trimBox.bottomLeftX)+" "+S(G.trimBox.bottomLeftY)+" "+S(G.trimBox.topRightX)+" "+S(G.trimBox.topRightY)+"]"),G.artBox!==null&&ne("/ArtBox ["+S(G.artBox.bottomLeftX)+" "+S(G.artBox.bottomLeftY)+" "+S(G.artBox.topRightX)+" "+S(G.artBox.topRightY)+"]"),typeof G.userUnit=="number"&&G.userUnit!==1&&ne("/UserUnit "+G.userUnit),Ut.publish("putPage",{objId:Qe,pageContext:rr[de],pageNumber:de,page:Fe}),ne("/Contents "+ot+" 0 R"),ne(">>"),ne("endobj");var Tt=Fe.join(` 687`);return w===b&&(Tt+=` 688Q`),Ct(ot,!0),Zr({data:Tt,filters:Qr(),objectId:ot}),ne("endobj"),Qe},yn=h.__private__.putPages=function(){var G,de,Fe=[];for(G=1;G<=kr;G++)rr[G].objId=ct(),rr[G].contentsObjId=ct();for(G=1;G<=kr;G++)Fe.push(Jn({number:G,data:ae[G],objId:rr[G].objId,contentsObjId:rr[G].contentsObjId,mediaBox:rr[G].mediaBox,cropBox:rr[G].cropBox,bleedBox:rr[G].bleedBox,trimBox:rr[G].trimBox,artBox:rr[G].artBox,userUnit:rr[G].userUnit,rootDictionaryObjId:ir,resourceDictionaryObjId:or}));Ct(ir,!0),ne("<</Type /Pages");var Qe="/Kids [";for(de=0;de<kr;de++)Qe+=Fe[de]+" 0 R ";ne(Qe+"]"),ne("/Count "+kr),ne(">>"),ne("endobj"),Ut.publish("postPutPages")},En=function(G){Ut.publish("putFont",{font:G,out:ne,newObject:Ye,putStream:Zr}
vendor: 6,875 bytes, lines 688-689
688),G.isAlreadyPutted!==!0&&(G.objectNumber=Ye(),ne("<<"),ne("/Type /Font"),ne("/BaseFont /"+g1(G.postScriptName)),ne("/Subtype /Type1"),typeof G.encoding=="string"&&ne("/Encoding /"+G.encoding),ne("/FirstChar 32"),ne("/LastChar 255"),ne(">>"),ne("endobj"))},pn=function(G){G.objectNumber=Ye();var de=[];de.push({key:"Type",value:"/XObject"}),de.push({key:"Subtype",value:"/Form"}),de.push({key:"BBox",value:"["+[S(G.x),S(G.y),S(G.x+G.width),S(G.y+G.height)].join(" ")+"]"}),de.push({key:"Matrix",value:"["+G.matrix.toString()+"]"});var Fe=G.pages[1].join(` 689`);Zr({data:Fe,additionalKeyValues:de,objectId:G.objectNumber}),ne("endobj")},si=function(G,de){de||(de=21);var Fe=Ye(),Qe=function(Nt,Er){var $r,sn=[],hn=1/(Er-1);for($r=0;$r<1;$r+=hn)sn.push($r);if(sn.push(1),Nt[0].offset!=0){var Wn={offset:0,color:Nt[0].color};Nt.unshift(Wn)}if(Nt[Nt.length-1].offset!=1){var Ti={offset:1,color:Nt[Nt.length-1].color};Nt.push(Ti)}for(var za="",Si=0,fs=0;fs<sn.length;fs++){for($r=sn[fs];$r>Nt[Si+1].offset;)Si++;var Ua=Nt[Si].offset,hs=($r-Ua)/(Nt[Si+1].offset-Ua),ll=Nt[Si].color,vo=Nt[Si+1].color;za+=ie(Math.round((1-hs)*ll[0]+hs*vo[0]).toString(16))+ie(Math.round((1-hs)*ll[1]+hs*vo[1]).toString(16))+ie(Math.round((1-hs)*ll[2]+hs*vo[2]).toString(16))}return za.trim()}(G.colors,de),ot=[];ot.push({key:"FunctionType",value:"0"}),ot.push({key:"Domain",value:"[0.0 1.0]"}),ot.push({key:"Size",value:"["+de+"]"}),ot.push({key:"BitsPerSample",value:"8"}),ot.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ot.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Zr({data:Qe,additionalKeyValues:ot,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Fe}),ne("endobj"),G.objectNumber=Ye(),ne("<< /ShadingType "+G.type),ne("/ColorSpace /DeviceRGB");var Tt="/Coords ["+S(parseFloat(G.coords[0]))+" "+S(parseFloat(G.coords[1]))+" ";G.type===2?Tt+=S(parseFloat(G.coords[2]))+" "+S(parseFloat(G.coords[3])):Tt+=S(parseFloat(G.coords[2]))+" "+S(parseFloat(G.coords[3]))+" "+S(parseFloat(G.coords[4]))+" "+S(parseFloat(G.coords[5])),ne(Tt+="]"),G.matrix&&ne("/Matrix ["+G.matrix.toString()+"]"),ne("/Function "+Fe+" 0 R"),ne("/Extend [true true]"),ne(">>"),ne("endobj")},fa=function(G,de){var Fe=ct(),Qe=Ye();de.push({resourcesOid:Fe,objectOid:Qe}),G.objectNumber=Qe;var ot=[];ot.push({key:"Type",value:"/Pattern"}),ot.push({key:"PatternType",value:"1"}),ot.push({key:"PaintType",value:"1"}),ot.push({key:"TilingType",value:"1"}),ot.push({key:"BBox",value:"["+G.boundingBox.map(S).join(" ")+"]"}),ot.push({key:"XStep",value:S(G.xStep)}),ot.push({key:"YStep",value:S(G.yStep)}),ot.push({key:"Resources",value:Fe+" 0 R"}),G.matrix&&ot.push({key:"Matrix",value:"["+G.matrix.toString()+"]"}),Zr({data:G.stream,additionalKeyValues:ot,objectId:G.objectNumber}),ne("endobj")},aa=function(G){for(var de in G.objectNumber=Ye(),ne("<<"),G)switch(de){case"opacity":ne("/ca "+k(G[de]));break;case"stroke-opacity":ne("/CA "+k(G[de]))}ne(">>"),ne("endobj")},xi=function(G){Ct(G.resourcesOid,!0),ne("<<"),ne("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var de in ne("/Font <<"),Zt)Zt.hasOwnProperty(de)&&(d===!1||d===!0&&f.hasOwnProperty(de))&&ne("/"+de+" "+Zt[de].objectNumber+" 0 R");ne(">>")}(),function(){if(Object.keys(Kt).length>0){for(var de in ne("/Shading <<"),Kt)Kt.hasOwnProperty(de)&&Kt[de]instanceof rg&&Kt[de].objectNumber>=0&&ne("/"+de+" "+Kt[de].objectNumber+" 0 R");Ut.publish("putShadingPatternDict"),ne(">>")}}(),function(de){if(Object.keys(Kt).length>0){for(var Fe in ne("/Pattern <<"),Kt)Kt.hasOwnProperty(Fe)&&Kt[Fe]instanceof h.TilingPattern&&Kt[Fe].objectNumber>=0&&Kt[Fe].objectNumber<de&&ne("/"+Fe+" "+Kt[Fe].objectNumber+" 0 R");Ut.publish("putTilingPatternDict"),ne(">>")}}(G.objectOid),function(){if(Object.keys(Ot).length>0){var de;for(de in ne("/ExtGState <<"),Ot)Ot.hasOwnProperty(de)&&Ot[de].objectNumber>=0&&ne("/"+de+" "+Ot[de].objectNumber+" 0 R");Ut.publish("putGStateDict"),ne(">>")}}(),function(){for(var de in ne("/XObject <<"),Ar)Ar.hasOwnProperty(de)&&Ar[de].objectNumber>=0&&ne("/"+de+" "+Ar[de].objectNumber+" 0 R");Ut.publish("putXobjectDict"),ne(">>")}(),ne(">>"),ne("endobj")},ci=function(G){fr[G.fontName]=fr[G.fontName]||{},fr[G.fontName][G.fontStyle]=G.id},oi=function(G,de,Fe,Qe,ot){var Tt={id:"F"+(Object.keys(Zt).length+1).toString(10),postScriptName:G,fontName:de,fontStyle:Fe,encoding:Qe,isStandardFont:ot||!1,metadata:{}};return Ut.publish("addFont",{font:Tt,instance:this}),Zt[Tt.id]=Tt,ci(Tt),Tt.id},Ki=h.__private__.pdfEscape=h.pdfEscape=function(G,de){return function(Fe,Qe){var ot,Tt,Nt,Er,$r,sn,hn,Wn,Ti;if(Nt=(Qe=Qe||{}).sourceEncoding||"Unicode",$r=Qe.outputEncoding,(Qe.autoencode||$r)&&Zt[Xe].metadata&&Zt[Xe].metadata[Nt]&&Zt[Xe].metadata[Nt].encoding&&(Er=Zt[Xe].metadata[Nt].encoding,!$r&&Zt[Xe].encoding&&($r=Zt[Xe].encoding),!$r&&Er.codePages&&($r=Er.codePages[0]),typeof $r=="string"&&($r=Er[$r]),$r)){for(hn=!1,sn=[],ot=0,Tt=Fe.length;ot<Tt;ot++)(Wn=$r[Fe.charCodeAt(ot)])?sn.push(String.fromCharCode(Wn)):sn.push(Fe[ot]),sn[ot].charCodeAt(0)>>8&&(hn=!0);Fe=sn.join("")}for(ot=Fe.length;hn===void 0&&ot!==0;)Fe.charCodeAt(ot-1)>>8&&(hn=!0),ot--;if(!hn)return Fe;for(sn=Qe.noBOM?[]:[254,255],ot=0,Tt=Fe.length;ot<Tt;ot++){if((Ti=(Wn=Fe.charCodeAt(ot))>>8)>>8)throw new Error("Character at position "+ot+" of string '"+Fe+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");sn.push(Ti),sn.push(Wn-(Ti<<8))}return String.fromCharCode.apply(void 0,sn)}(G,de).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ls=h.__private__.beginPage=function(G){ae[++kr]=[],rr[kr]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(G[0]),topRightY:Number(G[1])}},Ei(kr),Se(ae[N])},Yi=function(G,de){var Fe,Qe,ot;switch(r=de||r,typeof G=="string"&&(Fe=y(G.toLowerCase()),Array.isArray(Fe)&&(Qe=Fe[0],ot=Fe[1])),Array.isArray(G)&&(Qe=G[0]*mt,ot=G[1]*mt),isNaN(Qe)&&(Qe=i[0],ot=i[1]),(Qe>14400||ot>14400)&&(ya.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Qe=Math.min(14400,Qe),ot=Math.min(14400,ot)),i=[Qe,ot],r.substr(0,1)){case"l":ot>Qe&&(i=[ot,Qe]);break;case"p":Qe>ot&&(i=[ot,Qe])}ls(i),Pr(Oi),ne(Aa),Xi!==0&&ne(Xi+" J"),la!==0&&ne(la+" j"),Ut.publish("addPage",{pageNumber:kr})},sa=function(G){G>0&&G<=kr&&(ae.splice(G,1),rr.splice(G,1),kr--,N>kr&&(N=kr),this.setPage(N))},Ei=function(G){G>0&&G<=kr&&(N=G)},gi=h.__private__.getNumberOfPages=h.getNumberOfPages=function(){return ae.length-1},Ta=function(G,de,Fe){var Qe,ot=void 0;return Fe=Fe||{},G=G!==void 0?G:Zt[Xe].fontName,de=de!==void 0?de:Zt[Xe].fontStyle,Qe=G.toLowerCase(),fr[Qe]!==void 0&&fr[Qe][de]!==void 0?ot=fr[Qe][de]:fr[G]!==void 0&&fr[G][de]!==void 0?ot=fr[G][de]:Fe.disableWarning===!1&&ya.warn("Unable to look up font label for font '"+G+"', '"+de+"'. Refer to getFontList(
689) for available fonts."),ot||Fe.noFallback||(ot=fr.times[de])==null&&(ot=fr.times.normal),ot},Qs=h.__private__.putInfo=function(){var G=Ye(),de=function(Qe){return Qe};for(var Fe in c!==null&&(de=ha.encryptor(G,0)),ne("<<"),ne("/Producer ("+Ki(de("jsPDF "+qr.version))+")"),Ke)Ke.hasOwnProperty(Fe)&&Ke[Fe]&&ne("/"+Fe.substr(0,1).toUpperCase()+Fe.substr(1)+" ("+Ki(de(Ke[Fe]))+")");ne("/CreationDate ("+Ki(de(V))+")"),ne(">>"),ne("endobj")},us=h.__private__.putCatalog=function(G){var de=(G=G||{}).rootDictionaryObjId||ir;switch(Ye(),ne("<<"),ne("/Type /Catalog"),ne("/Pages "+de+" 0 R"),ce||(ce="fullwidth"),ce){case"fullwidth":ne("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ne("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ne("/OpenAction [3 0 R /Fit]");break;case"original":ne("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Fe=""+ce;Fe.substr(Fe.length-1)==="%"&&(ce=parseInt(ce)/100),typeof ce=="number"&&ne("/OpenAction [3 0 R /XYZ null null "+k(ce)+"]")}switch(Ge||(Ge="continuous"),Ge){case"continuous":ne("/PageLayout /OneColumn");break;case"single":ne("/PageLayout /SinglePage");break;case"two":case"twoleft":ne("/PageLayout /TwoColumnLeft");break;case"tworight":ne("/PageLayout /TwoColumnRight")}De&&ne("/PageMode /"+De),Ut.publish("putCatalog"),ne(">>"),ne("endobj")},jt=h.__private__.putTrailer=function(){ne("trailer"),ne("<<"),ne("/Size "+(ee+1)),ne("/Root "+ee+" 0 R"),ne("/Info "+(ee-1)+" 0 R"),c!==null&&ne("/Encrypt "+ha.oid+" 0 R"),ne("/ID [ <"+U+"> <"+U+"> ]"),ne(">>")},Pt=h.__private__.putHeader=function(){ne("%PDF-"+p),ne("%ºÃˆ ")},hr=h.__private__.putXRef=function(){var G="0000000000";ne("xref"),ne("0 "+(ee+1)),ne("0000000000 65535 f ");for(var de=1;de<=ee;de++)typeof le[de]=="function"?ne((G+le[de]()).slice(-10)+" 00000 n "):le[de]!==void 0?ne((G+le[de]).slice(-10)+" 00000 n "):ne("0000000000 00000 n ")},$n=h.__private__.buildDocument=function(){var G;ee=0,be=0,Te=[],le=[],we=[],ir=ct(),or=ct(),Se(Te),Ut.publish("buildDocument"),Pt(),yn(),function(){Ut.publish("putAdditionalObjects");for(var Fe=0;Fe<we.length;Fe++){var Qe=we[Fe];Ct(Qe.objId,!0),ne(Qe.content),ne("endobj")}Ut.publish("postPutAdditionalObjects")}(),G=[],function(){for(var Fe in Zt)Zt.hasOwnProperty(Fe)&&(d===!1||d===!0&&f.hasOwnProperty(Fe))&&En(Zt[Fe])}(),function(){var Fe;for(Fe in Ot)Ot.hasOwnProperty(Fe)&&aa(Ot[Fe])}(),function(){for(var Fe in Ar)Ar.hasOwnProperty(Fe)&&pn(Ar[Fe])}(),function(Fe){var Qe;for(Qe in Kt)Kt.hasOwnProperty(Qe)&&(Kt[Qe]instanceof rg?si(Kt[Qe]):Kt[Qe]instanceof Vy&&fa(Kt[Qe],Fe))}(G),Ut.publish("putResources"),G.forEach(xi),xi({resourcesOid:or,objectOid:Number.MAX_SAFE_INTEGER}),Ut.publish("postPutResources"),c!==null&&(ha.oid=Ye(),ne("<<"),ne("/Filter /Standard"),ne("/V "+ha.v),ne("/R "+ha.r),ne("/U <"+ha.toHexString(ha.U)+">"),ne("/O <"+ha.toHexString(ha.O)+">"),ne("/P "+ha.P),ne(">>"),ne("endobj")),Qs(),us();var de=be;return hr(),jt(),ne("startxref"),ne(""+de),ne("%%EOF"),Se(ae[N]),Te.join(` 690`)},xl=h.__private__.getBlob=function(G){return new Blob([me(G)],{type:"application/pdf"})},El=h.output=h.__private__.output=(Oe=function(G,de){switch(typeof(de=de||{})=="string"?de={filename:de}:de.filename=de.filename||"generated.pdf",G){case void 0:return $n();case"save":h.save(de.filename);break;case"arraybuffer":return me($n());case"blob":return xl($n());case"bloburi":case"bloburl":if(vn.URL!==void 0&&typeof vn.URL.createObjectURL=="function")return vn.URL&&vn.URL.createObjectURL(xl($n()))||void 0;ya.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Fe="",Qe=$n();try{Fe=jre(Qe)}catch{Fe=jre(unescape(encodeURIComponent(Qe)))}return"data:application/pdf;filename="+de.filename+";base64,"+Fe;case"pdfobjectnewwindow":if(Object.prototype.toString.call(vn)==="[object Window]"){var ot="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Tt=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';de.pdfObjectUrl&&(ot=de.pdfObjectUrl,Tt="");var Nt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+ot+'"'+Tt+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(de)+");<\/script></body></html>",Er=vn.open();return Er!==null&&Er.document.write(Nt),Er}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(vn)==="[object Window]"){var $r='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(de.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+de.filename+'" width="500px" height="400px" /></body></html>',sn=vn.open();if(sn!==null){sn.document.write($r);var hn=this;sn.document.documentElement.querySelector("#pdfViewer").onload=function(){sn.document.title=de.filename,sn.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(hn.output("bloburl"))}}return sn}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(vn)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Wn='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",de)+'"></iframe></body></html>',Ti=vn.open();if(Ti!==null&&(Ti.document.write(Wn),Ti.document.title=de.filename),Ti||typeof safari>"u")return Ti;break;case"datauri":case"dataurl":return vn.document.location.href=this.output("datauristring",de);default:return null}},Oe.foo=function(){try{return Oe.apply(this,arguments)}catch(Fe){var G=Fe.stack||"";~G.indexOf(" at ")&&(G=G.split(" at ")[1]);var de="Error in function "+G.split(` 691`)[0].split("<")[0]+": "+Fe.message;if(!vn.console)throw new Error(de);vn.console.error(de,Fe),vn.alert&&alert(de)}},Oe.foo.bar=Oe,Oe.foo),Sa=function(G){return Array.isArray(wr)===!0&&wr.indexOf(G)>-1};switch(n){case"pt":mt=1;break;case"mm":mt=72/25.4;break;case"cm":mt=72/2.54;break;case"in":mt=72;break;case"px":mt=Sa("px_scaling")==1?.75:96/72;break;case"pc":case"em":mt=12;break;case"ex":mt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);mt=n}var ha=null;K(),z();var sl=h.__private__.getPageInfo=h.getPageInfo=function(G){if(isNaN(G)||G%1!=0)throw new Error("Invalid argument passed to
691jsPDF.getPageInfo");return{objId:rr[G].objId,pageNumber:G,pageContext:rr[G]}},ud=h.__private__.getPageInfoByObjId=function(G){if(isNaN(G)||G%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var de in rr)if(rr[de].objId===G)break;return sl(de)},sf=h.__private__.getCurrentPageInfo=h.getCurrentPageInfo=function(){return{objId:rr[N].objId,pageNumber:N,pageContext:rr[N]}};h.addPage=function(){return Yi.apply(this,arguments),this},h.setPage=function(){return Ei.apply(this,arguments),Se.call(this,ae[N]),this},h.insertPage=function(G){return this.addPage(),this.movePage(N,G),this},h.movePage=function(G,de){var Fe,Qe;if(G>de){Fe=ae[G],Qe=rr[G];for(var ot=G;ot>de;ot--)ae[ot]=ae[ot-1],rr[ot]=rr[ot-1];ae[de]=Fe,rr[de]=Qe,this.setPage(de)}else if(G<de){Fe=ae[G],Qe=rr[G];for(var Tt=G;Tt<de;Tt++)ae[Tt]=ae[Tt+1],rr[Tt]=rr[Tt+1];ae[de]=Fe,rr[de]=Qe,this.setPage(de)}return this},h.deletePage=function(){return sa.apply(this,arguments),this},h.__private__.text=h.text=function(G,de,Fe,Qe,ot){var Tt,Nt,Er,$r,sn,hn,Wn,Ti,za,Si=(Qe=Qe||{}).scope||this;if(typeof G=="number"&&typeof de=="number"&&(typeof Fe=="string"||Array.isArray(Fe))){var fs=Fe;Fe=de,de=G,G=fs}if(arguments[3]instanceof Z==0?(Er=arguments[4],$r=arguments[5],ra(Wn=arguments[3])==="object"&&Wn!==null||(typeof Er=="string"&&($r=Er,Er=null),typeof Wn=="string"&&($r=Wn,Wn=null),typeof Wn=="number"&&(Er=Wn,Wn=null),Qe={flags:Wn,angle:Er,align:$r})):(A("The transform parameter of text() with a Matrix value"),za=ot),isNaN(de)||isNaN(Fe)||G==null)throw new Error("Invalid arguments passed to jsPDF.text");if(G.length===0)return Si;var Ua,hs="",ll=typeof Qe.lineHeightFactor=="number"?Qe.lineHeightFactor:Tn,vo=Si.internal.scaleFactor;function Iu(ei){return ei=ei.split(" ").join(Array(Qe.TabLen||9).join(" ")),Ki(ei,Wn)}function dh(ei){for(var Ai,ga=ei.concat(),Ca=[],su=ga.length;su--;)typeof(Ai=ga.shift())=="string"?Ca.push(Ai):Array.isArray(ei)&&(Ai.length===1||Ai[1]===void 0&&Ai[2]===void 0)?Ca.push(Ai[0]):Ca.push([Ai[0],Ai[1],Ai[2]]);return Ca}function lf(ei,Ai){var ga;if(typeof ei=="string")ga=Ai(ei)[0];else if(Array.isArray(ei)){for(var Ca,su,j=ei.concat(),J=[],oe=j.length;oe--;)typeof(Ca=j.shift())=="string"?J.push(Ai(Ca)[0]):Array.isArray(Ca)&&typeof Ca[0]=="string"&&(su=Ai(Ca[0],Ca[1],Ca[2]),J.push([su[0],su[1],su[2]]));ga=J}return ga}var pc=!1,fd=!0;if(typeof G=="string")pc=!0;else if(Array.isArray(G)){var hd=G.concat();Nt=[];for(var mc,Ms=hd.length;Ms--;)(typeof(mc=hd.shift())!="string"||Array.isArray(mc)&&typeof mc[0]!="string")&&(fd=!1);pc=fd}if(pc===!1)throw new Error('Type of text must be string or Array. "'+G+'" is not recognized.');typeof G=="string"&&(G=G.match(/[\r?\n]/)?G.split(/\r\n|\r|\n/g):[G]);var gc=ke/Si.internal.scaleFactor,eu=gc*(ll-1);switch(Qe.baseline){case"bottom":Fe-=eu;break;case"top":Fe+=gc-eu;break;case"hanging":Fe+=gc-2*eu;break;case"middle":Fe+=gc/2-eu}if((hn=Qe.maxWidth||0)>0&&(typeof G=="string"?G=Si.splitTextToSize(G,hn):Object.prototype.toString.call(G)==="[object Array]"&&(G=G.reduce(function(ei,Ai){return ei.concat(Si.splitTextToSize(Ai,hn))},[]))),Tt={text:G,x:de,y:Fe,options:Qe,mutex:{pdfEscape:Ki,activeFontKey:Xe,fonts:Zt,activeFontSize:ke}},Ut.publish("preProcessText",Tt),G=Tt.text,Er=(Qe=Tt.options).angle,za instanceof Z==0&&Er&&typeof Er=="number"){Er*=Math.PI/180,Qe.rotationDirection===0&&(Er=-Er),w===b&&(Er=-Er);var Tl=Math.cos(Er),pd=Math.sin(Er);za=new Z(Tl,pd,-pd,Tl,0,0)}else Er&&Er instanceof Z&&(za=Er);w!==b||za||(za=ue),(sn=Qe.charSpace||Ps)!==void 0&&(hs+=S(D(sn))+` Tc 692`,this.setCharSpace(this.getCharSpace()||0)),(Ti=Qe.horizontalScale)!==void 0&&(hs+=S(100*Ti)+` Tz 693`),Qe.lang;var Js=-1,tu=Qe.renderingMode!==void 0?Qe.renderingMode:Qe.stroke,Vo=Si.internal.getCurrentPageInfo().pageContext;switch(tu){case 0:case!1:case"fill":Js=0;break;case 1:case!0:case"stroke":Js=1;break;case 2:case"fillThenStroke":Js=2;break;case 3:case"invisible":Js=3;break;case 4:case"fillAndAddForClipping":Js=4;break;case 5:case"strokeAndAddPathForClipping":Js=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Js=6;break;
vendor: 18,305 bytes, lines 693-705
693case 7:case"addToPathForClipping":Js=7}var uf=Vo.usedRenderingMode!==void 0?Vo.usedRenderingMode:-1;Js!==-1?hs+=Js+` Tr 694`:uf!==-1&&(hs+=`0 Tr 695`),Js!==-1&&(Vo.usedRenderingMode=Js),$r=Qe.align||"left";var ul,yc=ke*ll,fh=Si.internal.pageSize.getWidth(),cf=Zt[Xe];sn=Qe.charSpace||Ps,hn=Qe.maxWidth||0,Wn=Object.assign({autoencode:!0,noBOM:!0},Qe.flags);var ru=[],vc=function(ei){return Si.getStringUnitWidth(ei,{font:cf,charSpace:sn,fontSize:ke,doKerning:!1})*ke/vo};if(Object.prototype.toString.call(G)==="[object Array]"){var Ho;Nt=dh(G),$r!=="left"&&(ul=Nt.map(vc));var _o,Du=0;if($r==="right"){de-=ul[0],G=[],Ms=Nt.length;for(var cl=0;cl<Ms;cl++)cl===0?(_o=Wi(de),Ho=cs(Fe)):(_o=D(Du-ul[cl]),Ho=-yc),G.push([Nt[cl],_o,Ho]),Du=ul[cl]}else if($r==="center"){de-=ul[0]/2,G=[],Ms=Nt.length;for(var xr=0;xr<Ms;xr++)xr===0?(_o=Wi(de),Ho=cs(Fe)):(_o=D((Du-ul[xr])/2),Ho=-yc),G.push([Nt[xr],_o,Ho]),Du=ul[xr]}else if($r==="left"){G=[],Ms=Nt.length;for(var hh=0;hh<Ms;hh++)G.push(Nt[hh])}else if($r==="justify"&&cf.encoding==="Identity-H"){G=[],Ms=Nt.length,hn=hn!==0?hn:fh;for(var md=0,ma=0;ma<Ms;ma++)if(Ho=ma===0?cs(Fe):-yc,_o=ma===0?Wi(de):md,ma<Ms-1){var _c=D((hn-ul[ma])/(Nt[ma].split(" ").length-1)),Za=Nt[ma].split(" ");G.push([Za[0]+" ",_o,Ho]),md=0;for(var Go=1;Go<Za.length;Go++){var bc=(vc(Za[Go-1]+" "+Za[Go])-vc(Za[Go]))*vo+_c;Go==Za.length-1?G.push([Za[Go],bc,0]):G.push([Za[Go]+" ",bc,0]),md-=bc}}else G.push([Nt[ma],_o,Ho]);G.push(["",md,0])}else{if($r!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(G=[],Ms=Nt.length,hn=hn!==0?hn:fh,ma=0;ma<Ms;ma++){Ho=ma===0?cs(Fe):-yc,_o=ma===0?Wi(de):0;var df=Nt[ma].split(" ").length-1,ff=df>0?(hn-ul[ma])/df:0;ma<Ms-1?ru.push(S(D(ff))):ru.push(0),G.push([Nt[ma],_o,Ho])}}}(typeof Qe.R2L=="boolean"?Qe.R2L:Re)===!0&&(G=lf(G,function(ei,Ai,ga){return[ei.split("").reverse().join(""),Ai,ga]})),Tt={text:G,x:de,y:Fe,options:Qe,mutex:{pdfEscape:Ki,activeFontKey:Xe,fonts:Zt,activeFontSize:ke}},Ut.publish("postProcessText",Tt),G=Tt.text,Ua=Tt.mutex.isHex||!1;var gd=Zt[Xe].encoding;gd!=="WinAnsiEncoding"&&gd!=="StandardEncoding"||(G=lf(G,function(ei,Ai,ga){return[Iu(ei),Ai,ga]})),Nt=dh(G),G=[];for(var nu,Lu,iu,wc=Array.isArray(Nt[0])?1:0,Sl="",au=function(ei,Ai,ga){var Ca="";return ga instanceof Z?(ga=typeof Qe.angle=="number"?Pe(ga,new Z(1,0,0,1,ei,Ai)):Pe(new Z(1,0,0,1,ei,Ai),ga),w===b&&(ga=Pe(new Z(1,0,0,-1,0,0),ga)),Ca=ga.join(" ")+` Tm 696`):Ca=S(ei)+" "+S(Ai)+` Td 697`,Ca},bo=0;bo<Nt.length;bo++){switch(Sl="",wc){case 1:iu=(Ua?"<":"(")+Nt[bo][0]+(Ua?">":")"),nu=parseFloat(Nt[bo][1]),Lu=parseFloat(Nt[bo][2]);break;case 0:iu=(Ua?"<":"(")+Nt[bo]+(Ua?">":")"),nu=Wi(de),Lu=cs(Fe)}ru!==void 0&&ru[bo]!==void 0&&(Sl=ru[bo]+` Tw 698`),bo===0?G.push(Sl+au(nu,Lu,za)+iu):wc===0?G.push(Sl+iu):wc===1&&G.push(Sl+au(nu,Lu,za)+iu)}G=wc===0?G.join(` Tj 699T* `):G.join(` Tj 700`),G+=` Tj 701`;var Al=`BT 702/`;return Al+=Xe+" "+ke+` Tf 703`,Al+=S(ke*ll)+` TL 704`,Al+=yo+` 705`,Al+=hs,Al+=G,ne(Al+="ET"),f[Xe]=!0,Si};var st=h.__private__.clip=h.clip=function(G){return ne(G==="evenodd"?"W*":"W"),this};h.clipEvenOdd=function(){return st("evenodd")},h.__private__.discardPath=h.discardPath=function(){return ne("n"),this};var se=h.__private__.isValidStyle=function(G){var de=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(G)!==-1&&(de=!0),de};h.__private__.setDefaultPathOperation=h.setDefaultPathOperation=function(G){return se(G)&&(u=G),this};var Ce=h.__private__.getStyle=h.getStyle=function(G){var de=u;switch(G){case"D":case"S":de="S";break;case"F":de="f";break;case"FD":case"DF":de="B";break;case"f":case"f*":case"B":case"B*":de=G}return de},Ve=h.close=function(){return ne("h"),this};h.stroke=function(){return ne("S"),this},h.fill=function(G){return Je("f",G),this},h.fillEvenOdd=function(G){return Je("f*",G),this},h.fillStroke=function(G){return Je("B",G),this},h.fillStrokeEvenOdd=function(G){return Je("B*",G),this};var Je=function(G,de){ra(de)==="object"?Bt(de,G):ne(G)},it=function(G){G===null||w===b&&G===void 0||(G=Ce(G),ne(G))};function vt(G,de,Fe,Qe,ot){var Tt=new Vy(de||this.boundingBox,Fe||this.xStep,Qe||this.yStep,this.gState,ot||this.matrix);Tt.stream=this.stream;var Nt=G+"$$"+this.cloneIndex+++"$$";return Ee(Nt,Tt),Tt}var Bt=function(G,de){var Fe=pr[G.key],Qe=Kt[Fe];if(Qe instanceof rg)ne("q"),ne(er(de)),Qe.gState&&h.setGState(Qe.gState),ne(G.matrix.toString()+" cm"),ne("/"+Fe+" sh"),ne("Q");else if(Qe instanceof Vy){var ot=new Z(1,0,0,-1,0,dd());G.matrix&&(ot=ot.multiply(G.matrix||ue),Fe=vt.call(Qe,G.key,G.boundingBox,G.xStep,G.yStep,ot).id),ne("q"),ne("/Pattern cs"),ne("/"+Fe+" scn"),Qe.gState&&h.setGState(Qe.gState),ne(de),ne("Q")}},er=function(G){switch(G){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Gt=h.moveTo=function(G,de){return ne(S(D(G))+" "+S($(de))+" m"),this},dr=h.lineTo=function(G,de){return ne(S(D(G))+" "+S($(de))+" l"),this},Dr=h.curveTo=function(G,de,Fe,Qe,ot,Tt){return ne([S(D(G)),S($(de)),S(D(Fe)),S($(Qe)),S(D(ot)),S($(Tt)),"c"].join(" ")),this};h.__private__.line=h.line=function(G,de,Fe,Qe,ot){if(isNaN(G)||isNaN(de)||isNaN(Fe)||isNaN(Qe)||!se(ot))throw new Error("Invalid arguments passed to jsPDF.line");return w===v?this.lines([[Fe-G,Qe-de]],G,de,[1,1],ot||"S"):this.lines([[Fe-G,Qe-de]],G,de,[1,1]).stroke()},h.__private__.lines=h.lines=function(G,de,Fe,Qe,ot,Tt){var Nt,Er,$r,sn,hn,Wn,Ti,za,Si,fs,Ua,hs;if(typeof G=="number"&&(hs=Fe,Fe=de,de=G,G=hs),Qe=Qe||[1,1],Tt=Tt||!1,isNaN(de)||isNaN(Fe)||!Array.isArray(G)||!Array.isArray(Qe)||!se(ot)||typeof Tt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Gt(de,Fe),Nt=Qe[0],Er=Qe[1],sn=G.length,fs=de,Ua=Fe,$r=0;$r<sn;$r++)(hn=G[$r]).length===2?(fs=hn[0]*Nt+fs,Ua=hn[1]*Er+Ua,dr(fs,Ua)):(Wn=hn[0]*Nt+fs,Ti=hn[1]*Er+Ua,za=hn[2]*Nt+fs,Si=hn[3]*Er+Ua,fs=hn[4]*Nt+fs,Ua=hn[5]*Er+Ua,Dr(Wn,Ti,za,Si,fs,Ua));return Tt&&Ve(),it(ot),this},h.path=function(G){for(var de=0;de<G.length;de++){var Fe=G[de],Qe=Fe.c;switch(Fe.op){case"m":Gt(Qe[0],Qe[1]);break;case"l":dr(Qe[0],Qe[1]);break;case"c":Dr.apply(this,Qe);break;case"h":Ve()}}return this},h.__private__.rect=h.rect=function(G,de,Fe,Qe,ot){if(isNaN(G)||isNaN(de)||isNaN(Fe)||isNaN(Qe)||!se(ot))throw new Error("Invalid arguments passed to jsPDF.rect");return w===v&&(Qe=-Qe),ne([S(D(G)),S($(de)),S(D(Fe)),S(D(Qe)),"re"].join(" ")),it(ot),this},h.__private__.triangle=h.triangle=function(G,de,Fe,Qe,ot,Tt,Nt){if(isNaN(G)||isNaN(de)||isNaN(Fe)||isNaN(Qe)||isNaN(ot)||isNaN(Tt)||!se(Nt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Fe-G,Qe-de],[ot-Fe,Tt-Qe],[G-ot,de-Tt]],G,de,[1,1],Nt,!0),this},h.__private__.roundedRect=h.roundedRect=function(G,de,Fe,Qe,ot,Tt,Nt){if(isNaN(G)||isNaN(de)||isNaN(Fe)||isNaN(Qe)||isNaN(ot)||isNaN(Tt)||!se(Nt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Er=4/3*(Math.SQRT2-1);return ot=Math.min(ot,.5*Fe),Tt=Math.min(Tt,.5*Qe),this.lines([[Fe-2*ot,0],[ot*Er,0,ot,Tt-Tt*Er,ot,Tt],[0,Qe-2*Tt],[0,Tt*Er,-ot*Er,Tt,-ot,Tt],[2*ot-Fe,0],[-ot*Er,0,-ot,-Tt*Er,-ot,-Tt],[0,2*Tt-Qe],[0,-Tt*Er,ot*Er,-Tt,ot,-Tt]],G+ot,de,[1,1],Nt,!0),this},h.__private__.ellipse=h.ellipse=function(G,de,Fe,Qe,ot){if(isNaN(G)||isNaN(de)||isNaN(Fe)||isNaN(Qe)||!se(ot))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Tt=4/3*(Math.SQRT2-1)*Fe,Nt=4/3*(Math.SQRT2-1)*Qe;return Gt(G+Fe,de),Dr(G+Fe,de-Nt,G+Tt,de-Qe,G,de-Qe),Dr(G-Tt,de-Qe,G-Fe,de-Nt,G-Fe,de),Dr(G-Fe,de+Nt,G-Tt,de+Qe,G,de+Qe),Dr(G+Tt,de+Qe,G+Fe,de+Nt,G+Fe,de),it(ot),this},h.__private__.circle=h.circle=function(G,de,Fe,Qe){if(isNaN(G)||isNaN(de)||isNaN(Fe)||!se(Qe))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(G,de,Fe,Fe,Qe)},h.setFont=function(G,de,Fe){return Fe&&(de=T(de,Fe)),Xe=Ta(G,de,{disableWarning:!1}),this};var Un=h.__private__.getFont=h.getFont=function(){return Zt[Ta.apply(h,arguments)]};h.__private__.getFontList=h.getFontList=function(){var G,de,Fe={};for(G in fr)if(fr.hasOwnProperty(G))for(de in Fe[G]=[],fr[G])fr[G].hasOwnProperty(de)&&Fe[G].push(de);return Fe},h.addFont=function(G,de,Fe,Qe,ot){var Tt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Tt.indexOf(arguments[3])!==-1?ot=arguments[3]:arguments[3]&&Tt.indexOf(arguments[3])==-1&&(Fe=T(Fe,Qe)),oi.call(this,G,de,Fe,ot=ot||"Identity-H")};var Tn,Oi=e.lineWidth||.200025,di=h.__private__.getLineWidth=h.getLineWidth=function(){return Oi},Pr=h.__private__.setLineWidth=h.setLineWidth=function(G){return Oi=G,ne(S(D(G))+" w"),this};h.__private__.setLineDash=qr.API.setLineDash=qr.API.setLineDashPattern=function(G,de){if(G=G||[],de=de||0,isNaN(de)||!Array.isArray(G))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return G=G.map(function(Fe){return S(D(Fe))}).join(" "),de=S(D(de)),ne("["+G+"] "+de+" d"),this};var Ra=h.__private__.getLineHeight=h.getLineHeight=function(){return ke*Tn};h.__private__.getLineHeight=h.getLineHeight=function(){return ke*Tn};var pa=h.__private__.setLineHeightFactor=h.setLineHeightFactor=function(G){return typeof(G=G||1.15)=="number"&&(Tn=G),this},$a=h.__private__.getLineHeightFactor=h.getLineHeightFactor=function(){return Tn};pa(e.lineHeight);var Wi=h.__private__.getHorizontalCoordinate=function(G){return D(G)},cs=h.__private__.getVerticalCoordinate=function(G){return w===b?G:rr[N].mediaBox.topRightY-rr[N].mediaBox.bottomLeftY-D(G)},ji=h.__private__.getHorizontalCoordinateString=h.getHorizontalCoordinateString=function(G){return S(Wi(G))},Fa=h.__private__.getVerticalCoordinateString=h.getVerticalCoordinateString=function(G){return S(cs(G))},Aa=e.strokeColor||"0 G";h.__private__.getStrokeColor=h.getDrawColor=function(){return It(Aa)},h.__private__.setStrokeColor=h.setDrawColor=function(G,de,Fe,Qe){return Aa=cr({ch1:G,ch2:de,ch3:Fe,ch4:Qe,pdfColorType:"draw",precision:2}),ne(Aa),this};var Zs=e.fillColor||"0 g";h.__private__.getFillColor=h.getFillColor=function(){return It(Zs)},h.__private__.setFillColor=h.setFillColor=function(G,de,Fe,Qe){return Zs=cr({ch1:G,ch2:de,ch3:Fe,ch4:Qe,pdfColorType:"fill",precision:2}),ne(Zs),this};var yo=e.textColor||"0 g",ds=h.__private__.getTextColor=h.getTextColor=function(){return It(yo)};h.__private__.setTextColor=h.setTextColor=function(G,de,Fe,Qe){return yo=cr({ch1:G,ch2:de,ch3:Fe,ch4:Qe,pdfColorType:"text",precision:3}),this};var Ps=e.charSpace,oa=h.__private__.getCharSpace=h.getCharSpace=function(){return parseFloat(Ps||0)};h.__private__.setCharSpace=h.setCharSpace=function(G){if(isNaN(G))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ps=G,this};var Xi=0;h.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},h.__private__.setLineCap=h.setLineCap=function(G){var de=h.CapJoinStyles[G];if(de===void 0)throw new Error("Line cap style of '"+G+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Xi=de,ne(de+" J"),this};var la=0;h.__private__.setLineJoin=h.setLineJoin=function(G){var de=h.CapJoinStyles[G];if(de===void 0)throw new Error("Line join style of '"+G+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return la=de,ne(de+" j"),this},h.__private__.setLineMiterLimit=h.__private__.setMiterLimit=h.setLineMiterLimit=h.setMiterLimit=function(G){if(G=G||0,isNaN(G))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ne(S(D(G))+" M"),this},h.GState=dA,h.setGState=function(G){(G=typeof G=="string"?Ot[Ir[G]]:Ri(null,G)).equals(cn)||(ne("/"+G.id+" gs"),cn=G)};var Ri=function(G,de){if(!G||!Ir[G]){var Fe=!1;for(var Qe in Ot)if(Ot.hasOwnProperty(Qe)&&Ot[Qe].equals(de)){Fe=!0;break}if(Fe)de=Ot[Qe];else{var ot="GS"+(Object.keys(Ot).length+1).toString(10);Ot[ot]=de,de.id=ot}return G&&(Ir[G]=de.id),Ut.publish("addGState",de),de}};h.addGState=function(G,de){return Ri(G,de),this},h.saveGraphicsState=function(){return ne("q"),yr.push({key:Xe,size:ke,color:yo}),this},h.restoreGraphicsState=function(){ne("Q");var G=yr.pop();return Xe=G.key,ke=G.size,yo=G.color,cn=null,this},h.setCurrentTransformationMatrix=function(G){return ne(G.toString()+" cm"),this},h.comment=function(G){return ne("#"+G),this};var Ba=function(G,de){var Fe=G||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Fe},set:function(Tt){isNaN(Tt)||(Fe=parseFloat(Tt))}});var Qe=de||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Qe},set:function(Tt){isNaN(Tt)||(Qe=parseFloat(Tt))}});var ot="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return ot},set:function(Tt){ot=Tt.toString()}}),this},Jl=function(G,de,Fe,Qe){Ba.call(this,G,de),this.type="rect";var ot=Fe||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return ot},set:function(Nt){isNaN(Nt)||(ot=parseFloat(Nt))}});var Tt=Qe||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Tt},set:function(Nt){isNaN(Nt)||(Tt=parseFloat(Nt))}}),this},ol=function(){this.page=kr,this.currentPage=N,this.pages=ae.slice(0),this.pagesContext=rr.slice(0),this.x=gt,this.y=$t,this.matrix=kt,this.width=of(N),this.height=lp(N),this.outputDestination=fe,this.id="",this.objectNumber=-1};ol.prototype.restore=function(){kr=this.page,N=this.currentPage,rr=this.pagesContext,ae=this.pages,gt=this.x,$t=this.y,kt=this.matrix,op(N,this.width),Wo(N,this.height),fe=this.outputDestination};var ch=function(G,de,Fe,Qe,ot){Ht.push(new ol),kr=N=0,ae=[],gt=G,$t=de,kt=ot,ls([Fe,Qe])};for(var cd in h.beginFormObject=function(G,de,Fe,Qe,ot){return ch(G,de,Fe,Qe,ot),this},h.endFormObject=function(G){return function(de){if(Jt[de])Ht.pop().restore();else{var Fe=new ol,Qe="Xo"+(Object.keys(Ar).length+1).toString(10);Fe.id=Qe,Jt[de]=Qe,Ar[Qe]=Fe,Ut.publish("addFormObject",Fe),Ht.pop().restore()}}(G),this},h.doFormObject=function(G,de){var Fe=Ar[Jt[G]];return ne("q"),ne(de.toString()+" cm"),ne("/"+Fe.id+" Do"),ne("Q"),this},h.getFormObject=function(G){var de=Ar[Jt[G]];return{x:de.x,y:de.y,width:de.width,height:de.height,matrix:de.matrix}},h.save=function(G,de){return G=G||"generated.pdf",(de=de||{}).returnPromise=de.returnPromise||!1,de.returnPromise===!1?(_y(xl($n()),G),typeof _y.unload=="function"&&vn.setTimeout&&setTimeout(_y.unload,911),this):new Promise(function(Fe,Qe){try{var ot=_y(xl($n()),G);typeof _y.unload=="function"&&vn.setTimeout&&setTimeout(_y.unload,911),Fe(ot)}catch(Tt){Qe(Tt.message)}})},qr.API)qr.API.hasOwnProperty(cd)&&(cd==="events"&&qr.API.events.length?function(G,de){var Fe,Qe,ot;for(ot=de.length-1;ot!==-1;ot--)Fe=de[ot][0],Qe=de[ot][1],G.subscribe.apply(G,[Fe].concat(typeof Qe=="function"?[Qe]:Qe))}(Ut,qr.API.events):h[cd]=qr.API[cd]);function of(G){return rr[G].mediaBox.topRightX-rr[G].mediaBox.bottomLeftX}function op(G,de){rr[G].mediaBox.topRightX=de+rr[G].mediaBox.bottomLeftX}function lp(G){return rr[G].mediaBox.topRightY-rr[G].mediaBox.bottomLeftY}function Wo(G,de){rr[G].mediaBox.topRightY=de+rr[G].mediaBox.bottomLeftY}var Nu=h.getPageWidth=function(G){return of(G=G||N)/mt},up=h.setPageWidth=function(G,de){op(G,de*mt)},dd=h.getPageHeight=function(G){return lp(G=G||N)/mt},cp=h.setPageHeight=function(G,de){Wo(G,de*mt)};return h.internal={pdfEscape:Ki,getStyle:Ce,getFont:Un,getFontSize:ve,getCharSpace:oa,getTextColor:ds,getLineHeight:Ra,getLineHeightFactor:$a,getLineWidth:di,write:$e,getHorizontalCoordinate:Wi,getVerticalCoordinate:cs,getCoordinateString:ji,getVerticalCoordinateString:Fa,collections:{},newObject:Ye,newAdditionalObject:sr,newObjectDeferred:ct,newObjectDeferredBegin:Ct,getFilters:Qr,putStream:Zr,events:Ut,scaleFactor:mt,pageSize:{getWidth:function(){return Nu(N)},setWidth:function(G){up(N,G)},getHeight:function(){return dd(N)},setHeight:function(G){cp(N,G)}},encryptionOptions:c,encryption:ha,getEncryptor:function(G){return c!==null?ha.encryptor(G,0):function(de){return de}},output:El,getNumberOfPages:gi,get pages(){return ae},out:ne,f2:k,f3:M,getPageInfo:sl,getPageInfoByObjId:ud,getCurrentPageInfo:sf,getPDFVersion:m,Point:Ba,Rectangle:Jl,Matrix:Z,hasHotfix:Sa},Object.defineProperty(h.internal.pageSize,"width",{get:function(){return Nu(N)},set:function(G){up(N,G)},enumerable:!0,configurable:!0}),Object.defineProperty(h.internal.pageSize,"height",{get:function(){return dd(N)},set:function(G){cp(N,G)},enumerable:!0,configurable:!0}),(function(G){for(var de=0,Fe=Ue.length;de<Fe;de++){var Qe=oi.call(this,G[de][0],G[de][1],G[de][2],Ue[de][3],!0);d===!1&&(f[Qe]=!0);var ot=G[de][0].split("-");ci({id:Qe,fontName:ot[0],fontStyle:ot[1]||""})}Ut.publish("addFonts",{fonts:Zt,dictionary:fr})}).call(h,Ue),Xe="F1",Yi(i,r),Ut.publish("initialized"),h}m1.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},m1.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},m1.prototype.hexToBytes=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(String.fromCharCode(parseInt(e.substr(r,2),16)));return t.join("")},m1.prototype.processOwnerPassword=function(e,t){return z8(B8(t).substr(0,5),e)},m1.prototype.encryptor=function(e,t){var r=B8(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return z8(r,n)}},dA.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||ra(e)!==ra(this))return!1;var n=0;for(t in this)if(!(r.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;n++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&n--;return n===0},qr.API={events:[]},qr.version="4.0.0";var Is=qr.API,K9=1,h_=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},i1=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Pn=function(e){return e.toFixed(2)},jm=function(e){return e.toFixed(5)};Is.__acroform__={};var fc=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},Bre=function(e){return e*K9},vh=function(e){var t=new Zwe,r=Lr.internal.getHeight(e)||0,n=Lr.internal.getWidth(e)||0;return t.BBox=[0,0,Number(Pn(n)),Number(Pn(r))],t},Q_t=Is.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to
705jsPDF.API.__acroform__.setBit");return e|1<<t},Z_t=Is.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},J_t=Is.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},Vs=Is.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return J_t(e,t-1)},Hs=Is.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Q_t(e,t-1)},Gs=Is.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Z_t(e,t-1)},e1t=Is.__acroform__.calculateCoordinates=function(e,t){var r=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,i=e[0],a=e[1],s=e[2],o=e[3],l={};return l.lowerLeft_X=r(i)||0,l.lowerLeft_Y=n(a+o)||0,l.upperRight_X=r(i+s)||0,l.upperRight_Y=n(a)||0,[Number(Pn(l.lowerLeft_X)),Number(Pn(l.lowerLeft_Y)),Number(Pn(l.upperRight_X)),Number(Pn(l.upperRight_Y))]},t1t=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=e._V||e.DV,n=U8(e,r),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+Pn(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var a=vh(e);return a.scope=e.scope,a.stream=t.join(` 706`),a}},U8=function(e,t){var r=e.fontSize===0?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map(function(k){return k.split(` 707`)}):i.map(function(k){return[k]});var a=r,s=Lr.internal.getHeight(e)||0;s=s<0?-s:s;var o=Lr.internal.getWidth(e)||0;o=o<0?-o:o;var l=function(k,M,D){if(k+1<i.length){var $=M+" "+i[k+1][0];return xM($,e,D).width<=o-4}return!1};a++;e:for(;a>0;){t="",a--;var u,c,d=xM("3",e,a).height,f=e.multiline?s-a:(s-d)/2,h=f+=2,p=0,m=0,_=0;if(a<=0){t=`(...) Tj 708`,t+="% Width of Text: "+xM(t,e,a=12).width+", FieldWidth:"+o+` 709`;break}for(var y="",v=0,b=0;b<i.length;b++)if(i.hasOwnProperty(b)){var w=!1;if(i[b].length!==1&&_!==i[b].length-1){if((d+2)*(v+2)+2>s)continue e;y+=i[b][_],w=!0,m=b,b--}else{y=(y+=i[b][_]+" ").substr(y.length-1)==" "?y.substr(0,y.length-1):y;var x=parseInt(b),E=l(x,y,a),T=b>=i.length-1;if(E&&!T){y+=" ",_=0;continue}if(E||T){if(T)m=x;else if(e.multiline&&(d+2)*(v+2)+2>s)continue e}else{if(!e.multiline||(d+2)*(v+2)+2>s)continue e;m=x}}for(var S="",A=p;A<=m;A++){var C=i[A];if(e.multiline){if(A===m){S+=C[_]+" ",_=(_+1)%C.length;continue}if(A===p){S+=C[C.length-1]+" ";continue}}S+=C[0]+" "}switch(S=S.substr(S.length-1)==" "?S.substr(0,S.length-1):S,c=xM(S,e,a).width,e.textAlign){case"right":u=o-c-2;break;case"center":u=(o-c)/2;break;default:u=2}t+=Pn(u)+" "+Pn(h)+` Td 710`,t+="("+h_(S)+`) Tj 711`,t+=-Pn(u)+` 0 Td 712`,h=-(a+2),c=0,p=w?m:m+1,v++,y=""}break}return n.text=t,n.fontSize=a,n},xM=function(e,t,r){var n=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:t.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},r1t={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},n1t=function(e,t){var r={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(n){return n.type===r.type&&n.object===r.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(r)},i1t=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(sh.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(r1t)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");K9=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new Jwe,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i];a.objId=void 0,a.hasAnnotation&&n1t(a,r)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(r){(function(n,i){var a=!n;for(var s in n||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(s)){var o=n[s],l=[],u=o.Rect;if(o.Rect&&(o.Rect=e1t(o.Rect,i)),i.internal.newObjectDeferredBegin(o.obj
vendor: 23,323 bytes, lines 712-724
712Id,!0),o.DA=Lr.createDefaultAppearanceStream(o),ra(o)==="object"&&typeof o.getKeyValueListForStream=="function"&&(l=o.getKeyValueListForStream()),o.Rect=u,o.hasAppearanceStream&&!o.appearanceStreamContent){var c=t1t(o);l.push({key:"AP",value:"<</N "+c+">>"}),i.internal.acroformPlugin.xForms.push(c)}if(o.appearanceStreamContent){var d="";for(var f in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(f)){var h=o.appearanceStreamContent[f];if(d+="/"+f+" ",d+="<<",Object.keys(h).length>=1||Array.isArray(h)){for(var s in h)if(h.hasOwnProperty(s)){var p=h[s];typeof p=="function"&&(p=p.call(i,o)),d+="/"+s+" "+p+" ",i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p)}}else typeof(p=h)=="function"&&(p=p.call(i,o)),d+="/"+s+" "+p,i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p);d+=">>"}l.push({key:"AP",value:`<< 713`+d+">>"})}i.internal.putStream({additionalKeyValues:l,objectId:o.objId}),i.internal.out("endobj")}a&&function(m,_){for(var y in m)if(m.hasOwnProperty(y)){var v=y,b=m[y];_.internal.newObjectDeferredBegin(b.objId,!0),ra(b)==="object"&&typeof b.putStream=="function"&&b.putStream(),delete m[v]}}(i.internal.acroformPlugin.xForms,i)})(r,e)}),e.internal.acroformPlugin.isInitialized=!0}},Qwe=Is.__acroform__.arrayToPdfArray=function(e,t,r){var n=function(s){return s};if(Array.isArray(e)){for(var i="[",a=0;a<e.length;a++)switch(a!==0&&(i+=" "),ra(e[a])){case"boolean":case"number":case"object":i+=e[a].toString();break;case"string":e[a].substr(0,1)!=="/"?(t!==void 0&&r&&(n=r.internal.getEncryptor(t)),i+="("+h_(n(e[a].toString()))+")"):i+=e[a].toString()}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},HL=function(e,t,r){var n=function(i){return i};return t!==void 0&&r&&(n=r.internal.getEncryptor(t)),(e=e||"").toString(),"("+h_(n(e))+")"},$h=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};$h.prototype.toString=function(){return this.objId+" 0 R"},$h.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},$h.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var r in t)if(Object.getOwnPropertyDescriptor(this,t[r]).configurable===!1){var n=t[r],i=this[n];i&&(Array.isArray(i)?e.push({key:n,value:Qwe(i,this.objId,this.scope)}):i instanceof $h?(i.scope=this.scope,e.push({key:n,value:i.objId+" 0 R"})):typeof i!="function"&&e.push({key:n,value:i}))}return e};var Zwe=function(){$h.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(r){e=r.trim()},get:function(){return e||null}})};fc(Zwe,$h);var Jwe=function(){$h.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var r=function(n){return n};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+h_(r(e))+")"}},set:function(r){e=r}})};fc(Jwe,$h);var sh=function e(){$h.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute F supplied.');t=y}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Vs(t,3)},set:function(y){y?this.F=Hs(t,3):this.F=Gs(t,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute Ff supplied.');r=y}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(y){n=y!==void 0?y:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(y){n[0]=y}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(y){n[1]=y}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(y){n[2]=y}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(y){n[3]=y}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(y){switch(y){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=y;break;default:throw new Error('Invalid value "'+y+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof pO)return;a="FieldObject"+e.FieldNum++}var y=function(v){return v};return this.scope&&(y=this.scope.internal.getEncryptor(this.objId)),"("+h_(y(a))+")"},set:function(y){a=y.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(y){a=y}});var s="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return s},set:function(y){s=y}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(y){o=y}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(y){l=y}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return u===void 0?50/K9:u},set:function(y){u=y}});var c="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(y){c=y}});var d="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof pO||this instanceof qg))return HL(d,this.objId,this.scope)},set:function(y){y=y.toString(),d=y}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof Lo==0?HL(f,this.objId,this.scope):f},set:function(y){y=y.toString(),f=this instanceof Lo==0?y.substr(0,1)==="("?i1(y.substr(1,y.length-2)):i1(y):y}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Lo==1?i1(f.substr(1,f.length-1)):f},set:function(y){y=y.toString(),f=this instanceof Lo==1?"/"+y:y}});var h=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(h)return h},set:function(y){this.V=y}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof Lo==0?HL(h,this.objId,this.scope):h},set:function(y){y=y.toString(),h=this instanceof Lo==0?y.substr(0,1)==="("?i1(y.substr(1,y.length-2)):i1(y):y}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Lo==1?i1(h.substr(1,h.length-1)):h},set:function(y){y=y.toString(),h=this instanceof Lo==1?"/"+y:y}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(y){y=!!y,m=y}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(y){p=y}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,1)},set:function(y){y?this.Ff=Hs(this.Ff,1):this.Ff=Gs(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,2)},set:function(y){y?this.Ff=Hs(this.Ff,2):this.Ff=Gs(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,3)},set:function(y){y?this.Ff=Hs(this.Ff,3):this.Ff=Gs(this.Ff,3)}});var _=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(_!==null)return _},set:function(y){if([0,1,2].indexOf(y)===-1)throw new Error('Invalid value "'+y+'" for attribute Q supplied.');_=y}}),Object.defineProperty(this,"textAlign",{get:function(){var y;switch(_){case 0:default:y="left";break;case 1:y="center";break;case 2:y="right"}return y},configurable:!0,enumerable:!0,set:function(y){switch(y){case"right":case 2:_=2;break;case"center":case 1:_=1;break;default:_=0}}})};fc(sh,$h);var mv=function(){sh.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){e=r}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Qwe(t,this.objId,this.scope)},set:function(r){var n,i;i=[],typeof(n=r)=="string"&&(i=function(a,s,o){o||(o=1);for(var l,u=[];l=s.exec(a);)u.push(l[o]);return u}(n,/\((.*?)\)/g)),t=i}}),this.getOptions=function(){return t},this.setOptions=function(r){t=r,this.sort&&t.sort()},this.addOption=function(r){r=(r=r||"").toString(),t.push(r),this.sort&&t.sort()},this.removeOption=function(r,n){for(n=n||!1,r=(r=r||"").toString();t.indexOf(r)!==-1&&(t.splice(t.indexOf(r),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,18)},set:function(r){r?this.Ff=Hs(this.Ff,18):this.Ff=Gs(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,19)},set:function(r){this.combo===!0&&(r?this.Ff=Hs(this.Ff,19):this.Ff=Gs(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,20)},set:function(r){r?(this.Ff=Hs(this.Ff,20),t.sort()):this.Ff=Gs(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,22)},set:function(r){r?this.Ff=Hs(this.Ff,22):this.Ff=Gs(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,23)},set:function(r){r?this.Ff=Hs(this.Ff,23):this.Ff=Gs(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,27)},set:function(r){r?this.Ff=Hs(this.Ff,27):this.Ff=Gs(this.Ff,27)}}),this.hasAppearanceStream=!1};fc(mv,sh);var gv=function(){mv.call(this),this.fontName="helvetica",this.combo=!1};fc(gv,mv);var yv=function(){gv.call(this),this.combo=!0};fc(yv,gv);var vT=function(){yv.call(this),this.edit=!0};fc(vT,yv);var Lo=function(){sh.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,15)},set:function(r){r?this.Ff=Hs(this.Ff,15):this.Ff=Gs(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,16)},set:function(r){r?this.Ff=Hs(this.Ff,16):this.Ff=Gs(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,17)},set:function(r){r?this.Ff=Hs(this.Ff,17):this.Ff=Gs(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,26)},set:function(r){r?this.Ff=Hs(this.Ff,26):this.Ff=Gs(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(a){return a};if(this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var n,i=[];for(n in i.push("<<"),t)i.push("/"+n+" ("+h_(r(t[n]))+")");return i.push(">>"),i.join(` 714`)}},set:function(r){ra(r)==="object"&&(t=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(r){typeof r=="string"&&(t.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(r){e="/"+r}})};fc(Lo,sh);var _T=function(){Lo.call(this),this.pushButton=!0};fc(_T,Lo);var vv=function(){Lo.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};fc(vv,Lo);var pO=function(){var e,t;sh.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){e=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(i){t=i}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(o){return o};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var a,s=[];for(a in s.push("<<"),n)s.push("/"+a+" ("+h_(i(n[a]))+")");return s.push(">>"),s.join(` 715`)},set:function(i){ra(i)==="object"&&(n=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(i){typeof i=="string"&&(n.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(i){r=i}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(i){r="/"+i}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Lr.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};fc(pO,sh),vv.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var r=this.Kids[t];r.appearanceStreamContent=e.createAppearanceStream(r.optionName),r.caption=e.getCA()}},vv.prototype.createOption=function(e){var t=new pO;return t.Parent=this,t.optionName=e,this.Kids.push(t),a1t.call(this.scope,t),t};var bT=function(){Lo.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Lr.CheckBox.createAppearanceStream()};fc(bT,Lo);var qg=function(){sh.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,13)},set:function(t){t?this.Ff=Hs(this.Ff,13):this.Ff=Gs(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,21)},set:function(t){t?this.Ff=Hs(this.Ff,21):this.Ff=Gs(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,23)},set:function(t){t?this.Ff=Hs(this.Ff,23):this.Ff=Gs(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,24)},set:function(t){t?this.Ff=Hs(this.Ff,24):this.Ff=Gs(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,25)},set:function(t){t?this.Ff=Hs(this.Ff,25):this.Ff=Gs(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,26)},set:function(t){t?this.Ff=Hs(this.Ff,26):this.Ff=Gs(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};fc(qg,sh);var wT=function(){qg.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Vs(this.Ff,14)},set:function(e){e?this.Ff=Hs(this.Ff,14):this.Ff=Gs(this.Ff,14)}}),this.password=!0};fc(wT,qg);var Lr={CheckBox:{createAppearanceStream:function(){return{N:{On:Lr.CheckBox.YesNormal},D:{On:Lr.CheckBox.YesPushDown,Off:Lr.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=vh(e);t.scope=e.scope;var r=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=U8(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+Pn(Lr.internal.getWidth(e))+" "+Pn(Lr.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+Pn(a.fontSize)+" Tf "+i),r.push("BT"),r.push(a.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join(` 716`),t},YesNormal:function(e){var t=vh(e);t.scope=e.scope;var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),i=[],a=Lr.internal.getHeight(e),s=Lr.internal.getWidth(e),o=U8(e,e.caption);return i.push("1 g"),i.push("0 0 "+Pn(s)+" "+Pn(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Pn(s-1)+" "+Pn(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+Pn(o.fontSize)+" Tf "+n),i.push(o.text),i.push("ET"),i.push("Q"),t.stream=i.join(` 717`),t},OffPushDown:function(e){var t=vh(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Pn(Lr.internal.getWidth(e))+" "+Pn(Lr.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(` 718`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Lr.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Lr.RadioButton.Circle.YesNormal,t.D[e]=Lr.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=vh(e);t.scope=e.scope;var r=[],n=Lr.internal.getWidth(e)<=Lr.internal.getHeight(e)?Lr.internal.getWidth(e)/4:Lr.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Lr.internal.Bezier_C,a=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+jm(Lr.internal.getWidth(e)/2)+" "+jm(Lr.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),r.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),r.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),r.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(` 719`),t},YesPushDown:function(e){var t=vh(e);t.scope=e.scope;var r=[],n=Lr.internal.getWidth(e)<=Lr.internal.getHeight(e)?Lr.internal.getWidth(e)/4:Lr.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*Lr.internal.Bezier_C).toFixed(5)),s=Number((n*Lr.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+jm(Lr.internal.getWidth(e)/2)+" "+jm(Lr.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),r.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),r.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),r.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+jm(Lr.internal.getWidth(e)/2)+" "+jm(Lr.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),r.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),r.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),r.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(` 720`),t},OffPushDown:function(e){var t=vh(e);t.scope=e.scope;var r=[],n=Lr.internal.getWidth(e)<=Lr.internal.getHeight(e)?Lr.internal.getWidth(e)/4:Lr.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*Lr.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+jm(Lr.internal.getWidth(e)/2)+" "+jm(Lr.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),r.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),r.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),r.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(` 721`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Lr.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Lr.RadioButton.Cross.YesNormal,t.D[e]=Lr.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=vh(e);t.scope=e.scope;var r=[],n=Lr.internal.calculateCross(e);return r.push("q"),r.push("1 1 "+Pn(Lr.internal.getWidth(e)-2)+" "+Pn(Lr.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(Pn(n.x1.x)+" "+Pn(n.x1.y)+" m"),r.push(Pn(n.x2.x)+" "+Pn(n.x2.y)+" l"),r.push(Pn(n.x4.x)+" "+Pn(n.x4.y)+" m"),r.push(Pn(n.x3.x)+" "+Pn(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(` 722`),t},YesPushDown:function(e){var t=vh(e);t.scope=e.scope;var r=Lr.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+Pn(Lr.internal.getWidth(e))+" "+Pn(Lr.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Pn(Lr.internal.getWidth(e)-2)+" "+Pn(Lr.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Pn(r.x1.x)+" "+Pn(r.x1.y)+" m"),n.push(Pn(r.x2.x)+" "+Pn(r.x2.y)+" l"),n.push(Pn(r.x4.x)+" "+Pn(r.x4.y)+" m"),n.push(Pn(r.x3.x)+" "+Pn(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(` 723`),t},OffPushDown:function(e){var t=vh(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Pn(Lr.internal.getWidth(e))+" "+Pn(Lr.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(` 724`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};Lr.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Lr.internal.getWidth(e),r=Lr.internal.getHeight(e),n=Math.min(t,r);return{x1:{x:(t-n)/2,y:(r-n)/2+n},x2:{x:(t-n)/2+n,y:(r-n)/2},x3:{x:(t-n)/2,y:(r-n)/2},x4:{x:(t-n)/2+n,y:(r-n)/2+n}}}},Lr.internal.getWidth=function(e){var t=0;return ra(e)==="object"&&(t=Bre(e.Rect[2])),t},Lr.internal.getHeight=function(e){var t=0;return ra(e)==="object"&&(t=Bre(e.Rect[3])),t};var a1t=Is.addField=function(e){if(i1t(this,e),!(e instanceof sh))throw new Error("Invalid argument passed to
724jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Is.AcroFormChoiceField=mv,Is.AcroFormListBox=gv,Is.AcroFormComboBox=yv,Is.AcroFormEditBox=vT,Is.AcroFormButton=Lo,Is.AcroFormPushButton=_T,Is.AcroFormRadioButton=vv,Is.AcroFormCheckBox=bT,Is.AcroFormTextField=qg,Is.AcroFormPasswordField=wT,Is.AcroFormAppearance=Lr,Is.AcroForm={ChoiceField:mv,ListBox:gv,ComboBox:yv,EditBox:vT,Button:Lo,PushButton:_T,RadioButton:vv,CheckBox:bT,TextField:qg,PasswordField:wT,Appearance:Lr},qr.AcroForm={ChoiceField:mv,ListBox:gv,ComboBox:yv,EditBox:vT,Button:Lo,PushButton:_T,RadioButton:vv,CheckBox:bT,TextField:qg,PasswordField:wT,Appearance:Lr};var s1t=qr.AcroForm;function exe(e){return e.reduce(function(t,r,n){return t[r]=n,t},{})}(function(e){var t="addImage_";e.__addimage__={};var r="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(k,M){var D,$,V,U,B,z=r;if((M=M||r)==="RGBA"||k.data!==void 0&&k.data instanceof Uint8ClampedArray&&"height"in k&&"width"in k)return"RGBA";if(E(k))for(B in n)for(V=n[B],D=0;D<V.length;D+=1){for(U=!0,$=0;$<V[D].length;$+=1)if(V[D][$]!==void 0&&V[D][$]!==k[$]){U=!1;break}if(U===!0){z=B;break}}else for(B in n)for(V=n[B],D=0;D<V.length;D+=1){for(U=!0,$=0;$<V[D].length;$+=1)if(V[D][$]!==void 0&&V[D][$]!==k.charCodeAt($)){U=!1;break}if(U===!0){z=B;break}}return z===r&&M!==r&&(z=M),z},a=function k(M){for(var D=this.internal.write,$=this.internal.putStream,V=(0,this.internal.getFilters)();V.indexOf("FlateEncode")!==-1;)V.splice(V.indexOf("FlateEncode"),1);M.objectId=this.internal.newObject();var U=[];if(U.push({key:"Type",value:"/XObject"}),U.push({key:"Subtype",value:"/Image"}),U.push({key:"Width",value:M.width}),U.push({key:"Height",value:M.height}),M.colorSpace===y.INDEXED?U.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(M.palette.length/3-1)+" "+("sMask"in M&&M.sMask!==void 0?M.objectId+2:M.objectId+1)+" 0 R]"}):(U.push({key:"ColorSpace",value:"/"+M.colorSpace}),M.colorSpace===y.DEVICE_CMYK&&U.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),U.push({key:"BitsPerComponent",value:M.bitsPerComponent}),"decodeParameters"in M&&M.decodeParameters!==void 0&&U.push({key:"DecodeParms",value:"<<"+M.decodeParameters+">>"}),"transparency"in M&&Array.isArray(M.transparency)&&M.transparency.length>0){for(var B="",z=0,q=M.transparency.length;z<q;z++)B+=M.transparency[z]+" "+M.transparency[z]+" ";U.push({key:"Mask",value:"["+B+"]"})}M.sMask!==void 0&&U.push({key:"SMask",value:M.objectId+1+" 0 R"});var L=M.filter!==void 0?["/"+M.filter]:void 0;if($({data:M.data,additionalKeyValues:U,alreadyAppliedFilters:L,objectId:M.objectId}),D("endobj"),"sMask"in M&&M.sMask!==void 0){var K,O=(K=M.sMaskBitsPerComponent)!==null&&K!==void 0?K:M.bitsPerComponent,N={width:M.width,height:M.height,colorSpace:"DeviceGray",bitsPerComponent:O,data:M.sMask};"filter"in M&&(N.decodeParameters="/Predictor ".concat(M.predictor," /Colors 1 /BitsPerComponent ").concat(O," /Columns ").concat(M.width),N.filter=M.filter),k.call(this,N)}
vendor: 5,032 bytes, line 724
724if(M.colorSpace===y.INDEXED){var X=this.internal.newObject();$({data:S(new Uint8Array(M.palette)),objectId:X}),D("endobj")}},s=function(){var k=this.internal.collections[t+"images"];for(var M in k)a.call(this,k[M])},o=function(){var k,M=this.internal.collections[t+"images"],D=this.internal.write;for(var $ in M)D("/I"+(k=M[$]).index,k.objectId,"0","R")},l=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",s),this.internal.events.subscribe("putXobjectDict",o))},u=function(){var k=this.internal.collections[t+"images"];return l.call(this),k},c=function(){return Object.keys(this.internal.collections[t+"images"]).length},d=function(k){return typeof e["process"+k.toUpperCase()]=="function"},f=function(k){return ra(k)==="object"&&k.nodeType===1},h=function(k,M){if(k.nodeName==="IMG"&&k.hasAttribute("src")){var D=""+k.getAttribute("src");if(D.indexOf("data:image/")===0)return Nk(unescape(D).split("base64,").pop());var $=e.loadFile(D,!0);if($!==void 0)return $}if(k.nodeName==="CANVAS"){if(k.width===0||k.height===0)throw new Error("Given canvas must have data. Canvas width: "+k.width+", height: "+k.height);var V;switch(M){case"PNG":V="image/png";break;case"WEBP":V="image/webp";break;default:V="image/jpeg"}return Nk(k.toDataURL(V,1).split("base64,").pop())}},p=function(k){var M=this.internal.collections[t+"images"];if(M){for(var D in M)if(k===M[D].alias)return M[D]}},m=function(k,M,D){return k||M||(k=-96,M=-96),k<0&&(k=-1*D.width*72/k/this.internal.scaleFactor),M<0&&(M=-1*D.height*72/M/this.internal.scaleFactor),k===0&&(k=M*D.width/D.height),M===0&&(M=k*D.height/D.width),[k,M]},_=function(k,M,D,$,V,U){var B=m.call(this,D,$,V),z=this.internal.getCoordinateString,q=this.internal.getVerticalCoordinateString,L=u.call(this);if(D=B[0],$=B[1],L[V.index]=V,U){U*=Math.PI/180;var K=Math.cos(U),O=Math.sin(U),N=function(ie){return ie.toFixed(4)},X=[N(K),N(O),N(-1*O),N(K),0,0,"cm"]}this.internal.write("q"),U?(this.internal.write([1,"0","0",1,z(k),q(M+$),"cm"].join(" ")),this.internal.write(X.join(" ")),this.internal.write([z(D),"0","0",z($),"0","0","cm"].join(" "))):this.internal.write([z(D),"0","0",z($),z(k),q(M+$),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+V.index+" Do"),this.internal.write("Q")},y=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var v=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},b=e.__addimage__.sHashCode=function(k){var M,D,$=0;if(typeof k=="string")for(D=k.length,M=0;M<D;M++)$=($<<5)-$+k.charCodeAt(M),$|=0;else if(E(k))for(D=k.byteLength/2,M=0;M<D;M++)$=($<<5)-$+k[M],$|=0;return $},w=e.__addimage__.validateStringAsBase64=function(k){(k=k||"").toString().trim();var M=!0;return k.length===0&&(M=!1),k.length%4!=0&&(M=!1),/^[A-Za-z0-9+/]+$/.test(k.substr(0,k.length-2))===!1&&(M=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(k.substr(-2))===!1&&(M=!1),M},x=e.__addimage__.extractImageFromDataUrl=function(k){if(k==null||!(k=k.trim()).startsWith("data:"))return null;var M=k.indexOf(",");return M<0?null:k.substring(0,M).trim().endsWith("base64")?k.substring(M+1):null};e.__addimage__.isArrayBuffer=function(k){return k instanceof ArrayBuffer};var E=e.__addimage__.isArrayBufferView=function(k){return k instanceof Int8Array||k instanceof Uint8Array||k instanceof Uint8ClampedArray||k instanceof Int16Array||k instanceof Uint16Array||k instanceof Int32Array||k instanceof Uint32Array||k instanceof Float32Array||k instanceof Float64Array},T=e.__addimage__.binaryStringToUint8Array=function(k){for(var M=k.length,D=new Uint8Array(M),$=0;$<M;$++)D[$]=k.charCodeAt($);return D},S=e.__addimage__.arrayBufferToBinaryString=function(k){for(var M="",D=E(k)?k:new Uint8Array(k),$=0;$<D.length;$+=8192)M+=String.fromCharCode.apply(null,D.subarray($,$+8192));return M};e.addImage=function(){var k,M,D,$,V,U,B,z,q;if(typeof arguments[1]=="number"?(M=r,D=arguments[1],$=arguments[2],V=arguments[3],U=arguments[4],B=arguments[5],z=arguments[6],q=arguments[7]):(M=arguments[1],D=arguments[2],$=arguments[3],V=arguments[4],U=arguments[5],B=arguments[6],z=arguments[7],q=arguments[8]),ra(k=arguments[0])==="object"&&!f(k)&&"imageData"in k){var L=k;k=L.imageData,M=L.format||M||r,D=L.x||D||0,$=L.y||$||0,V=L.w||L.width||V,U=L.h||L.height||U,B=L.alias||B,z=L.compression||z,q=L.rotation||L.angle||q}var K=this.internal.getFilters();if(z===void 0&&K.indexOf("FlateEncode")!==-1&&(z="SLOW"),isNaN(D)||isNaN($))throw new Error("Invalid coordinates passed to
724jsPDF.addImage");l.call(this);var O=A.call(this,k,M,B,z);return _.call(this,D,$,V,U,O,q),this};var A=function(k,M,D,$){var V,U,B;if(typeof k=="string"&&i(k)===r){k=unescape(k);var z=C(k,!1);(z!==""||(z=e.loadFile(k,!0))!==void 0)&&(k=z)}if(f(k)&&(k=h(k,M)),M=i(k,M),!d(M))throw new Error("addImage does not support files of type '"+M+"', please ensure that a plugin for '"+M+"' support is added.");if(((B=D)==null||B.length===0)&&(D=function(q){return typeof q=="string"||E(q)?b(q):E(q.data)?b(q.data):null}(k)),(V=p.call(this,D))||(k instanceof Uint8Array||M==="RGBA"||(U=k,k=T(k)),V=this["process"+M.toUpperCase()](k,c.call(this),D,function(q){return q&&typeof q=="string"&&(q=q.toUpperCase()),q in e.image_compression?q:v.NONE}($),U)),!V)throw new Error("An unknown error occurred whilst processing the image.");return V},C=e.__addimage__.convertBase64ToBinaryString=function(k,M){M=typeof M!="boolean"||M;var D,$="";if(typeof k=="string"){var V;D=(V=x(k))!==null&&V!==void 0?V:k;try{$=Nk(D)}catch(U){if(M)throw w(D)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+U.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return $};e.getImageProperties=function(k){var M,D,$="";if(f(k)&&(k=h(k)),typeof k=="string"&&i(k)===r&&(($=C(k,!1))===""&&($=e.loadFile(k)||""),k=$),D=i(k),!d(D))throw new Error("addImage does not support files of type '"+D+"', please ensure that a plugin for '"+D+"' support is added.");if(k instanceof Uint8Array||(k=T(k)),!(M=this["process"+D.toUpperCase()](k)))throw new Error("An unknown error occurred whilst processing the image");return M.fileType=D,M}})(qr.API),function(e){var t=function(r){if(r!==void 0&&r!="")return!0};qr.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(r){for(var n,i,a,s=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,l=this.internal.getPageInfoByObjId(r.objId),u=r.pageContext.annotations,c=!1,d=0;d<u.length&&!c;d++)switch((n=u[d]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(c=!0);break;case"reference":case"text":case"freetext":c=!0}if(c!=0){this.internal.write("/Annots [");for(var f=0;f<u.length;f++){n=u[f];var h=this.internal.pdfEscape,p=this.internal.getEncryptor(r.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var m=this.internal.newAdditionalObject(),_=this.internal.newAdditionalObject(),y=this.internal.getEncryptor(m.objId),v=n.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+s(n.bounds.x)+" "+o(n.bounds.y+n.bounds.h)+" "+s(n.bounds.x+n.bounds.w)+" "+o(n.bounds.y)+"] ")+"/Contents ("+h(y(n.contents))+")",a+=" /Popup "+_.objId+" 0 R",a+=" /P "+l.objId+" 0 R",a+=" /T ("+h(y(v))+") >>",m.content=a;var b=m.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+s(n.bounds.x+30)+" "+o(n.bounds.y+n.bounds.h)+" "+s(n.bounds.x+n.bounds.w+30)+" "+o(n.bounds.y)+"] ")+" /Parent "+b,n.open&&(a+=" /Open true"),a+=" >>",_.content=a,this.internal.write(m.objId,"0 R",_.objId,"0 R");break;case"freetext":i="/Rect ["+s(n.bounds.x)+" "+o(n.bounds.y)+" "+s(n.bounds.x+n.bounds.w)+" "+o(n.bounds.y+n.bounds.h)+"] ";var w=n.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+h(p(n.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+w+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var x=this.annotations._nameMap[n.options.name];n.options.pageNumber=x.page,n.options.top=x.y}else n.options.top||(n.options.top=0);if(i="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",a="",n.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+h(p(n.options.url))+") >>";else if(n.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,a+=" /FitV "+n.options.left+"]";break;default:var E=o(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),a+=" /XYZ "+n.options.left+" "+E+" "+n.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),e.createAnnotation=function(r){var n=this.internal.getCurrentPageInfo();
vendor: 77,741 bytes, lines 724-761
724switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":n.pageContext.annotations.push(r)}},e.link=function(r,n,i,a,s){var o=this.internal.getCurrentPageInfo(),l=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:l(r),y:u(n),w:l(r+i),h:u(n+a)},options:s,type:"link"})},e.textWithLink=function(r,n,i,a){var s,o,l=this.getTextWidth(r),u=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){o=a.maxWidth;var c=this.splitTextToSize(r,o).length;s=Math.ceil(u*c)}else o=l,s=u;return this.text(r,n,i,a),i+=.2*u,a.align==="center"&&(n-=l/2),a.align==="right"&&(n-=l),this.link(n,i-u,o,s,a),l},e.getTextWidth=function(r){var n=this.internal.getFontSize();return this.getStringUnitWidth(r)*n/this.internal.scaleFactor}}(qr.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var a=e.__arabicParser__.isInArabicSubstitutionA=function(m){return t[m.charCodeAt(0)]!==void 0},s=e.__arabicParser__.isArabicLetter=function(m){return typeof m=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(m)},o=e.__arabicParser__.isArabicEndLetter=function(m){return s(m)&&a(m)&&t[m.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(m){return s(m)&&i.indexOf(m.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(m){return s(m)&&a(m)&&t[m.charCodeAt(0)].length>=1};var u=e.__arabicParser__.arabicLetterHasFinalForm=function(m){return s(m)&&a(m)&&t[m.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(m){return s(m)&&a(m)&&t[m.charCodeAt(0)].length>=3};var c=e.__arabicParser__.arabicLetterHasMedialForm=function(m){return s(m)&&a(m)&&t[m.charCodeAt(0)].length==4},d=e.__arabicParser__.resolveLigatures=function(m){var _=0,y=r,v="",b=0;for(_=0;_<m.length;_+=1)y[m.charCodeAt(_)]!==void 0?(b++,typeof(y=y[m.charCodeAt(_)])=="number"&&(v+=String.fromCharCode(y),y=r,b=0),_===m.length-1&&(y=r,v+=m.charAt(_-(b-1)),_-=b-1,b=0)):(y=r,v+=m.charAt(_-b),_-=b,b=0);return v};e.__arabicParser__.isArabicDiacritic=function(m){return m!==void 0&&n[m.charCodeAt(0)]!==void 0};var f=e.__arabicParser__.getCorrectForm=function(m,_,y){return s(m)?a(m)===!1?-1:!u(m)||!s(_)&&!s(y)||!s(y)&&o(_)||o(m)&&!s(_)||o(m)&&l(_)||o(m)&&o(_)?0:c(m)&&s(_)&&!o(_)&&s(y)&&u(y)?3:o(m)||!s(y)?1:2:-1},h=function(m){var _=0,y=0,v=0,b="",w="",x="",E=(m=m||"").split("\\s+"),T=[];for(_=0;_<E.length;_+=1){for(T.push(""),y=0;y<E[_].length;y+=1)b=E[_][y],w=E[_][y-1],x=E[_][y+1],s(b)?(v=f(b,w,x),T[_]+=v!==-1?String.fromCharCode(t[b.charCodeAt(0)][v]):b):T[_]+=b;T[_]=d(T[_])}return T.join(" ")},p=e.__arabicParser__.processArabic=e.processArabic=function(){var m,_=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,y=[];if(Array.isArray(_)){var v=0;for(y=[],v=0;v<_.length;v+=1)Array.isArray(_[v])?y.push([h(_[v][0]),_[v][1],_[v][2]]):y.push([h(_[v])]);m=y}else m=h(_);return typeof arguments[0]=="string"?m:(arguments[0].text=m,arguments[0])};e.events.push(["preProcessText",p])}(qr.API),qr.API.autoPrint=function(e){var t;return(e=e||{}).variant=e.variant||"non-conform",e.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},function(e){var t=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(o){r=o}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(o){n=isNaN(o)||Number.isInteger(o)===!1||o<0?150:o,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(o){i=isNaN(o)||Number.isInteger(o)===!1||o<0?300:o,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(o){a=o}});var s={};Object.defineProperty(this,"style",{get:function(){return s},set:function(o){s=o}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(r,n){var i;if((r=r||"2d")!=="2d")return null;for(i in n)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=n[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(qr.API),function(e){var t={left:0,top:0,bottom:0,right:0},r=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var l=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return l},set:function(m){l=m}});var u=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return u},set:function(m){u=m}});var c=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return c},set:function(m){c=m}});var d=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return d},set:function(m){d=m}});var f=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return f},set:function(m){f=m}});var h=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return h},set:function(m){h=m}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(m){p=m}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(l){return n.call(this),this.internal.__cell__.headerFunction=typeof l=="function"?l:void 0,this},e.getTextDimensions=function(l,u){n.call(this);var c=(u=u||{}).fontSize||this.getFontSize(),d=u.font||this.getFont(),f=u.scaleFactor||this.internal.scaleFactor,h=0,p=0,m=0,_=this;if(!Array.isArray(l)&&typeof l!="string"){if(typeof l!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");l=String(l)}var y=u.maxWidth;y>0?typeof l=="string"?l=this.splitTextToSize(l,y):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(b,w){return b.concat(_.splitTextToSize(w,y))},[])):l=Array.isArray(l)?l:[l];for(var v=0;v<l.length;v++)h<(m=this.getStringUnitWidth(l[v],{font:d})*c)&&(h=m);return h!==0&&(p=l.length),{w:h/=f,h:Math.max((p*c*this.getLineHeightFactor()-c*(this.getLineHeightFactor()-1))/f,0)}},e.cellAddPage=function(){n.call(this),this.addPage();var l=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(l.left,l.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=e.cell=function(){var l;l=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var u=this.internal.__cell__.lastCell,c=this.internal.__cell__.padding,d=this.internal.__cell__.margins||t,f=this.internal.__cell__.tableHeaderRow,h=this.internal.__cell__.printHeaders;return u.lineNumber!==void 0&&(u.lineNumber===l.lineNumber?(l.x=(u.x||0)+(u.width||0),l.y=u.y||0):u.y+u.height+l.height+d.bottom>this.getPageHeight()?(this.cellAddPage(),l.y=d.top,h&&f&&(this.printHeaderRow(l.lineNumber,!0),l.y+=f[0].height)):l.y=u.y+u.height||l.y),l.text[0]!==void 0&&(this.rect(l.x,l.y,l.width,l.height,r===!0?"FD":void 0),l.align==="right"?this.text(l.text,l.x+l.width-c,l.y+c,{align:"right",baseline:"top"}):l.align==="center"?this.text(l.text,l.x+l.width/2,l.y+c,{align:"center",baseline:"top",maxWidth:l.width-c-c}):this.text(l.text,l.x+c,l.y+c,{align:"left",baseline:"top",maxWidth:l.width-c-c})),this.internal.__cell__.lastCell=l,this};e.table=function(l,u,c,d,f){if(n.call(this),!c)throw new Error("No data for PDF table.");var h,p,m,_,y=[],v=[],b=[],w={},x={},E=[],T=[],S=(f=f||{}).autoSize||!1,A=f.printHeaders!==!1,C=f.css&&f.css["font-size"]!==void 0?16*f.css["font-size"]:f.fontSize||12,k=f.margins||Object.assign({width:this.getPageWidth()},t),M=typeof f.padding=="number"?f.padding:3,D=f.headerBackgroundColor||"#c8c8c8",$=f.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=A,this.internal.__cell__.margins=k,this.internal.__cell__.table_font_size=C,this.internal.__cell__.padding=M,this.internal.__cell__.headerBackgroundColor=D,this.internal.__cell__.headerTextColor=$,this.setFontSize(C),d==null)v=y=Object.keys(c[0]),b=y.map(function(){return"left"});else if(Array.isArray(d)&&ra(d[0])==="object")for(y=d.map(function(L){return L.name}),v=d.map(function(L){return L.prompt||L.name||""}),b=d.map(function(L){return L.align||"left"}),h=0;h<d.length;h+=1)x[d[h].name]=.7499990551181103*d[h].width;else Array.isArray(d)&&typeof d[0]=="string"&&(v=y=d,b=y.map(function(){return"left"}));if(S||Array.isArray(d)&&typeof d[0]=="string")for(h=0;h<y.length;h+=1){for(w[_=y[h]]=c.map(function(L){return L[_]}),this.setFont(void 0,"bold"),E.push(this.getTextDimensions(v[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=w[_],this.setFont(void 0,"normal"),m=0;m<p.length;m+=1)E.push(this.getTextDimensions(p[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);x[_]=Math.max.apply(null,E)+M+M,E=[]}if(A){var V={};for(h=0;h<y.length;h+=1)V[y[h]]={},V[y[h]].text=v[h],V[y[h]].align=b[h];var U=o.call(this,V,x);T=y.map(function(L){return new a(l,u,x[L],U,V[L].text,void 0,V[L].align)}),this.setTableHeaderRow(T),this.printHeaderRow(1,!1)}var B=d.reduce(function(L,K){return L[K.name]=K.align,L},{});for(h=0;h<c.length;h+=1){"rowStart"in f&&f.rowStart instanceof Function&&f.rowStart({row:h,data:c[h]},this);var z=o.call(this,c[h],x);for(m=0;m<y.length;m+=1){var q=c[h][y[m]];"cellStart"in f&&f.cellStart instanceof Function&&f.cellStart({row:h,col:m,data:q},this),s.call(this,new a(l,u,x[y[m]],z,q,h+2,B[y[m]]))}}return this.internal.__cell__.table_x=l,this.internal.__cell__.table_y=u,this};var o=function(l,u){var c=this.internal.__cell__.padding,d=this.internal.__cell__.table_font_size,f=this.internal.scaleFactor;return Object.keys(l).map(function(h){var p=l[h];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,u[h]-c-c)},this).map(function(h){return this.getLineHeightFactor()*h.length*d/f+c+c},this).reduce(function(h,p){return Math.max(h,p)},0)};e.setTableHeaderRow=function(l){n.call(this),this.internal.__cell__.tableHeaderRow=l},e.printHeaderRow=function(l,u){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var c;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var d=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(d[0],d[1],d[2],d[3],void 0,-1)}this.setFont(void 0,"bold");for(var f=[],h=0;h<this.internal.__cell__.tableHeaderRow.length;h+=1){c=this.internal.__cell__.tableHeaderRow[h].clone(),u&&(c.y=this.internal.__cell__.margins.top||0,f.push(c)),c.lineNumber=l;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,c),this.setTextColor(p)}f.length>0&&this.setTableHeaderRow(f),this.setFont(void 0,"normal"),r=!1}}(qr.API);var txe={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},rxe=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],W8=exe(rxe),nxe=[100,200,300,400,500,600,700,800,900],o1t=exe(nxe);function GL(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),r=function(a){return txe[a=a||"normal"]?a:"normal"}(e.style),n=function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400}(e.weight),i=function(a){return typeof W8[a=a||"normal"]=="number"?a:"normal"}(e.stretch);return{family:t,style:r,weight:n,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,r,n].join(" ")}}}function zre(e,t,r,n){var i;for(i=r;i>=0&&i<t.length;i+=n)if(e[t[i]])return e[t[i]];for(i=r;i>=0&&i<t.length;i-=n)if(e[t[i]])return e[t[i]]}var l1t={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Ure={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Wre(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function Vre(e){return e.trimLeft()}function u1t(e,t){for(var r=0;r<e.length;){if(e.charAt(r)===t)return[e.substring(0,r),e.substring(r+1)];r+=1}return null}function c1t(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var EM,Hre,Gre,a1,TM,qre,Kre,Yre,qL=["times"];function Xre(e,t,r,n,i){var a=4,s=Zre;switch(i){case qr.API.image_compression.FAST:a=1,s=Qre;break;case qr.API.image_compression.MEDIUM:a=6,s=Jre;break;case qr.API.image_compression.SLOW:a=9,s=ene}e=function(l,u,c,d){for(var f,h=l.length/u,p=new Uint8Array(l.length+h),m=[d1t,Qre,Zre,Jre,ene],_=0;_<h;_+=1){var y=_*u,v=l.subarray(y,y+u);if(d)p.set(d(v,c,f),y+_);else{for(var b=m.length,w=[],x=0;x<b;x+=1)w[x]=m[x](v,c,f);var E=h1t(w.concat());p.set(w[E],y+_)}f=v}return p}(e,t,Math.ceil(r*n/8),s);var o=k8(e,{level:a});return qr.API.__addimage__.arrayBufferToBinaryString(o)}function d1t(e){var t=Array.apply([],e);return t.unshift(0),t}function Qre(e,t){var r=e.length,n=[];n[0]=1;for(var i=0;i<r;i+=1){var a=e[i-t]||0;n[i+1]=e[i]-a+256&255}return n}function Zre(e,t,r){var n=e.length,i=[];i[0]=2;for(var a=0;a<n;a+=1){var s=r&&r[a]||0;i[a+1]=e[a]-s+256&255}return i}function Jre(e,t,r){var n=e.length,i=[];i[0]=3;for(var a=0;a<n;a+=1){var s=e[a-t]||0,o=r&&r[a]||0;i[a+1]=e[a]+256-(s+o>>>1)&255}return i}function ene(e,t,r){var n=e.length,i=[];i[0]=4;for(var a=0;a<n;a+=1){var s=f1t(e[a-t]||0,r&&r[a]||0,r&&r[a-t]||0);i[a+1]=e[a]-s+256&255}return i}function f1t(e,t,r){if(e===t&&t===r)return e;var n=Math.abs(t-r),i=Math.abs(e-r),a=Math.abs(e+t-r-r);return n<=i&&n<=a?e:i<=a?t:r}function h1t(e){var t=e.map(function(r){return r.reduce(function(n,i){return n+Math.abs(i)},0)});return t.indexOf(Math.min.apply(null,t))}function KL(e,t,r){var n=t*r,i=Math.floor(n/8),a=16-(n-8*i+r),s=(1<<r)-1;return ixe(e,i)>>a&s}function tne(e,t,r,n){var i=r*n,a=Math.floor(i/8),s=16-(i-8*a+n),o=(1<<n)-1,l=(t&o)<<s;(function(u,c,d){if(c+1<u.byteLength)u.setUint16(c,d,!1);else{var f=d>>8&255;u.setUint8(c,f)}})(e,a,ixe(e,a)&~(o<<s)&65535|l)}function ixe(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function p1t(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var r=e[t++]|e[t++]<<8,n=e[t++]|e[t++]<<8,i=e[t++],a=i>>7,s=1<<1+(7&i);e[t++],e[t++];var o=null,l=null;a&&(o=t,l=s,t+=3*s);var u=!0,c=[],d=0,f=null,h=0,p=null;for(this.width=r,this.height=n;u&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,p=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((k=e[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var m=e[t++];d=e[t++]|e[t++]<<8,f=e[t++],1&m||(f=null),h=m>>2&7,t++;break;case 254:for(;;){if(!((k=e[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var _=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,w=e[t++],x=w>>6&1,E=1<<1+(7&w),T=o,S=l,A=!1;w>>7&&(A=!0,T=t,S=E,t+=3*E);var C=t;for(t++;;){var k;if(!((k=e[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}c.push({x:_,y,width:v,height:b,has_local_palette:A,palette_offset:T,palette_size:S,data_offset:C,data_length:t-C,transparent_index:f,interlaced:!!x,delay:d,disposal:h});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return c.length},this.loopCount=function(){return p},this.frameInfo=function(M){if(M<0||M>=c.length)throw new Error("Frame index out of range.");return c[M]},this.decodeAndBlitFrameBGRA=function(M,D){var $=this.frameInfo(M),V=$.width*$.height,U=new Uint8Array(V);rne(e,$.data_offset,U,V);var B=$.palette_offset,z=$.transparent_index;z===null&&(z=256);var q=$.width,L=r-q,K=q,O=4*($.y*r+$.x),N=4*(($.y+$.height)*r+$.x),X=O,ie=4*L;$.interlaced===!0&&(ie+=4*r*7);for(var ee=8,le=0,Te=U.length;le<Te;++le){var be=U[le];if(K===0&&(K=q,(X+=ie)>=N&&(ie=4*L+4*r*(ee-1),X=O+(q+L)*(ee<<1),ee>>=1)),be===z)X+=4;else{var we=e[B+3*be],ae=e[B+3*be+1],H=e[B+3*be+2];D[X++]=H,D[X++]=ae,D[X++]=we,D[X++]=255}--K}},this.decodeAndBlitFrameRGBA=function(M,D){var $=this.frameInfo(M),V=$.width*$.height,U=new Uint8Array(V);rne(e,$.data_offset,U,V);var B=$.palette_offset,z=$.transparent_index;z===null&&(z=256);var q=$.width,L=r-q,K=q,O=4*($.y*r+$.x),N=4*(($.y+$.height)*r+$.x),X=O,ie=4*L;$.interlaced===!0&&(ie+=4*r*7);for(var ee=8,le=0,Te=U.length;le<Te;++le){var be=U[le];if(K===0&&(K=q,(X+=ie)>=N&&(ie=4*L+4*r*(ee-1),X=O+(q+L)*(ee<<1),ee>>=1)),be===z)X+=4;else{var we=e[B+3*be],ae=e[B+3*be+1],H=e[B+3*be+2];D[X++]=we,D[X++]=ae,D[X++]=H,D[X++]=255}--K}}}function rne(e,t,r,n){for(var i=e[t++],a=1<<i,s=a+1,o=s+1,l=i+1,u=(1<<l)-1,c=0,d=0,f=0,h=e[t++],p=new Int32Array(4096),m=null;;){for(;c<16&&h!==0;)d|=e[t++]<<c,c+=8,h===1?h=e[t++]:--h;if(c<l)break;var _=d&u;if(d>>=l,c-=l,_!==a){if(_===s)break;for(var y=_<o?_:m,v=0,b=y;b>a;)b=p[b]>>8,++v;var w=b;if(f+v+(y!==_?1:0)>n)return void ya.log("Warning, gif stream longer than expected.");r[f++]=w;var x=f+=v;for(y!==_&&(r[f++]=w),b=y;v--;)b=p[b],r[--x]=255&b,b>>=8;m!==null&&o<4096&&(p[o++]=m<<8|w,o>=u+1&&l<12&&(++l,u=u<<1|1)),m=_}else o=s+1,u=(1<<(l=i+1))-1,m=null}return f!==n&&ya.log("Warning, gif stream shorter than expected."),r}/** 725 * @license 726 Copyright (c) 2008, Adobe Systems Incorporated 727 All rights reserved. 728 729 Redistribution and use in source and binary forms, with or without 730 modification, are permitted provided that the following conditions are 731 met: 732 733 * Redistributions of source code must retain the above copyright notice, 734 this list of conditions and the following disclaimer. 735 736 * Redistributions in binary form must reproduce the above copyright 737 notice, this list of conditions and the following disclaimer in the 738 documentation and/or other materials provided with the distribution. 739 740 * Neither the name of Adobe Systems Incorporated nor the names of its 741 contributors may be used to endorse or promote products derived from 742 this software without specific prior written permission. 743 744 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 745 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 746 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 747 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 748 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 749 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 750 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 751 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 752 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 753 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 754 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 755*/function YL(e){var t,r,n,i,a,s=Math.floor,o=new Array(64),l=new Array(64),u=new Array(64),c=new Array(64),d=new Array(65535),f=new Array(65535),h=new Array(64),p=new Array(64),m=[],_=0,y=7,v=new Array(64),b=new Array(64),w=new Array(64),x=new Array(256),E=new Array(2048),T=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],S=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],C=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],M=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],D=[0,1,2,3,4,5,6,7,8,9,10,11],$=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],V=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function U(O,N){for(var X=0,ie=0,ee=new Array,le=1;le<=16;le++){for(var Te=1;Te<=O[le];Te++)ee[N[ie]]=[],ee[N[ie]][0]=X,ee[N[ie]][1]=le,ie++,X++;X*=2}return ee}function B(O){for(var N=O[0],X=O[1]-1;X>=0;)N&1<<X&&(_|=1<<y),X--,--y<0&&(_==255?(z(255),z(0)):z(_),y=7,_=0)}function z(O){m.push(O)}function q(O){z(O>>8&255),z(255&O)}function L(O,N,X,ie,ee){for(var le,Te=ee[0],be=ee[240],we=function(ke,ce){var ve,Re,De,tt,Ge,Ie,He,Ke,Xe,mt,gt=0;for(Xe=0;Xe<8;++Xe){ve=ke[gt],Re=ke[gt+1],De=ke[gt+2],tt=ke[gt+3],Ge=ke[gt+4],Ie=ke[gt+5],He=ke[gt+6];var $t=ve+(Ke=ke[gt+7]),kt=ve-Ke,Zt=Re+He,fr=Re-He,yr=De+Ie,Kt=De-Ie,pr=tt+Ge,Ot=tt-Ge,Ir=$t+pr,cn=$t-pr,kr=Zt+yr,rr=Zt-yr;ke[gt]=Ir+kr,ke[gt+4]=Ir-kr;var Ut=.707106781*(rr+cn);ke[gt+2]=cn+Ut,ke[gt+6]=cn-Ut;var wr=.382683433*((Ir=Ot+Kt)-(rr=fr+kt)),Ar=.5411961*Ir+wr,Jt=1.306562965*rr+wr,Ht=.707106781*(kr=Kt+fr),Z=kt+Ht,Pe=kt-Ht;ke[gt+5]=Pe+Ar,ke[gt+3]=Pe-Ar,ke[gt+1]=Z+Jt,ke[gt+7]=Z-Jt,gt+=8}for(gt=0,Xe=0;Xe<8;++Xe){ve=ke[gt],Re=ke[gt+8],De=ke[gt+16],tt=ke[gt+24],Ge=ke[gt+32],Ie=ke[gt+40],He=ke[gt+48];var ue=ve+(Ke=ke[gt+56]),Ee=ve-Ke,Oe=Re+He,Ye=Re-He,ct=De+Ie,Ct=De-Ie,sr=tt+Ge,ir=tt-Ge,or=ue+sr,It=ue-sr,cr=Oe+ct,Qr=Oe-ct;ke[gt]=or+cr,ke[gt+32]=or-cr;var Zr=.707106781*(Qr+It);ke[gt+16]=It+Zr,ke[gt+48]=It-Zr;var Jn=.382683433*((or=ir+Ct)-(Qr=Ye+Ee)),yn=.5411961*or+Jn,En=1.306562965*Qr+Jn,pn=.707106781*(cr=Ct+Ye),si=Ee+pn,fa=Ee-pn;ke[gt+40]=fa+yn,ke[gt+24]=fa-yn,ke[gt+8]=si+En,ke[gt+56]=si-En,gt++}for(Xe=0;Xe<64;++Xe)mt=ke[Xe]*ce[Xe],h[Xe]=mt>0?mt+.5|0:mt-.5|0;return h}(O,N),ae=0;ae<64;++ae)p[T[ae]]=we[ae];var H=p[0]-X;X=p[0],H==0?B(ie[0]):(B(ie[f[le=32767+H]]),B(d[le]));for(var fe=63;fe>0&&p[fe]==0;)fe--;if(fe==0)return B(Te),X;for(var Se,ne=1;ne<=fe;){for(var $e=ne;p[ne]==0&&ne<=fe;)++ne;var me=ne-$e;if(me>=16){Se=me>>4;for(var Ue=1;Ue<=Se;++Ue)B(be);me&=15}le=32767+p[ne],B(ee[(me<<4)+f[le]]),B(d[le]),ne++}return fe!=63&&B(Te),X}function K(O){O=Math.min(Math.max(O,1),100),a!=O&&(function(N){for(var X=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ie=0;ie<64;ie++){var ee=s((X[ie]*N+50)/100);ee=Math.min(Math.max(ee,1),255),o[T[ie]]=ee}for(var le=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Te=0;Te<64;Te++){var be=s((le[Te]*N+50)/100);be=Math.min(Math.max(be,1),255),l[T[Te]]=be}for(var we=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],ae=0,H=0;H<8;H++)for(var fe=0;fe<8;fe++)u[ae]=1/(o[T[ae]]*we[H]*we[fe]*8),c[ae]=1/(l[T[ae]]*we[H]*we[fe]*8),ae++}(O<50?Math.floor(5e3/O):Math.floor(200-2*O)),a=O)}this.encode=function(O,N){N&&K(N),m=new Array,_=0,y=7,q(65496),q(65504),q(16),z(74),z(70),z(73),z(70),z(0),z(1),z(1),z(0),q(1),q(1),z(0),z(0),function(){q(65499),q(132),z(0);for(var Re=0;Re<64;Re++)z(o[Re]);z(1);for(var De=0;De<64;De++)z(l[De])}(),function(Re,De){q(65472),q(17),z(8),q(De),q(Re),z(3),z(1),z(17),z(0),z(2),z(17),z(1),z(3),z(17),z(1)}(O.width,O.height),function(){q(65476),q(418),z(0);for(var Re=0;Re<16;Re++)z(S[Re+1]);for(var De=0;De<=11;De++)z(A[De]);z(16);for(var tt=0;tt<16;tt++)z(C[tt+1]);for(var Ge=0;Ge<=161;Ge++)z(k[Ge]);z(1);for(var Ie=0;Ie<16;Ie++)z(M[Ie+1]);for(var He=0;He<=11;He++)z(D[He]);z(17);for(var Ke=0;Ke<16;Ke++)z($[Ke+1]);for(var Xe=0;Xe<=161;Xe++)z(V[Xe])}(),q(65498),q(12),z(3),z(1),z(0),z(2),z(17),z(3),z(17),z(0),z(63),z(0);var X=0,ie=0,ee=0;_=0,y=7,this.encode.displayName="_encode_";for(var le,Te,be,we,ae,H,fe,Se,ne,$e=O.data,me=O.width,Ue=O.height,ke=4*me,ce=0;ce<Ue;){for(le=0;le<ke;){for(ae=ke*ce+le,fe=-1,Se=0,ne=0;ne<64;ne++)H=ae+(Se=ne>>3)*ke+(fe=4*(7&ne)),ce+Se>=Ue&&(H-=ke*(ce+1+Se-Ue)),le+fe>=ke&&(H-=le+fe-ke+4),Te=$e[H++],be=$e[H++],we=$e[H++],v[ne]=(E[Te]+E[be+256|0]+E[we+512|0]>>16)-128,b[ne]=(E[Te+768|0]+E[be+1024|0]+E[we+1280|0]>>16)-128,w[ne]=(E[Te+1280|0]+E[be+1536|0]+E[we+1792|0]>>16)-128;X=L(v,u,X,t,n),ie=L(b,c,ie,r,i),ee=L(w,c,ee,r,i),le+=32}ce+=8}if(y>=0){var ve=[];ve[1]=y+1,ve[0]=(1<<y+1)-1,B(ve)}return q(65497),new Uint8Array(m)},e=e||50,function(){for(var O=String.fromCharCode,N=0;N<256;N++)x[N]=O(N)}(),t=U(S,A),r=U(M,D),n=U(C,k),i=U($,V),function(){for(var O=1,N=2,X=1;X<=15;X++){for(var ie=O;ie<N;ie++)f[32767+ie]=X,d[32767+ie]=[],d[32767+ie][1]=X,d[32767+ie][0]=ie;for(var ee=-(N-1);ee<=-O;ee++)f[32767+ee]=X,d[32767+ee]=[],d[32767+ee][1]=X,d[32767+ee][0]=N-1+ee;O<<=1,N<<=1}}(),function(){for(var O=0;O<256;O++)E[O]=19595*O,E[O+256|0]=38470*O,E[O+512|0]=7471*O+32768,E[O+768|0]=-11059*O,E[O+1024|0]=-21709*O,E[O+1280|0]=32768*O+8421375,E[O+1536|0]=-27439*O,E[O+1792|0]=-5329*O}(),K(e)}/** 756 * @license 757 * Copyright (c) 2017 Aras Abbasi 758 * 759 * Licensed under the MIT License. 760 * http://opensource.org/licenses/mit-license 761 */function wf(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function nne(e){function t(A){if(!A)throw Error("assert :P")}function r(A,C,k){for(var M=0;4>M;M++)if(A[C+M]!=k.charCodeAt(M))return!0;return!1}function n(A,C,k,M,D){for(var $=0;$<D;$++)A[C+$]=k[M+$]}function i(A,C,k,M){for(var D=0;D<M;D++)A[C+D]=k}function a(A){return new Int32Array(A)}function s(A,C){for(var k=[],M=0;M<A;M++)k.push(new C);return k}function o(A,C){var k=[];return function M(D,$,V){for(var U=V[$],B=0;B<U&&(D.push(V.length>$+1?[]:new C),!(V.length<$+1));B++)M(D[B],$+1,V)}(k,0,A),k}var l=function(){var A=this;function C(P,I){for(var Q=1<<I-1>>>0;P&Q;)Q>>>=1;return Q?(P&Q-1)+Q:P}function k(P,I,Q,re,he){t(!(re%Q));do P[I+(re-=Q)]=he;while(0<re)}function M(P,I,Q,re,he){if(t(2328>=he),512>=he)var ye=a(512);else if((ye=a(he))==null)return 0;return function(xe,Ae,Ne,Be,rt,pt){var ze,at,ut=Ae,xt=1<<Ne,dt=a(16),St=a(16);for(t(rt!=0),t(Be!=null),t(xe!=null),t(0<Ne),at=0;at<rt;++at){if(15<Be[at])return 0;++dt[Be[at]]}if(dt[0]==rt)return 0;for(St[1]=0,ze=1;15>ze;++ze){if(dt[ze]>1<<ze)return 0;St[ze+1]=St[ze]+dt[ze]}for(at=0;at<rt;++at)ze=Be[at],0<Be[at]&&(pt[St[ze]++]=at);if(St[15]==1)return(Be=new D).g=0,Be.value=pt[0],k(xe,ut,1,xt,Be),xt;var Mt,zt=-1,Dt=xt-1,Ur=0,Cr=1,Sn=1,Fr=1<<Ne;for(at=0,ze=1,rt=2;ze<=Ne;++ze,rt<<=1){if(Cr+=Sn<<=1,0>(Sn-=dt[ze]))return 0;for(;0<dt[ze];--dt[ze])(Be=new D).g=ze,Be.value=pt[at++],k(xe,ut+Ur,rt,Fr,Be),Ur=C(Ur,ze)}for(ze=Ne+1,rt=2;15>=ze;++ze,rt<<=1){if(Cr+=Sn<<=1,0>(Sn-=dt[ze]))return 0;for(;0<dt[ze];--dt[ze]){if(Be=new D,(Ur&Dt)!=zt){for(ut+=Fr,Mt=1<<(zt=ze)-Ne;15>zt&&!(0>=(Mt-=dt[zt]));)++zt,Mt<<=1;xt+=Fr=1<<(Mt=zt-Ne),xe[Ae+(zt=Ur&Dt)].g=Mt+Ne,xe[Ae+zt].value=ut-Ae-zt}Be.g=ze-Ne,Be.value=pt[at++],k(xe,ut+(Ur>>Ne),rt,Fr,Be),Ur=C(Ur,ze)}}return Cr!=2*St[15]-1?0:xt}(P,I,Q,re,he,ye)}function D(){this.value=this.g=0}function $(){this.value=this.g=0}function V(){this.G=s(5,D),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=s(vc,$)}function U(P,I,Q,re){t(P!=null),t(I!=null),t(2147483648>re),P.Ca=254,P.I=0,P.b=-8,P.Ka=0,P.oa=I,P.pa=Q,P.Jd=I,P.Yc=Q+re,P.Zc=4<=re?Q+re-4+1:Q,Te(P)}function B(P,I){for(var Q=0;0<I--;)Q|=we(P,128)<<I;return Q}function z(P,I){var Q=B(P,I);return be(P)?-Q:Q}function q(P,I,Q,re){var he,ye=0;for(t(P!=null),t(I!=null),t(4294967288>re),P.Sb=re,P.Ra=0,P.u=0,P.h=0,4<re&&(re=4),he=0;he<re;++he)ye+=I[Q+he]<<8*he;P.Ra=ye,P.bb=re,P.oa=I,P.pa=Q}function L(P){for(;8<=P.u&&P.bb<P.Sb;)P.Ra>>>=8,P.Ra+=P.oa[P.pa+P.bb]<<Du-8>>>0,++P.bb,P.u-=8;ie(P)&&(P.h=1,P.u=0)}function K(P,I){if(t(0<=I),!P.h&&I<=_o){var Q=X(P)&Ho[I];return P.u+=I,L(P),Q}return P.h=1,P.u=0}function O(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function X(P){return P.Ra>>>(P.u&Du-1)>>>0}function ie(P){return t(P.bb<=P.Sb),P.h||P.bb==P.Sb&&P.u>Du}function ee(P,I){P.u=I,P.h=ie(P)}function le(P){P.u>=cl&&(t(P.u>=cl),L(P))}function Te(P){t(P!=null&&P.oa!=null),P.pa<P.Zc?(P.I=(P.oa[P.pa++]|P.I<<8)>>>0,P.b+=8):(t(P!=null&&P.oa!=null),P.pa<P.Yc?(P.b+=8,P.I=P.oa[P.pa++]|P.I<<8):P.Ka?P.b=0:(P.I<<=8,P.b+=8,P.Ka=1))}function be(P){return B(P,1)}function we(P,I){var Q=P.Ca;0>P.b&&Te(P);var re=P.b,he=Q*I>>>8,ye=(P.I>>>re>he)+0;for(ye?(Q-=he,P.I-=he+1<<re>>>0):Q=he+1,re=Q,he=0;256<=re;)he+=8,re>>=8;return re=7^he+xr[re],P.b-=re,P.Ca=(Q<<re)-1,ye}function ae(P,I,Q){P[I+0]=Q>>24&255,P[I+1]=Q>>16&255,P[I+2]=Q>>8&255,P[I+3]=255&Q}function H(P,I){return P[I+0]|P[I+1]<<8}function fe(P,I){return H(P,I)|P[I+2]<<16}function Se(P,I){return H(P,I)|H(P,I+2)<<16}function ne(P,I){var Q=1<<I;return t(P!=null),t(0<I),P.X=a(Q),P.X==null?0:(P.Mb=32-I,P.Xa=I,1)}function $e(P,I){t(P!=null),t(I!=null),t(P.Xa==I.Xa),n(I.X,0,P.X,0,1<<I.Xa)}function me(){this.X=[],this.Xa=this.Mb=0}function Ue(P,I,Q,re){t(Q!=null),t(re!=null);var he=Q[0],ye=re[0];return he==0&&(he=(P*ye+I/2)/I),ye==0&&(ye=(I*he+P/2)/P),0>=he||0>=ye?0:(Q[0]=he,re[0]=ye,1)}function ke(P,I){return P+(1<<I)-1>>>I}function ce(P,I){return((4278255360&P)+(4278255360&I)>>>0&4278255360)+((16711935&P)+(16711935&I)>>>0&16711935)>>>0}function ve(P,I){A[I]=function(Q,re,he,ye,xe,Ae,Ne){var Be;for(Be=0;Be<xe;++Be){var rt=A[P](Ae[Ne+Be-1],he,ye+Be);Ae[Ne+Be]=ce(Q[re+Be],rt)}}}function Re(){this.ud=this.hd=this.jd=0}function De(P,I){return((4278124286&(P^I))>>>1)+(P&I)>>>0}function tt(P){return 0<=P&&256>P?P:0>P?0:255<P?255:void 0}function Ge(P,I){return tt(P+(P-I+.5>>1))}function Ie(P,I,Q){return Math.abs(I-Q)-Math.abs(P-Q)}function He(P,I,Q,re,he,ye,xe){for(re=ye[xe-1],Q=0;Q<he;++Q)ye[xe+Q]=re=ce(P[I+Q],re)}function Ke(P,I,Q,re,he){var ye;for(ye=0;ye<Q;++ye){var xe=P[I+ye],Ae=xe>>8&255,Ne=16711935&(Ne=(Ne=16711935&xe)+((Ae<<16)+Ae));re[he+ye]=(4278255360&xe)+Ne>>>0}}function Xe(P,I){I.jd=255&P,I.hd=P>>8&255,I.ud=P>>16&255}function mt(P,I,Q,re,he,ye){var xe;for(xe=0;xe<re;++xe){var Ae=I[Q+xe],Ne=Ae>>>8,Be=Ae,rt=255&(rt=(rt=Ae>>>16)+((P.jd<<24>>24)*(Ne<<24>>24)>>>5));Be=255&(Be=(Be+=(P.hd<<24>>24)*(Ne<<24>>24)>>>5)+((P.ud<<24>>24)*(rt<<24>>24)>>>5)),he[ye+xe]=(4278255360&Ae)+(rt<<16)+Be}}function gt(P,I,Q,re,he){A[I]=function(ye,xe,Ae,Ne,Be,rt,pt,ze,at){for(Ne=pt;Ne<ze;++Ne)for(pt=0;pt<at;++pt)Be[rt++]=he(Ae[re(ye[xe++])])},A[P]=function(ye,xe,Ae,Ne,Be,rt,pt){var ze=8>>ye.b,at=ye.Ea,ut=ye.K[0],xt=ye.w;if(8>ze)for(ye=(1<<ye.b)-1,xt=(1<<ze)-1;xe<Ae;++xe){var dt,St=0;for(dt=0;dt<at;++dt)dt&ye||(St=re(Ne[Be++])),rt[pt++]=he(ut[St&xt]),St>>=ze}else A["VP8LMapColor"+Q](Ne,Be,ut,xt,rt,pt,xe,Ae,at)}}function $t(P,I,Q,re,he){for(Q=I+Q;I<Q;){var ye=P[I++];re[he++]=ye>>16&255,re[he++]=ye>>8&255,re[he++]=255&ye}}function kt(P,I,Q,re,he){for(Q=I+Q;I<Q;){var ye=P[I++];re[he++]=ye>>16&255,re[he++]=ye>>8&255,re[he++]=255&ye,re[he++]=ye>>24&255}}function Zt(P,I,Q,re,he){for(Q=I+Q;I<Q;){var ye=(xe=P[I++])>>16&240|xe>>12&15,xe=240&xe|xe>>28&15;re[he++]=ye,re[he++]=xe}}function fr(P,I,Q,re,he){for(Q=I+Q;I<Q;){var ye=(xe=P[I++])>>16&248|xe>>13&7,xe=xe>>5&224|xe>>3&31;re[he++]=ye,re[he++]=xe}}function yr(P,I,Q,re,he){for(Q=I+Q;I<Q;){var ye=P[I++];re[he++]=255&ye,re[he++]=ye>>8&255,re[he++]=ye>>16&255}}function Kt(P,I,Q,re,he,ye){if(ye==0)for(Q=I+Q;I<Q;)ae(re,((ye=P[I++])[0]>>24|ye[1]>>8&65280|ye[2]<<8&16711680|ye[3]<<24)>>>0),he+=32;else n(re,he,P,I,Q)}function pr(P,I){A[I][0]=A[P+"0"],A[I][1]=A[P+"1"],A[I][2]=A[P+"2"],A[I][3]=A[P+"3"],A[I][4]=A[P+"4"],A[I][5]=A[P+"5"],A[I][6]=A[P+"6"],A[I][7]=A[P+"7"],A[I][8]=A[P+"8"],A[I][9]=A[P+"9"],A[I][10]=A[P+"10"],A[I][11]=A[P+"11"],A[I][12]=A[P+"12"],A[I][13]=A[P+"13"],A[I][14]=A[P+"0"],A[I][15]=A[P+"0"]}function Ot(P){return P==__||P==I0||P==D0||P==b_}function Ir(){this.eb=[],this.size=this.A=this.fb=0}function cn(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function kr(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Ir,this.f.kb=new cn,this.sd=null}function rr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Ut(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function wr(P){return alert("todo:WebPSamplerProcessPlane"),P.T}function Ar(P,I){var Q=P.T,re=I.ba.f.RGBA,he=re.eb,ye=re.fb+P.ka*re.A,xe=Ml[I.ba.S],Ae=P.y,Ne=P.O,Be=P.f,rt=P.N,pt=P.ea,ze=P.W,at=I.cc,ut=I.dc,xt=I.Mc,dt=I.Nc,St=P.ka,Mt=P.ka+P.T,zt=P.U,Dt=zt+1>>1;for(St==0?xe(Ae,Ne,null,null,Be,rt,pt,ze,Be,rt,pt,ze,he,ye,null,null,zt):(xe(I.ec,I.fc,Ae,Ne,at,ut,xt,dt,Be,rt,pt,ze,he,ye-re.A,he,ye,zt),++Q);St+2<Mt;St+=2)at=Be,ut=rt,xt=pt,dt=ze,rt+=P.Rc,ze+=P.Rc,ye+=2*re.A,xe(Ae,(Ne+=2*P.fa)-P.fa,Ae,Ne,at,ut,xt,dt,Be,rt,pt,ze,he,ye-re.A,he,ye,zt);return Ne+=P.fa,P.j+Mt<P.o?(n(I.ec,I.fc,Ae,Ne,zt),n(I.cc,I.dc,Be,rt,Dt),n(I.Mc,I.Nc,pt,ze,Dt),Q--):1&Mt||xe(Ae,Ne,null,null,Be,rt,pt,ze,Be,rt,pt,ze,he,ye+re.A,null,null,zt),Q}function Jt(P,I,Q){var re=P.F,he=[P.J];if(re!=null){var ye=P.U,xe=I.ba.S,Ae=xe==O0||xe==D0;I=I.ba.f.RGBA;var Ne=[0],Be=P.ka;Ne[0]=P.T,P.Kb&&(Be==0?--Ne[0]:(--Be,he[0]-=P.width),P.j+P.ka+P.T==P.o&&(Ne[0]=P.o-P.j-Be));var rt=I.eb;Be=I.fb+Be*I.A,P=Fn(re,he[0],P.width,ye,Ne,rt,Be+(Ae?0:3),I.A),t(Q==Ne),P&&Ot(xe)&&vr(rt,Be,Ae,ye,Ne,I.A)}return 0}function Ht(P){var I=P.ma,Q=I.ba.S,re=11>Q,he=Q==M0||Q==k0||Q==O0||Q==N0||Q==12||Ot(Q);if(I.memory=null,I.Ib=null,I.Jb=null,I.Nd=null,!fh(I.Oa,P,he?11:12))return 0;if(he&&Ot(Q)&&dh(),P.da)alert("todo:use_scaling");else{if(re){if(I.Ib=wr,P.Kb){if(Q=P.U+1>>1,I.memory=a(P.U+2*Q),I.memory==null)return 0;I.ec=I.memory,I.fc=0,I.cc=I.ec,I.dc=I.fc+P.U,I.Mc=I.cc,I.Nc=I.dc+Q,I.Ib=Ar,dh()}}else alert("todo:EmitYUV");he&&(I.Jb=Jt,re&&vo())}if(re&&!S_){for(P=0;256>P;++P)SC[P]=89858*(P-128)+wm>>j0,CC[P]=-22014*(P-128)+wm,Gx[P]=-45773*(P-128),AC[P]=113618*(P-128)+wm>>j0;for(P=xm;P<T_;++P)I=76283*(P-16)+wm>>j0,PC[P-xm]=Qs(I,255),qx[P-xm]=Qs(I+8>>4,15);S_=1}return 1}function Z(P){var I=P.ma,Q=P.U,re=P.T;return t(!(1&P.ka)),0>=Q||0>=re?0:(Q=I.Ib(P,I),I.Jb!=null&&I.Jb(P,I,Q),I.Dc+=Q,1)}function Pe(P){P.ma.memory=null}function ue(P,I,Q,re){return K(P,8)!=47?0:(I[0]=K(P,14)+1,Q[0]=K(P,14)+1,re[0]=K(P,1),K(P,3)!=0?0:!P.h)}function Ee(P,I){if(4>P)return P+1;var Q=P-2>>1;return(2+(1&P)<<Q)+K(I,Q)+1}function Oe(P,I){return 120<I?I-120:1<=(Q=((Q=mC[I-1])>>4)*P+(8-(15&Q)))?Q:1;var Q}function Ye(P,I,Q){var re=X(Q),he=P[I+=255&re].g-8;return 0<he&&(ee(Q,Q.u+8),re=X(Q),I+=P[I].value,I+=re&(1<<he)-1),ee(Q,Q.u+P[I].g),P[I].value}function ct(P,I,Q){return Q.g+=P.g,Q.value+=P.value<<I>>>0,t(8>=Q.g),P.g}function Ct(P,I,Q){var re=P.xc;return t((I=re==0?0:P.vc[P.md*(Q>>re)+(I>>re)])<P.Wb),P.Ya[I]}function sr(P,I,Q,re){var he=P.ab,ye=P.c*I,xe=P.C;I=xe+I;var Ae=Q,Ne=re;for(re=P.Ta,Q=P.Ua;0<he--;){var Be=P.gc[he],rt=xe,pt=I,ze=Ae,at=Ne,ut=(Ne=re,Ae=Q,Be.Ea);switch(t(rt<pt),t(pt<=Be.nc),Be.hc){case 2:ma(ze,at,(pt-rt)*ut,Ne,Ae);break;case 0:var xt=rt,dt=pt,St=Ne,Mt=Ae,zt=(Fr=Be).Ea;xt==0&&(hh(ze,at,null,null,1,St,Mt),He(ze,at+1,0,0,zt-1,St,Mt+1),at+=zt,Mt+=zt,++xt);for(var Dt=1<<Fr.b,Ur=Dt-1,Cr=ke(zt,Fr.b),Sn=Fr.K,Fr=Fr.w+(xt>>Fr.b)*Cr;xt<dt;){var qn=Sn,ms=Fr,An=1;for(md(ze,at,St,Mt-zt,1,St,Mt);An<zt;){var Br=(An&~Ur)+Dt;Br>zt&&(Br=zt),(0,df[qn[ms++]>>8&15])(ze,at+ +An,St,Mt+An-zt,Br-An,St,Mt+An),An=Br}at+=zt,Mt+=zt,++xt&Ur||(Fr+=Cr)}pt!=Be.nc&&n(Ne,Ae-ut,Ne,Ae+(pt-rt-1)*ut,ut);break;case 1:for(ut=ze,dt=at,zt=(ze=Be.Ea)-(Mt=ze&~(St=(at=1<<Be.b)-1)),xt=ke(ze,Be.b),Dt=Be.K,Be=Be.w+(rt>>Be.b)*xt;rt<pt;){for(Ur=Dt,Cr=Be,Sn=new Re,Fr=dt+Mt,qn=dt+ze;dt<Fr;)Xe(Ur[Cr++],Sn),ff(Sn,ut,dt,at,Ne,Ae),dt+=at,Ae+=at;dt<qn&&(Xe(Ur[Cr++],Sn),ff(Sn,ut,dt,zt,Ne,Ae),dt+=zt,Ae+=zt),++rt&St||(Be+=xt)}break;case 3:if(ze==Ne&&at==Ae&&0<Be.b){for(dt=Ne,ze=ut=Ae+(pt-rt)*ut-(Mt=(pt-rt)*ke(Be.Ea,Be.b)),at=Ne,St=Ae,xt=[],Mt=(zt=Mt)-1;0<=Mt;--Mt)xt[Mt]=at[St+Mt];for(Mt=zt-1;0<=Mt;--Mt)dt[ze+Mt]=xt[Mt];_c(Be,rt,pt,Ne,ut,Ne,Ae)}else _c(Be,rt,pt,ze,at,Ne,Ae)}Ae=re,Ne=Q}Ne!=Q&&n(re,Q,Ae,Ne,ye)}function ir(P,I){var Q=P.V,re=P.Ba+P.c*P.C,he=I-P.C;if(t(I<=P.l.o),t(16>=he),0<he){var ye=P.l,xe=P.Ta,Ae=P.Ua,Ne=ye.width;if(sr(P,he,Q,re),he=Ae=[Ae],t((Q=P.C)<(re=I)),t(ye.v<ye.va),re>ye.o&&(re=ye.o),Q<ye.j){var Be=ye.j-Q;Q=ye.j,he[0]+=Be*Ne}if(Q>=re?Q=0:(he[0]+=4*ye.v,ye.ka=Q-ye.j,ye.U=ye.va-ye.v,ye.T=re-Q,Q=1),Q){if(Ae=Ae[0],11>(Q=P.ca).S){var rt=Q.f.RGBA,pt=(re=Q.S,he=ye.U,ye=ye.T,Be=rt.eb,rt.A),ze=ye;for(rt=rt.fb+P.Ma*rt.A;0<ze--;){var at=xe,ut=Ae,xt=he,dt=Be,St=rt;switch(re){case P0:gd(at,ut,xt,dt,St);break;case M0:nu(at,ut,xt,dt,St);break;case __:nu(at,ut,xt,dt,St),vr(dt,St,0,xt,1,0);break;case v_:wc(at,ut,xt,dt,St);break;case k0:Kt(at,ut,xt,dt,St,1);break;case I0:Kt(at,ut,xt,dt,St,1),vr(dt,St,0,xt,1,0);break;case O0:Kt(at,ut,xt,dt,St,0);break;case D0:Kt(at,ut,xt,dt,St,0),vr(dt,St,1,xt,1,0);break;case N0:Lu(at,ut,xt,dt,St);break;case b_:Lu(at,ut,xt,dt,St),on(dt,St,xt,1,0);break;case Ix:iu(at,ut,xt,dt,St);break;default:t(0)}Ae+=Ne,rt+=pt}P.Ma+=ye}else alert("todo:EmitRescaledRowsYUVA");t(P.Ma<=Q.height)}}P.C=I,t(P.C<=P.i)}function or(P){var I;if(0<P.ua)return 0;for(I=0;I<P.Wb;++I){var Q=P.Ya[I].G,re=P.Ya[I].H;if(0<Q[1][re[1]+0].g||0<Q[2][re[2]+0].g||0<Q[3][re[3]+0].g)return 0}return 1}function It(P,I,Q,re,he,ye){if(P.Z!=0){var xe=P.qd,Ae=P.rd;for(t(hf[P.Z]!=null);I<Q;++I)hf[P.Z](xe,Ae,re,he,re,he,ye),xe=re,Ae=he,he+=ye;P.qd=xe,P.rd=Ae}}function cr(P,I){var Q=P.l.ma,re=Q.Z==0||Q.Z==1?P.l.j:P.C;if(re=P.C<re?re:P.C,t(I<=P.l.o),I>re){var he=P.l.width,ye=Q.ca,xe=Q.tb+he*re,Ae=P.V,Ne=P.Ba+P.c*re,Be=P.gc;t(P.ab==1),t(Be[0].hc==3),Go(Be[0],re,I,Ae,Ne,ye,xe),It(Q,re,I,ye,xe,he)}P.C=P.Ma=I}function Qr(P,I,Q,re,he,ye,xe){var Ae=P.$/re,Ne=P.$%re,Be=P.m,rt=P.s,pt=Q+P.$,ze=pt;he=Q+re*he;var at=Q+re*ye,ut=280+rt.ua,xt=P.Pb?Ae:16777216,dt=0<rt.ua?rt.Wa:null,St=rt.wc,Mt=pt<at?Ct(rt,Ne,Ae):null;t(P.C<ye),t(at<=he);var zt=!1;e:for(;;){for(;zt||pt<at;){var Dt=0;if(Ae>=xt){var Ur=pt-Q;t((xt=P).Pb),xt.wd=xt.m,xt.xd=Ur,0<xt.s.ua&&$e(xt.s.Wa,xt.s.vb),xt=Ae+gC}if(Ne&St||(Mt=Ct(rt,Ne,Ae)),t(Mt!=null),Mt.Qb&&(I[pt]=Mt.qb,zt=!0),!zt)if(le(Be),Mt.jc){Dt=Be,Ur=I;var Cr=pt,Sn=Mt.pd[X(Dt)&vc-1];t(Mt.jc),256>Sn.g?(ee(Dt,Dt.u+Sn.g),Ur[Cr]=Sn.value,Dt=0):(ee(Dt,Dt.u+Sn.g-256),t(256<=Sn.value),Dt=Sn.value),Dt==0&&(zt=!0)}else Dt=Ye(Mt.G[0],Mt.H[0],Be);if(Be.h)break;if(zt||256>Dt){if(!zt)if(Mt.nd)I[pt]=(Mt.qb|Dt<<8)>>>0;else{if(le(Be),zt=Ye(Mt.G[1],Mt.H[1],Be),le(Be),Ur=Ye(Mt.G[2],Mt.H[2],Be),Cr=Ye(Mt.G[3],Mt.H[3],Be),Be.h)break;I[pt]=(Cr<<24|zt<<16|Dt<<8|Ur)>>>0}if(zt=!1,++pt,++Ne>=re&&(Ne=0,++Ae,xe!=null&&Ae<=ye&&!(Ae%16)&&xe(P,Ae),dt!=null))for(;ze<pt;)Dt=I[ze++],dt.X[(506832829*Dt&4294967295)>>>dt.Mb]=Dt}else if(280>Dt){if(Dt=Ee(Dt-256,Be),Ur=Ye(Mt.G[4],Mt.H[4],Be),le(Be),Ur=Oe(re,Ur=Ee(Ur,Be)),Be.h)break;if(pt-Q<Ur||he-pt<Dt)break e;for(Cr=0;Cr<Dt;++Cr)I[pt+Cr]=I[pt+Cr-Ur];for(pt+=Dt,Ne+=Dt;Ne>=re;)Ne-=re,++Ae,xe!=null&&Ae<=ye&&!(Ae%16)&&xe(P,Ae);if(t(pt<=he),Ne&St&&(Mt=Ct(rt,Ne,Ae)),dt!=null)for(;ze<pt;)Dt=I[ze++],dt.X[(506832829*Dt&4294967295)>>>dt.Mb]=Dt}else{if(!(Dt<ut))break e;for(zt=Dt-280,t(dt!=null);ze<pt;)Dt=I[ze++],dt.X[(506832829*Dt&4294967295)>>>dt.Mb]=Dt;Dt=pt,t(!(zt>>>(Ur=dt).Xa)),I[Dt]=Ur.X[zt],zt=!0}zt||t(Be.h==ie(Be))}if(P.Pb&&Be.h&&pt<he)t(P.m.h),P.a=5,P.m=P.wd,P.$=P.xd,0<P.s.ua&&$e(P.s.vb,P.s.Wa);else{if(Be.h)break e;xe!=null&&xe(P,Ae>ye?ye:Ae),P.a=0,P.$=pt-Q}return 1}return P.a=3,0}function Zr(P){t(P!=null),P.vc=null,P.yc=null,P.Ya=null;var I=P.Wa;I!=null&&(I.X=null),P.vb=null,t(P!=null)}function Jn(){var P=new sn;return P==null?null:(P.a=0,P.xb=Ux,pr("Predictor","VP8LPredictors"),pr("Predictor","VP8LPredictors_C"),pr("PredictorAdd","VP8LPredictorsAdd"),pr("PredictorAdd","VP8LPredictorsAdd_C"),ma=Ke,ff=mt,gd=$t,nu=kt,Lu=Zt,iu=fr,wc=yr,A.VP8LMapColor32b=Za,A.VP8LMapColor8b=bc,P)}function yn(P,I,Q,re,he){var ye=1,xe=[P],Ae=[I],Ne=re.m,Be=re.s,rt=null,pt=0;e:for(;;){if(Q)for(;ye&&K(Ne,1);){var ze=xe,at=Ae,ut=re,xt=1,dt=ut.m,St=ut.gc[ut.ab],Mt=K(dt,2);if(ut.Oc&1<<Mt)ye=0;else{switch(ut.Oc|=1<<Mt,St.hc=Mt,St.Ea=ze[0],St.nc=at[0],St.K=[null],++ut.ab,t(4>=ut.ab),Mt){case 0:case 1:St.b=K(dt,3)+2,xt=yn(ke(St.Ea,St.b),ke(St.nc,St.b),0,ut,St.K),St.K=St.K[0];break;case 3:var zt,Dt=K(dt,8)+1,Ur=16<Dt?0:4<Dt?1:2<Dt?2:3;if(ze[0]=ke(St.Ea,Ur),St.b=Ur,zt=xt=yn(Dt,1,0,ut,St.K)){var Cr,Sn=Dt,Fr=St,qn=1<<(8>>Fr.b),ms=a(qn);if(ms==null)zt=0;else{var An=Fr.K[0],Br=Fr.w;for(ms[0]=Fr.K[0][0],Cr=1;Cr<1*Sn;++Cr)ms[Cr]=ce(An[Br+Cr],ms[Cr-1]);for(;Cr<4*qn;++Cr)ms[Cr]=0;Fr.K[0]=null,Fr.K[0]=ms,zt=1}}xt=zt;break;case 2:break;default:t(0)}ye=xt}}if(xe=xe[0],Ae=Ae[0],ye&&K(Ne,1)&&!(ye=1<=(pt=K(Ne,4))&&11>=pt)){re.a=3;break e}var lr;if(lr=ye)t:{var Ja,bn,Kn,ua=re,eo=xe,wo=Ae,Wa=pt,xo=Q,Eo=ua.m,ks=ua.s,ui=[null],yi=1,Va=0,Ni=Rx[Wa];r:for(;;){if(xo&&K(Eo,1)){var Fs=K(Eo,3)+2,ou=ke(eo,Fs),es=ke(wo,Fs),qo=ou*es;if(!yn(ou,es,0,ua,ui))break r;for(ui=ui[0],ks.xc=Fs,Ja=0;Ja<qo;++Ja){var Vi=ui[Ja]>>8&65535;ui[Ja]=Vi,Vi>=yi&&(yi=Vi+1)}}if(Eo.h)break r;for(bn=0;5>bn;++bn){var Os=Lx[bn];!bn&&0<Wa&&(Os+=1<<Wa),Va<Os&&(Va=Os)}var To=s(yi*Ni,D),So=yi,kl=s(So,V);if(kl==null)var Ol=null;else t(65536>=So),Ol=kl;var dl=a(Va);if(Ol==null||dl==null||To==null){ua.a=1;break r}var fl=To;for(Ja=Kn=0;Ja<yi;++Ja){var Qi=Ol[Ja],Nl=Qi.G,Ru=Qi.H,pf=0,bd=1,to=0;for(bn=0;5>bn;++bn){Os=Lx[bn],Nl[bn]=fl,Ru[bn]=Kn,!bn&&0<Wa&&(Os+=1<<Wa);i:{var Em,A_=Os,$0=ua,Tm=dl,Qx=fl,kC=Kn,C_=0,wd=$0.m,OC=K(wd,1);if(i(Tm,0,0,A_),OC){var NC=K(wd,1)+1,Zx=K(wd,1),Jx=K(wd,Zx==0?1:8);Tm[Jx]=1,NC==2&&(Tm[Jx=K(wd,8)]=1);var F0=1}else{var B0=a(19),e2=K(wd,4)+4;if(19<e2){$0.a=3;var z0=0;break i}for(Em=0;Em<e2;++Em)B0[pC[Em]]=K(wd,3);var P_=void 0,dp=void 0,t2=$0,IC=B0,Sm=A_,r2=Tm,M_=0,mf=t2.m,n2=8,U0=s(128,D);n:for(;M(U0,0,7,IC,19);){if(K(mf,1)){var DC=2+2*K(mf,3);if((P_=2+K(mf,DC))>Sm)break n}else P_=Sm;for(dp=0;dp<Sm&&P_--;){le(mf);var i2=U0[0+(127&X(mf))];ee(mf,mf.u+i2.g);var fp=i2.value;if(16>fp)r2[dp++]=fp,fp!=0&&(n2=fp);else{var LC=fp==16,a2=fp-16,jC=hC[a2],s2=K(mf,Dx[a2])+jC;if(dp+s2>Sm)break n;for(var RC=LC?n2:0;0<s2--;)r2[dp++]=RC}}M_=1;break n}M_||(t2.a=3),F0=M_}(F0=F0&&!wd.h)&&(C_=M(Qx,kC,8,Tm,A_)),F0&&C_!=0?z0=C_:($0.a=3,z0=0)}if(z0==0)break r;if(bd&&jx[bn]==1&&(bd=fl[Kn].g==0),pf+=fl[Kn].g,Kn+=z0,3>=bn){var Am,W0=dl[0];for(Am=1;Am<Os;++Am)dl[Am]>W0&&(W0=dl[Am]);to+=W0}}if(Qi.nd=bd,Qi.Qb=0,bd&&(Qi.qb=(Nl[3][Ru[3]+0].value<<24|Nl[1][Ru[1]+0].value<<16|Nl[2][Ru[2]+0].value)>>>0,pf==0&&256>Nl[0][Ru[0]+0].value&&(Qi.Qb=1,Qi.qb+=Nl[0][Ru[0]+0].value<<8)),Qi.jc=!Qi.Qb&&6>to,Qi.jc){var V0,xd=Qi;for(V0=0;V0<vc;++V0){var Ed=V0,gf=xd.pd[Ed],H0=xd.G[0][xd.H[0]+Ed];256<=H0.value?(gf.g=H0.g+256,gf.value=H0.value):(gf.g=0,gf.value=0,Ed>>=ct(H0,8,gf),Ed>>=ct(xd.G[1][xd.H[1]+Ed],16,gf),Ed>>=ct(xd.G[2][xd.H[2]+Ed],0,gf),ct(xd.G[3][xd.H[3]+Ed],24,gf))}}}ks.vc=ui,ks.Wb=yi,ks.Ya=Ol,ks.yc=To,lr=1;break t}lr=0}if(!(ye=lr)){re.a=3;break e}if(0<pt){if(Be.ua=1<<pt,!ne(Be.Wa,pt)){re.a=1,ye=0;break e}}else Be.ua=0;var k_=re,o2=xe,l2=Ae,O_=k_.s,N_=O_.xc;if(k_.c=o2,k_.i=l2,O_.md=ke(o2,N_),O_.wc=N_==0?-1:(1<<N_)-1,Q){re.xb=zx;break e}if((rt=a(xe*Ae))==null){re.a=1,ye=0;break e}ye=(ye=Qr(re,rt,0,xe,Ae,Ae,null))&&!Ne.h;break e}return ye?(he!=null?he[0]=rt:(t(rt==null),t(Q)),re.$=0,Q||Zr(Be)):Zr(Be),ye}function En(P,I){var Q=P.c*P.i,re=Q+I+16*I;return t(P.c<=I),P.V=a(re),P.V==null?(P.Ta=null,P.Ua=0,P.a=1,0):(P.Ta=P.V,P.Ua=P.Ba+Q+I,1)}function pn(P,I){var Q=P.C,re=I-Q,he=P.V,ye=P.Ba+P.c*Q;for(t(I<=P.l.o);0<re;){var xe=16<re?16:re,Ae=P.l.ma,Ne=P.l.width,Be=Ne*xe,rt=Ae.ca,pt=Ae.tb+Ne*Q,ze=P.Ta,at=P.Ua;sr(P,xe,he,ye),li(ze,at,rt,pt,Be),It(Ae,Q,Q+xe,rt,pt,Ne),re-=xe,he+=xe*P.c,Q+=xe}t(Q==I),P.C=P.Ma=I}function si(){this.ub=this.yd=this.td=this.Rb=0}function fa(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function aa(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function xi(){this.Yb=function(){var P=[];return function I(Q,re,he){for(var ye=he[re],xe=0;xe<ye&&(Q.push(he.length>re+1?[]:0),!(he.length<re+1));xe++)I(Q[xe],re+1,he)}(P,0,[3,11]),P}()}function ci(){this.jb=a(3),this.Wc=o([4,8],xi),this.Xc=o([4,17],xi)}function oi(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Ki(){this.ld=this.La=this.dd=this.tc=0}function ls(){this.Na=this.la=0}function Yi(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function sa(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ei(){this.uc=this.M=this.Nb=0,this.wa=Array(new Ki),this.Y=0,this.ya=Array(new sa),this.aa=0,this.l=new us}function gi(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Ta(){this.cb=this.a=0,this.sc="",this.m=new O,this.Od=new si,this.Kc=new fa,this.ed=new oi,this.Qa=new aa,this.Ic=this.$c=this.Aa=0,this.D=new Ei,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=s(8,O),this.ia=0,this.pb=s(4,Yi),this.Pa=new ci,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new gi),this.Hd=0,this.rb=Array(new ls),this.sb=0,this.wa=Array(new Ki),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new sa),this.L=this.aa=0,this.gd=o([4,2],Ki),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Qs(P,I){return 0>P?0:P>I?I:P}function us(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function jt(){var P=new Ta;return P!=null&&(P.a=0,P.sc="OK",P.cb=0,P.Xb=0,bm||(bm=xl)),P}function Pt(P,I,Q){return P.a==0&&(P.a=I,P.sc=Q,P.cb=0),0}function hr(P,I,Q){return 3<=Q&&P[I+0]==157&&P[I+1]==1&&P[I+2]==42}function $n(P,I){if(P==null)return 0;if(P.a=0,P.sc="OK",I==null)return Pt(P,2,"null VP8Io passed to VP8GetHeaders()");var Q=I.data,re=I.w,he=I.ha;if(4>he)return Pt(P,7,"Truncated header.");var ye=Q[re+0]|Q[re+1]<<8|Q[re+2]<<16,xe=P.Od;if(xe.Rb=!(1&ye),xe.td=ye>>1&7,xe.yd=ye>>4&1,xe.ub=ye>>5,3<xe.td)return Pt(P,3,"Incorrect keyframe parameters.");if(!xe.yd)return Pt(P,4,"Frame not displayable.");re+=3,he-=3;var Ae=P.Kc;if(xe.Rb){if(7>he)return Pt(P,7,"cannot parse picture header");if(!hr(Q,re,he))return Pt(P,3,"Bad code word");Ae.c=16383&(Q[re+4]<<8|Q[re+3]),Ae.Td=Q[re+4]>>6,Ae.i=16383&(Q[re+6]<<8|Q[re+5]),Ae.Ud=Q[re+6]>>6,re+=7,he-=7,P.za=Ae.c+15>>4,P.Ub=Ae.i+15>>4,I.width=Ae.c,I.height=Ae.i,I.Da=0,I.j=0,I.v=0,I.va=I.width,I.o=I.height,I.da=0,I.ib=I.width,I.hb=I.height,I.U=I.width,I.T=I.height,i((ye=P.Pa).jb,0,255,ye.jb.length),t((ye=P.Qa)!=null),ye.Cb=0,ye.Bb=0,ye.Fb=1,i(ye.Zb,0,0,ye.Zb.length),i(ye.Lb,0,0,ye.Lb)}if(xe.ub>he)return Pt(P,7,"bad partition length");U(ye=P.m,Q,re,xe.ub),re+=xe.ub,he-=xe.ub,xe.Rb&&(Ae.Ld=be(ye),Ae.Kd=be(ye)),Ae=P.Qa;var Ne,Be=P.Pa;if(t(ye!=null),t(Ae!=null),Ae.Cb=be(ye),Ae.Cb){if(Ae.Bb=be(ye),be(ye)){for(Ae.Fb=be(ye),Ne=0;4>Ne;++Ne)Ae.Zb[Ne]=be(ye)?z(ye,7):0;for(Ne=0;4>Ne;++Ne)Ae.Lb[Ne]=be(ye)?z(ye,6):0}if(Ae.Bb)for(Ne=0;3>Ne;++Ne)Be.jb[Ne]=be(ye)?B(ye,8):255}else Ae.Bb=0;if(ye.Ka)return Pt(P,3,"cannot parse segment header");if((Ae=P.ed).zd=be(ye),Ae.Tb=B(ye,6),Ae.wb=B(ye,3),Ae.Pc=be(ye),Ae.Pc&&be(ye)){for(Be=0;4>Be;++Be)be(ye)&&(Ae.vd[Be]=z(ye,6));for(Be=0;4>Be;++Be)be(ye)&&(Ae.od[Be]=z(ye,6))}if(P.L=Ae.Tb==0?0:Ae.zd?1:2,ye.Ka)return Pt(P,3,"cannot parse filter header");var rt=he;if(he=Ne=re,re=Ne+rt,Ae=rt,P.Xb=(1<<B(P.m,2))-1,rt<3*(Be=P.Xb))Q=7;else{for(Ne+=3*Be,Ae-=3*Be,rt=0;rt<Be;++rt){var pt=Q[he+0]|Q[he+1]<<8|Q[he+2]<<16;pt>Ae&&(pt=Ae),U(P.Jc[+rt],Q,Ne,pt),Ne+=pt,Ae-=pt,he+=3}U(P.Jc[+Be],Q,Ne,Ae),Q=Ne<re?0:5}if(Q!=0)return Pt(P,Q,"cannot parse partitions");for(Q=B(Ne=P.m,7),he=be(Ne)?z(Ne,4):0,re=be(Ne)?z(Ne,4):0,Ae=be(Ne)?z(Ne,4):0,Be=be(Ne)?z(Ne,4):0,Ne=be(Ne)?z(Ne,4):0,rt=P.Qa,pt=0;4>pt;++pt){if(rt.Cb){var ze=rt.Zb[pt];rt.Fb||(ze+=Q)}else{if(0<pt){P.pb[pt]=P.pb[0];continue}ze=Q}var at=P.pb[pt];at.Sc[0]=w_[Qs(ze+he,127)],at.Sc[1]=L0[Qs(ze+0,127)],at.Eb[0]=2*w_[Qs(ze+re,127)],at.Eb[1]=101581*L0[Qs(ze+Ae,127)]>>16,8>at.Eb[1]&&(at.Eb[1]=8),at.Qc[0]=w_[Qs(ze+Be,117)],at.Qc[1]=L0[Qs(ze+Ne,127)],at.lc=ze+Ne}if(!xe.Rb)return Pt(P,4,"Not a key frame.");for(be(ye),xe=P.Pa,Q=0;4>Q;++Q){for(he=0;8>he;++he)for(re=0;3>re;++re)for(Ae=0;11>Ae;++Ae)Be=we(ye,_C[Q][he][re][Ae])?B(ye,8):vC[Q][he][re][Ae],xe.Wc[Q][he].Yb[re][Ae]=Be;for(he=0;17>he;++he)xe.Xc[Q][he]=xe.Wc[Q][bC[he]]}return P.kc=be(ye),P.kc&&(P.Bd=B(ye,8)),P.cb=1}function xl(P,I,Q,re,he,ye,xe){var Ae=I[he].Yb[Q];for(Q=0;16>he;++he){if(!we(P,Ae[Q+0]))return he;for(;!we(P,Ae[Q+1]);)if(Ae=I[++he].Yb[0],Q=0,he==16)return 16;var Ne=I[he+1].Yb;if(we(P,Ae[Q+2])){var Be=P,rt=0;if(we(Be,(ze=Ae)[(pt=Q)+3]))if(we(Be,ze[pt+6])){for(Ae=0,pt=2*(rt=we(Be,ze[pt+8]))+(ze=we(Be,ze[pt+9+rt])),rt=0,ze=yC[pt];ze[Ae];++Ae)rt+=rt+we(Be,ze[Ae]);rt+=3+(8<<pt)}else we(Be,ze[pt+7])?(rt=7+2*we(Be,165),rt+=we(Be,145)):rt=5+we(Be,159);else rt=we(Be,ze[pt+4])?3+we(Be,ze[pt+5]):2;Ae=Ne[2]}else rt=1,Ae=Ne[1];Ne=xe+$x[he],0>(Be=P).b&&Te(Be);var pt,ze=Be.b,at=(pt=Be.Ca>>1)-(Be.I>>ze)>>31;--Be.b,Be.Ca+=at,Be.Ca|=1,Be.I-=(pt+1&at)<<ze,ye[Ne]=((rt^at)-at)*re[(0<he)+0]}return 16}function El(P){var I=P.rb[P.sb-1];I.la=0,I.Na=0,i(P.zc,0,0,P.zc.length),P.ja=0}function Sa(P,I,Q,re,he){he=P[I+Q+32*re]+(he>>3),P[I+Q+32*re]=-256&he?0>he?0:255:he}function ha(P,I,Q,re,he,ye){Sa(P,I,0,Q,re+he),Sa(P,I,1,Q,re+ye),Sa(P,I,2,Q,re-ye),Sa(P,I,3,Q,re-he)}function sl(P){return(20091*P>>16)+P}function ud(P,I,Q,re){var he,ye=0,xe=a(16);for(he=0;4>he;++he){var Ae=P[I+0]+P[I+8],Ne=P[I+0]-P[I+8],Be=(35468*P[I+4]>>16)-sl(P[I+12]),rt=sl(P[I+4])+(35468*P[I+12]>>16);xe[ye+0]=Ae+rt,xe[ye+1]=Ne+Be,xe[ye+2]=Ne-Be,xe[ye+3]=Ae-rt,ye+=4,I++}for(he=ye=0;4>he;++he)Ae=(P=xe[ye+0]+4)+xe[ye+8],Ne=P-xe[ye+8],Be=(35468*xe[ye+4]>>16)-sl(xe[ye+12]),Sa(Q,re,0,0,Ae+(rt=sl(xe[ye+4])+(35468*xe[ye+12]>>16))),Sa(Q,re,1,0,Ne+Be),Sa(Q,re,2,0,Ne-Be),Sa(Q,re,3,0,Ae-rt),ye++,re+=32}function sf(P,I,Q,re){var he=P[I+0]+4,ye=35468*P[I+4]>>16,xe=sl(P[I+4]),Ae=35468*P[I+1]>>16;ha(Q,re,0,he+xe,P=sl(P[I+1]),Ae),ha(Q,re,1,he+ye,P,Ae),ha(Q,re,2,he-ye,P,Ae),ha(Q,re,3,he-xe,P,Ae)}function st(P,I,Q,re,he){ud(P,I,Q,re),he&&ud(P,I+16,Q,re+4)}function se(P,I,Q,re){au(P,I+0,Q,re,1),au(P,I+32,Q,re+128,1)}function Ce(P,I,Q,re){var he;for(P=P[I+0]+4,he=0;4>he;++he)for(I=0;4>I;++I)Sa(Q,re,I,he,P)}function Ve(P,I,Q,re){P[I+0]&&ei(P,I+0,Q,re),P[I+16]&&ei(P,I+16,Q,re+4),P[I+32]&&ei(P,I+32,Q,re+128),P[I+48]&&ei(P,I+48,Q,re+128+4)}function Je(P,I,Q,re){var he,ye=a(16);for(he=0;4>he;++he){var xe=P[I+0+he]+P[I+12+he],Ae=P[I+4+he]+P[I+8+he],Ne=P[I+4+he]-P[I+8+he],Be=P[I+0+he]-P[I+12+he];ye[0+he]=xe+Ae,ye[8+he]=xe-Ae,ye[4+he]=Be+Ne,ye[12+he]=Be-Ne}for(he=0;4>he;++he)xe=(P=ye[0+4*he]+3)+ye[3+4*he],Ae=ye[1+4*he]+ye[2+4*he],Ne=ye[1+4*he]-ye[2+4*he],Be=P-ye[3+4*he],Q[re+0]=xe+Ae>>3,Q[re+16]=Be+Ne>>3,Q[re+32]=xe-Ae>>3,Q[re+48]=Be-Ne>>3,re+=64}function it(P,I,Q){var re,he=I-32,ye=Cl,xe=255-P[he-1];for(re=0;re<Q;++re){var Ae,Ne=ye,Be=xe+P[I-1];for(Ae=0;Ae<Q;++Ae)P[I+Ae]=Ne[Be+P[he+Ae]];I+=32}}function vt(P,I){it(P,I,4)}function Bt(P,I){it(P,I,8)}function er(P,I){it(P,I,16)}function Gt(P,I){var Q;for(Q=0;16>Q;++Q)n(P,I+32*Q,P,I-32,16)}function dr(P,I){var Q;for(Q=16;0<Q;--Q)i(P,I,P[I-1],16),I+=32}function Dr(P,I,Q){var re;for(re=0;16>re;++re)i(I,Q+32*re,P,16)}function Un(P,I){var Q,re=16;for(Q=0;16>Q;++Q)re+=P[I-1+32*Q]+P[I+Q-32];Dr(re>>5,P,I)}function Tn(P,I){var Q,re=8;for(Q=0;16>Q;++Q)re+=P[I-1+32*Q];Dr(re>>4,P,I)}function Oi(P,I){var Q,re=8;for(Q=0;16>Q;++Q)re+=P[I+Q-32];Dr(re>>4,P,I)}function di(P,I){Dr(128,P,I)}function Pr(P,I,Q){return P+2*I+Q+2>>2}function Ra(P,I){var Q,re=I-32;for(re=new Uint8Array([Pr(P[re-1],P[re+0],P[re+1]),Pr(P[re+0],P[re+1],P[re+2]),Pr(P[re+1],P[re+2],P[re+3]),Pr(P[re+2],P[re+3],P[re+4])]),Q=0;4>Q;++Q)n(P,I+32*Q,re,0,re.length)}function pa(P,I){var Q=P[I-1],re=P[I-1+32],he=P[I-1+64],ye=P[I-1+96];ae(P,I+0,16843009*Pr(P[I-1-32],Q,re)),ae(P,I+32,16843009*Pr(Q,re,he)),ae(P,I+64,16843009*Pr(re,he,ye)),ae(P,I+96,16843009*Pr(he,ye,ye))}function $a(P,I){var Q,re=4;for(Q=0;4>Q;++Q)re+=P[I+Q-32]+P[I-1+32*Q];for(re>>=3,Q=0;4>Q;++Q)i(P,I+32*Q,re,4)}function Wi(P,I){var Q=P[I-1+0],re=P[I-1+32],he=P[I-1+64],ye=P[I-1-32],xe=P[I+0-32],Ae=P[I+1-32],Ne=P[I+2-32],Be=P[I+3-32];P[I+0+96]=Pr(re,he,P[I-1+96]),P[I+1+96]=P[I+0+64]=Pr(Q,re,he),P[I+2+96]=P[I+1+64]=P[I+0+32]=Pr(ye,Q,re),P[I+3+96]=P[I+2+64]=P[I+1+32]=P[I+0+0]=Pr(xe,ye,Q),P[I+3+64]=P[I+2+32]=P[I+1+0]=Pr(Ae,xe,ye),P[I+3+32]=P[I+2+0]=Pr(Ne,Ae,xe),P[I+3+0]=Pr(Be,Ne,Ae)}function cs(P,I){var Q=P[I+1-32],re=P[I+2-32],he=P[I+3-32],ye=P[I+4-32],xe=P[I+5-32],Ae=P[I+6-32],Ne=P[I+7-32];P[I+0+0]=Pr(P[I+0-32],Q,re),P[I+1+0]=P[I+0+32]=Pr(Q,re,he),P[I+2+0]=P[I+1+32]=P[I+0+64]=Pr(re,he,ye),P[I+3+0]=P[I+2+32]=P[I+1+64]=P[I+0+96]=Pr(he,ye,xe),P[I+3+32]=P[I+2+64]=P[I+1+96]=Pr(ye,xe,Ae),P[I+3+64]=P[I+2+96]=Pr(xe,Ae,Ne),P[I+3+96]=Pr(Ae,Ne,Ne)}function ji(P,I){var Q=P[I-1+0],re=P[I-1+32],he=P[I-1+64],ye=P[I-1-32],xe=P[I+0-32],Ae=P[I+1-32],Ne=P[I+2-32],Be=P[I+3-32];P[I+0+0]=P[I+1+64]=ye+xe+1>>1,P[I+1+0]=P[I+2+64]=xe+Ae+1>>1,P[I+2+0]=P[I+3+64]=Ae+Ne+1>>1,P[I+3+0]=Ne+Be+1>>1,P[I+0+96]=Pr(he,re,Q),P[I+0+64]=Pr(re,Q,ye),P[I+0+32]=P[I+1+96]=Pr(Q,ye,xe),P[I+1+32]=P[I+2+96]=Pr(ye,xe,Ae),P[I+2+32]=P[I+3+96]=Pr(xe,Ae,Ne),P[I+3+32]=Pr(Ae,Ne,Be)}function Fa(P,I){var Q=P[I+0-32],re=P[I+1-32],he=P[I+2-32],ye=P[I+3-32],xe=P[I+4-32],Ae=P[I+5-32],Ne=P[I+6-32],Be=P[I+7-32];P[I+0+0]=Q+re+1>>1,P[I+1+0]=P[I+0+64]=re+he+1>>1,P[I+2+0]=P[I+1+64]=he+ye+1>>1,P[I+3+0]=P[I+2+64]=ye+xe+1>>1,P[I+0+32]=Pr(Q,re,he),P[I+1+32]=P[I+0+96]=Pr(re,he,ye),P[I+2+32]=P[I+1+96]=Pr(he,ye,xe),P[I+3+32]=P[I+2+96]=Pr(ye,xe,Ae),P[I+3+64]=Pr(xe,Ae,Ne),P[I+3+96]=Pr(Ae,Ne,Be)}function Aa(P,I){var Q=P[I-1+0],re=P[I-1+32],he=P[I-1+64],ye=P[I-1+96];P[I+0+0]=Q+re+1>>1,P[I+2+0]=P[I+0+32]=re+he+1>>1,P[I+2+32]=P[I+0+64]=he+ye+1>>1,P[I+1+0]=Pr(Q,re,he),P[I+3+0]=P[I+1+32]=Pr(re,he,ye),P[I+3+32]=P[I+1+64]=Pr(he,ye,ye),P[I+3+64]=P[I+2+64]=P[I+0+96]=P[I+1+96]=P[I+2+96]=P[I+3+96]=ye}function Zs(P,I){var Q=P[I-1+0],re=P[I-1+32],he=P[I-1+64],ye=P[I-1+96],xe=P[I-1-32],Ae=P[I+0-32],Ne=P[I+1-32],Be=P[I+2-32];P[I+0+0]=P[I+2+32]=Q+xe+1>>1,P[I+0+32]=P[I+2+64]=re+Q+1>>1,P[I+0+64]=P[I+2+96]=he+re+1>>1,P[I+0+96]=ye+he+1>>1,P[I+3+0]=Pr(Ae,Ne,Be),P[I+2+0]=Pr(xe,Ae,Ne),P[I+1+0]=P[I+3+32]=Pr(Q,xe,Ae),P[I+1+32]=P[I+3+64]=Pr(re,Q,xe),P[I+1+64]=P[I+3+96]=Pr(he,re,Q),P[I+1+96]=Pr(ye,he,re)}function yo(P,I){var Q;for(Q=0;8>Q;++Q)n(P,I+32*Q,P,I-32,8)}function ds(P,I){var Q;for(Q=0;8>Q;++Q)i(P,I,P[I-1],8),I+=32}function Ps(P,I,Q){var re;for(re=0;8>re;++re)i(I,Q+32*re,P,8)}function oa(P,I){var Q,re=8;for(Q=0;8>Q;++Q)re+=P[I+Q-32]+P[I-1+32*Q];Ps(re>>4,P,I)}function Xi(P,I){var Q,re=4;for(Q=0;8>Q;++Q)re+=P[I+Q-32];Ps(re>>3,P,I)}function la(P,I){var Q,re=4;for(Q=0;8>Q;++Q)re+=P[I-1+32*Q];Ps(re>>3,P,I)}function Ri(P,I){Ps(128,P,I)}function Ba(P,I,Q){var re=P[I-Q],he=P[I+0],ye=3*(he-re)+A0[1020+P[I-2*Q]-P[I+Q]],xe=C0[112+(ye+4>>3)];P[I-Q]=Cl[255+re+C0[112+(ye+3>>3)]],P[I+0]=Cl[255+he-xe]}function Jl(P,I,Q,re){var he=P[I+0],ye=P[I+Q];return Pl[255+P[I-2*Q]-P[I-Q]]>re||Pl[255+ye-he]>re}function ol(P,I,Q,re){return 4*Pl[255+P[I-Q]-P[I+0]]+Pl[255+P[I-2*Q]-P[I+Q]]<=re}function ch(P,I,Q,re,he){var ye=P[I-3*Q],xe=P[I-2*Q],Ae=P[I-Q],Ne=P[I+0],Be=P[I+Q],rt=P[I+2*Q],pt=P[I+3*Q];return 4*Pl[255+Ae-Ne]+Pl[255+xe-Be]>re?0:Pl[255+P[I-4*Q]-ye]<=he&&Pl[255+ye-xe]<=he&&Pl[255+xe-Ae]<=he&&Pl[255+pt-rt]<=he&&Pl[255+rt-Be]<=he&&Pl[255+Be-Ne]<=he}function cd(P,I,Q,re){var he=2*re+1;for(re=0;16>re;++re)ol(P,I+re,Q,he)&&Ba(P,I+re,Q)}function of(P,I,Q,re){var he=2*re+1;for(re=0;16>re;++re)ol(P,I+re*Q,1,he)&&Ba(P,I+re*Q,1)}function op(P,I,Q,re){var he;for(he=3;0<he;--he)cd(P,I+=4*Q,Q,re)}function lp(P,I,Q,re){var he;for(he=3;0<he;--he)of(P,I+=4,Q,re)}function Wo(P,I,Q,re,he,ye,xe,Ae){for(ye=2*ye+1;0<he--;){if(ch(P,I,Q,ye,xe))if(Jl(P,I,Q,Ae))Ba(P,I,Q);else{var Ne=P,Be=I,rt=Q,pt=Ne[Be-2*rt],ze=Ne[Be-rt],at=Ne[Be+0],ut=Ne[Be+rt],xt=Ne[Be+2*rt],dt=27*(Mt=A0[1020+3*(at-ze)+A0[1020+pt-ut]])+63>>7,St=18*Mt+63>>7,Mt=9*Mt+63>>7;Ne[Be-3*rt]=Cl[255+Ne[Be-3*rt]+Mt],Ne[Be-2*rt]=Cl[255+pt+St],Ne[Be-rt]=Cl[255+ze+dt],Ne[Be+0]=Cl[255+at-dt],Ne[Be+rt]=Cl[255+ut-St],Ne[Be+2*rt]=Cl[255+xt-Mt]}I+=re}}function Nu(P,I,Q,re,he,ye,xe,Ae){for(ye=2*ye+1;0<he--;){if(ch(P,I,Q,ye,xe))if(Jl(P,I,Q,Ae))Ba(P,I,Q);else{var Ne=P,Be=I,rt=Q,pt=Ne[Be-rt],ze=Ne[Be+0],at=Ne[Be+rt],ut=C0[112+(4+(xt=3*(ze-pt))>>3)],xt=C0[112+(xt+3>>3)],dt=ut+1>>1;Ne[Be-2*rt]=Cl[255+Ne[Be-2*rt]+dt],Ne[Be-rt]=Cl[255+pt+xt],Ne[Be+0]=Cl[255+ze-ut],Ne[Be+rt]=Cl[255+at-dt]}I+=re}}function up(P,I,Q,re,he,ye){Wo(P,I,Q,1,16,re,he,ye)}function dd(P,I,Q,re,he,ye){Wo(P,I,1,Q,16,re,he,ye)}function cp(P,I,Q,re,he,ye){var xe;for(xe=3;0<xe;--xe)Nu(P,I+=4*Q,Q,1,16,re,he,ye)}function G(P,I,Q,re,he,ye){var xe;for(xe=3;0<xe;--xe)Nu(P,I+=4,1,Q,16,re,he,ye)}function de(P,I,Q,re,he,ye,xe,Ae){Wo(P,I,he,1,8,ye,xe,Ae),Wo(Q,re,he,1,8,ye,xe,Ae)}function Fe(P,I,Q,re,he,ye,xe,Ae){Wo(P,I,1,he,8,ye,xe,Ae),Wo(Q,re,1,he,8,ye,xe,Ae)}function Qe(P,I,Q,re,he,ye,xe,Ae){Nu(P,I+4*he,he,1,8,ye,xe,Ae),Nu(Q,re+4*he,he,1,8,ye,xe,Ae)}function ot(P,I,Q,re,he,ye,xe,Ae){Nu(P,I+4,1,he,8,ye,xe,Ae),Nu(Q,re+4,1,he,8,ye,xe,Ae)}function Tt(){this.ba=new kr,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Ut,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Nt(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Er(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function $r(){this.ua=0,this.Wa=new me,this.vb=new me,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new V,this.yc=new D}function sn(){this.xb=this.a=0,this.l=new us,this.ca=new kr,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new N,this.Pb=0,this.wd=new N,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new $r,this.ab=0,this.gc=s(4,Er),this.Oc=0}function hn(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new us,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Wn(P,I,Q,re,he,ye,xe){for(P=P==null?0:P[I+0],I=0;I<xe;++I)he[ye+I]=P+Q[re+I]&255,P=he[ye+I]}function Ti(P,I,Q,re,he,ye,xe){var Ae;if(P==null)Wn(null,null,Q,re,he,ye,xe);else for(Ae=0;Ae<xe;++Ae)he[ye+Ae]=P[I+Ae]+Q[re+Ae]&255}function za(P,I,Q,re,he,ye,xe){if(P==null)Wn(null,null,Q,re,he,ye,xe);else{var Ae,Ne=P[I+0],Be=Ne,rt=Ne;for(Ae=0;Ae<xe;++Ae)Be=rt+(Ne=P[I+Ae])-Be,rt=Q[re+Ae]+(-256&Be?0>Be?0:255:Be)&255,Be=Ne,he[ye+Ae]=rt}}function Si(P,I,Q,re){var he=I.width,ye=I.o;if(t(P!=null&&I!=null),0>Q||0>=re||Q+re>ye)return null;if(!P.Cc){if(P.ga==null){var xe;if(P.ga=new hn,(xe=P.ga==null)||(xe=I.width*I.o,t(P.Gb.length==0),P.Gb=a(xe),P.Uc=0,P.Gb==null?xe=0:(P.mb=P.Gb,P.nb=P.Uc,P.rc=null,xe=1),xe=!xe),!xe){xe=P.ga;var Ae=P.Fa,Ne=P.P,Be=P.qc,rt=P.mb,pt=P.nb,ze=Ne+1,at=Be-1,ut=xe.l;if(t(Ae!=null&&rt!=null&&I!=null),hf[0]=null,hf[1]=Wn,hf[2]=Ti,hf[3]=za,xe.ca=rt,xe.tb=pt,xe.c=I.width,xe.i=I.height,t(0<xe.c&&0<xe.i),1>=Be)I=0;else if(xe.$a=3&Ae[Ne+0],xe.Z=Ae[Ne+0]>>2&3,xe.Lc=Ae[Ne+0]>>4&3,Ne=Ae[Ne+0]>>6&3,0>xe.$a||1<xe.$a||4<=xe.Z||1<xe.Lc||Ne)I=0;else if(ut.put=Z,ut.ac=Ht,ut.bc=Pe,ut.ma=xe,ut.width=I.width,ut.height=I.height,ut.Da=I.Da,ut.v=I.v,ut.va=I.va,ut.j=I.j,ut.o=I.o,xe.$a)e:{t(xe.$a==1),I=Jn();t:for(;;){if(I==null){I=0;break e}if(t(xe!=null),xe.mc=I,I.c=xe.c,I.i=xe.i,I.l=xe.l,I.l.ma=xe,I.l.width=xe.c,I.l.height=xe.i,I.a=0,q(I.m,Ae,ze,at),!yn(xe.c,xe.i,1,I,null)||(I.ab==1&&I.gc[0].hc==3&&or(I.s)?(xe.ic=1,Ae=I.c*I.i,I.Ta=null,I.Ua=0,I.V=a(Ae),I.Ba=0,I.V==null?(I.a=1,I=0):I=1):(xe.ic=0,I=En(I,xe.c)),!I))break t;I=1;break e}xe.mc=null,I=0}else I=at>=xe.c*xe.i;xe=!I}if(xe)return null;P.ga.Lc!=1?P.Ga=0:re=ye-Q}t(P.ga!=null),t(Q+re<=ye);e:{if(I=(Ae=P.ga).c,ye=Ae.l.o,Ae.$a==0){if(ze=P.rc,at=P.Vc,ut=P.Fa,Ne=P.P+1+Q*I,Be=P.mb,rt=P.nb+Q*I,t(Ne<=P.P+P.qc),Ae.Z!=0)for(t(hf[Ae.Z]!=null),xe=0;xe<re;++xe)hf[Ae.Z](ze,at,ut,Ne,Be,rt,I),ze=Be,at=rt,rt+=I,Ne+=I;else for(xe=0;xe<re;++xe)n(Be,rt,ut,Ne,I),ze=Be,at=rt,rt+=I,Ne+=I;P.rc=ze,P.Vc=at}else{if(t(Ae.mc!=null),I=Q+re,t((xe=Ae.mc)!=null),t(I<=xe.i),xe.C>=I)I=1;else if(Ae.ic||vo(),Ae.ic){Ae=xe.V,ze=xe.Ba,at=xe.c;var xt=xe.i,dt=(ut=1,Ne=xe.$/at,Be=xe.$%at,rt=xe.m,pt=xe.s,xe.$),St=at*xt,Mt=at*I,zt=pt.wc,Dt=dt<Mt?Ct(pt,Be,Ne):null;t(dt<=St),t(I<=xt),t(or(pt));t:for(;;){for(;!rt.h&&dt<Mt;){if(Be&zt||(Dt=Ct(pt,Be,Ne)),t(Dt!=null),le(rt),256>(xt=Ye(Dt.G[0],Dt.H[0],rt)))Ae[ze+dt]=xt,++dt,++Be>=at&&(Be=0,++Ne<=I&&!(Ne%16)&&cr(xe,Ne));else{if(!(280>xt)){ut=0;break t}xt=Ee(xt-256,rt);var Ur,Cr=Ye(Dt.G[4],Dt.H[4],rt);if(le(rt),!(dt>=(Cr=Oe(at,Cr=Ee(Cr,rt)))&&St-dt>=xt)){ut=0;break t}for(Ur=0;Ur<xt;++Ur)Ae[ze+dt+Ur]=Ae[ze+dt+Ur-Cr];for(dt+=xt,Be+=xt;Be>=at;)Be-=at,++Ne<=I&&!(Ne%16)&&cr(xe,Ne);dt<Mt&&Be&zt&&(Dt=Ct(pt,Be,Ne))}t(rt.h==ie(rt))}cr(xe,Ne>I?I:Ne);break t}!ut||rt.h&&dt<St?(ut=0,xe.a=rt.h?5:3):xe.$=dt,I=ut}else I=Qr(xe,xe.V,xe.Ba,xe.c,xe.i,I,pn);if(!I){re=0;break e}}Q+re>=ye&&(P.Cc=1),re=1}if(!re)return null;if(P.Cc&&((re=P.ga)!=null&&(re.mc=null),P.ga=null,0<P.Ga))return alert("todo:WebPDequantizeLevels"),null}return P.nb+Q*he}function fs(P,I,Q,re,he,ye){for(;0<he--;){var xe,Ae=P,Ne=I+(Q?1:0),Be=P,rt=I+(Q?0:3);for(xe=0;xe<re;++xe){var pt=Be[rt+4*xe];pt!=255&&(pt*=32897,Ae[Ne+4*xe+0]=Ae[Ne+4*xe+0]*pt>>23,Ae[Ne+4*xe+1]=Ae[Ne+4*xe+1]*pt>>23,Ae[Ne+4*xe+2]=Ae[Ne+4*xe+2]*pt>>23)}I+=ye}}function Ua(P,I,Q,re,he){for(;0<re--;){var ye;for(ye=0;ye<Q;++ye){var xe=P[I+2*ye+0],Ae=15&(Be=P[I+2*ye+1]),Ne=4369*Ae,Be=(240&Be|Be>>4)*Ne>>16;P[I+2*ye+0]=(240&xe|xe>>4)*Ne>>16&240|(15&xe|xe<<4)*Ne>>16>>4&15,P[I+2*ye+1]=240&Be|Ae}I+=he}}function hs(P,I,Q,re,he,ye,xe,Ae){var Ne,Be,rt=255;for(Be=0;Be<he;++Be){for(Ne=0;Ne<re;++Ne){var pt=P[I+Ne];ye[xe+4*Ne]=pt,rt&=pt}I+=Q,xe+=Ae}return rt!=255}function ll(P,I,Q,re,he){var ye;for(ye=0;ye<he;++ye)Q[re+ye]=P[I+ye]>>8}function vo(){vr=fs,on=Ua,Fn=hs,li=ll}function Iu(P,I,Q){A[P]=function(re,he,ye,xe,Ae,Ne,Be,rt,pt,ze,at,ut,xt,dt,St,Mt,zt){var Dt,Ur=zt-1>>1,Cr=Ae[Ne+0]|Be[rt+0]<<16,Sn=pt[ze+0]|at[ut+0]<<16;t(re!=null);var Fr=3*Cr+Sn+131074>>2;for(I(re[he+0],255&Fr,Fr>>16,xt,dt),ye!=null&&(Fr=3*Sn+Cr+131074>>2,I(ye[xe+0],255&Fr,Fr>>16,St,Mt)),Dt=1;Dt<=Ur;++Dt){var qn=Ae[Ne+Dt]|Be[rt+Dt]<<16,ms=pt[ze+Dt]|at[ut+Dt]<<16,An=Cr+qn+Sn+ms+524296,Br=An+2*(qn+Sn)>>3;Fr=Br+Cr>>1,Cr=(An=An+2*(Cr+ms)>>3)+qn>>1,I(re[he+2*Dt-1],255&Fr,Fr>>16,xt,dt+(2*Dt-1)*Q),I(re[he+2*Dt-0],255&Cr,Cr>>16,xt,dt+(2*Dt-0)*Q),ye!=null&&(Fr=An+Sn>>1,Cr=Br+ms>>1,I(ye[xe+2*Dt-1],255&Fr,Fr>>16,St,Mt+(2*Dt-1)*Q),I(ye[xe+2*Dt+0],255&Cr,Cr>>16,St,Mt+(2*Dt+0)*Q)),Cr=qn,Sn=ms}1&zt||(Fr=3*Cr+Sn+131074>>2,I(re[he+zt-1],255&Fr,Fr>>16,xt,dt+(zt-1)*Q),ye!=null&&(Fr=3*Sn+Cr+131074>>2,I(ye[xe+zt-1],255&Fr,Fr>>16,St,Mt+(zt-1)*Q)))}}function dh(){Ml[P0]=wC,Ml[M0]=x_,Ml[v_]=xC,Ml[k0]=Wx,Ml[O0]=Vx,Ml[N0]=E_,Ml[Ix]=EC,Ml[__]=x_,Ml[I0]=Wx,Ml[D0]=Vx,Ml[b_]=E_}function lf(P){return P&~TC?0>P?0:255:P>>Hx}function pc(P,I){return lf((19077*P>>8)+(26149*I>>8)-14234)}function fd(P,I,Q){return lf((19077*P>>8)-(6419*I>>8)-(13320*Q>>8)+8708)}function hd(P,I){return lf((19077*P>>8)+(33050*I>>8)-17685)}function mc(P,I,Q,re,he){re[he+0]=pc(P,Q),re[he+1]=fd(P,I,Q),re[he+2]=hd(P,I)}function Ms(P,I,Q,re,he){re[he+0]=hd(P,I),re[he+1]=fd(P,I,Q),re[he+2]=pc(P,Q)}function gc(P,I,Q,re,he){var ye=fd(P,I,Q);I=ye<<3&224|hd(P,I)>>3,re[he+0]=248&pc(P,Q)|ye>>5,re[he+1]=I}function eu(P,I,Q,re,he){var ye=240&hd(P,I)|15;re[he+0]=240&pc(P,Q)|fd(P,I,Q)>>4,re[he+1]=ye}function Tl(P,I,Q,re,he){re[he+0]=255,mc(P,I,Q,re,he+1)}function pd(P,I,Q,re,he){Ms(P,I,Q,re,he),re[he+3]=255}function Js(P,I,Q,re,he){mc(P,I,Q,re,he),re[he+3]=255}function tu(P,I,Q){A[P]=function(re,he,ye,xe,Ae,Ne,Be,rt,pt){for(var ze=rt+(-2&pt)*Q;rt!=ze;)I(re[he+0],ye[xe+0],Ae[Ne+0],Be,rt),I(re[he+1],ye[xe+0],Ae[Ne+0],Be,rt+Q),he+=2,++xe,++Ne,rt+=2*Q;1&pt&&I(re[he+0],ye[xe+0],Ae[Ne+0],Be,rt)}}function Vo(P,I,Q){return Q==0?P==0?I==0?6:5:I==0?4:0:Q}function uf(P,I,Q,re,he){switch(P>>>30){case 3:au(I,Q,re,he,0);break;case 2:bo(I,Q,re,he);break;case 1:ei(I,Q,re,he)}}function ul(P,I){var Q,re,he=I.M,ye=I.Nb,xe=P.oc,Ae=P.pc+40,Ne=P.oc,Be=P.pc+584,rt=P.oc,pt=P.pc+600;for(Q=0;16>Q;++Q)xe[Ae+32*Q-1]=129;for(Q=0;8>Q;++Q)Ne[Be+32*Q-1]=129,rt[pt+32*Q-1]=129;for(0<he?xe[Ae-1-32]=Ne[Be-1-32]=rt[pt-1-32]=129:(i(xe,Ae-32-1,127,21),i(Ne,Be-32-1,127,9),i(rt,pt-32-1,127,9)),re=0;re<P.za;++re){var ze=I.ya[I.aa+re];if(0<re){for(Q=-1;16>Q;++Q)n(xe,Ae+32*Q-4,xe,Ae+32*Q+12,4);for(Q=-1;8>Q;++Q)n(Ne,Be+32*Q-4,Ne,Be+32*Q+4,4),n(rt,pt+32*Q-4,rt,pt+32*Q+4,4)}var at=P.Gd,ut=P.Hd+re,xt=ze.ad,dt=ze.Hc;if(0<he&&(n(xe,Ae-32,at[ut].y,0,16),n(Ne,Be-32,at[ut].f,0,8),n(rt,pt-32,at[ut].ea,0,8)),ze.Za){var St=xe,Mt=Ae-32+16;for(0<he&&(re>=P.za-1?i(St,Mt,at[ut].y[15],4):n(St,Mt,at[ut+1].y,0,4)),Q=0;4>Q;Q++)St[Mt+128+Q]=St[Mt+256+Q]=St[Mt+384+Q]=St[Mt+0+Q];for(Q=0;16>Q;++Q,dt<<=2)St=xe,Mt=Ae+Kx[Q],ju[ze.Ob[Q]](St,Mt),uf(dt,xt,16*+Q,St,Mt)}else if(St=Vo(re,he,ze.Ob[0]),vd[St](xe,Ae),dt!=0)for(Q=0;16>Q;++Q,dt<<=2)uf(dt,xt,16*+Q,xe,Ae+Kx[Q]);for(Q=ze.Gc,St=Vo(re,he,ze.Dd),_d[St](Ne,Be),_d[St](rt,pt),dt=xt,St=Ne,Mt=Be,255&(ze=0|Q)&&(170&ze?Al(dt,256,St,Mt):Ai(dt,256,St,Mt)),ze=rt,dt=pt,255&(Q>>=8)&&(170&Q?Al(xt,320,ze,dt):Ai(xt,320,ze,dt)),he<P.Ub-1&&(n(at[ut].y,0,xe,Ae+480,16),n(at[ut].f,0,Ne,Be+224,8),n(at[ut].ea,0,rt,pt+224,8)),Q=8*ye*P.B,at=P.sa,ut=P.ta+16*re+16*ye*P.R,xt=P.qa,ze=P.ra+8*re+Q,dt=P.Ha,St=P.Ia+8*re+Q,Q=0;16>Q;++Q)n(at,ut+Q*P.R,xe,Ae+32*Q,16);for(Q=0;8>Q;++Q)n(xt,ze+Q*P.B,Ne,Be+32*Q,8),n(dt,St+Q*P.B,rt,pt+32*Q,8)}}function yc(P,I,Q,re,he,ye,xe,Ae,Ne){var Be=[0],rt=[0],pt=0,ze=Ne!=null?Ne.kd:0,at=Ne??new Nt;if(P==null||12>Q)return 7;at.data=P,at.w=I,at.ha=Q,I=[I],Q=[Q],at.gb=[at.gb];e:{var ut=I,xt=Q,dt=at.gb;if(t(P!=null),t(xt!=null),t(dt!=null),dt[0]=0,12<=xt[0]&&!r(P,ut[0],"RIFF")){if(r(P,ut[0]+8,"WEBP")){dt=3;break e}var St=Se(P,ut[0]+4);if(12>St||4294967286<St){dt=3;break e}if(ze&&St>xt[0]-8){dt=7;break e}dt[0]=St,ut[0]+=12,xt[0]-=12}dt=0}if(dt!=0)return dt;for(St=0<at.gb[0],Q=Q[0];;){e:{var Mt=P;xt=I,dt=Q;var zt=Be,Dt=rt,Ur=ut=[0];if((Fr=pt=[pt])[0]=0,8>dt[0])dt=7;else{if(!r(Mt,xt[0],"VP8X")){if(Se(Mt,xt[0]+4)!=10){dt=3;break e}if(18>dt[0]){dt=7;break e}var Cr=Se(Mt,xt[0]+8),Sn=1+fe(Mt,xt[0]+12);if(2147483648<=Sn*(Mt=1+fe(Mt,xt[0]+15))){dt=3;break e}Ur!=null&&(Ur[0]=Cr),zt!=null&&(zt[0]=Sn),Dt!=null&&(Dt[0]=Mt),xt[0]+=18,dt[0]-=18,Fr[0]=1}dt=0}}if(pt=pt[0],ut=ut[0],dt!=0)return dt;if(xt=!!(2&ut),!St&&pt)return 3;if(ye!=null&&(ye[0]=!!(16&ut)),xe!=null&&(xe[0]=xt),Ae!=null&&(Ae[0]=0),xe=Be[0],ut=rt[0],pt&&xt&&Ne==null){dt=0;break}if(4>Q){dt=7;break}if(St&&pt||!St&&!pt&&!r(P,I[0],"ALPH")){Q=[Q],at.na=[at.na],at.P=[at.P],at.Sa=[at.Sa];e:{Cr=P,dt=I,St=Q;var Fr=at.gb;zt=at.na,Dt=at.P,Ur=at.Sa,Sn=22,t(Cr!=null),t(St!=null),Mt=dt[0];var qn=St[0];for(t(zt!=null),t(Ur!=null),zt[0]=null,Dt[0]=null,Ur[0]=0;;){if(dt[0]=Mt,St[0]=qn,8>qn){dt=7;break e}var ms=Se(Cr,Mt+4);if(4294967286<ms){dt=3;break e}var An=8+ms+1&-2;if(Sn+=An,0<Fr&&Sn>Fr){dt=3;break e}if(!r(Cr,Mt,"VP8 ")||!r(Cr,Mt,"VP8L")){dt=0;break e}if(qn[0]<An){dt=7;break e}r(Cr,Mt,"ALPH")||(zt[0]=Cr,Dt[0]=Mt+8,Ur[0]=ms),Mt+=An,qn-=An}}if(Q=Q[0],at.na=at.na[0],at.P=at.P[0],at.Sa=at.Sa[0],dt!=0)break}Q=[Q],at.Ja=[at.Ja],at.xa=[at.xa];e:if(Fr=P,dt=I,St=Q,zt=at.gb[0],Dt=at.Ja,Ur=at.xa,Cr=dt[0],Mt=!r(Fr,Cr,"VP8 "),Sn=!r(Fr,Cr,"VP8L"),t(Fr!=null),t(St!=null),t(Dt!=null),t(Ur!=null),8>St[0])dt=7;else{if(Mt||Sn){if(Fr=Se(Fr,Cr+4),12<=zt&&Fr>zt-12){dt=3;break e}if(ze&&Fr>St[0]-8){dt=7;break e}Dt[0]=Fr,dt[0]+=8,St[0]-=8,Ur[0]=Sn}else Ur[0]=5<=St[0]&&Fr[Cr+0]==47&&!(Fr[Cr+4]>>5),Dt[0]=St[0];dt=0}if(Q=Q[0],at.Ja=at.Ja[0],at.xa=at.xa[0],I=I[0],dt!=0)break;if(4294967286<at.Ja)return 3;if(Ae==null||xt||(Ae[0]=at.xa?2:1),xe=[xe],ut=[ut],at.xa){if(5>Q){dt=7;break}Ae=xe,ze=ut,xt=ye,P==null||5>Q?P=0:5<=Q&&P[I+0]==47&&!(P[I+4]>>5)?(St=[0],Fr=[0],zt=[0],q(Dt=new N,P,I,Q),ue(Dt,St,Fr,zt)?(Ae!=null&&(Ae[0]=St[0]),ze!=null&&(ze[0]=Fr[0]),xt!=null&&(xt[0]=zt[0]),P=1):P=0):P=0}else{if(10>Q){dt=7;break}Ae=ut,P==null||10>Q||!hr(P,I+3,Q-3)?P=0:(ze=P[I+0]|P[I+1]<<8|P[I+2]<<16,xt=16383&(P[I+7]<<8|P[I+6]),P=16383&(P[I+9]<<8|P[I+8]),1&ze||3<(ze>>1&7)||!(ze>>4&1)||ze>>5>=at.Ja||!xt||!P?P=0:(xe&&(xe[0]=xt),Ae&&(Ae[0]=P),P=1))}if(!P||(xe=xe[0],ut=ut[0],pt&&(Be[0]!=xe||rt[0]!=ut)))return 3;Ne!=null&&(Ne[0]=at,Ne.offset=I-Ne.w,t(4294967286>I-Ne.w),t(Ne.offset==Ne.ha-Q));break}return dt==0||dt==7&&pt&&Ne==null?(ye!=null&&(ye[0]|=at.na!=null&&0<at.na.length),re!=null&&(re[0]=xe),he!=null&&(he[0]=ut),0):dt}function fh(P,I,Q){var re=I.width,he=I.height,ye=0,xe=0,Ae=re,Ne=he;if(I.Da=P!=null&&0<P.Da,I.Da&&(Ae=P.cd,Ne=P.bd,ye=P.v,xe=P.j,11>Q||(ye&=-2,xe&=-2),0>ye||0>xe||0>=Ae||0>=Ne||ye+Ae>re||xe+Ne>he))return 0;if(I.v=ye,I.j=xe,I.va=ye+Ae,I.o=xe+Ne,I.U=Ae,I.T=Ne,I.da=P!=null&&0<P.da,I.da){if(!Ue(Ae,Ne,Q=[P.ib],ye=[P.hb]))return 0;I.ib=Q[0],I.hb=ye[0]}return I.ob=P!=null&&P.ob,I.Kb=P==null||!P.Sd,I.da&&(I.ob=I.ib<3*re/4&&I.hb<3*he/4,I.Kb=0),1}function cf(P){if(P==null)return 2;if(11>P.S){var I=P.f.RGBA;I.fb+=(P.height-1)*I.A,I.A=-I.A}else I=P.f.kb,P=P.height,I.O+=(P-1)*I.fa,I.fa=-I.fa,I.N+=(P-1>>1)*I.Ab,I.Ab=-I.Ab,I.W+=(P-1>>1)*I.Db,I.Db=-I.Db,I.F!=null&&(I.J+=(P-1)*I.lb,I.lb=-I.lb);return 0}function ru(P,I,Q,re){if(re==null||0>=P||0>=I)return 2;if(Q!=null){if(Q.Da){var he=Q.cd,ye=Q.bd,xe=-2&Q.v,Ae=-2&Q.j;if(0>xe||0>Ae||0>=he||0>=ye||xe+he>P||Ae+ye>I)return 2;P=he,I=ye}if(Q.da){if(!Ue(P,I,he=[Q.ib],ye=[Q.hb]))return 2;P=he[0],I=ye[0]}}re.width=P,re.height=I;e:{var Ne=re.width,Be=re.height;if(P=re.S,0>=Ne||0>=Be||!(P>=P0&&13>P))P=2;else{if(0>=re.Rd&&re.sd==null){xe=ye=he=I=0;var rt=(Ae=Ne*Xx[P])*Be;if(11>P||(ye=(Be+1)/2*(I=(Ne+1)/2),P==12&&(xe=(he=Ne)*Be)),(Be=a(rt+2*ye+xe))==null){P=1;break e}re.sd=Be,11>P?((Ne=re.f.RGBA).eb=Be,Ne.fb=0,Ne.A=Ae,Ne.size=rt):((Ne=re.f.kb).y=Be,Ne.O=0,Ne.fa=Ae,Ne.Fd=rt,Ne.f=Be,Ne.N=0+rt,Ne.Ab=I,Ne.Cd=ye,Ne.ea=Be,Ne.W=0+rt+ye,Ne.Db=I,Ne.Ed=ye,P==12&&(Ne.F=Be,Ne.J=0+rt+2*ye),Ne.Tc=xe,Ne.lb=he)}if(I=1,he=re.S,ye=re.width,xe=re.height,he>=P0&&13>he)if(11>he)P=re.f.RGBA,I&=(Ae=Math.abs(P.A))*(xe-1)+ye<=P.size,I&=Ae>=ye*Xx[he],I&=P.eb!=null;else{P=re.f.kb,Ae=(ye+1)/2,rt=(xe+1)/2,Ne=Math.abs(P.fa),Be=Math.abs(P.Ab);var pt=Math.abs(P.Db),ze=Math.abs(P.lb),at=ze*(xe-1)+ye;I&=Ne*(xe-1)+ye<=P.Fd,I&=Be*(rt-1)+Ae<=P.Cd,I=(I&=pt*(rt-1)+Ae<=P.Ed)&Ne>=ye&Be>=Ae&pt>=Ae,I&=P.y!=null,I&=P.f!=null,I&=P.ea!=null,he==12&&(I&=ze>=ye,I&=at<=P.Tc,I&=P.F!=null)}else I=0;P=I?0:2}}return P!=0||Q!=null&&Q.fd&&(P=cf(re)),P}var vc=64,Ho=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],_o=24,Du=32,cl=8,xr=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];ve("Predictor0","PredictorAdd0"),A.Predictor0=function(){return 4278190080},A.Predictor1=function(P){return P},A.Predictor2=function(P,I,Q){return I[Q+0]},A.Predictor3=function(P,I,Q){return I[Q+1]},A.Predictor4=function(P,I,Q){return I[Q-1]},A.Predictor5=function(P,I,Q){return De(De(P,I[Q+1]),I[Q+0])},A.Predictor6=function(P,I,Q){return De(P,I[Q-1])},A.Predictor7=function(P,I,Q){return De(P,I[Q+0])},A.Predictor8=function(P,I,Q){return De(I[Q-1],I[Q+0])},A.Predictor9=function(P,I,Q){return De(I[Q+0],I[Q+1])},A.Predictor10=function(P,I,Q){return De(De(P,I[Q-1]),De(I[Q+0],I[Q+1]))},A.Predictor11=function(P,I,Q){var re=I[Q+0];return 0>=Ie(re>>24&255,P>>24&255,(I=I[Q-1])>>24&255)+Ie(re>>16&255,P>>16&255,I>>16&255)+Ie(re>>8&255,P>>8&255,I>>8&255)+Ie(255&re,255&P,255&I)?re:P},A.Predictor12=function(P,I,Q){var re=I[Q+0];return(tt((P>>24&255)+(re>>24&255)-((I=I[Q-1])>>24&255))<<24|tt((P>>16&255)+(re>>16&255)-(I>>16&255))<<16|tt((P>>8&255)+(re>>8&255)-(I>>8&255))<<8|tt((255&P)+(255&re)-(255&I)))>>>0},A.Predictor13=function(P,I,Q){var re=I[Q-1];return(Ge((P=De(P,I[Q+0]))>>24&255,re>>24&255)<<24|Ge(P>>16&255,re>>16&255)<<16|Ge(P>>8&255,re>>8&255)<<8|Ge(255&P,255&re))>>>0};var hh=A.PredictorAdd0;A.PredictorAdd1=He,ve("Predictor2","PredictorAdd2"),ve("Predictor3","PredictorAdd3"),ve("Predictor4","PredictorAdd4"),ve("Predictor5","PredictorAdd5"),ve("Predictor6","PredictorAdd6"),ve("Predictor7","PredictorAdd7"),ve("Predictor8","PredictorAdd8"),ve("Predictor9","PredictorAdd9"),ve("Predictor10","PredictorAdd10"),ve("Predictor11","PredictorAdd11"),ve("Predictor12","PredictorAdd12"),ve("Predictor13","PredictorAdd13");var md=A.PredictorAdd2;gt("ColorIndexInverseTransform","MapARGB","32b",function(P){return P>>8&255},function(P){return P}),gt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(P){return P},function(P){return P>>8&255});var ma,_c=A.ColorIndexInverseTransform,Za=A.MapARGB,Go=A.VP8LColorIndexInverseTransformAlpha,bc=A.MapAlpha,df=A.VP8LPredictorsAdd=[];df.length=16,(A.VP8LPredictors=[]).length=16,(A.VP8LPredictorsAdd_C=[]).length=16,(A.VP8LPredictors_C=[]).length=16;var ff,gd,nu,Lu,iu,wc,Sl,au,bo,Al,ei,Ai,ga,Ca,su,j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps=a(511),yd=a(2041),_m=a(225),Ox=a(76
vendor: 4,685 bytes, line 761
7617),Nx=0,A0=yd,C0=_m,Cl=Ox,Pl=ps,P0=0,M0=1,v_=2,k0=3,O0=4,N0=5,Ix=6,__=7,I0=8,D0=9,b_=10,Dx=[2,3,7],hC=[3,3,11],Lx=[280,256,256,256,40],jx=[0,1,1,1,0],pC=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],mC=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Rx=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],gC=8,w_=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],L0=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],bm=null,yC=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],$x=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Fx=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],vC=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,25
7615,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Bx=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,
7611,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],_C=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
vendor: 22,427 bytes, line 761
7615,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],bC=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],vd=[],ju=[],_d=[],zx=1,Ux=2,hf=[],Ml=[];Iu("UpsampleRgbLinePair",mc,3),Iu("UpsampleBgrLinePair",Ms,3),Iu("UpsampleRgbaLinePair",Js,4),Iu("UpsampleBgraLinePair",pd,4),Iu("UpsampleArgbLinePair",Tl,4),Iu("UpsampleRgba4444LinePair",eu,2),Iu("UpsampleRgb565LinePair",gc,2);var wC=A.UpsampleRgbLinePair,xC=A.UpsampleBgrLinePair,x_=A.UpsampleRgbaLinePair,Wx=A.UpsampleBgraLinePair,Vx=A.UpsampleArgbLinePair,E_=A.UpsampleRgba4444LinePair,EC=A.UpsampleRgb565LinePair,j0=16,wm=1<<j0-1,xm=-227,T_=482,Hx=6,TC=(256<<Hx)-1,S_=0,SC=a(256),AC=a(256),Gx=a(256),CC=a(256),PC=a(T_-xm),qx=a(T_-xm);tu("YuvToRgbRow",mc,3),tu("YuvToBgrRow",Ms,3),tu("YuvToRgbaRow",Js,4),tu("YuvToBgraRow",pd,4),tu("YuvToArgbRow",Tl,4),tu("YuvToRgba4444Row",eu,2),tu("YuvToRgb565Row",gc,2);var Kx=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],R0=[0,2,8],Yx=[8,7,6,4,4,2,2,2,1,1,1,1],MC=1;this.WebPDecodeRGBA=function(P,I,Q,re,he){var ye=M0,xe=new Tt,Ae=new kr;xe.ba=Ae,Ae.S=ye,Ae.width=[Ae.width],Ae.height=[Ae.height];var Ne=Ae.width,Be=Ae.height,rt=new rr;if(rt==null||P==null)var pt=2;else t(rt!=null),pt=yc(P,I,Q,rt.width,rt.height,rt.Pd,rt.Qd,rt.format,null);if(pt!=0?Ne=0:(Ne!=null&&(Ne[0]=rt.width[0]),Be!=null&&(Be[0]=rt.height[0]),Ne=1),Ne){Ae.width=Ae.width[0],Ae.height=Ae.height[0],re!=null&&(re[0]=Ae.width),he!=null&&(he[0]=Ae.height);e:{if(re=new us,(he=new Nt).data=P,he.w=I,he.ha=Q,he.kd=1,I=[0],t(he!=null),((P=yc(he.data,he.w,he.ha,null,null,null,I,null,he))==0||P==7)&&I[0]&&(P=4),(I=P)==0){if(t(xe!=null),re.data=he.data,re.w=he.w+he.offset,re.ha=he.ha-he.offset,re.put=Z,re.ac=Ht,re.bc=Pe,re.ma=xe,he.xa){if((P=Jn())==null){xe=1;break e}if(function(ze,at){var ut=[0],xt=[0],dt=[0];t:for(;;){if(ze==null)return 0;if(at==null)return ze.a=2,0;if(ze.l=at,ze.a=0,q(ze.m,at.data,at.w,at.ha),!ue(ze.m,ut,xt,dt)){ze.a=3;break t}if(ze.xb=Ux,at.width=ut[0],at.height=xt[0],!yn(ut[0],xt[0],1,ze,null))break t;return 1}return t(ze.a!=0),0}(P,re)){if(re=(I=ru(re.width,re.height,xe.Oa,xe.ba))==0){t:{re=P;r:for(;;){if(re==null){re=0;break t}if(t(re.s.yc!=null),t(re.s.Ya!=null),t(0<re.s.Wb),t((Q=re.l)!=null),t((he=Q.ma)!=null),re.xb!=0){if(re.ca=he.ba,re.tb=he.tb,t(re.ca!=null),!fh(he.Oa,Q,k0)){re.a=2;break r}if(!En(re,Q.width)||Q.da)break r;if((Q.da||Ot(re.ca.S))&&vo(),11>re.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),re.ca.f.kb.F!=null&&vo()),re.Pb&&0<re.s.ua&&re.s.vb.X==null&&!ne(re.s.vb,re.s.Wa.Xa)){re.a=1;break r}re.xb=0}if(!Qr(re,re.V,re.Ba,re.c,re.i,Q.o,ir))break r;he.Dc=re.Ma,re=1;break t}t(re.a!=0),re=0}re=!re}re&&(I=P.a)}else I=P.a}else{if((P=new jt)==null){xe=1;break e}if(P.Fa=he.na,P.P=he.P,P.qc=he.Sa,$n(P,re)){if((I=ru(re.width,re.height,xe.Oa,xe.ba))==0){if(P.Aa=0,Q=xe.Oa,t((he=P)!=null),Q!=null){if(0<(Ne=0>(Ne=Q.Md)?0:100<Ne?255:255*Ne/100)){for(Be=rt=0;4>Be;++Be)12>(pt=he.pb[Be]).lc&&(pt.ia=Ne*Yx[0>pt.lc?0:pt.lc]>>3),rt|=pt.ia;rt&&(alert("todo:VP8InitRandom"),he.ia=1)}he.Ga=Q.Id,100<he.Ga?he.Ga=100:0>he.Ga&&(he.Ga=0)}(function(ze,at){if(ze==null)return 0;if(at==null)return Pt(ze,2,"NULL VP8Io parameter in VP8Decode().");if(!ze.cb&&!$n(ze,at))return 0;if(t(ze.cb),at.ac==null||at.ac(at)){at.ob&&(ze.L=0);var ut=R0[ze.L];if(ze.L==2?(ze.yb=0,ze.zb=0):(ze.yb=at.v-ut>>4,ze.zb=at.j-ut>>4,0>ze.yb&&(ze.yb=0),0>ze.zb&&(ze.zb=0)),ze.Va=at.o+15+ut>>4,ze.Hb=at.va+15+ut>>4,ze.Hb>ze.za&&(ze.Hb=ze.za),ze.Va>ze.Ub&&(ze.Va=ze.Ub),0<ze.L){var xt=ze.ed;for(ut=0;4>ut;++ut){var dt;if(ze.Qa.Cb){var St=ze.Qa.Lb[ut];ze.Qa.Fb||(St+=xt.Tb)}else St=xt.Tb;for(dt=0;1>=dt;++dt){var Mt=ze.gd[ut][dt],zt=St;if(xt.Pc&&(zt+=xt.vd[0],dt&&(zt+=xt.od[0])),0<(zt=0>zt?0:63<zt?63:zt)){var Dt=zt;0<xt.wb&&(Dt=4<xt.wb?Dt>>2:Dt>>1)>9-xt.wb&&(Dt=9-xt.wb),1>Dt&&(Dt=1),Mt.dd=Dt,Mt.tc=2*zt+Dt,Mt.ld=40<=zt?2:15<=zt?1:0}else Mt.tc=0;Mt.La=dt}}}ut=0}else Pt(ze,6,"Frame setup failed"),ut=ze.a;if(ut=ut==0){if(ut){ze.$c=0,0<ze.Aa||(ze.Ic=MC);t:{ut=ze.Ic,xt=4*(Dt=ze.za);var Ur=32*Dt,Cr=Dt+1,Sn=0<ze.L?Dt*(0<ze.Aa?2:1):0,Fr=(ze.Aa==2?2:1)*Dt;if((Mt=xt+832+(dt=3*(16*ut+R0[ze.L])/2*Ur)+(St=ze.Fa!=null&&0<ze.Fa.length?ze.Kc.c*ze.Kc.i:0))!=Mt)ut=0;else{if(Mt>ze.Vb){if(ze.Vb=0,ze.Ec=a(Mt),ze.Fc=0,ze.Ec==null){ut=Pt(ze,1,"no memory during frame initialization.");break t}ze.Vb=Mt}Mt=ze.Ec,zt=ze.Fc,ze.Ac=Mt,ze.Bc=zt,zt+=xt,ze.Gd=s(Ur,gi),ze.Hd=0,ze.rb=s(Cr+1,ls),ze.sb=1,ze.wa=Sn?s(Sn,Ki):null,ze.Y=0,ze.D.Nb=0,ze.D.wa=ze.wa,ze.D.Y=ze.Y,0<ze.Aa&&(ze.D.Y+=Dt),t(!0),ze.oc=Mt,ze.pc=zt,zt+=832,ze.ya=s(Fr,sa),ze.aa=0,ze.D.ya=ze.ya,ze.D.aa=ze.aa,ze.Aa==2&&(ze.D.aa+=Dt),ze.R=16*Dt,ze.B=8*Dt,Dt=(Ur=R0[ze.L])*ze.R,Ur=Ur/2*ze.B,ze.sa=Mt,ze.ta=zt+Dt,ze.qa=ze.sa,ze.ra=ze.ta+16*ut*ze.R+Ur,ze.Ha=ze.qa,ze.Ia=ze.ra+8*ut*ze.B+Ur,ze.$c=0,zt+=dt,ze.mb=St?Mt:null,ze.nb=St?zt:null,t(zt+St<=ze.Fc+ze.Vb),El(ze),i(ze.Ac,ze.Bc,0,xt),ut=1}}if(ut){if(at.ka=0,at.y=ze.sa,at.O=ze.ta,at.f=ze.qa,at.N=ze.ra,at.ea=ze.Ha,at.Vd=ze.Ia,at.fa=ze.R,at.Rc=ze.B,at.F=null,at.J=0,!Nx){for(ut=-255;255>=ut;++ut)ps[255+ut]=0>ut?-ut:ut;for(ut=-1020;1020>=ut;++ut)yd[1020+ut]=-128>ut?-128:127<ut?127:ut;for(ut=-112;112>=ut;++ut)_m[112+ut]=-16>ut?-16:15<ut?15:ut;for(ut=-255;510>=ut;++ut)Ox[255+ut]=0>ut?0:255<ut?255:ut;Nx=1}Sl=Je,au=st,Al=se,ei=Ce,Ai=Ve,bo=sf,ga=up,Ca=dd,su=de,j=Fe,J=cp,oe=G,ge=Qe,Me=ot,nt=cd,_t=of,Lt=op,nr=lp,ju[0]=$a,ju[1]=vt,ju[2]=Ra,ju[3]=pa,ju[4]=Wi,ju[5]=ji,ju[6]=cs,ju[7]=Fa,ju[8]=Zs,ju[9]=Aa,vd[0]=Un,vd[1]=er,vd[2]=Gt,vd[3]=dr,vd[4]=Tn,vd[5]=Oi,vd[6]=di,_d[0]=oa,_d[1]=Bt,_d[2]=yo,_d[3]=ds,_d[4]=la,_d[5]=Xi,_d[6]=Ri,ut=1}else ut=0}ut&&(ut=function(qn,ms){for(qn.M=0;qn.M<qn.Va;++qn.M){var An,Br=qn.Jc[qn.M&qn.Xb],lr=qn.m,Ja=qn;for(An=0;An<Ja.za;++An){var bn=lr,Kn=Ja,ua=Kn.Ac,eo=Kn.Bc+4*An,wo=Kn.zc,Wa=Kn.ya[Kn.aa+An];if(Kn.Qa.Bb?Wa.$b=we(bn,Kn.Pa.jb[0])?2+we(bn,Kn.Pa.jb[2]):we(bn,Kn.Pa.jb[1]):Wa.$b=0,Kn.kc&&(Wa.Ad=we(bn,Kn.Bd)),Wa.Za=!we(bn,145)+0,Wa.Za){var xo=Wa.Ob,Eo=0;for(Kn=0;4>Kn;++Kn){var ks,ui=wo[0+Kn];for(ks=0;4>ks;++ks){ui=Bx[ua[eo+ks]][ui];for(var yi=Fx[we(bn,ui[0])];0<yi;)yi=Fx[2*yi+we(bn,ui[yi])];ui=-yi,ua[eo+ks]=ui}n(xo,Eo,ua,eo,4),Eo+=4,wo[0+Kn]=ui}}else ui=we(bn,156)?we(bn,128)?1:3:we(bn,163)?2:0,Wa.Ob[0]=ui,i(ua,eo,ui,4),i(wo,0,ui,4);Wa.Dd=we(bn,142)?we(bn,114)?we(bn,183)?1:3:2:0}if(Ja.m.Ka)return Pt(qn,7,"Premature end-of-partition0 encountered.");for(;qn.ja<qn.za;++qn.ja){if(Ja=Br,bn=(lr=qn).rb[lr.sb-1],ua=lr.rb[lr.sb+lr.ja],An=lr.ya[lr.aa+lr.ja],eo=lr.kc?An.Ad:0)bn.la=ua.la=0,An.Za||(bn.Na=ua.Na=0),An.Hc=0,An.Gc=0,An.ia=0;else{var Va,Ni;if(bn=ua,ua=Ja,eo=lr.Pa.Xc,wo=lr.ya[lr.aa+lr.ja],Wa=lr.pb[wo.$b],Kn=wo.ad,xo=0,Eo=lr.rb[lr.sb-1],ui=ks=0,i(Kn,xo,0,384),wo.Za)var Fs=0,ou=eo[3];else{yi=a(16);var es=bn.Na+Eo.Na;if(es=bm(ua,eo[1],es,Wa.Eb,0,yi,0),bn.Na=Eo.Na=(0<es)+0,1<es)Sl(yi,0,Kn,xo);else{var qo=yi[0]+3>>3;for(yi=0;256>yi;yi+=16)Kn[xo+yi]=qo}Fs=1,ou=eo[0]}var Vi=15&bn.la,Os=15&Eo.la;for(yi=0;4>yi;++yi){var To=1&Os;for(qo=Ni=0;4>qo;++qo)Vi=Vi>>1|(To=(es=bm(ua,ou,es=To+(1&Vi),Wa.Sc,Fs,Kn,xo))>Fs)<<7,Ni=Ni<<2|(3<es?3:1<es?2:Kn[xo+0]!=0),xo+=16;Vi>>=4,Os=Os>>1|To<<7,ks=(ks<<8|Ni)>>>0}for(ou=Vi,Fs=Os>>4,Va=0;4>Va;Va+=2){for(Ni=0,Vi=bn.la>>4+Va,Os=Eo.la>>4+Va,yi=0;2>yi;++yi){for(To=1&Os,qo=0;2>qo;++qo)es=To+(1&Vi),Vi=Vi>>1|(To=0<(es=bm(ua,eo[2],es,Wa.Qc,0,Kn,xo)))<<3,Ni=Ni<<2|(3<es?3:1<es?2:Kn[xo+0]!=0),xo+=16;Vi>>=2,Os=Os>>1|To<<5}ui|=Ni<<4*Va,ou|=Vi<<4<<Va,Fs|=(240&Os)<<Va}bn.la=ou,Eo.la=Fs,wo.Hc=ks,wo.Gc=ui,wo.ia=43690&ui?0:Wa.ia,eo=!(ks|ui)}if(0<lr.L&&(lr.wa[lr.Y+lr.ja]=lr.gd[An.$b][An.Za],lr.wa[lr.Y+lr.ja].La|=!eo),Ja.Ka)return Pt(qn,7,"Premature end-of-file encountered.")}if(El(qn),lr=ms,Ja=1,An=(Br=qn).D,bn=0<Br.L&&Br.M>=Br.zb&&Br.M<=Br.Va,Br.Aa==0)t:{if(An.M=Br.M,An.uc=bn,ul(Br,An),Ja=1,An=(Ni=Br.D).Nb,bn=(ui=R0[Br.L])*Br.R,ua=ui/2*Br.B,yi=16*An*Br.R,qo=8*An*Br.B,eo=Br.sa,wo=Br.ta-bn+yi,Wa=Br.qa,Kn=Br.ra-ua+qo,xo=Br.Ha,Eo=Br.Ia-ua+qo,Os=(Vi=Ni.M)==0,ks=Vi>=Br.Va-1,Br.Aa==2&&ul(Br,Ni),Ni.uc)for(To=(es=Br).D.M,t(es.D.uc),Ni=es.yb;Ni<es.Hb;++Ni){Fs=Ni,ou=To;var So=(kl=(to=es).D).Nb;Va=to.R;var kl=kl.wa[kl.Y+Fs],Ol=to.sa,dl=to.ta+16*So*Va+16*Fs,fl=kl.dd,Qi=kl.tc;if(Qi!=0)if(t(3<=Qi),to.L==1)0<Fs&&_t(Ol,dl,Va,Qi+4),kl.La&&nr(Ol,dl,Va,Qi),0<ou&&nt(Ol,dl,Va,Qi+4),kl.La&&Lt(Ol,dl,Va,Qi);else{var Nl=to.B,Ru=to.qa,pf=to.ra+8*So*Nl+8*Fs,bd=to.Ha,to=to.Ia+8*So*Nl+8*Fs;So=kl.ld,0<Fs&&(Ca(Ol,dl,Va,Qi+4,fl,So),j(Ru,pf,bd,to,Nl,Qi+4,fl,So)),kl.La&&(oe(Ol,dl,Va,Qi,fl,So),Me(Ru,pf,bd,to,Nl,Qi,fl,So)),0<ou&&(ga(Ol,dl,Va,Qi+4,fl,So),su(Ru,pf,bd,to,Nl,Qi+4,fl,So)),kl.La&&(J(Ol,dl,Va,Qi,fl,So),ge(Ru,pf,bd,to,Nl,Qi,fl,So))}}if(Br.ia&&alert("todo:DitherRow"),lr.put!=null){if(Ni=16*Vi,Vi=16*(Vi+1),Os?(lr.y=Br.sa,lr.O=Br.ta+yi,lr.f=Br.qa,lr.N=Br.ra+qo,lr.ea=Br.Ha,lr.W=Br.Ia+qo):(Ni-=ui,lr.y=eo,lr.O=wo,lr.f=Wa,lr.N=Kn,lr.ea=xo,lr.W=Eo),ks||(Vi-=ui),Vi>lr.o&&(Vi=lr.o),lr.F=null,lr.J=null,Br.Fa!=null&&0<Br.Fa.length&&Ni<Vi&&(lr.J=Si(Br,lr,Ni,Vi-Ni),lr.F=Br.mb,lr.F==null&&lr.F.length==0)){Ja=Pt(Br,3,"Could not decode alpha data.");break t}Ni<lr.j&&(ui=lr.j-Ni,Ni=lr.j,t(!(1&ui)),lr.O+=Br.R*ui,lr.N+=Br.B*(ui>>1),lr.W+=Br.B*(ui>>1),lr.F!=null&&(lr.J+=lr.width*ui)),Ni<Vi&&(lr.O+=lr.v,lr.N+=lr.v>>1,lr.W+=lr.v>>1,lr.F!=null&&(lr.J+=lr.v),lr.ka=Ni-lr.j,lr.U=lr.va-lr.v,lr.T=Vi-Ni,Ja=lr.put(lr))}An+1!=Br.Ic||ks||(n(Br.sa,Br.ta-bn,eo,wo+16*Br.R,bn),n(Br.qa,Br.ra-ua,Wa,Kn+8*Br.B,ua),n(Br.Ha,Br.Ia-ua,xo,Eo+8*Br.B,ua))}if(!Ja)return Pt(qn,6,"Output aborted.")}return 1}(ze,at)),at.bc!=null&&at.bc(at),ut&=1}return ut?(ze.cb=0,ut):0})(P,re)||(I=P.a)}}else I=P.a}I==0&&xe.Oa!=null&&xe.Oa.fd&&(I=cf(xe.ba))}xe=I}ye=xe!=0?null:11>ye?Ae.f.RGBA.eb:Ae.f.kb.y}else ye=null;return ye};var Xx=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(A,C){for(var k="",M=0;M<4;M++)k+=String.fromCharCode(A[C++]);return k}function c(A,C){return A[C+0]|A[C+1]<<8}function d(A,C){return(A[C+0]|A[C+1]<<8|A[C+2]<<16)>>>0}function f(A,C){return(A[C+0]|A[C+1]<<8|A[C+2]<<16|A[C+3]<<24)>>>0}new l;var h=[0],p=[0],m=[],_=new l,y=e,v=function(A,C){var k={},M=0,D=!1,$=0,V=0;if(k.frames=[],!function(O,N){for(var X=0;X<4;X++)if(O[N+X]!="RIFF".charCodeAt(X))return!0;return!1}(A,C)){for(f(A,C+=4),C+=8;C<A.length;){var U=u(A,C),B=f(A,C+=4);C+=4;var z=B+(1&B);switch(U){case"VP8 ":case"VP8L":k.frames[M]===void 0&&(k.frames[M]={}),(K=k.frames[M]).src_off=D?V:C-8,K.src_size=$+B+8,M++,D&&(D=!1,$=0,V=0);break;case"VP8X":(K=k.header={}).feature_flags=A[C];var q=C+4;K.canvas_width=1+d(A,q),q+=3,K.canvas_height=1+d(A,q),q+=3;break;case"ALPH":D=!0,$=z+8,V=C-8;break;case"ANIM":(K=k.header).bgcolor=f(A,C),q=C+4,K.loop_count=c(A,q),q+=2;break;case"ANMF":var L,K;(K=k.frames[M]={}).offset_x=2*d(A,C),C+=3,K.offset_y=2*d(A,C),C+=3,K.width=1+d(A,C),C+=3,K.height=1+d(A,C),C+=3,K.duration=d(A,C),C+=3,L=A[C++],K.dispose=1&L,K.blend=L>>1&1}U!="ANMF"&&(C+=z)}return k}}(y,0);v.response=y,v.rgbaoutput=!0,v.dataurl=!1;var b=v.header?v.header:null,w=v.frames?v.frames:null;if(b){b.loop_counter=b.loop_count,h=[b.canvas_height],p=[b.canvas_width];for(var x=0;x<w.length&&w[x].blend!=0;x++);}var E=w[0],T=_.WebPDecodeRGBA(y,E.src_off,E.src_size,p,h);E.rgba=T,E.imgwidth=p[0],E.imgheight=h[0];for(var S=0;S<p[0]*h[0]*4;S++)m[S]=T[S];return this.width=p,this.height=h,this.data=m,this}(function(e){var t,r,n,i,a,s,o,l,u,c=function(O){return O=O||{},this.isStrokeTransparent=O.isStrokeTransparent||!1,this.strokeOpacity=O.strokeOpacity||1,this.strokeStyle=O.strokeStyle||"#000000",this.fillStyle=O.fillStyle||"#000000",this.isFillTransparent=O.isFillTransparent||!1,this.fillOpacity=O.fillOpacity||1,this.font=O.font||"10px sans-serif",this.textBaseline=O.textBaseline||"alphabetic",this.textAlign=O.textAlign||"left",this.lineWidth=O.lineWidth||1,this.lineJoin=O.lineJoin||"miter",this.lineCap=O.lineCap||"butt",this.path=O.path||[],this.transform=O.transform!==void 0?O.transform.clone():new l,this.globalCompositeOperation=O.globalCompositeOperation||"normal",this.globalAlpha=O.globalAlpha||1,this.clip_path=O.clip_path||[],this.currentPoint=O.currentPoint||new s,this.miterLimit=O.miterLimit||10,this.lastPoint=O.lastPoint||new s,this.lineDashOffset=O.lineDashOffset||0,this.lineDash=O.lineDash||[],this.margin=O.margin||[0,0,0,0],this.prevPageLastElemOffset=O.prevPageLastElemOffset||0,this.ignoreClearRect=typeof O.ignoreClearRect!="boolean"||O.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new d(this),t=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,s=this.internal.Point,o=this.internal.Rectangle,l=this.internal.Matrix,u=new c}]);var d=function(O){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var N=O;Object.defineProperty(this,"pdf",{get:function(){return N}});var X=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return X},set:function(ne){X=!!ne}});var ie=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return ie},set:function(ne){ie=!!ne}});var ee=0;Object.defineProperty(this,"posX",{get:function(){return ee},set:function(ne){isNaN(ne)||(ee=ne)}});var le=0;Object.defineProperty(this,"posY",{get:function(){return le},set:function(ne){isNaN(ne)||(le=ne)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(ne){var $e;typeof ne=="number"?$e=[ne,ne,ne,ne]:(($e=new Array(4))[0]=ne[0],$e[1]=ne.length>=2?ne[1]:$e[0],$e[2]=ne.length>=3?ne[2]:$e[0],$e[3]=ne.length>=4?ne[3]:$e[1]),u.margin=$e}});var Te=!1;Object.defineProperty(this,"autoPaging",{get:function(){return Te},set:function(ne){Te=ne}});var be=0;Object.defineProperty(this,"lastBreak",{get:function(){return be},set:function(ne){be=ne}});var we=[];Object.defineProperty(this,"pageBreaks",{get:function(){return we},set:function(ne){we=ne}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(ne){ne instanceof c&&(u=ne)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(ne){u.path=ne}});var ae=[];Object.defineProperty(this,"ctxStack",{get:function(){return ae},set:function(ne){ae=ne}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(ne){var $e;$e=f(ne),this.ctx.fillStyle=$e.style,this.ctx.isFillTransparent=$e.a===0,this.ctx.fillOpacity=$e.a,this.pdf.setFillColor($e.r,$e.g,$e.b,{a:$e.a}),this.pdf.setTextColor($e.r,$e.g,$e.b,{a:$e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(ne){var $e=f(ne);this.ctx.strokeStyle=$e.style,this.ctx.isStrokeTransparent=$e.a===0,this.ctx.strokeOpacity=$e.a,$e.a===0?this.pdf.setDrawColor(255,255,255):($e.a,this.pdf.setDrawColor($e.r,$e.g,$e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(ne){["butt","round","square"].indexOf(ne)!==-1&&(this.ctx.lineCap=ne,this.pdf.setLineCap(ne))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(ne){isNaN(ne)||(this.ctx.lineWidth=ne,this.pdf.setLineWidth(ne))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(ne){["bevel","round","miter"].indexOf(ne)!==-1&&(this.ctx.lineJoin=ne,this.pdf.setLineJoin(ne))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(ne){isNaN(ne)||(this.ctx.miterLimit=ne,this.pdf.setMiterLimit(ne))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(ne){this.ctx.textBaseline=ne}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(ne){["right","end","center","left","start"].indexOf(ne)!==-1&&(this.ctx.textAlign=ne)}});var H=null,fe=null,Se=null;Object.defineProperty(this,"fontFaces",{get:function(){return Se},set:function(ne){H=null,fe=null,Se=ne}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(ne){var $e;if(this.ctx.font=ne,($e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(ne))!==null){var me=$e[1];$e[2];var Ue=$e[3],ke=$e[4];$e[5];var ce=$e[6],ve=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(ke)[2];ke=Math.floor(ve==="px"?parseFloat(ke)*this.pdf.internal.scaleFactor:ve==="em"?parseFloat(ke)*this.pdf.getFontSize():parseFloat(ke)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(ke);var Re=function(gt){var $t,kt,Zt=[],fr=gt.trim();if(fr==="")return qL;if(fr in Ure)return[Ure[fr]];for(;fr!=="";){switch(kt=null,$t=(fr=Vre(fr)).charAt(0)){case'"':case"'":kt=u1t(fr.substring(1),$t);break;default:kt=c1t(fr)}if(kt===null||(Zt.push(kt[0]),(fr=Vre(kt[1]))!==""&&fr.charAt(0)!==","))return qL;fr=fr.replace(/^,/,"")}return Zt}(ce);if(this.fontFaces){var De=function(gt,$t){var kt=gt.getFontList(),Zt=JSON.stringify(kt);if(H===null||fe!==Zt){var fr=function(yr){var Kt=[];return Object.keys(yr).forEach(function(pr){yr[pr].forEach(function(Ot){var Ir=null;switch(Ot){case"bold":Ir={family:pr,weight:"bold"};break;case"italic":Ir={family:pr,style:"italic"};break;case"bolditalic":Ir={family:pr,weight:"bold",style:"italic"};break;case"":case"normal":Ir={family:pr}}Ir!==null&&(Ir.ref={name:pr,style:Ot},Kt.push(Ir))})}),Kt}(kt);H=function(yr){for(var Kt={},pr=0;pr<yr.length;++pr){var Ot=GL(yr[pr]),Ir=Ot.family,cn=Ot.stretch,kr=Ot.style,rr=Ot.weight;Kt[Ir]=Kt[Ir]||{},Kt[Ir][cn]=Kt[Ir][cn]||{},Kt[Ir][cn][kr]=Kt[Ir][cn][kr]||{},Kt[Ir][cn][kr][rr]=Ot}return Kt}(fr.concat($t)),fe=Zt}return H}(this.pdf,this.fontFaces),tt=Re.map(function(gt){return{family:gt,stretch:"normal",weight:Ue,style:me}}),Ge=function(gt,$t,kt){for(var Zt=(kt=kt||{}).defaultFontFamily||"times",fr=Object.assign({},l1t,kt.genericFontFamilies||{}),yr=null,Kt=null,pr=0;pr<$t.length;++pr)if(fr[(yr=GL($t[pr])).family]&&(yr.family=fr[yr.family]),gt.hasOwnProperty(yr.family)){Kt=gt[yr.family];break}if(!(Kt=Kt||gt[Zt]))throw new Error("Could not find a font-family for the rule '"+Wre(yr)+"' and default family '"+Zt+"'.");if(Kt=function(Ot,Ir){if(Ir[Ot])return Ir[Ot];var cn=W8[Ot],kr=cn<=W8.normal?-1:1,rr=zre(Ir,rxe,cn,kr);if(!rr)throw new Error("Could not find a matching font-stretch value for "+Ot);return rr}(yr.stretch,Kt),Kt=function(Ot,Ir){if(Ir[Ot])return Ir[Ot];for(var cn=txe[Ot],kr=0;kr<cn.length;++kr)if(Ir[cn[kr]])return Ir[cn[kr]];throw new Error("Could not find a matching font-style for "+Ot)}(yr.style,Kt),!(Kt=function(Ot,Ir){if(Ir[Ot])return Ir[Ot];if(Ot===400&&Ir[500])return Ir[500];if(Ot===500&&Ir[400])return Ir[400];var cn=o1t[Ot],kr=zre(Ir,nxe,cn,Ot<400?-1:1);if(!kr)throw new Error("Could not find a matching font-weight for value "+Ot);return kr}(yr.weight,Kt)))throw new Error("Failed to resolve a font for the rule '"+Wre(yr)+"'.");return Kt}(De,tt);this.pdf.setFont(Ge.ref.name,Ge.ref.style)}else{var Ie="";(Ue==="bold"||parseInt(Ue,10)>=700||me==="bold")&&(Ie="bold"),me==="italic"&&(Ie+="italic"),Ie.length===0&&(Ie="normal");for(var He="",Ke={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Xe=0;Xe<Re.length;Xe++){if(this.pdf.internal.getFont(Re[Xe],Ie,{noFallback:!0,disableWarning:!0})!==void 0){He=Re[Xe];break}if(Ie==="bolditalic"&&this.pdf.internal.getFont(Re[Xe],"bold",{noFallback:!0,disableWarning:!0})!==void 0)He=Re[Xe],Ie="bold";else if(this.pdf.internal.getFont(Re[Xe],"normal",{noFallback:!0,disableWarning:!0})!==void 0){He=Re[Xe],Ie="normal";break}}if(He===""){for(var mt=0;mt<Re.length;mt++)if(Ke[Re[mt]]){He=Ke[Re[mt]];break}}He=He===""?"Times":He,this.pdf.setFont(He,Ie)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(ne){this.ctx.globalCompositeOperation=ne}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(ne){this.ctx.globalAlpha=ne}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(ne){this.ctx.lineDashOffset=ne,K.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(ne){this.ctx.lineDash=ne,K.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(ne){this.ctx.ignoreClearRect=!!ne}})};d.prototype.setLineDash=function(O){this.lineDash=O},d.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},d.prototype.fill=function(){w.call(this,"fill",!1)},d.prototype.stroke=function(){w.call(this,"stroke",!1)},d.prototype.beginPath=function(){this.path=[{type:"begin"}]},d.prototype.moveTo=function(O,N){if(isNaN(O)||isNaN(N))throw ya.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var X=this.ctx.transform.applyToPoint(new s(O,N));this.path.push({type:"mt",x:X.x,y:X.y}),this.ctx.lastPoint=new s(O,N)},d.prototype.closePath=function(){var O=new s(0,0),N=0;for(N=this.path.length-1;N!==-1;N--)if(this.path[N].type==="begin"&&ra(this.path[N+1])==="object"&&typeof this.path[N+1].x=="number"){O=new s(this.path[N+1].x,this.path[N+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(O.x,O.y)},d.prototype.lineTo=function(O,N){if(isNaN(O)||isNaN(N))throw ya.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to
761jsPDF.context2d.lineTo");var X=this.ctx.transform.applyToPoint(new s(O,N));this.path.push({type:"lt",x:X.x,y:X.y}),this.ctx.lastPoint=new s(X.x,X.y)},d.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),w.call(this,null,!0)},d.prototype.quadraticCurveTo=function(O,N,X,ie){if(isNaN(X)||isNaN(ie)||isNaN(O)||isNaN(N))throw ya.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ee=this.ctx.transform.applyToPoint(new s(X,ie)),le=this.ctx.transform.applyToPoint(new s(O,N));this.path.push({type:"qct",x1:le.x,y1:le.y,x:ee.x,y:ee.y}),this.ctx.lastPoint=new s(ee.x,ee.y)},d.prototype.bezierCurveTo=function(O,N,X,ie,ee,le){if(isNaN(ee)||isNaN(le)||isNaN(O)||isNaN(N)||isNaN(X)||isNaN(ie))throw ya.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var Te=this.ctx.transform.applyToPoint(new s(ee,le)),be=this.ctx.transform.applyToPoint(new s(O,N)),we=this.ctx.transform.applyToPoint(new s(X,ie));this.path.push({type:"bct",x1:be.x,y1:be.y,x2:we.x,y2:we.y,x:Te.x,y:Te.y}),this.ctx.lastPoint=new s(Te.x,Te.y)},d.prototype.arc=function(O,N,X,ie,ee,le){if(isNaN(O)||isNaN(N)||isNaN(X)||isNaN(ie)||isNaN(ee))throw ya.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(le=!!le,!this.ctx.transform.isIdentity){var Te=this.ctx.transform.applyToPoint(new s(O,N));O=Te.x,N=Te.y;var be=this.ctx.transform.applyToPoint(new s(0,X)),we=this.ctx.transform.applyToPoint(new s(0,0));X=Math.sqrt(Math.pow(be.x-we.x,2)+Math.pow(be.y-we.y,2))}Math.abs(ee-ie)>=2*Math.PI&&(ie=0,ee=2*Math.PI),this.path.push({type:"arc",x:O,y:N,radius:X,startAngle:ie,endAngle:ee,counterclockwise:le})},d.prototype.arcTo=function(O,N,X,ie,ee){throw new Error("arcTo not implemented.")},d.prototype.rect=function(O,N,X,ie){if(isNaN(O)||isNaN(N)||isNaN(X)||isNaN(ie))throw ya.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(O,N),this.lineTo(O+X,N),this.lineTo(O+X,N+ie),this.lineTo(O,N+ie),this.lineTo(O,N),this.lineTo(O+X,N),this.lineTo(O,N)},d.prototype.fillRect=function(O,N,X,ie){if(isNaN(O)||isNaN(N)||isNaN(X)||isNaN(ie))throw ya.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!h.call(this)){var ee={};this.lineCap!=="butt"&&(ee.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ee.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(O,N,X,ie),this.fill(),ee.hasOwnProperty("lineCap")&&(this.lineCap=ee.lineCap),ee.hasOwnProperty("lineJoin")&&(this.lineJoin=ee.lineJoin)}},d.prototype.strokeRect=function(O,N,X,ie){if(isNaN(O)||isNaN(N)||isNaN(X)||isNaN(ie))throw ya.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(O,N,X,ie),this.stroke())},d.prototype.clearRect=function(O,N,X,ie){if(isNaN(O)||isNaN(N)||isNaN(X)||isNaN(ie))throw ya.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(O,N,X,ie))},d.prototype.save=function(O){O=typeof O!="boolean"||O;for(var N=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("q");if(this.pdf.setPage(N),O){this.ctx.fontSize=this.pdf.internal.getFontSize();var ie=new c(this.ctx);this.ctxStack.push(this.ctx),this.ctx=ie}},d.prototype.restore=function(O){O=typeof O!="boolean"||O;for(var N=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("Q");this.pdf.setPage(N),O&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},d.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(O){var N,X,ie,ee;if(O.isCanvasGradient===!0&&(O=O.getColor()),!O)return{r:0,g:0,b:0,a:0,style:O};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(O))N=0,X=0,ie=0,ee=0;else{var le=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(O);if(le!==null)N=parseInt(le[1]),X=parseInt(le[2]),ie=parseInt(le[3]),ee=1;else if((le=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(O))!==null)N=parseInt(le[1]),X=parseInt(le[2]),ie=parseInt(le[3]),ee=parseFloat(le[4]);else{if(ee=1,typeof O=="string"&&O.charAt(0)!=="#"){var Te=new Kwe(O);O=Te.ok?Te.toHex():"#000000"}
vendor: 51,632 bytes, lines 761-769
761O.length===4?(N=O.substring(1,2),N+=N,X=O.substring(2,3),X+=X,ie=O.substring(3,4),ie+=ie):(N=O.substring(1,3),X=O.substring(3,5),ie=O.substring(5,7)),N=parseInt(N,16),X=parseInt(X,16),ie=parseInt(ie,16)}}return{r:N,g:X,b:ie,a:ee,style:O}},h=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};d.prototype.fillText=function(O,N,X,ie){if(isNaN(N)||isNaN(X)||typeof O!="string")throw ya.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(ie=isNaN(ie)?void 0:ie,!h.call(this)){var ee=z(this.ctx.transform.rotation),le=this.ctx.transform.scaleX;M.call(this,{text:O,x:N,y:X,scale:le,angle:ee,align:this.textAlign,maxWidth:ie})}},d.prototype.strokeText=function(O,N,X,ie){if(isNaN(N)||isNaN(X)||typeof O!="string")throw ya.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){ie=isNaN(ie)?void 0:ie;var ee=z(this.ctx.transform.rotation),le=this.ctx.transform.scaleX;M.call(this,{text:O,x:N,y:X,scale:le,renderingMode:"stroke",angle:ee,align:this.textAlign,maxWidth:ie})}},d.prototype.measureText=function(O){if(typeof O!="string")throw ya.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var N=this.pdf,X=this.pdf.internal.scaleFactor,ie=N.internal.getFontSize(),ee=N.getStringUnitWidth(O)*ie/N.internal.scaleFactor;return new function(le){var Te=(le=le||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return Te}}),this}({width:ee*=Math.round(96*X/72*1e4)/1e4})},d.prototype.scale=function(O,N){if(isNaN(O)||isNaN(N))throw ya.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var X=new l(O,0,0,N,0,0);this.ctx.transform=this.ctx.transform.multiply(X)},d.prototype.rotate=function(O){if(isNaN(O))throw ya.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var N=new l(Math.cos(O),Math.sin(O),-Math.sin(O),Math.cos(O),0,0);this.ctx.transform=this.ctx.transform.multiply(N)},d.prototype.translate=function(O,N){if(isNaN(O)||isNaN(N))throw ya.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var X=new l(1,0,0,1,O,N);this.ctx.transform=this.ctx.transform.multiply(X)},d.prototype.transform=function(O,N,X,ie,ee,le){if(isNaN(O)||isNaN(N)||isNaN(X)||isNaN(ie)||isNaN(ee)||isNaN(le))throw ya.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var Te=new l(O,N,X,ie,ee,le);this.ctx.transform=this.ctx.transform.multiply(Te)},d.prototype.setTransform=function(O,N,X,ie,ee,le){O=isNaN(O)?1:O,N=isNaN(N)?0:N,X=isNaN(X)?0:X,ie=isNaN(ie)?1:ie,ee=isNaN(ee)?0:ee,le=isNaN(le)?0:le,this.ctx.transform=new l(O,N,X,ie,ee,le)};var m=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(O,N,X,ie,ee,le,Te,be,we){var ae=this.pdf.getImageProperties(O),H=1,fe=1,Se=1,ne=1;ie!==void 0&&be!==void 0&&(Se=be/ie,ne=we/ee,H=ae.width/ie*be/ie,fe=ae.height/ee*we/ee),le===void 0&&(le=N,Te=X,N=0,X=0),ie!==void 0&&be===void 0&&(be=ie,we=ee),ie===void 0&&be===void 0&&(be=ae.width,we=ae.height);var $e=this.ctx.transform.decompose(),me=z($e.rotate.shx),Ue=new l,ke=(Ue=(Ue=(Ue=Ue.multiply($e.translate)).multiply($e.skew)).multiply($e.scale)).applyToRectangle(new o(le-N*Se,Te-X*ne,ie*H,ee*fe));if(this.autoPaging){for(var ce,ve=_.call(this,ke),Re=[],De=0;De<ve.length;De+=1)Re.indexOf(ve[De])===-1&&Re.push(ve[De]);b(Re);for(var tt=Re[0],Ge=Re[Re.length-1],Ie=tt;Ie<Ge+1;Ie++){this.pdf.setPage(Ie);var He=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ke=Ie===1?this.posY+this.margin[0]:this.margin[0],Xe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],mt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],gt=Ie===1?0:Xe+(Ie-2)*mt;if(this.ctx.clip_path.length!==0){var $t=this.path;ce=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(ce,this.posX+this.margin[3],-gt+Ke+this.ctx.prevPageLastElemOffset),x.call(this,"fill",!0),this.path=$t}var kt=JSON.parse(JSON.stringify(ke));kt=v([kt],this.posX+this.margin[3],-gt+Ke+this.ctx.prevPageLastElemOffset)[0];var Zt=(Ie>tt||Ie<Ge)&&m.call(this);Zt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],He,mt,null).clip().discardPath()),this.pdf.addImage(O,"JPEG",kt.x,kt.y,kt.w,kt.h,null,null,me),Zt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(O,"JPEG",ke.x,ke.y,ke.w,ke.h,null,null,me)};var _=function(O,N,X){var ie=[];N=N||this.pdf.internal.pageSize.width,X=X||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ee=this.posY+this.ctx.prevPageLastElemOffset;switch(O.type){default:case"mt":case"lt":ie.push(Math.floor((O.y+ee)/X)+1);break;case"arc":ie.push(Math.floor((O.y+ee-O.radius)/X)+1),ie.push(Math.floor((O.y+ee+O.radius)/X)+1);break;case"qct":var le=q(this.ctx.lastPoint.x,this.ctx.lastPoint.y,O.x1,O.y1,O.x,O.y);ie.push(Math.floor((le.y+ee)/X)+1),ie.push(Math.floor((le.y+le.h+ee)/X)+1);break;case"bct":var Te=L(this.ctx.lastPoint.x,this.ctx.lastPoint.y,O.x1,O.y1,O.x2,O.y2,O.x,O.y);ie.push(Math.floor((Te.y+ee)/X)+1),ie.push(Math.floor((Te.y+Te.h+ee)/X)+1);break;case"rect":ie.push(Math.floor((O.y+ee)/X)+1),ie.push(Math.floor((O.y+O.h+ee)/X)+1)}for(var be=0;be<ie.length;be+=1)for(;this.pdf.internal.getNumberOfPages()<ie[be];)y.call(this);return ie},y=function(){var O=this.fillStyle,N=this.strokeStyle,X=this.font,ie=this.lineCap,ee=this.lineWidth,le=this.lineJoin;this.pdf.addPage(),this.fillStyle=O,this.strokeStyle=N,this.font=X,this.lineCap=ie,this.lineWidth=ee,this.lineJoin=le},v=function(O,N,X){for(var ie=0;ie<O.length;ie++)switch(O[ie].type){case"bct":O[ie].x2+=N,O[ie].y2+=X;case"qct":O[ie].x1+=N,O[ie].y1+=X;default:O[ie].x+=N,O[ie].y+=X}return O},b=function(O){return O.sort(function(N,X){return N-X})},w=function(O,N){var X=this.fillStyle,ie=this.strokeStyle,ee=this.lineCap,le=this.lineWidth,Te=Math.abs(le*this.ctx.transform.scaleX),be=this.lineJoin;if(this.autoPaging){for(var we,ae,H=JSON.parse(JSON.stringify(this.path)),fe=JSON.parse(JSON.stringify(this.path)),Se=[],ne=0;ne<fe.length;ne++)if(fe[ne].x!==void 0)for(var $e=_.call(this,fe[ne]),me=0;me<$e.length;me+=1)Se.indexOf($e[me])===-1&&Se.push($e[me]);for(var Ue=0;Ue<Se.length;Ue++)for(;this.pdf.internal.getNumberOfPages()<Se[Ue];)y.call(this);b(Se);for(var ke=Se[0],ce=Se[Se.length-1],ve=ke;ve<ce+1;ve++){this.pdf.setPage(ve),this.fillStyle=X,this.strokeStyle=ie,this.lineCap=ee,this.lineWidth=Te,this.lineJoin=be;var Re=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],De=ve===1?this.posY+this.margin[0]:this.margin[0],tt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ge=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ie=ve===1?0:tt+(ve-2)*Ge;if(this.ctx.clip_path.length!==0){var He=this.path;we=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(we,this.posX+this.margin[3],-Ie+De+this.ctx.prevPageLastElemOffset),x.call(this,O,!0),this.path=He}if(ae=JSON.parse(JSON.stringify(H)),this.path=v(ae,this.posX+this.margin[3],-Ie+De+this.ctx.prevPageLastElemOffset),N===!1||ve===0){var Ke=(ve>ke||ve<ce)&&m.call(this);Ke&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Re,Ge,null).clip().discardPath()),x.call(this,O,N),Ke&&this.pdf.restoreGraphicsState()}this.lineWidth=le}this.path=H}else this.lineWidth=Te,x.call(this,O,N),this.lineWidth=le},x=function(O,N){if((O!=="stroke"||N||!p.call(this))&&(O==="stroke"||N||!h.call(this))){for(var X,ie,ee=[],le=this.path,Te=0;Te<le.length;Te++){var be=le[Te];switch(be.type){case"begin":ee.push({begin:!0});break;case"close":ee.push({close:!0});break;case"mt":ee.push({start:be,deltas:[],abs:[]});break;case"lt":var we=ee.length;if(le[Te-1]&&!isNaN(le[Te-1].x)&&(X=[be.x-le[Te-1].x,be.y-le[Te-1].y],we>0)){for(;we>=0;we--)if(ee[we-1].close!==!0&&ee[we-1].begin!==!0){ee[we-1].deltas.push(X),ee[we-1].abs.push(be);break}}break;case"bct":X=[be.x1-le[Te-1].x,be.y1-le[Te-1].y,be.x2-le[Te-1].x,be.y2-le[Te-1].y,be.x-le[Te-1].x,be.y-le[Te-1].y],ee[ee.length-1].deltas.push(X);break;case"qct":var ae=le[Te-1].x+2/3*(be.x1-le[Te-1].x),H=le[Te-1].y+2/3*(be.y1-le[Te-1].y),fe=be.x+2/3*(be.x1-be.x),Se=be.y+2/3*(be.y1-be.y),ne=be.x,$e=be.y;X=[ae-le[Te-1].x,H-le[Te-1].y,fe-le[Te-1].x,Se-le[Te-1].y,ne-le[Te-1].x,$e-le[Te-1].y],ee[ee.length-1].deltas.push(X);break;case"arc":ee.push({deltas:[],abs:[],arc:!0}),Array.isArray(ee[ee.length-1].abs)&&ee[ee.length-1].abs.push(be)}}ie=N?null:O==="stroke"?"stroke":"fill";for(var me=!1,Ue=0;Ue<ee.length;Ue++)if(ee[Ue].arc)for(var ke=ee[Ue].abs,ce=0;ce<ke.length;ce++){var ve=ke[ce];ve.type==="arc"?S.call(this,ve.x,ve.y,ve.radius,ve.startAngle,ve.endAngle,ve.counterclockwise,void 0,N,!me):D.call(this,ve.x,ve.y),me=!0}else if(ee[Ue].close===!0)this.pdf.internal.out("h"),me=!1;else if(ee[Ue].begin!==!0){var Re=ee[Ue].start.x,De=ee[Ue].start.y;$.call(this,ee[Ue].deltas,Re,De),me=!0}ie&&A.call(this,ie),N&&C.call(this)}},E=function(O){var N=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,X=N*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return O-X;case"top":return O+N-X;case"hanging":return O+N-2*X;case"middle":return O+N/2-X;default:return O}},T=function(O){return O+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};d.prototype.createLinearGradient=function(){var O=function(){};return O.colorStops=[],O.addColorStop=function(N,X){this.colorStops.push([N,X])},O.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},O.isCanvasGradient=!0,O},d.prototype.createPattern=function(){return this.createLinearGradient()},d.prototype.createRadialGradient=function(){return this.createLinearGradient()};var S=function(O,N,X,ie,ee,le,Te,be,we){for(var ae=U.call(this,X,ie,ee,le),H=0;H<ae.length;H++){var fe=ae[H];H===0&&(we?k.call(this,fe.x1+O,fe.y1+N):D.call(this,fe.x1+O,fe.y1+N)),V.call(this,O,N,fe.x2,fe.y2,fe.x3,fe.y3,fe.x4,fe.y4)}be?C.call(this):A.call(this,Te)},A=function(O){switch(O){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},C=function(){this.pdf.clip(),this.pdf.discardPath()},k=function(O,N){this.pdf.internal.out(r(O)+" "+n(N)+" m")},M=function(O){var N;switch(O.align){case"right":case"end":N="right";break;case"center":N="center";break;default:N="left"}var X,ie,ee,le=this.pdf.getTextDimensions(O.text),Te=E.call(this,O.y),be=T.call(this,Te)-le.h,we=this.ctx.transform.applyToPoint(new s(O.x,Te));if(this.autoPaging){var ae=this.ctx.transform.decompose(),H=new l;H=(H=(H=H.multiply(ae.translate)).multiply(ae.skew)).multiply(ae.scale);for(var fe=this.ctx.transform.applyToRectangle(new o(O.x,Te,le.w,le.h)),Se=H.applyToRectangle(new o(O.x,be,le.w,le.h)),ne=_.call(this,Se),$e=[],me=0;me<ne.length;me+=1)$e.indexOf(ne[me])===-1&&$e.push(ne[me]);b($e);for(var Ue=$e[0],ke=$e[$e.length-1],ce=Ue;ce<ke+1;ce++){this.pdf.setPage(ce);var ve=ce===1?this.posY+this.margin[0]:this.margin[0],Re=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],De=this.pdf.internal.pageSize.height-this.margin[2],tt=De-this.margin[0],Ge=this.pdf.internal.pageSize.width-this.margin[1],Ie=Ge-this.margin[3],He=ce===1?0:Re+(ce-2)*tt;if(this.ctx.clip_path.length!==0){var Ke=this.path;X=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(X,this.posX+this.margin[3],-1*He+ve),x.call(this,"fill",!0),this.path=Ke}var Xe=v([JSON.parse(JSON.stringify(Se))],this.posX+this.margin[3],-He+ve+this.ctx.prevPageLastElemOffset)[0];O.scale>=.01&&(ie=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ie*O.scale),ee=this.lineWidth,this.lineWidth=ee*O.scale);var mt=this.autoPaging!=="text";if(mt||Xe.y+Xe.h<=De){if(mt||Xe.y>=ve&&Xe.x<=Ge){var gt=mt?O.text:this.pdf.splitTextToSize(O.text,O.maxWidth||Ge-Xe.x)[0],$t=v([JSON.parse(JSON.stringify(fe))],this.posX+this.margin[3],-He+ve+this.ctx.prevPageLastElemOffset)[0],kt=mt&&(ce>Ue||ce<ke)&&m.call(this);kt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ie,tt,null).clip().discardPath()),this.pdf.text(gt,$t.x,$t.y,{angle:O.angle,align:N,renderingMode:O.renderingMode}),kt&&this.pdf.restoreGraphicsState()}}else Xe.y<De&&(this.ctx.prevPageLastElemOffset+=De-Xe.y);O.scale>=.01&&(this.pdf.setFontSize(ie),this.lineWidth=ee)}}else O.scale>=.01&&(ie=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ie*O.scale),ee=this.lineWidth,this.lineWidth=ee*O.scale),this.pdf.text(O.text,we.x+this.posX,we.y+this.posY,{angle:O.angle,align:N,renderingMode:O.renderingMode,maxWidth:O.maxWidth}),O.scale>=.01&&(this.pdf.setFontSize(ie),this.lineWidth=ee)},D=function(O,N,X,ie){X=X||0,ie=ie||0,this.pdf.internal.out(r(O+X)+" "+n(N+ie)+" l")},$=function(O,N,X){return this.pdf.lines(O,N,X,null,null)},V=function(O,N,X,ie,ee,le,Te,be){this.pdf.internal.out([t(i(X+O)),t(a(ie+N)),t(i(ee+O)),t(a(le+N)),t(i(Te+O)),t(a(be+N)),"c"].join(" "))},U=function(O,N,X,ie){for(var ee=2*Math.PI,le=Math.PI/2;N>X;)N-=ee;var Te=Math.abs(X-N);Te<ee&&ie&&(Te=ee-Te);for(var be=[],we=ie?-1:1,ae=N;Te>1e-5;){var H=ae+we*Math.min(Te,le);be.push(B.call(this,O,ae,H)),Te-=Math.abs(H-ae),ae=H}return be},B=function(O,N,X){var ie=(X-N)/2,ee=O*Math.cos(ie),le=O*Math.sin(ie),Te=ee,be=-le,we=Te*Te+be*be,ae=we+Te*ee+be*le,H=4/3*(Math.sqrt(2*we*ae)-ae)/(Te*le-be*ee),fe=Te-H*be,Se=be+H*Te,ne=fe,$e=-Se,me=ie+N,Ue=Math.cos(me),ke=Math.sin(me);return{x1:O*Math.cos(N),y1:O*Math.sin(N),x2:fe*Ue-Se*ke,y2:fe*ke+Se*Ue,x3:ne*Ue-$e*ke,y3:ne*ke+$e*Ue,x4:O*Math.cos(X),y4:O*Math.sin(X)}},z=function(O){return 180*O/Math.PI},q=function(O,N,X,ie,ee,le){var Te=O+.5*(X-O),be=N+.5*(ie-N),we=ee+.5*(X-ee),ae=le+.5*(ie-le),H=Math.min(O,ee,Te,we),fe=Math.max(O,ee,Te,we),Se=Math.min(N,le,be,ae),ne=Math.max(N,le,be,ae);return new o(H,Se,fe-H,ne-Se)},L=function(O,N,X,ie,ee,le,Te,be){var we,ae,H,fe,Se,ne,$e,me,Ue,ke,ce,ve,Re,De,tt=X-O,Ge=ie-N,Ie=ee-X,He=le-ie,Ke=Te-ee,Xe=be-le;for(ae=0;ae<41;ae++)Ue=($e=(H=O+(we=ae/40)*tt)+we*((Se=X+we*Ie)-H))+we*(Se+we*(ee+we*Ke-Se)-$e),ke=(me=(fe=N+we*Ge)+we*((ne=ie+we*He)-fe))+we*(ne+we*(le+we*Xe-ne)-me),ae==0?(ce=Ue,ve=ke,Re=Ue,De=ke):(ce=Math.min(ce,Ue),ve=Math.min(ve,ke),Re=Math.max(Re,Ue),De=Math.max(De,ke));return new o(Math.round(ce),Math.round(ve),Math.round(Re-ce),Math.round(De-ve))},K=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var O,N,X=(O=this.ctx.lineDash,N=this.ctx.lineDashOffset,JSON.stringify({lineDash:O,lineDashOffset:N}));this.prevLineDash!==X&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=X)}}})(qr.API),function(e){var t=function(s){var o,l,u,c,d,f,h,p,m,_;for(l=[],u=0,c=(s+=o="\0\0\0\0".slice(s.length%4||4)).length;c>u;u+=4)(d=(s.charCodeAt(u)<<24)+(s.charCodeAt(u+1)<<16)+(s.charCodeAt(u+2)<<8)+s.charCodeAt(u+3))!==0?(f=(d=((d=((d=((d=(d-(_=d%85))/85)-(m=d%85))/85)-(p=d%85))/85)-(h=d%85))/85)%85,l.push(f+33,h+33,p+33,m+33,_+33)):l.push(122);return function(y,v){for(var b=v;b>0;b--)y.pop()}(l,o.length),String.fromCharCode.apply(String,l)+"~>"},r=function(s){var o,l,u,c,d,f=String,h="length",p=255,m="charCodeAt",_="slice",y="replace";for(s[_](-2),s=s[_](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),u=[],c=0,d=(s+=o="uuuuu"[_](s[h]%5||5))[h];d>c;c+=5)l=52200625*(s[m](c)-33)+614125*(s[m](c+1)-33)+7225*(s[m](c+2)-33)+85*(s[m](c+3)-33)+(s[m](c+4)-33),u.push(p&l>>24,p&l>>16,p&l>>8,p&l);return function(v,b){for(var w=b;w>0;w--)v.pop()}(u,o[h]),f.fromCharCode.apply(f,u)},n=function(s){return s.split("").map(function(o){return("0"+o.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(s){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((s=s.replace(/\s/g,"")).indexOf(">")!==-1&&(s=s.substr(0,s.indexOf(">"))),s.length%2&&(s+="0"),o.test(s)===!1)return"";for(var l="",u=0;u<s.length;u+=2)l+=String.fromCharCode("0x"+(s[u]+s[u+1]));return l},a=function(s){for(var o=new Uint8Array(s.length),l=s.length;l--;)o[l]=s.charCodeAt(l);return(o=k8(o)).reduce(function(u,c){return u+String.fromCharCode(c)},"")};e.processDataByFilters=function(s,o){var l=0,u=s||"",c=[];for(typeof(o=o||[])=="string"&&(o=[o]),l=0;l<o.length;l+=1)switch(o[l]){case"ASCII85Decode":case"/ASCII85Decode":u=r(u),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=t(u),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=i(u),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=n(u),c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=a(u),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[l]+'" is not implemented')}return{data:u,reverseChain:c.reverse().join(" ")}}}(qr.API),function(e){e.loadFile=function(t,r,n){return function(i,a,s){a=a!==!1,s=typeof s=="function"?s:function(){};var o=void 0;try{o=function(l,u,c){var d=new XMLHttpRequest,f=0,h=function(p){var m=p.length,_=[],y=String.fromCharCode;for(f=0;f<m;f+=1)_.push(y(255&p.charCodeAt(f)));return _.join("")};if(d.open("GET",l,!u),d.overrideMimeType("text/plain; charset=x-user-defined"),u===!1&&(d.onload=function(){d.status===200?c(h(this.responseText)):c(void 0)}),d.send(null),u&&d.status===200)return h(d.responseText)}(i,a,s)}catch{}return o}(t,r,n)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(qr.API),function(e){function t(){return(vn.html2canvas?Promise.resolve(vn.html2canvas):Wp(()=>import("./html2canvas.esm-CBrSDip1.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function r(){return(vn.DOMPurify?Promise.resolve(vn.DOMPurify):Wp(()=>import("./purify.es-C5KSVp3G.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var l=ra(o);return l==="undefined"?"undefined":l==="string"||o instanceof String?"string":l==="number"||o instanceof Number?"number":l==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":l==="object"?"object":"unknown"},i=function(o,l){var u=document.createElement(o);for(var c in l.className&&(u.className=l.className),l.innerHTML&&l.dompurify&&(u.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)u.style[c]=l.style[c];return u},a=function o(l,u){for(var c=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),d=l.firstChild;d;d=d.nextSibling)u!==!0&&d.nodeType===1&&d.nodeName==="SCRIPT"||c.appendChild(o(d,u));return l.nodeType===1&&(l.nodeName==="CANVAS"?(c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(c.value=l.value),c.addEventListener("load",function(){c.scrollTop=l.scrollTop,c.scrollLeft=l.scrollLeft},!0)),c},s=function o(l){var u=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),c=o.convert(Promise.resolve(),u);return(c=c.setProgress(1,o,1,[o])).set(l)};(s.prototype=Object.create(Promise.prototype)).constructor=s,s.convert=function(o,l){return o.__proto__=l||s.prototype,o},s.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},s.prototype.from=function(o,l){return this.then(function(){switch(l=l||function(u){switch(n(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o),l){case"string":return this.then(r).then(function(u){return this.set({src:i("div",{innerHTML:o,dompurify:u})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},s.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},s.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},l=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},s.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(l){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,l(this.prop.container,u)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},s.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(l){var u=this.opt.jsPDF,c=this.opt.fontFaces,d=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,f=Object.assign({async:!0,allowTaint:!0,scale:d,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete f.onrendered,u.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,u.context2d.posX=this.opt.x,u.context2d.posY=this.opt.y,u.context2d.margin=this.opt.margin,u.context2d.fontFaces=c,c)for(var h=0;h<c.length;++h){var p=c[h],m=p.src.find(function(_){return _.format==="truetype"});m&&u.addFont(m.url,p.ref.name,p.ref.style)}return f.windowHeight=f.windowHeight||0,f.windowHeight=f.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):f.windowHeight,u.context2d.save(!0),l(this.prop.container,f)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},s.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},s.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},s.prototype.output=function(o,l,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(o,l):this.outputPdf(o,l)},s.prototype.outputPdf=function(o,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,l)})},s.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},s.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},s.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},s.prototype.set=function(o){if(n(o)!=="object")return this;var l=Object.keys(o||{}).map(function(u){if(u in s.template.prop)return function(){this.prop[u]=o[u]};switch(u){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[u]=o[u]}}},this);return this.then(function(){return this.thenList(l)})},s.prototype.get=function(o,l){return this.then(function(){var u=o in s.template.prop?this.prop[o]:this.opt[o];return l?l(u):u})},s.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},s.prototype.setPageSize=function(o){function l(u,c){return Math.floor(u*c/72*96)}return this.then(function(){(o=o||qr.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:l(o.inner.width,o.k),height:l(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},s.prototype.setProgress=function(o,l,u,c){return o!=null&&(this.progress.val=o),l!=null&&(this.progress.state=l),u!=null&&(this.progress.n=u),c!=null&&(this.progress.stack=c),this.progress.ratio=this.progress.val/this.progress.state,this},s.prototype.updateProgress=function(o,l,u,c){return this.setProgress(o?this.progress.val+o:null,l||null,u?this.progress.n+u:null,c?this.progress.stack.concat(c):null)},s.prototype.then=function(o,l){var u=this;return this.thenCore(o,l,function(c,d){return u.updateProgress(null,null,1,[c]),Promise.prototype.then.call(this,function(f){return u.updateProgress(null,c),f}).then(c,d).then(function(f){return u.updateProgress(1),f})})},s.prototype.thenCore=function(o,l,u){u=u||Promise.prototype.then;var c=this;o&&(o=o.bind(c)),l&&(l=l.bind(c));var d=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?c:s.convert(Object.assign({},c),Promise.prototype),f=u.call(d,o,l);return s.convert(f,c.__proto__)},s.prototype.thenExternal=function(o,l){return Promise.prototype.then.call(this,o,l)},s.prototype.thenList=function(o){var l=this;return o.forEach(function(u){l=l.thenCore(u)}),l},s.prototype.catch=function(o){o&&(o=o.bind(this));var l=Promise.prototype.catch.call(this,o);return s.convert(l,this)},s.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},s.prototype.error=function(o){return this.then(function(){throw new Error(o)})},s.prototype.using=s.prototype.set,s.prototype.saveAs=s.prototype.save,s.prototype.export=s.prototype.output,s.prototype.run=s.prototype.then,qr.getPageSize=function(o,l,u){if(ra(o)==="object"){var c=o;o=c.orientation,l=c.unit||l,u=c.format||u}l=l||"mm",u=u||"a4",o=(""+(o||"P")).toLowerCase();var d,f=(""+u).toLowerCase(),h={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(l){case"pt":d=1;break;case"mm":d=72/25.4;break;case"cm":d=72/2.54;break;case"in":d=72;break;case"px":d=.75;break;case"pc":case"em":d=12;break;case"ex":d=6;break;default:throw"Invalid unit: "+l}var p,m=0,_=0;if(h.hasOwnProperty(f))m=h[f][1]/d,_=h[f][0]/d;else try{m=u[1],_=u[0]}catch{throw new Error("Invalid format: "+u)}if(o==="p"||o==="portrait")o="p",_>m&&(p=_,_=m,m=p);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",m>_&&(p=_,_=m,m=p)}return{width:_,height:m,unit:l,k:d,orientation:o}},e.html=function(o,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map(GL):null;var u=new s(l);return l.worker?u:u.from(o).doCallback()}}(qr.API),qr.API.addJS=function(e){return Gre=e,this.internal.events.subscribe("postPutResources",function(){EM=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(EM+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Hre=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Gre+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){EM!==void 0&&Hre!==void 0&&this.internal.out("/Names <</JavaScript "+EM+" 0 R>>")}),this},function(e){var t;e.events.push(["postPutResources",function(){var r=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=r.outline.render().split(/\r\n/),a=0;a<i.length;a++){var s=i[a],o=n.exec(s);if(o!=null){var l=o[1];r.internal.newObjectDeferredBegin(l,!1)}r.internal.write(s)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,c=[];for(a=0;a<u;a++){var d=r.internal.newObject();c.push(d);var f=r.internal.getPageInfo(a+1);r.internal.write("<< /D["+f.objId+" 0 R /XYZ null null null]>> endobj")}var h=r.internal.newObject();for(r.internal.write("<< /Names [ "),a=0;a<c.length;a++)r.internal.write("(page_"+(a+1)+")"+c[a]+" 0 R");r.internal.write(" ] >>","endobj"),t=r.internal.newObject(),r.internal.write("<< /Dests "+h+" 0 R"),r.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var r=this;r.outline.root.children.length>0&&(r.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&r.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(n,i,a){var s={title:i,options:a,children:[]};return n==null&&(n=this.root),n.children.push(s),s},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(n){n.id=r.internal.newObjectDeferred();for(var i=0;i<n.children.length;i++)this.genIds_r(n.children[i])},r.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},r.outline.renderItems=function(n){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<n.children.length;a++){var s=n.children[a];this.objStart(s),this.line("/Title "+this.makeString(s.title)),this.line("/Parent "+this.makeRef(n)),a>0&&this.line("/Prev "+this.makeRef(n.children[a-1])),a<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[a+1])),s.children.length>0&&(this.line("/First "+this.makeRef(s.children[0])),this.line("/Last "+this.makeRef(s.children[s.children.length-1])));var o=this.count=this.count_r({count:0},s);if(o>0&&this.line("/Count "+o),s.options&&s.options.pageNumber){var l=r.internal.getPageInfo(s.options.pageNumber);this.line("/Dest ["+l.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var u=0;u<n.children.length;u++)this.renderItems(n.children[u])},r.outline.line=function(n){this.ctx.val+=n+`\r 762`},r.outline.makeRef=function(n){return n.id+" 0 R"},r.outline.makeString=function(n){return"("+r.internal.pdfEscape(n)+")"},r.outline.objStart=function(n){this.ctx.val+=`\r 763`+n.id+` 0 obj\r 764<<\r 765`},r.outline.objEnd=function(){this.ctx.val+=`>> \r 766endobj\r 767`},r.outline.count_r=function(n,i){for(var a=0;a<i.children.length;a++)n.count++,this.count_r(n,i.children[a]);return n.count}}])}(qr.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(r,n,i,a,s,o){var l,u=this.decode.DCT_DECODE,c=null;if(typeof r=="string"||this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r)){switch(r=s||r,r=this.__addimage__.isArrayBuffer(r)?new Uint8Array(r):r,l=function(d){for(var f,h=256*d.charCodeAt(4)+d.charCodeAt(5),p=d.length,m={width:0,height:0,numcomponents:1},_=4;_<p;_+=2){if(_+=h,t.indexOf(d.charCodeAt(_+1))!==-1){f=256*d.charCodeAt(_+5)+d.charCodeAt(_+6),m={width:256*d.charCodeAt(_+7)+d.charCodeAt(_+8),height:f,numcomponents:d.charCodeAt(_+9)};break}h=256*d.charCodeAt(_+2)+d.charCodeAt(_+3)}return m}(r=this.__addimage__.isArrayBufferView(r)?this.__addimage__.arrayBufferToBinaryString(r):r),l.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}c={data:r,width:l.width,height:l.height,colorSpace:o,bitsPerComponent:8,filter:u,index:n,alias:i}}return c}}(qr.API),qr.API.processPNG=function(e,t,r,n){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=G_t(e,{checkCrc:!0}),s=a.width,o=a.height,l=a.channels,u=a.palette,c=a.depth;i=u&&l===1?function(S){for(var A=S.width,C=S.height,k=S.data,M=S.palette,D=S.depth,$=!1,V=[],U=[],B=void 0,z=!1,q=0,L=0;L<M.length;L++){var K=Bte(M[L],4),O=K[0],N=K[1],X=K[2],ie=K[3];V.push(O,N,X),ie!=null&&(ie===0?(q++,U.length<1&&U.push(L)):ie<255&&(z=!0))}if(z||q>1){$=!0,U=void 0;var ee=A*C;B=new Uint8Array(ee);for(var le=new DataView(k.buffer),Te=0;Te<ee;Te++){var be=KL(le,Te,D),we=Bte(M[be],4)[3];B[Te]=we}}else q===0&&(U=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:$?8:void 0,colorBytes:k,alphaBytes:B,needSMask:$,palette:V,mask:U}}(a):l===2||l===4?function(S){for(var A=S.data,C=S.width,k=S.height,M=S.channels,D=S.depth,$=M===2?"DeviceGray":"DeviceRGB",V=M-1,U=C*k,B=V,z=U*B,q=1*U,L=Math.ceil(z*D/8),K=Math.ceil(q*D/8),O=new Uint8Array(L),N=new Uint8Array(K),X=new DataView(A.buffer),ie=new DataView(O.buffer),ee=new DataView(N.buffer),le=!1,Te=0;Te<U;Te++){for(var be=Te*M,we=0;we<B;we++)tne(ie,KL(X,be+we,D),Te*B+we,D);var ae=KL(X,be+B,D);ae<(1<<D)-1&&(le=!0),tne(ee,ae,1*Te,D)}return{colorSpace:$,colorsPerPixel:V,sMaskBitsPerComponent:le?D:void 0,colorBytes:O,alphaBytes:N,needSMask:le}}(a):function(S){var A=S.data,C=S.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:C,colorsPerPixel:C==="DeviceGray"?1:3,colorBytes:A instanceof Uint16Array?function(k){for(var M=k.length,D=new Uint8Array(2*M),$=new DataView(D.buffer,D.byteOffset,D.byteLength),V=0;V<M;V++)$.setUint16(2*V,k[V],!1);return D}(A):A,needSMask:!1}}(a);var d,f,h,p=i,m=p.colorSpace,_=p.colorsPerPixel,y=p.sMaskBitsPerComponent,v=p.colorBytes,b=p.alphaBytes,w=p.needSMask,x=p.palette,E=p.mask,T=null;return n!==qr.API.image_compression.NONE&&typeof k8=="function"?(T=function(S){var A;switch(S){case qr.API.image_compression.FAST:A=11;break;case qr.API.image_compression.MEDIUM:A=13;break;case qr.API.image_compression.SLOW:A=14;break;default:A=12}return A}(n),d=this.decode.FLATE_DECODE,f="/Predictor ".concat(T," /Colors ").concat(_," /BitsPerComponent ").concat(c," /Columns ").concat(s),e=Xre(v,Math.ceil(s*_*c/8),_,c,n),w&&(h=Xre(b,Math.ceil(s*y/8),1,y,n))):(d=void 0,f=void 0,e=v,w&&(h=b)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(h&&this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),{alias:r,data:e,index:t,filter:d,decodeParameters:f,transparency:E,palette:x,sMask:h,predictor:T,width:s,height:o,bitsPerComponent:c,sMaskBitsPerComponent:y,colorSpace:m}}},function(e){e.processGIF89A=function(t,r,n,i){var a=new p1t(t),s=a.width,o=a.height,l=[];a.decodeAndBlitFrameRGBA(0,l);var u={data:l,width:s,height:o},c=new YL(100).encode(u,100);return e.processJPEG.call(this,c,r,n,i)},e.processGIF87A=e.processGIF89A}(qr.API),wf.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:n,blue:r,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},wf.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(r){ya.log("bit decode error:"+r)}},wf.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),r=t%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+8*i*4,o=0;o<8&&8*i+o<this.width;o++){var l=this.palette[a>>7-o&1];this.data[s+4*o]=l.blue,this.data[s+4*o+1]=l.green,this.data[s+4*o+2]=l.red,this.data[s+4*o+3]=255}r!==0&&(this.pos+=4-r)}},wf.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+2*i*4,o=a>>4,l=15&a,u=this.palette[o];if(this.data[s]=u.blue,this.data[s+1]=u.green,this.data[s+2]=u.red,this.data[s+3]=255,2*i+1>=this.width)break;u=this.palette[l],this.data[s+4]=u.blue,this.data[s+4+1]=u.green,this.data[s+4+2]=u.red,this.data[s+4+3]=255}t!==0&&(this.pos+=4-t)}},wf.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+4*n;if(i<this.palette.length){var s=this.palette[i];this.data[a]=s.red,this.data[a+1]=s.green,this.data[a+2]=s.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},wf.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(a&t)/t*255|0,o=(a>>5&t)/t*255|0,l=(a>>10&t)/t*255|0,u=a>>15?255:0,c=n*this.width*4+4*i;this.data[c]=l,this.data[c+1]=o,this.data[c+2]=s,this.data[c+3]=u}this.pos+=e}},wf.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(s&t)/t*255|0,l=(s>>5&r)/r*255|0,u=(s>>11)/t*255|0,c=i*this.width*4+4*a;this.data[c]=u,this.data[c+1]=l,this.data[c+2]=o,this.data[c+3]=255}this.pos+=e}},wf.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*r;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=n,this.data[s+3]=255}this.pos+=this.width%4}},wf.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*r;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=s}},wf.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,r,n,i){var a=new wf(t,!1),s=a.width,o=a.height,l={data:a.getData(),width:s,height:o},u=new YL(100).encode(l,100);return e.processJPEG.call(this,u,r,n,i)}}(qr.API),nne.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,r,n,i){var a=new nne(t),s=a.width,o=a.height,l={data:a.getData(),width:s,height:o},u=new YL(100).encode(l,100);return e.processJPEG.call(this,u,r,n,i)}}(qr.API),qr.API.processRGBA=function(e,t,r){for(var n=e.data,i=n.length,a=new Uint8Array(i/4*3),s=new Uint8Array(i/4),o=0,l=0,u=0;u<i;u+=4){var c=n[u],d=n[u+1],f=n[u+2],h=n[u+3];a[o++]=c,a[o++]=d,a[o++]=f,s[l++]=h}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(s),data:p,index:t,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},qr.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},a1=qr.API,TM=a1.getCharWidthsArray=function(e,t){var r,n,i=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),s=t.charSpace||this.internal.getCharSpace(),o=t.widths?t.widths:i.metadata.Unicode.widths,l=o.fof?o.fof:1,u=t.kerning?t.kerning:i.metadata.Unicode.kerning,c=u.fof?u.fof:1,d=t.doKerning!==!1,f=0,h=e.length,p=0,m=o[0]||l,_=[];for(r=0;r<h;r++)n=e.charCodeAt(r),typeof i.metadata.widthOfString=="function"?_.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+s*(1e3/a)||0)/1e3):(f=d&&ra(u[n])==="object"&&!isNaN(parseInt(u[n][p],10))?u[n][p]/c:0,_.push((o[n]||m)/l+f)),p=n;return _},qre=a1.getStringUnitWidth=function(e,t){var r=(t=t||{}).fontSize||this.internal.getFontSize(),n=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return a1.processArabic&&(e=a1.processArabic(e)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(e,r,i)/r:TM.apply(this,arguments).reduce(function(a,s){return a+s},0)},Kre=function(e,t,r,n){for(var i=[],a=0,s=e.length,o=0;a!==s&&o+t[a]<r;)o+=t[a],a++;i.push(e.slice(0,a));var l=a;for(o=0;a!==s;)o+t[a]>n&&(i.push(e.slice(l,a)),o=0,l=a),o+=t[a],a++;return l!==a&&i.push(e.slice(l,a)),i},Yre=function(e,t,r){r||(r={});var n,i,a,s,o,l,u,c=[],d=[c],f=r.textIndent||0,h=0,p=0,m=e.split(" "),_=TM.apply(this,[" ",r])[0];if(l=r.lineIndent===-1?m[0].length+2:r.lineIndent||0){var y=Array(l).join(" "),v=[];m.map(function(w){(w=w.split(/\s*\n/)).length>1?v=v.concat(w.map(function(x,E){return(E&&x.length?` 768`:"")+x})):v.push(w[0])}),m=v,l=qre.apply(this,[y,r])}for(a=0,s=m.length;a<s;a++){var b=0;if(n=m[a],l&&n[0]==` 769`&&(n=n.substr(1),b=1),f+h+(p=(i=TM.apply(this,[n,r])).reduce(function(w,x){return w+x},0))>t||b){if(p>t){for(o=Kre.apply(this,[n,i,t-(f+h),t]),c.push(o.shift()),c=[o.pop()];o.length;)d.push([o.shift()]);p=i.slice(n.length-(c[0]?c[0].length:0)).reduce(function(w,x){return w+x},0)}else c=[n];d.push(c),f=p+l,h=_}else c.push(n),f+=h+p,h=_}return u=l?function(w,x){return(x?y:"")+w.join(" ")}:function(w){return w.join(" ")},d.map(u)},a1.splitTextToSize=function(e,t,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),a=(function(c){if(c.widths&&c.kerning)return{widths:c.widths,kerning:c.kerning};var d=this.internal.getFont(c.fontName,c.fontStyle),f="Unicode";return d.metadata[f]?{widths:d.metadata[f].widths||{0:1},kerning:d.metadata[f].kerning||{}}:{font:d.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var s=1*this.internal.scaleFactor*t/i;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=r.lineIndent;var o,l,u=[];for(o=0,l=n.length;o<l;o++)u=u.concat(Yre.apply(this,[n[o],s,a]));return u},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",r="klmnopqrstuvwxyz",n={},i={},a=0;a<16;a++)n[r[a]]=t[a],i[t[a]]=r[a];var s=function(f){return"0x"+parseInt(f,10).toString(16)},o=e.__fontmetrics__.compress=function(f){var h,p,m,_,y=["{"];for(var v in f){if(h=f[v],isNaN(parseInt(v,10))?p="'"+v+"'":(v=parseInt(v,10),p=(p=s(v).slice(2)).slice(0,-1)+i[p.slice(-1)]),typeof h=="number")h<0?(m=s(h).slice(3),_="-"):(m=s(h).slice(2),_=""),m=_+m.slice(0,-1)+i[m.slice(-1)];else{if(ra(h)!=="object")throw new Error("Don't know what to do with value type "+ra(h)+".");m=o(h)}y.push(p+m)}return y.push("}"),y.join("")},l=e.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,p,m,_,y={},v=1,b=y,w=[],x="",E="",T=f.length-1,S=1;S<T;S+=1)(_=f[S])=="'"?h?(m=h.join(""),h=void 0):h=[]:h?h.push(_):_=="{"?(w.push([b,m]),b={},m=void 0):_=="}"?((p=w.pop())[0][p[1]]=b,m=void 0,b=p[0]):_=="-"?v=-1:m===void 0?n.hasOwnProperty(_)?(x+=n[_],m=parseInt(x,16)*v,v=1,x=""):x+=_:n.hasOwnProperty(_)?(E+=n[_],b[m]=parseInt(E,16)*v,v=1,m=void 0,E=""):E+=_;return y},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},d
vendor: 14,727 bytes, line 769
769={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(
vendor: 10,616 bytes, lines 769-797
769f){var h=f.font,p=d.Unicode[h.postScriptName];p&&(h.metadata.Unicode={},h.metadata.Unicode.widths=p.widths,h.metadata.Unicode.kerning=p.kerning);var m=c.Unicode[h.postScriptName];m&&(h.metadata.Unicode.encoding=m,h.encoding=m.codePages[0])}])}(qr.API),function(e){var t=function(r){for(var n=r.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=r.charCodeAt(a);return i};e.API.events.push(["addFont",function(r){var n=void 0,i=r.font,a=r.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(n=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(s,o){o=/^\x00\x01\x00\x00/.test(o)?t(o):t(Nk(o)),s.metadata=e.API.TTFFont.open(o),s.metadata.Unicode=s.metadata.Unicode||{encoding:{},kerning:{},widths:[]},s.metadata.glyIdsUsed=[0]})(i,n)}}])}(qr),qr.API.addSvgAsImage=function(e,t,r,n,i,a,s,o){if(isNaN(t)||isNaN(r))throw ya.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw ya.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=n,l.height=i;var u=l.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,l.width,l.height);var c={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(vn.canvg?Promise.resolve(vn.canvg):Wp(()=>import("./index.es-DWybdSWb.js"),[])).catch(function(f){return Promise.reject(new Error("Could not load canvg: "+f))}).then(function(f){return f.default?f.default:f}).then(function(f){return f.fromString(u,e,c)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(f){return f.render(c)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),t,r,n,i,s,o)})},qr.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(t,r);return this},qr.API.viewerPreferences=function(e,t){var r;e=e||{},t=t||!1;var n,i,a,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(s),l=[],u=0,c=0,d=0;function f(p,m){var _,y=!1;for(_=0;_<p.length;_+=1)p[_]===m&&(y=!0);return y}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var h=o.length;for(d=0;d<h;d+=1)r[o[d]].value=r[o[d]].defaultValue,r[o[d]].explicitSet=!1}if(ra(e)==="object"){for(i in e)if(a=e[i],f(o,i)&&a!==void 0){if(r[i].type==="boolean"&&typeof a=="boolean")r[i].value=a;else if(r[i].type==="name"&&f(r[i].valueSet,a))r[i].value=a;else if(r[i].type==="integer"&&Number.isInteger(a))r[i].value=a;else if(r[i].type==="array"){for(u=0;u<a.length;u+=1)if(n=!0,a[u].length===1&&typeof a[u][0]=="number")l.push(String(a[u]-1));else if(a[u].length>1){for(c=0;c<a[u].length;c+=1)typeof a[u][c]!="number"&&(n=!1);n===!0&&l.push([a[u][0]-1,a[u][1]-1].join(" "))}r[i].value="["+l.join(" ")+"]"}else r[i].value=r[i].defaultValue;r[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,m=[];for(p in r)r[p].explicitSet===!0&&(r[p].type==="name"?m.push("/"+p+" /"+r[p].value):m.push("/"+p+" "+r[p].value));m.length!==0&&this.internal.write(`/ViewerPreferences 770<< 771`+m.join(` 772`)+` 773>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},function(e){var t=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',i=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),a=unescape(encodeURIComponent(n)),s=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),o=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),l=unescape(encodeURIComponent("</x:xmpmeta>")),u=a.length+s.length+o.length+i.length+l.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+u+" >>"),this.internal.write("stream"),this.internal.write(i+a+s+o+l),this.internal.write("endstream"),this.internal.write("endobj")},r=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(n,i){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:i||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",r),this.internal.events.subscribe("postPutResources",t)),this}}(qr.API),function(e){var t=e.API,r=t.pdfEscape16=function(a,s){for(var o,l=s.metadata.Unicode.widths,u=["","0","00","000","0000"],c=[""],d=0,f=a.length;d<f;++d){if(o=s.metadata.characterToGlyph(a.charCodeAt(d)),s.metadata.glyIdsUsed.push(o),s.metadata.toUnicode[o]=a.charCodeAt(d),l.indexOf(o)==-1&&(l.push(o),l.push([parseInt(s.metadata.widthOfGlyph(o),10)])),o=="0")return c.join("");o=o.toString(16),c.push(u[4-o.length],o)}return c.join("")},n=function(a){var s,o,l,u,c,d,f;for(c=`/CIDInit /ProcSet findresource begin 77412 dict begin 775begincmap 776/CIDSystemInfo << 777 /Registry (Adobe) 778 /Ordering (UCS) 779 /Supplement 0 780>> def 781/CMapName /Adobe-Identity-UCS def 782/CMapType 2 def 7831 begincodespacerange 784<0000><ffff> 785endcodespacerange`,l=[],d=0,f=(o=Object.keys(a).sort(function(h,p){return h-p})).length;d<f;d++)s=o[d],l.length>=100&&(c+=` 786`+l.length+` beginbfchar 787`+l.join(` 788`)+` 789endbfchar`,l=[]),a[s]!==void 0&&a[s]!==null&&typeof a[s].toString=="function"&&(u=("0000"+a[s].toString(16)).slice(-4),s=("0000"+(+s).toString(16)).slice(-4),l.push("<"+s+"><"+u+">"));return l.length&&(c+=` 790`+l.length+` beginbfchar 791`+l.join(` 792`)+` 793endbfchar 794`),c+`endcmap 795CMapName currentdict /CMap defineresource pop 796end 797end`};t.events.push(["putFont",function(a){(function(s){var o=s.font,l=s.out,u=s.newObject,c=s.putStream;if(o.metadata instanceof e.API.TTFFont&&o.encoding==="Identity-H"){for(var d=o.metadata.Unicode.widths,f=o.metadata.subset.encode(o.metadata.glyIdsUsed,1),h="",p=0;p<f.length;p++)h+=String.fromCharCode(f[p]);var m=u();c({data:h,addLength1:!0,objectId:m}),l("endobj");var _=u();c({data:n(o.metadata.toUnicode),addLength1:!0,objectId:_}),l("endobj");var y=u();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+g1(o.fontName)),l("/FontFile2 "+m+" 0 R"),l("/FontBBox "+e.API.PDFObject.convert(o.metadata.bbox)),l("/Flags "+o.metadata.flags),l("/StemV "+o.metadata.stemV),l("/ItalicAngle "+o.metadata.italicAngle),l("/Ascent "+o.metadata.ascender),l("/Descent "+o.metadata.decender),l("/CapHeight "+o.metadata.capHeight),l(">>"),l("endobj");var v=u();l("<<"),l("/Type /Font"),l("/BaseFont /"+g1(o.fontName)),l("/FontDescriptor "+y+" 0 R"),l("/W "+e.API.PDFObject.convert(d)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+o.encoding+")"),l(">>"),l(">>"),l("endobj"),o.objectNumber=u(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+_+" 0 R"),l("/BaseFont /"+g1(o.fontName)),l("/Encoding /"+o.encoding),l("/DescendantFonts ["+v+" 0 R]"),l(">>"),l("endobj"),o.isAlreadyPutted=!0}})(a)}]),t.events.push(["putFont",function(a){(function(s){var o=s.font,l=s.out,u=s.newObject,c=s.putStream;if(o.metadata instanceof e.API.TTFFont&&o.encoding==="WinAnsiEncoding"){for(var d=o.metadata.rawData,f="",h=0;h<d.length;h++)f+=String.fromCharCode(d[h]);var p=u();c({data:f,addLength1:!0,objectId:p}),l("endobj");var m=u();c({data:n(o.metadata.toUnicode),addLength1:!0,objectId:m}),l("endobj");var _=u();l("<<"),l("/Descent "+o.metadata.decender),l("/CapHeight "+o.metadata.capHeight),l("/StemV "+o.metadata.stemV),l("/Type /FontDescriptor"),l("/
797FontFile2 "+p+" 0 R"),l("/Flags 96"),l("/FontBBox "+e.API.PDFObject.convert(o.metadata.bbox)),l("/FontName /"+g1(o.fontName)),l("/ItalicAngle "+o.metadata.italicAngle),l("/Ascent "+o.metadata.ascender),l(">>"),l("endobj"),o.objectNumber=u();for(var y=0;y<o.metadata.hmtx.widths.length;y++)o.metadata.hmtx.widths[y]=parseInt(o.metadata.hmtx.widths[y]*(1e3/o.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+m+" 0 R/BaseFont/"+g1(o.fontName)+"/FontDescriptor "+_+" 0 R/Encoding/"+o.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(o.metadata.hmtx.widths)+">>"),l("endobj"),o.isAlreadyPutted=!0}})(a)}]);var i=function(a){var s,o=a.text||"",l=a.x,u=a.y,c=a.options||{},d=a.mutex||{},f=d.pdfEscape,h=d.activeFontKey,p=d.fonts,m=h,_="",y=0,v="",b=p[m].encoding;if(p[m].encoding!=="Identity-H")return{text:o,x:l,y:u,options:c,mutex:d};for(v=o,m=h,Array.isArray(o)&&(v=o[0]),y=0;y<v.length;y+=1)p[m].metadata.hasOwnProperty("cmap")&&(s=p[m].metadata.cmap.unicode.codeMap[v[y].charCodeAt(0)]),s||v[y].charCodeAt(0)<256&&p[m].metadata.hasOwnProperty("Unicode")?_+=v[y]:_+="";var w="";return parseInt(m.slice(1))<14||b==="WinAnsiEncoding"?w=f(_,m).split("").map(function(x){return x.charCodeAt(0).toString(16)}).join(""):b==="Identity-H"&&(w=r(_,p[m])),d.isHex=!0,{text:w,x:l,y:u,options:c,mutex:d}};t.events.push(["postProcessText",function(a){var s=a.text||"",o=[],l={text:s,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(s)){var u=0;for(u=0;u<s.length;u+=1)Array.isArray(s[u])&&s[u].length===3?o.push([i(Object.assign({},l,{text:s[u][0]})).text,s[u][1],s[u][2]]):o.push(i(Object.assign({},l,{text:s[u]})).text);a.text=o}else a.text=i(Object.assign({},l,{text:s})).text}])}(qr),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0},e.addFileToVFS=function(r,n){return t.call(this),this.internal.vFS[r]=n,this},e.getFileFromVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0?this.internal.vFS[r]:null}}(qr.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(n){var i,a,s,o,l,u,c,d=t,f=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},_=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","â¹","âº","â¹","â
","â","â
","â½","â¾","â½","â","â","â","â¤","â¥","â¤","â©","âª","â©","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","﹤","ï¹¥","﹤"],y=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),v=!1,b=0;this.__bidiEngine__={};var w=function(k){var M=k.charCodeAt(),D=M>>8,$=m[D];return $!==void 0?d[256*$+(255&M)]:D===252||D===253?"AL":y.test(D)?"L":D===8?"R":"N"},x=function(k){for(var M,D=0;D<k.length;D++){if((M=w(k.charAt(D)))==="L")return!1;if(M==="R")return!0}return!1},E=function(k,M,D,$){var V,U,B,z,q=M[$];switch(q){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":v=!1;break;case"N":case"AN":break;case"EN":v&&(q="AN");break;case"AL":v=!0,q="R";break;case"WS":case"BN":q="N";break;case"CS":$<1||$+1>=M.length||(V=D[$-1])!=="EN"&&V!=="AN"||(U=M[$+1])!=="EN"&&U!=="AN"?q="N":v&&(U="AN"),q=U===V?U:"N";break;case"ES":q=(V=$>0?D[$-1]:"B")==="EN"&&$+1<M.length&&M[$+1]==="EN"?"EN":"N";break;case"ET":if($>0&&D[$-1]==="EN"){q="EN";break}if(v){q="N";break}for(B=$+1,z=M.length;B<z&&M[B]==="ET";)B++;q=B<z&&M[B]==="EN"?"EN":"N";break;case"NSM":if(s&&!o){for(z=M.length,B=$+1;B<z&&M[B]==="NSM";)B++;if(B<z){var L=k[$],K=L>=1425&&L<=2303||L===64286;if(V=M[B],K&&(V==="R"||V==="AL")){q="R";break}}}q=$<1||(V=M[$-1])==="B"?"N":D[$-1];break;case"B":v=!1,i=!0,q=b;break;case"S":a=!0,q="N"}return q},T=function(k,M,D){var $=k.split("");return D&&S($,D,{hiLevel:b}),$.reverse(),M&&M.reverse(),$.join("")},S=function(k,M,D){var $,V,U,B,z,q=-1,L=k.length,K=0,O=[],N=b?h:f,X=[];for(v=!1,i=!1,a=!1,V=0;V<L;V++)X[V]=w(k[V]);for(U=0;U<L;U++){if(z=K,O[U]=E(k,X,O,U),$=240&(K=N[z][p[O[U]]]),K&=15,M[U]=B=N[K][5],$>0)if($===16){for(V=q;V<U;V++)M[V]=1;q=-1}else q=-1;if(N[K][6])q===-1&&(q=U);else if(q>-1){for(V=q;V<U;V++)M[V]=B;q=-1}X[U]==="B"&&(M[U]=0),D.hiLevel|=B}a&&function(ie,ee,le){for(var Te=0;Te<le;Te++)if(ie[Te]==="S"){ee[Te]=b;for(var be=Te-1;be>=0&&ie[be]==="WS";be--)ee[be]=b}}(X,M,L)}
vendor: 30,924 bytes, line 797
797,A=function(k,M,D,$,V){if(!(V.hiLevel<k)){if(k===1&&b===1&&!i)return M.reverse(),void(D&&D.reverse());for(var U,B,z,q,L=M.length,K=0;K<L;){if($[K]>=k){for(z=K+1;z<L&&$[z]>=k;)z++;for(q=K,B=z-1;q<B;q++,B--)U=M[q],M[q]=M[B],M[B]=U,D&&(U=D[q],D[q]=D[B],D[B]=U);K=z}K++}}},C=function(k,M,D){var $=k.split(""),V={hiLevel:b};return D||(D=[]),S($,D,V),function(U,B,z){if(z.hiLevel!==0&&c)for(var q,L=0;L<U.length;L++)B[L]===1&&(q=_.indexOf(U[L]))>=0&&(U[L]=_[q+1])}($,D,V),A(2,$,M,D,V),A(1,$,M,D,V),$.join("")};return this.__bidiEngine__.doBidiReorder=function(k,M,D){if(function(V,U){if(U)for(var B=0;B<V.length;B++)U[B]=B;o===void 0&&(o=x(V)),u===void 0&&(u=x(V))}(k,M),s||!l||u)if(s&&l&&o^u)b=o?1:0,k=T(k,M,D);else if(!s&&l&&u)b=o?1:0,k=C(k,M,D),k=T(k,M);else if(!s||o||l||u){if(s&&!l&&o^u)k=T(k,M),o?(b=0,k=C(k,M,D)):(b=1,k=C(k,M,D),k=T(k,M));else if(s&&o&&!l&&u)b=1,k=C(k,M,D),k=T(k,M);else if(!s&&!l&&o^u){var $=c;o?(b=1,k=C(k,M,D),b=0,c=!1,k=C(k,M,D),c=$):(b=0,k=C(k,M,D),k=T(k,M),b=1,c=!1,k=C(k,M,D),c=$,k=T(k,M))}}else b=0,k=C(k,M,D);else b=o?1:0,k=C(k,M,D);return k},this.__bidiEngine__.setOptions=function(k){k&&(s=k.isInputVisual,l=k.isOutputVisual,o=k.isInputRtl,u=k.isOutputRtl,c=k.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(n){var i=n.text;n.x,n.y;var a=n.options||{};n.mutex,a.lang;var s=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,r.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var o=0;for(s=[],o=0;o<i.length;o+=1)Object.prototype.toString.call(i[o])==="[object Array]"?s.push([r.doBidiReorder(i[o][0]),i[o][1],i[o][2]]):s.push([r.doBidiReorder(i[o])]);n.text=s}else n.text=r.doBidiReorder(i);r.setOptions({isInputVisual:!0})}])}(qr),qr.API.TTFFont=function(){function e(t){var r;if(this.rawData=t,r=this.contents=new a0(t),this.contents.pos=4,r.readString(4)==="ttcf")throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new M1t(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new m1t(this.contents),this.head=new y1t(this),this.name=new x1t(this),this.cmap=new axe(this),this.toUnicode={},this.hhea=new v1t(this),this.maxp=new E1t(this),this.hmtx=new T1t(this),this.post=new b1t(this),this.os2=new _1t(this),this.loca=new P1t(this),this.glyf=new S1t(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var t,r,n,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var s,o,l,u;for(u=[],s=0,o=(l=this.bbox).length;s<o;s++)t=l[s],u.push(Math.round(t*this.scaleFactor));return u}).call(this),this.stemV=0,this.post.exists?(n=255&(i=this.post.italic_angle),32768&(r=i>>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(t){var r;return((r=this.cmap.unicode)!=null?r.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*r},e.prototype.widthOfString=function(t,r,n){var i,a,s,o;for(s=0,a=0,o=(t=""+t).length;0<=o?a<o:a>o;a=0<=o?++a:--a)i=t.charCodeAt(a),s+=this.widthOfGlyph(this.characterToGlyph(i))+n*(1e3/r)||0;return s*(r/1e3)},e.prototype.lineHeight=function(t,r){var n;return r==null&&(r=!1),n=r?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},e}();var oh,a0=function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var r,n;for(n=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)n[r]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(t){var r,n,i;for(i=[],r=0,n=t.length;0<=n?r<n:r>n;r=0<=n?++r:--r)i.push(this.writeByte(t.charCodeAt(r)));return i},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,r,n,i,a,s,o,l;return t=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),s=this.readByte(),o=this.readByte(),l=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^r)+1099511627776*(255^n)+4294967296*(255^i)+16777216*(255^a)+65536*(255^s)+256*(255^o)+(255^l)+1):72057594037927940*t+281474976710656*r+1099511627776*n+4294967296*i+16777216*a+65536*s+256*o+l},e.prototype.writeLongLong=function(t){var r,n;return r=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var r,n;for(r=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)r.push(this.readByte());return r},e.prototype.write=function(t){var r,n,i,a;for(a=[],n=0,i=t.length;n<i;n++)r=t[n],a.push(this.writeByte(r));return a},e}(),m1t=function(){var e;function t(r){var n,i,a;for(this.scalarType=r.readInt(),this.tableCount=r.readShort(),this.searchRange=r.readShort(),this.entrySelector=r.readShort(),this.rangeShift=r.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)n={tag:r.readString(4),checksum:r.readInt(),offset:r.readInt(),length:r.readInt()},this.tables[n.tag]=n}return t.prototype.encode=function(r){var n,i,a,s,o,l,u,c,d,f,h,p,m;for(m in h=Object.keys(r).length,l=Math.log(2),d=16*Math.floor(Math.log(h)/l),s=Math.floor(d/l),c=16*h-d,(i=new a0).writeInt(this.scalarType),i.writeShort(h),i.writeShort(d),i.writeShort(s),i.writeShort(c),a=16*h,u=i.pos+a,o=null,p=[],r)for(f=r[m],i.writeString(m),i.writeInt(e(f)),i.writeInt(u),i.writeInt(f.length),p=p.concat(f),m==="head"&&(o=u),u+=f.length;u%4;)p.push(0),u++;return i.write(p),n=2981146554-e(i.data),i.pos=o+8,i.writeUInt32(n),i.data},e=function(r){var n,i,a,s;for(r=sxe.call(r);r.length%4;)r.push(0);for(a=new a0(r),i=0,n=0,s=r.length;n<s;n=n+=4)i+=a.readUInt32();return 4294967295&i},t}(),g1t={}.hasOwnProperty,ip=function(e,t){for(var r in t)g1t.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};oh=function(){function e(t){var r;this.file=t,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var y1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var r;return(r=new a0).writeInt(this.version),r.writeInt(this.revision),r.writeInt(this.checkSumAdjustment),r.writeInt(this.magicNumber),r.writeShort(this.flags),r.writeShort(this.unitsPerEm),r.writeLongLong(this.created),r.writeLongLong(this.modified),r.writeShort(this.xMin),r.writeShort(this.yMin),r.writeShort(this.xMax),r.writeShort(this.yMax),r.writeShort(this.macStyle),r.writeShort(this.lowestRecPPEM),r.writeShort(this.fontDirectionHint),r.writeShort(t),r.writeShort(this.glyphDataFormat),r.data},e}(),ine=function(){function e(t,r){var n,i,a,s,o,l,u,c,d,f,h,p,m,_,y,v,b;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=r+t.readInt(),d=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=t.readByte();break;case 4:for(h=t.readUInt16(),f=h/2,t.pos+=6,a=function(){var w,x;for(x=[],l=w=0;0<=f?w<f:w>f;l=0<=f?++w:--w)x.push(t.readUInt16());return x}(),t.pos+=2,m=function(){var w,x;for(x=[],l=w=0;0<=f?w<f:w>f;l=0<=f?++w:--w)x.push(t.readUInt16());return x}(),u=function(){var w,x;for(x=[],l=w=0;0<=f?w<f:w>f;l=0<=f?++w:--w)x.push(t.readUInt16());return x}(),c=function(){var w,x;for(x=[],l=w=0;0<=f?w<f:w>f;l=0<=f?++w:--w)x.push(t.readUInt16());return x}(),i=(this.length-t.pos+this.offset)/2,o=function(){var w,x;for(x=[],l=w=0;0<=i?w<i:w>i;l=0<=i?++w:--w)x.push(t.readUInt16());return x}(),l=y=0,b=a.length;y<b;l=++y)for(_=a[l],n=v=p=m[l];p<=_?v<=_:v>=_;n=p<=_?++v:--v)c[l]===0?s=n+u[l]:(s=o[c[l]/2+(n-p)-(f-l)]||0)!==0&&(s+=u[l]),this.codeMap[n]=65535&s}t.pos=d}return e.encode=function(t,r){var n,i,a,s,o,l,u,c,d,f,h,p,m,_,y,v,b,w,x,E,T,S,A,C,k,M,D,$,V,U,B,z,q,L,K,O,N,X,ie,ee,le,Te,be,we,ae,H;switch($=new a0,s=Object.keys(t).sort(function(fe,Se){return fe-Se}),r){case"macroman":for(m=0,_=function(){var fe=[];for(p=0;p<256;++p)fe.push(0);return fe}(),v={0:0},a={},V=0,q=s.length;V<q;V++)v[be=t[i=s[V]]]==null&&(v[be]=++m),a[i]={old:t[i],new:v[t[i]]},_[i]=v[t[i]];return $.writeUInt16(1),$.writeUInt16(0),$.writeUInt32(12),$.writeUInt16(0),$.writeUInt16(262),$.writeUInt16(0),$.write(_),{charMap:a,subtable:$.data,maxGlyphID:m+1};case"unicode":for(M=[],d=[],b=0,v={},n={},y=u=null,U=0,L=s.length;U<L;U++)v[x=t[i=s[U]]]==null&&(v[x]=++b),n[i]={old:x,new:v[x]},o=v[x]-i,y!=null&&o===u||(y&&d.push(y),M.push(i),u=o),y=i;for(y&&d.push(y),d.push(65535),M.push(65535),C=2*(A=M.length),S=2*Math.pow(Math.log(A)/Math.LN2,2),f=Math.log(S/2)/Math.LN2,T=2*A-S,l=[],E=[],h=[],p=B=0,K=M.length;B<K;p=++B){if(k=M[p],c=d[p],k===65535){l.push(0),E.push(0);break}if(k-(D=n[k].new)>=32768)for(l.push(0),E.push(2*(h.length+A-p)),i=z=k;k<=c?z<=c:z>=c;i=k<=c?++z:--z)h.push(n[i].new);else l.push(D-k),E.push(0)}for($.writeUInt16(3),$.writeUInt16(1),$.writeUInt32(12),$.writeUInt16(4),$.writeUInt16(16+8*A+2*h.length),$.writeUInt16(0),$.writeUInt16(C),$.writeUInt16(S),$.writeUInt16(f),$.writeUInt16(T),le=0,O=d.length;le<O;le++)i=d[le],$.writeUInt16(i);for($.writeUInt16(0),Te=0,N=M.length;Te<N;Te++)i=M[Te],$.writeUInt16(i);for(we=0,X=l.length;we<X;we++)o=l[we],$.writeUInt16(o);for(ae=0,ie=E.length;ae<ie;ae++)w=E[ae],$.writeUInt16(w);for(H=0,ee=h.length;H<ee;H++)m=h[H],$.writeUInt16(m);return{charMap:n,subtable:$.data,maxGlyphID:b+1}}},e}(),axe=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="cmap",e.prototype.parse=function(t){var r,n,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=i?n<i:n>i;n=0<=i?++n:--n)r=new ine(t,this.offset),this.tables.push(r),r.isUnicode&&this.unicode==null&&(this.unicode=r);return!0},e.encode=function(t,r){var n,i;return r==null&&(r="macroman"),n=ine.encode(t,r),(i=new a0).writeUInt16(0),i.writeUInt16(1),n.table=i.data.concat(n.subtable),n},e}(),v1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e}(),_1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var r,n;for(n=[],r=0;r<10;++r)n.push(t.readByte());return n}(),this.charRange=function(){var r,n;for(n=[],r=0;r<4;++r)n.push(t.readInt());return n}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var r,n;for(n=[],r=0;r<2;r=++r)n.push(t.readInt());return n}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e}(),b1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="post",e.prototype.parse=function(t){var r,n,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(n=t.readUInt16(),this.glyphNameIndex=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)r=t.readByte(),i.push(this.names.push(t.readString(r)));return i;case 151552:return n=t.readUInt16(),this.offsets=t.read(n);case 262144:return this.map=(function(){var s,o,l;for(l=[],a=s=0,o=this.file.maxp.numGlyphs;0<=o?s<o:s>o;a=0<=o?++s:--s)l.push(t.readUInt32());return l}).call(this)}},e}(),w1t=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},x1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="name",e.prototype.parse=function(t){var r,n,i,a,s,o,l,u,c,d,f;for(t.pos=this.offset,t.readShort(),r=t.readShort(),o=t.readShort(),n=[],a=0;0<=r?a<r:a>r;a=0<=r?++a:--a)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(l={},a=c=0,d=n.length;c<d;a=++c)i=n[a],t.pos=i.offset,u=t.readString(i.length),s=new w1t(u,i),l[f=i.nameID]==null&&(l[f]=[]),l[i.nameID].push(s);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},e}(),E1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e}(),T1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="hmtx",e.prototype.parse=function(t){var r,n,i,a,s,o,l;for(t.pos=this.offset,this.metrics=[],r=0,o=this.file.hhea.numberOfMetrics;0<=o?r<o:r>o;r=0<=o?++r:--r)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var u,c;for(c=[],r=u=0;0<=i?u<i:u>i;r=0<=i?++u:--u)c.push(t.readInt16());return c}(),this.widths=(function(){var u,c,d,f;for(f=[],u=0,c=(d=this.metrics).length;u<c;u++)a=d[u],f.push(a.advance);return f}).call(this),n=this.widths[this.widths.length-1],l=[],r=s=0;0<=i?s<i:s>i;r=0<=i?++s:--s)l.push(this.widths.push(n));return l},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e}(),sxe=[].slice,S1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var r,n,i,a,s,o,l,u,c,d;return t in this.cache?this.cache[t]:(a=this.file.loca,r=this.file.contents,n=a.indexOf(t),(i=a.lengthOf(t))===0?this.cache[t]=null:(r.pos=this.offset+n,s=(o=new a0(r.read(i))).readShort(),u=o.readShort(),d=o.readShort(),l=o.readShort(),c=o.readShort(),this.cache[t]=s===-1?new C1t(o,u,d,l,c):new A1t(o,s,u,d,l,c),this.cache[t]))},e.prototype.encode=function(t,r,n){var i,a,s,o,l;for(s=[],a=[],o=0,l=r.length;o<l;o++)i=t[r[o]],a.push(s.length),i&&(s=s.concat(i.encode(n)));return a.push(s.length),{table:s,offsets:a}},e}(),A1t=function(){function e(t,r,n,i,a,s){this.raw=t,this.numberOfContours=r,this.xMin=n,this.yMin=i,this.xMax=a,this.yMax=s,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),C1t=function(){function e(t,r,n,i,a){var s,o;for(this.raw=t,this.xMin=r,this.yMin=n,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;o=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&o;)s.pos+=1&o?4:2,128&o?s.pos+=8:64&o?s.pos+=4:8&o&&(s.pos+=2)}return e.prototype.encode=function(){var t,r,n;for(r=new a0(sxe.call(this.raw.data)),t=0,n=this.glyphIDs.length;t<n;++t)r.pos=this.glyphOffsets[t];return r.data},e}(),P1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return ip(e,oh),e.prototype.tag="loca",e.prototype.parse=function(t){var r,n;return t.pos=this.offset,r=this.file.head.indexToLocFormat,this.offsets=r===0?(function(){var i,a;for(a=[],n=0,i=this.length;n<i;n+=2)a.push(2*t.readUInt16());return a}).call(this):(function(){var i,a;for(a=[],n=0,i=this.length;n<i;n+=4)a.push(t.readUInt32());return a}).call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,r){for(var n=new Uint32Array(this.offsets.length),i=0,a=0,s=0;s<n.length;++s)if(n[s]=i,a<r.length&&r[a]==s){++a,n[s]=i;var o=this.offsets[s],l=this.offsets[s+1]-o;l>0&&(i+=l)}for(var u=new Array(4*n.length),c=0;c<n.length;
797++c)u[4*c+3]=255&n[c],u[4*c+2]=(65280&n[c])>>8,u[4*c+1]=(16711680&n[c])>>16,u[4*c]=(4278190080&n[c])>>24;return u},e}(),M1t=function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,r,n,i,a;for(r in i=this.font.cmap.tables[0].codeMap,t={},a=this.subset)n=a[r],t[r]=i[n];return t},e.prototype.glyphsFor=function(t){var r,n,i,a,s,o,l;for(i={},s=0,o=t.length;s<o;s++)i[a=t[s]]=this.font.glyf.glyphFor(a);for(a in r=[],i)(n=i[a])!=null&&n.compound&&r.push.apply(r,n.glyphIDs);if(r.length>0)for(a in l=this.glyphsFor(r))n=l[a],i[a]=n;return i},e.prototype.encode=function(t,r){var n,i,a,s,o,l,u,c,d,f,h,p,m,_,y;for(i in n=axe.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(t),h={0:0},y=n.charMap)h[(l=y[i]).old]=l.new;for(p in f=n.maxGlyphID,s)p in h||(h[p]=f++);return c=function(v){var b,w;for(b in w={},v)w[v[b]]=b;return w}(h),d=Object.keys(c).sort(function(v,b){return v-b}),m=function(){var v,b,w;for(w=[],v=0,b=d.length;v<b;v++)o=d[v],w.push(c[o]);return w}(),a=this.font.glyf.encode(s,m,h),u=this.font.loca.encode(a.offsets,m),_={cmap:this.font.cmap.raw(),glyf:a.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(r)},this.font.os2.exists&&(_["OS/2"]=this.font.os2.raw()),this.font.directory.encode(_)},e}();qr.API.PDFObject=function(){var e;function t(){}return e=function(r,n){return(Array(n+1).join("0")+r).slice(-n)},t.convert=function(r){var n,i,a,s;if(Array.isArray(r))return"["+function(){var o,l,u;for(u=[],o=0,l=r.length;o<l;o++)n=r[o],u.push(t.convert(n));return u}().join(" ")+"]";if(typeof r=="string")return"/"+r;if(r!=null&&r.isString)return"("+r+")";if(r instanceof Date)return"(D:"+e(r.getUTCFullYear(),4)+e(r.getUTCMonth(),2)+e(r.getUTCDate(),2)+e(r.getUTCHours(),2)+e(r.getUTCMinutes(),2)+e(r.getUTCSeconds(),2)+"Z)";if({}.toString.call(r)==="[object Object]"){for(i in a=["<<"],r)s=r[i],a.push("/"+i+" "+t.convert(s));return a.push(">>"),a.join(` 798`)}return""+r},t}();const k1t=Object.freeze(Object.defineProperty({__proto__:null,AcroForm:s1t,AcroFormAppearance:Lr,AcroFormButton:Lo,AcroFormCheckBox:bT,AcroFormChoiceField:mv,AcroFormComboBox:yv,AcroFormEditBox:vT,AcroFormListBox:gv,AcroFormPasswordField:wT,AcroFormPushButton:_T,AcroFormRadioButton:vv,AcroFormTextField:qg,GState:dA,ShadingPattern:rg,TilingPattern:Vy,default:qr,jsPDF:qr},Symbol.toStringTag,{value:"Module"}));var oxe={exports:{}};const O1t=AB(k1t);/*! 799 * 800 * jsPDF AutoTable plugin v3.8.4 801 * 802 * Copyright (c) 2024 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable 803 * Licensed under the MIT License. 804 * http://opensource.org/licenses/mit-license 805 * 806 */(function(e,t){(function(n,i){e.exports=i(function(){try{return O1t}catch{}}())})(typeof globalThis<"u"?globalThis:typeof Wf<"u"?Wf:typeof window<"u"?window:typeof self<"u"?self:Wf,function(r){return function(){var n={172:function(o,l){var u=this&&this.__extends||function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,_){m.__proto__=_}||function(m,_){for(var y in _)Object.prototype.hasOwnProperty.call(_,y)&&(m[y]=_[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function m(){this.constructor=h}h.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}}();Object.defineProperty(l,"__esModule",{value:!0}),l.CellHookData=l.HookData=void 0;var c=function(){function f(h,p,m){this.table=p,this.pageNumber=p.pageNumber,this.pageCount=this.pageNumber,this.settings=p.settings,this.cursor=m,this.doc=h.getDocument()}return f}();l.HookData=c;var d=function(f){u(h,f);function h(p,m,_,y,v,b){var w=f.call(this,p,m,b)||this;return w.cell=_,w.row=y,w.column=v,w.section=y.section,w}return h}(c);l.CellHookData=d},340:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0});var c=u(4),d=u(136),f=u(744),h=u(776),p=u(664),m=u(972);function _(y){y.API.autoTable=function(){for(var v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];var w;v.length===1?w=v[0]:(console.error("Use of deprecated autoTable initiation"),w=v[2]||{},w.columns=v[0],w.body=v[1]);var x=(0,h.parseInput)(this,w),E=(0,m.createTable)(this,x);return(0,p.drawTable)(this,E),this},y.API.lastAutoTable=!1,y.API.previousAutoTable=!1,y.API.autoTable.previous=!1,y.API.autoTableText=function(v,b,w,x){(0,d.default)(v,b,w,x,this)},y.API.autoTableSetDefaults=function(v){return f.DocHandler.setDefaults(v,this),this},y.autoTableSetDefaults=function(v,b){f.DocHandler.setDefaults(v,b)},y.API.autoTableHtmlToJson=function(v,b){var w;if(b===void 0&&(b=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var x=new f.DocHandler(this),E=(0,c.parseHtml)(x,v,window,b,!1),T=E.head,S=E.body,A=((w=T[0])===null||w===void 0?void 0:w.map(function(C){return C.content}))||[];return{columns:A,rows:S,data:S}},y.API.autoTableEndPosY=function(){console.error("Use of deprecated function: autoTableEndPosY. Use doc.lastAutoTable.finalY instead.");var v=this.lastAutoTable;return v&&v.finalY?v.finalY:0},y.API.autoTableAddPageContent=function(v){return console.error("Use of deprecated function: autoTableAddPageContent. Use jsPDF.autoTableSetDefaults({didDrawPage: () => {}}) instead."),y.API.autoTable.globalDefaults||(y.API.autoTable.globalDefaults={}),y.API.autoTable.globalDefaults.addPageContent=v,this},y.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}}l.default=_}
806,136:function(o,l){Object.defineProperty(l,"__esModule",{value:!0});function u(c,d,f,h,p){h=h||{};var m=1.15,_=p.internal.scaleFactor,y=p.internal.getFontSize()/_,v=p.getLineHeightFactor?p.getLineHeightFactor():m,b=y*v,w=/\r\n|\r|\n/g,x="",E=1;if((h.valign==="middle"||h.valign==="bottom"||h.halign==="center"||h.halign==="right")&&(x=typeof c=="string"?c.split(w):c,E=x.length||1),f+=y*(2-m),h.valign==="middle"?f-=E/2*b:h.valign==="bottom"&&(f-=E*b),h.halign==="center"||h.halign==="right"){var T=y;if(h.halign==="center"&&(T*=.5),x&&E>=1){for(var S=0;S<x.length;S++)p.text(x[S],d-p.getStringUnitWidth(x[S])*T,f),f+=b;return p}d-=p.getStringUnitWidth(c)*T}return h.halign==="justify"?p.text(c,d,f,{maxWidth:h.maxWidth||100,align:"justify"}):p.text(c,d,f),p}l.default=u},420:function(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.getPageAvailableWidth=l.parseSpacing=l.getFillStyle=l.addTableBorder=l.getStringWidth=void 0;function u(p,m,_){_.applyStyles(m,!0);var y=Array.isArray(p)?p:[p],v=y.map(function(b){return _.getTextWidth(b)}).reduce(function(b,w){return Math.max(b,w)},0);return v}l.getStringWidth=u;function c(p,m,_,y){var v=m.settings.tableLineWidth,b=m.settings.tableLineColor;p.applyStyles({lineWidth:v,lineColor:b});var w=d(v,!1);w&&p.rect(_.x,_.y,m.getWidth(p.pageSize().width),y.y-_.y,w)}l.addTableBorder=c;function d(p,m){var _=p>0,y=m||m===0;return _&&y?"DF":_?"S":y?"F":null}l.getFillStyle=d;function f(p,m){var _,y,v,b;if(p=p||m,Array.isArray(p)){if(p.length>=4)return{top:p[0],right:p[1],bottom:p[2],left:p[3]};if(p.length===3)return{top:p[0],right:p[1],bottom:p[2],left:p[1]};if(p.length===2)return{top:p[0],right:p[1],bottom:p[0],left:p[1]};p.length===1?p=p[0]:p=m}return typeof p=="object"?(typeof p.vertical=="number"&&(p.top=p.vertical,p.bottom=p.vertical),typeof p.horizontal=="number"&&(p.right=p.horizontal,p.left=p.horizontal),{left:(_=p.left)!==null&&_!==void 0?_:m,top:(y=p.top)!==null&&y!==void 0?y:m,right:(v=p.right)!==null&&v!==void 0?v:m,bottom:(b=p.bottom)!==null&&b!==void 0?b:m}):(typeof p!="number"&&(p=m),{top:p,right:p,bottom:p,left:p})}l.parseSpacing=f;function h(p,m){var _=f(m.settings.margin,0);return p.pageSize().width-(_.left+_.right)}l.getPageAvailableWidth=h},796:function(o,l){var u=this&&this.__extends||function(){var h=function(p,m){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&(_[v]=y[v])},h(p,m)};return function(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");h(p,m);function _(){this.constructor=p}p.prototype=m===null?Object.create(m):(_.prototype=m.prototype,new _)}}();Object.defineProperty(l,"__esModule",{value:!0}),l.getTheme=l.defaultStyles=l.HtmlRowInput=void 0;var c=function(h){u(p,h);function p(m){var _=h.call(this)||this;return _._element=m,_}return p}(Array);l.HtmlRowInput=c;function d(h){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/h,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}l.defaultStyles=d;function f(h){var p={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return p[h]}l.getTheme=f},903:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.parseCss=void 0;var c=u(420);function d(_,y,v,b,w){var x={},E=1.3333333333333333,T=h(y,function(q){return w.getComputedStyle(q).backgroundColor});T!=null&&(x.fillColor=T);var S=h(y,function(q){return w.getComputedStyle(q).color});S!=null&&(x.textColor=S);var A=m(b,v);A&&(x.cellPadding=A);var C="borderTopColor",k=E*v,M=b.borderTopWidth;
806if(b.borderBottomWidth===M&&b.borderRightWidth===M&&b.borderLeftWidth===M){var D=(parseFloat(M)||0)/k;D&&(x.lineWidth=D)}else x.lineWidth={top:(parseFloat(b.borderTopWidth)||0)/k,right:(parseFloat(b.borderRightWidth)||0)/k,bottom:(parseFloat(b.borderBottomWidth)||0)/k,left:(parseFloat(b.borderLeftWidth)||0)/k},x.lineWidth.top||(x.lineWidth.right?C="borderRightColor":x.lineWidth.bottom?C="borderBottomColor":x.lineWidth.left&&(C="borderLeftColor"));var $=h(y,function(q){return w.getComputedStyle(q)[C]});$!=null&&(x.lineColor=$);var V=["left","right","center","justify"];V.indexOf(b.textAlign)!==-1&&(x.halign=b.textAlign),V=["middle","bottom","top"],V.indexOf(b.verticalAlign)!==-1&&(x.valign=b.verticalAlign);var U=parseInt(b.fontSize||"");isNaN(U)||(x.fontSize=U/E);var B=f(b);B&&(x.fontStyle=B);var z=(b.fontFamily||"").toLowerCase();return _.indexOf(z)!==-1&&(x.font=z),x}l.parseCss=d;function f(_){var y="";return(_.fontWeight==="bold"||_.fontWeight==="bolder"||parseInt(_.fontWeight)>=700)&&(y="bold"),(_.fontStyle==="italic"||_.fontStyle==="oblique")&&(y+="italic"),y}function h(_,y){var v=p(_,y);if(!v)return null;var b=v.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!b||!Array.isArray(b))return null;var w=[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])],x=parseInt(b[4]);return x===0||isNaN(w[0])||isNaN(w[1])||isNaN(w[2])?null:w}function p(_,y){var v=y(_);return v==="rgba(0, 0, 0, 0)"||v==="transparent"||v==="initial"||v==="inherit"?_.parentElement==null?null:p(_.parentElement,y):v}function m(_,y){var v=[_.paddingTop,_.paddingRight,_.paddingBottom,_.paddingLeft],b=96/(72/y),w=(parseInt(_.lineHeight)-parseInt(_.fontSize))/y/2,x=v.map(function(T){return parseInt(T||"0")/b}),E=(0,c.parseSpacing)(x,0);return w>E.top&&(E.top=w),w>E.bottom&&(E.bottom=w),E}},744:function(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.DocHandler=void 0;var u={},c=function(){function d(f){this.jsPDFDocument=f,this.userStyles={textColor:f.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:f.internal.getFontSize(),fontStyle:f.internal.getFont().fontStyle,font:f.internal.getFont().fontName,lineWidth:f.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:f.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return d.setDefaults=function(f,h){h===void 0&&(h=null),h?h.__autoTableDocumentDefaults=f:u=f},d.unifyColor=function(f){return Array.isArray(f)?f:typeof f=="number"?[f,f,f]:typeof f=="string"?[f]:null},d.prototype.applyStyles=function(f,h){var p,m,_;h===void 0&&(h=!1),f.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(f.fontStyle);var y=this.jsPDFDocument.internal.getFont(),v=y.fontStyle,b=y.fontName;if(f.font&&(b=f.font),f.fontStyle){v=f.fontStyle;var w=this.getFontList()[b];w&&w.indexOf(v)===-1&&(this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(w[0]),v=w[0])}if(this.jsPDFDocument.setFont(b,v),f.fontSize&&this.jsPDFDocument.setFontSize(f.fontSize),!h){var x=d.unifyColor(f.fillColor);x&&(p=this.jsPDFDocument).setFillColor.apply(p,x),x=d.unifyColor(f.textColor),x&&(m=this.jsPDFDocument).setTextColor.apply(m,x),x=d.unifyColor(f.lineColor),x&&(_=this.jsPDFDocument).setDrawColor.apply(_,x),typeof f.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(f.lineWidth)}},d.prototype.splitTextToSize=function(f,h,p){return this.jsPDFDocument.splitTextToSize(f,h,p)},d.prototype.rect=function(f,h,p,m,_){return this.jsPDFDocument.rect(f,h,p,m,_)},d.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},d.prototype.getTextWidth=function(f){return this.jsPDFDocument.getTextWidth(f)},d.prototype.getDocument=function(){return this.jsPDFDocument},d.prototype.setPage=function(f){this.jsPDFDocument.setPage(f)},d.prototype.addPage=function(){return this.jsPDFDocument.addPage()},d.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},d.prototype.getGlobalOptions=function(){return u||{}},d.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},d.prototype.pageSize=function(){var f=this.jsPDFDocument.internal.pageSize;return f.width==null&&(f={width:f.getWidth(),height:f.getHeight()}),f},d.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},d.prototype.getLineHeightFactor=function(){var f=this.jsPDFDocument;return f.getLineHeightFactor?f.getLineHeightFactor():1.15},d.prototype.getLineHeight=function(f){return f/this.scaleFactor()*this.getLineHeightFactor()},d.prototype.pageNumber=function(){var f=this.jsPDFDocument.internal.getCurrentPageInfo();return f?f.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},d}();l.DocHandler=c}
806,4:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.parseHtml=void 0;var c=u(903),d=u(796);function f(m,_,y,v,b){var w,x;v===void 0&&(v=!1),b===void 0&&(b=!1);var E;typeof _=="string"?E=y.document.querySelector(_):E=_;var T=Object.keys(m.getFontList()),S=m.scaleFactor(),A=[],C=[],k=[];if(!E)return console.error("Html table could not be found with input: ",_),{head:A,body:C,foot:k};for(var M=0;M<E.rows.length;M++){var D=E.rows[M],$=(x=(w=D==null?void 0:D.parentElement)===null||w===void 0?void 0:w.tagName)===null||x===void 0?void 0:x.toLowerCase(),V=h(T,S,y,D,v,b);V&&($==="thead"?A.push(V):$==="tfoot"?k.push(V):C.push(V))}return{head:A,body:C,foot:k}}l.parseHtml=f;function h(m,_,y,v,b,w){for(var x=new d.HtmlRowInput(v),E=0;E<v.cells.length;E++){var T=v.cells[E],S=y.getComputedStyle(T);if(b||S.display!=="none"){var A=void 0;w&&(A=(0,c.parseCss)(m,T,_,S,y)),x.push({rowSpan:T.rowSpan,colSpan:T.colSpan,styles:A,_element:T,content:p(T)})}}var C=y.getComputedStyle(v);if(x.length>0&&(b||C.display!=="none"))return x}function p(m){var _=m.cloneNode(!0);return _.innerHTML=_.innerHTML.replace(/\n/g,"").replace(/ +/g," "),_.innerHTML=_.innerHTML.split(/<br.*?>/).map(function(y){return y.trim()}).join(` 807`),_.innerText||_.textContent||""}},776:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.parseInput=void 0;var c=u(4),d=u(356),f=u(420),h=u(744),p=u(792);function m(E,T){var S=new h.DocHandler(E),A=S.getDocumentOptions(),C=S.getGlobalOptions();(0,p.default)(S,C,A,T);var k=(0,d.assign)({},C,A,T),M;typeof window<"u"&&(M=window);var D=_(C,A,T),$=y(C,A,T),V=v(S,k),U=w(S,k,M);return{id:T.tableId,content:U,hooks:$,styles:D,settings:V}}l.parseInput=m;function _(E,T,S){for(var A={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},C=function($){if($==="columnStyles"){var V=E[$],U=T[$],B=S[$];A.columnStyles=(0,d.assign)({},V,U,B)}else{var z=[E,T,S],q=z.map(function(L){return L[$]||{}});A[$]=(0,d.assign)({},q[0],q[1],q[2])}},k=0,M=Object.keys(A);k<M.length;k++){var D=M[k];C(D)}return A}function y(E,T,S){for(var A=[E,T,S],C={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},k=0,M=A;k<M.length;k++){var D=M[k];D.didParseCell&&C.didParseCell.push(D.didParseCell),D.willDrawCell&&C.willDrawCell.push(D.willDrawCell),D.didDrawCell&&C.didDrawCell.push(D.didDrawCell),D.willDrawPage&&C.willDrawPage.push(D.willDrawPage),D.didDrawPage&&C.didDrawPage.push(D.didDrawPage)}return C}function v(E,T){var S,A,C,k,M,D,$,V,U,B,z,q,L=(0,f.parseSpacing)(T.margin,40/E.scaleFactor()),K=(S=b(E,T.startY))!==null&&S!==void 0?S:L.top,O;T.showFoot===!0?O="everyPage":T.showFoot===!1?O="never":O=(A=T.showFoot)!==null&&A!==void 0?A:"everyPage";var N;T.showHead===!0?N="everyPage":T.showHead===!1?N="never":N=(C=T.showHead)!==null&&C!==void 0?C:"everyPage";var X=(k=T.useCss)!==null&&k!==void 0?k:!1,ie=T.theme||(X?"plain":"striped"),ee=!!T.horizontalPageBreak,le=(M=T.horizontalPageBreakRepeat)!==null&&M!==void 0?M:null;return{includeHiddenHtml:(D=T.includeHiddenHtml)!==null&&D!==void 0?D:!1,useCss:X,theme:ie,startY:K,margin:L,pageBreak:($=T.pageBreak)!==null&&$!==void 0?$:"auto",rowPageBreak:(V=T.rowPageBreak)!==null&&V!==void 0?V:"auto",tableWidth:(U=T.tableWidth)!==null&&U!==void 0?U:"auto",showHead:N,showFoot:O,tableLineWidth:(B=T.tableLineWidth)!==null&&B!==void 0?B:0,tableLineColor:(z=T.tableLineColor)!==null&&z!==void 0?z:200,horizontalPageBreak:ee,horizontalPageBreakRepeat:le,horizontalPageBreakBehaviour:(q=T.horizontalPageBreakBehaviour)!==null&&q!==void 0?q:"afterAllRows"}}function b(E,T){var S=E.getLastAutoTable(),A=E.scaleFactor(),C=E.pageNumber(),k=!1;if(S&&S.startPageNumber){var M=S.startPageNumber+S.pageNumber-1;k=M===C}return typeof T=="number"?T:(T==null||T===!1)&&k&&(S==null?void 0:S.finalY)!=null?S.finalY+20/A:null}function w(E,T,S){var A=T.head||[],C=T.body||[],k=T.foot||[];if(T.html){var M=T.includeHiddenHtml;if(S){var D=(0,c.parseHtml)(E,T.html,S,M,T.useCss)||{};A=D.head||A,C=D.body||A,k=D.foot||A}else console.error("Cannot parse html in non browser environment")}var $=T.columns||x(A,C,k);return{columns:$,head:A,body:C,foot:k}}
807function x(E,T,S){var A=E[0]||T[0]||S[0]||[],C=[];return Object.keys(A).filter(function(k){return k!=="_element"}).forEach(function(k){var M=1,D;Array.isArray(A)?D=A[parseInt(k)]:D=A[k],typeof D=="object"&&!Array.isArray(D)&&(M=(D==null?void 0:D.colSpan)||1);for(var $=0;$<M;$++){var V=void 0;Array.isArray(A)?V=C.length:V=k+($>0?"_".concat($):"");var U={dataKey:V};C.push(U)}}),C}},792:function(o,l){Object.defineProperty(l,"__esModule",{value:!0});function u(d,f,h,p){for(var m=function(b){b&&typeof b!="object"&&console.error("The options parameter should be of type object, is: "+typeof b),typeof b.extendWidth<"u"&&(b.tableWidth=b.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),typeof b.margins<"u"&&(typeof b.margin>"u"&&(b.margin=b.margins),console.error("Use of deprecated option: margins, use margin instead.")),b.startY&&typeof b.startY!="number"&&(console.error("Invalid value for startY option",b.startY),delete b.startY),!b.didDrawPage&&(b.afterPageContent||b.beforePageContent||b.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),b.didDrawPage=function(k){d.applyStyles(d.userStyles),b.beforePageContent&&b.beforePageContent(k),d.applyStyles(d.userStyles),b.afterPageContent&&b.afterPageContent(k),d.applyStyles(d.userStyles),b.afterPageAdd&&k.pageNumber>1&&k.afterPageAdd(k),d.applyStyles(d.userStyles)}),["createdHeaderCell","drawHeaderRow","drawRow","drawHeaderCell"].forEach(function(k){b[k]&&console.error('The "'.concat(k,'" hook has changed in version 3.0, check the changelog for how to migrate.'))}),[["showFoot","showFooter"],["showHead","showHeader"],["didDrawPage","addPageContent"],["didParseCell","createdCell"],["headStyles","headerStyles"]].forEach(function(k){var M=k[0],D=k[1];b[D]&&(console.error("Use of deprecated option ".concat(D,". Use ").concat(M," instead")),b[M]=b[D])}),[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(k){var M=typeof k=="string"?k:k[0],D=typeof k=="string"?k:k[1];typeof b[M]<"u"&&(typeof b.styles[D]>"u"&&(b.styles[D]=b[M]),console.error("Use of deprecated option: "+M+", use the style "+D+" instead."))});for(var w=0,x=["styles","bodyStyles","headStyles","footStyles"];w<x.length;w++){var E=x[w];c(b[E]||{})}for(var T=b.columnStyles||{},S=0,A=Object.keys(T);S<A.length;S++){var C=A[S];c(T[C]||{})}},_=0,y=[f,h,p];_<y.length;_++){var v=y[_];m(v)}}l.default=u;function c(d){d.rowHeight?(console.error("Use of deprecated style rowHeight. It is renamed to minCellHeight."),d.minCellHeight||(d.minCellHeight=d.rowHeight)):d.columnWidth&&(console.error("Use of deprecated style columnWidth. It is renamed to cellWidth."),d.cellWidth||(d.cellWidth=d.columnWidth))}},260:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.Column=l.Cell=l.Row=l.Table=void 0;var c=u(796),d=u(172),f=u(420),h=function(){function y(v,b){this.pageNumber=1,this.pageCount=1,this.id=v.id,this.settings=v.settings,this.styles=v.styles,this.hooks=v.hooks,this.columns=b.columns,this.head=b.head,this.body=b.body,this.foot=b.foot}return y.prototype.getHeadHeight=function(v){return this.head.reduce(function(b,w){return b+w.getMaxCellHeight(v)},0)},y.prototype.getFootHeight=function(v){return this.foot.reduce(function(b,w){return b+w.getMaxCellHeight(v)},0)},y.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},y.prototype.callCellHooks=function(v,b,w,x,E,T){for(var S=0,A=b;S<A.length;S++){var C=A[S],k=new d.CellHookData(v,this,w,x,E,T),M=C(k)===!1;if(w.text=Array.isArray(w.text)?w.text:[w.text],M)return!1}return!0},y.prototype.callEndPageHooks=function(v,b){v.applyStyles(v.userStyles);for(var w=0,x=this.hooks.didDrawPage;w<x.length;w++){var E=x[w];E(new d.HookData(v,this,b))}},y.prototype.callWillDrawPageHooks=function(v,b){for(var w=0,x=this.hooks.willDrawPage;w<x.length;w++){var E=x[w];E(new d.HookData(v,this,b))}},y.prototype.getWidth=function(v){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var b=this.columns.reduce(function(x,E){return x+E.wrappedWidth},0);return b}else{var w=this.settings.margin;return v-w.left-w.right}},y}();l.Table=h;var p=function(){function y(v,b,w,x,E){E===void 0&&(E=!1),this.height=0,this.raw=v,v instanceof c.HtmlRowInput&&(this.raw=v._element,this.element=v._element),this.index=b,this.section=w,this.cells=x,this.spansMultiplePages=E}return y.prototype.getMaxCellHeight=function(v){var b=this;return v.reduce(function(w,x){var E;return Math.max(w,((E=b.cells[x.index])===null||E===void 0?void 0:E.height)||0)},0)},y.prototype.hasRowSpan=function(v){var b=this;return v.filter(function(w){var x=b.cells[w.index];return x?x.rowSpan>1:!1}).length>0},y.prototype.canEntireRowFit=function(v,b){return this.getMaxCellHeight(b)<=v},y.prototype.getMinimumRowHeight=function(v,b){var w=this;return v.reduce(function(x,E){var T=w.cells[E.index];if(!T)return 0;var S=b.getLineHeight(T.styles.fontSize),A=T.padding("vertical"),C=A+S;return C>x?C:x},0)},y}();l.Row=p;var m=function(){function y(v,b,w){var x,E;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=b,this.section=w,this.raw=v;var T=v;v!=null&&typeof v=="object"&&!Array.isArray(v)?(this.rowSpan=v.rowSpan||1,this.colSpan=v.colSpan||1,T=(E=(x=v.content)!==null&&x!==void 0?x:v.title)!==null&&E!==void 0?E:v,v._element&&(this.raw=v._element)):(this.rowSpan=1,this.colSpan=1);var S=T!=null?""+T:"",A=/\r\n|\r|\n/g;this.text=S.split(A)}return y.prototype.getTextPos=function(){var v;if(this.styles.valign==="top")v=this.y+this.padding("top");else if(this.styles.valign==="bottom")v=this.y+this.height-this.padding("bottom");else{var b=this.height-this.padding("vertical");v=this.y+b/2+this.padding("top")}var w;if(this.styles.halign==="right")w=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var x=this.width-this.padding("horizontal");w=this.x+x/2+this.padding("left")}else w=this.x+this.padding("left");return{x:w,y:v}}
807,y.prototype.getContentHeight=function(v,b){b===void 0&&(b=1.15);var w=Array.isArray(this.text)?this.text.length:1,x=this.styles.fontSize/v*b,E=w*x+this.padding("vertical");return Math.max(E,this.styles.minCellHeight)},y.prototype.padding=function(v){var b=(0,f.parseSpacing)(this.styles.cellPadding,0);return v==="vertical"?b.top+b.bottom:v==="horizontal"?b.left+b.right:b[v]},y}();l.Cell=m;var _=function(){function y(v,b,w){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=v,this.raw=b,this.index=w}return y.prototype.getMaxCustomCellWidth=function(v){for(var b=0,w=0,x=v.allRows();w<x.length;w++){var E=x[w],T=E.cells[this.index];T&&typeof T.styles.cellWidth=="number"&&(b=Math.max(b,T.styles.cellWidth))}return b},y}();l.Column=_},356:function(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.assign=void 0;function u(c,d,f,h,p){if(c==null)throw new TypeError("Cannot convert undefined or null to object");for(var m=Object(c),_=1;_<arguments.length;_++){var y=arguments[_];if(y!=null)for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&(m[v]=y[v])}return m}l.assign=u},972:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.createTable=void 0;var c=u(744),d=u(260),f=u(324),h=u(796),p=u(356);function m(E,T){var S=new c.DocHandler(E),A=_(T,S.scaleFactor()),C=new d.Table(T,A);return(0,f.calculateWidths)(S,C),S.applyStyles(S.userStyles),C}l.createTable=m;function _(E,T){var S=E.content,A=w(S.columns);if(S.head.length===0){var C=v(A,"head");C&&S.head.push(C)}if(S.foot.length===0){var C=v(A,"foot");C&&S.foot.push(C)}var k=E.settings.theme,M=E.styles;return{columns:A,head:y("head",S.head,A,M,k,T),body:y("body",S.body,A,M,k,T),foot:y("foot",S.foot,A,M,k,T)}}function y(E,T,S,A,C,k){var M={},D=T.map(function($,V){for(var U=0,B={},z=0,q=0,L=0,K=S;L<K.length;L++){var O=K[L];if(M[O.index]==null||M[O.index].left===0)if(q===0){var N=void 0;Array.isArray($)?N=$[O.index-z-U]:N=$[O.dataKey];var X={};typeof N=="object"&&!Array.isArray(N)&&(X=(N==null?void 0:N.styles)||{});var ie=x(E,O,V,C,A,k,X),ee=new d.Cell(N,ie,E);B[O.dataKey]=ee,B[O.index]=ee,q=ee.colSpan-1,M[O.index]={left:ee.rowSpan-1,times:q}}else q--,z++;else M[O.index].left--,q=M[O.index].times,U++}return new d.Row($,V,E,B)});return D}function v(E,T){var S={};return E.forEach(function(A){if(A.raw!=null){var C=b(T,A.raw);C!=null&&(S[A.dataKey]=C)}}),Object.keys(S).length>0?S:null}function b(E,T){if(E==="head"){if(typeof T=="object")return T.header||T.title||null;if(typeof T=="string"||typeof T=="number")return T}else if(E==="foot"&&typeof T=="object")return T.footer;return null}function w(E){return E.map(function(T,S){var A,C,k;return typeof T=="object"?k=(C=(A=T.dataKey)!==null&&A!==void 0?A:T.key)!==null&&C!==void 0?C:S:k=S,new d.Column(k,T,S)})}function x(E,T,S,A,C,k,M){var D=(0,h.getTheme)(A),$;E==="head"?$=C.headStyles:E==="body"?$=C.bodyStyles:E==="foot"&&($=C.footStyles);var V=(0,p.assign)({},D.table,D[E],C.styles,$),U=C.columnStyles[T.dataKey]||C.columnStyles[T.index]||{},B=E==="body"?U:{},z=E==="body"&&S%2===0?(0,p.assign)({},D.alternateRow,C.alternateRowStyles):{},q=(0,h.defaultStyles)(k),L=(0,p.assign)({},q,V,z,B);return(0,p.assign)(L,M)}},664:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.addPage=l.drawTable=void 0;var c=u(420),d=u(260),f=u(744),h=u(356),p=u(136),m=u(224);function _(U,B){var z=B.settings,q=z.startY,L=z.margin,K={x:L.left,y:q},O=B.getHeadHeight(B.columns)+B.getFootHeight(B.columns),N=q+L.bottom+O;if(z.pageBreak==="avoid"){var X=B.body,ie=X.reduce(function(Te,be){return Te+be.height},0);N+=ie}var ee=new f.DocHandler(U);(z.pageBreak==="always"||z.startY!=null&&N>ee.pageSize().height)&&(V(ee),K.y=L.top),B.callWillDrawPageHooks(ee,K);var le=(0,h.assign)({},K);B.startPageNumber=ee.pageNumber(),z.horizontalPageBreak?y(ee,B,le,K):(ee.applyStyles(ee.userStyles),(z.showHead==="firstPage"||z.showHead==="everyPage")&&B.head.forEach(function(Te){return C(ee,B,Te,K,B.columns)}),ee.applyStyles(ee.userStyles),B.body.forEach(function(Te,be){var we=be===B.body.length-1;A(ee,B,Te,we,le,K,B.columns)}),ee.applyStyles(ee.userStyles),(z.showFoot==="lastPage"||z.showFoot==="everyPage")&&B.foot.forEach(function(Te){return C(ee,B,Te,K,B.columns)})),(0,c.addTableBorder)(ee,B,le,K),B.callEndPageHooks(ee,K),B.finalY=K.y,U.lastAutoTable=B,U.previousAutoTable=B,U.autoTable&&(U.autoTable.previous=B),ee.applyStyles(ee.userStyles)}l.drawTable=_;function y(U,B,z,q){var L=(0,m.calculateAllColumnsCanFitInPage)(U,B),K=B.settings;if(K.horizontalPageBreakBehaviour==="afterAllRows")L.forEach(function(ie,ee){U.applyStyles(U.userStyles),ee>0?$(U,B,z,q,ie.columns,!0):v(U,B,q,ie.columns),b(U,B,z,q,ie.columns),x(U,B,q,ie.columns)});else for(var O=-1,N=L[0],X=function(){var ie=O;if(N){U.applyStyles(U.userStyles);var ee=N.columns;O>=0?$(U,B,z,q,ee,!0):v(U,B,q,ee),ie=w(U,B,O+1,q,ee),x(U,B,q,ee)}var le=ie-O;
807L.slice(1).forEach(function(Te){U.applyStyles(U.userStyles),$(U,B,z,q,Te.columns,!0),w(U,B,O+1,q,Te.columns,le),x(U,B,q,Te.columns)}),O=ie};O<B.body.length-1;)X()}function v(U,B,z,q){var L=B.settings;U.applyStyles(U.userStyles),(L.showHead==="firstPage"||L.showHead==="everyPage")&&B.head.forEach(function(K){return C(U,B,K,z,q)})}function b(U,B,z,q,L){U.applyStyles(U.userStyles),B.body.forEach(function(K,O){var N=O===B.body.length-1;A(U,B,K,N,z,q,L)})}function w(U,B,z,q,L,K){U.applyStyles(U.userStyles),K=K??B.body.length;var O=Math.min(z+K,B.body.length),N=-1;return B.body.slice(z,O).forEach(function(X,ie){var ee=z+ie===B.body.length-1,le=D(U,B,ee,q);X.canEntireRowFit(le,L)&&(C(U,B,X,q,L),N=z+ie)}),N}function x(U,B,z,q){var L=B.settings;U.applyStyles(U.userStyles),(L.showFoot==="lastPage"||L.showFoot==="everyPage")&&B.foot.forEach(function(K){return C(U,B,K,z,q)})}function E(U,B,z){var q=z.getLineHeight(U.styles.fontSize),L=U.padding("vertical"),K=Math.floor((B-L)/q);return Math.max(0,K)}function T(U,B,z,q){var L={};U.spansMultiplePages=!0,U.height=0;for(var K=0,O=0,N=z.columns;O<N.length;O++){var X=N[O],ie=U.cells[X.index];if(ie){Array.isArray(ie.text)||(ie.text=[ie.text]);var ee=new d.Cell(ie.raw,ie.styles,ie.section);ee=(0,h.assign)(ee,ie),ee.text=[];var le=E(ie,B,q);ie.text.length>le&&(ee.text=ie.text.splice(le,ie.text.length));var Te=q.scaleFactor(),be=q.getLineHeightFactor();ie.contentHeight=ie.getContentHeight(Te,be),ie.contentHeight>=B&&(ie.contentHeight=B,ee.styles.minCellHeight-=B),ie.contentHeight>U.height&&(U.height=ie.contentHeight),ee.contentHeight=ee.getContentHeight(Te,be),ee.contentHeight>K&&(K=ee.contentHeight),L[X.index]=ee}}var we=new d.Row(U.raw,-1,U.section,L,!0);we.height=K;for(var ae=0,H=z.columns;ae<H.length;ae++){var X=H[ae],ee=we.cells[X.index];ee&&(ee.height=we.height);var ie=U.cells[X.index];ie&&(ie.height=U.height)}return we}function S(U,B,z,q){var L=U.pageSize().height,K=q.settings.margin,O=K.top+K.bottom,N=L-O;B.section==="body"&&(N-=q.getHeadHeight(q.columns)+q.getFootHeight(q.columns));var X=B.getMinimumRowHeight(q.columns,U),ie=X<z;if(X>N)return console.error("Will not be able to print row ".concat(B.index," correctly since it's minimum height is larger than page height")),!0;if(!ie)return!1;var ee=B.hasRowSpan(q.columns),le=B.getMaxCellHeight(q.columns)>N;return le?(ee&&console.error("The content of row ".concat(B.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(ee||q.settings.rowPageBreak==="avoid")}function A(U,B,z,q,L,K,O){var N=D(U,B,q,K);if(z.canEntireRowFit(N,O))C(U,B,z,K,O);else if(S(U,z,N,B)){var X=T(z,N,B,U);C(U,B,z,K,O),$(U,B,L,K,O),A(U,B,X,q,L,K,O)}else $(U,B,L,K,O),A(U,B,z,q,L,K,O)}function C(U,B,z,q,L){q.x=B.settings.margin.left;for(var K=0,O=L;K<O.length;K++){var N=O[K],X=z.cells[N.index];if(!X){q.x+=N.width;continue}U.applyStyles(X.styles),X.x=q.x,X.y=q.y;var ie=B.callCellHooks(U,B.hooks.willDrawCell,X,z,N,q);if(ie===!1){q.x+=N.width;continue}k(U,X,q);var ee=X.getTextPos();(0,p.default)(X.text,ee.x,ee.y,{halign:X.styles.halign,valign:X.styles.valign,maxWidth:Math.ceil(X.width-X.padding("left")-X.padding("right"))},U.getDocument()),B.callCellHooks(U,B.hooks.didDrawCell,X,z,N,q),q.x+=N.width}q.y+=z.height}function k(U,B,z){var q=B.styles;if(U.getDocument().setFillColor(U.getDocument().getFillColor()),typeof q.lineWidth=="number"){var L=(0,c.getFillStyle)(q.lineWidth,q.fillColor);L&&U.rect(B.x,z.y,B.width,B.height,L)}else typeof q.lineWidth=="object"&&(q.fillColor&&U.rect(B.x,z.y,B.width,B.height,"F"),M(U,B,z,q.lineWidth))}function M(U,B,z,q){var L,K,O,N;q.top&&(L=z.x,K=z.y,O=z.x+B.width,N=z.y,q.right&&(O+=.5*q.right),q.left&&(L-=.5*q.left),X(q.top,L,K,O,N)),q.bottom&&(L=z.x,K=z.y+B.height,O=z.x+B.width,N=z.y+B.height,q.right&&(O+=.5*q.right),q.left&&(L-=.5*q.left),X(q.bottom,L,K,O,N)),q.left&&(L=z.x,K=z.y,O=z.x,N=z.y+B.height,q.top&&(K-=.5*q.top),q.bottom&&(N+=.5*q.bottom),X(q.left,L,K,O,N)),q.right&&(L=z.x+B.width,K=z.y,O=z.x+B.width,N=z.y+B.height,q.top&&(K-=.5*q.top),q.bottom&&(N+=.5*q.bottom),X(q.right,L,K,O,N));function X(ie,ee,le,Te,be){U.getDocument().setLineWidth(ie),U.getDocument().line(ee,le,Te,be,"S")}}function D(U,B,z,q){var L=B.settings.margin.bottom,K=B.settings.showFoot;return(K==="everyPage"||K==="lastPage"&&z)&&(L+=B.getFootHeight(B.columns)),U.pageSize().height-q.y-L}function $(U,B,z,q,L,K){L===void 0&&(L=[]),K===void 0&&(K=!1),U.applyStyles(U.userStyles),B.settings.showFoot==="everyPage"&&!K&&B.foot.forEach(function(N){return C(U,B,N,q,L)}),B.callEndPageHooks(U,q);var O=B.settings.margin;(0,c.addTableBorder)(U,B,z,q),V(U),B.pageNumber++,B.pageCount++,q.x=O.left,q.y=O.top,z.y=O.top,B.callWillDrawPageHooks(U,q),B.settings.showHead==="everyPage"&&(B.head.forEac
807h(function(N){return C(U,B,N,q,L)}),U.applyStyles(U.userStyles))}l.addPage=$;function V(U){var B=U.pageNumber();U.setPage(B+1);var z=U.pageNumber();return z===B?(U.addPage(),!0):!1}},224:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.calculateAllColumnsCanFitInPage=void 0;var c=u(420);function d(h,p,m){var _;m===void 0&&(m={});var y=(0,c.getPageAvailableWidth)(h,p),v=new Map,b=[],w=[],x=[];p.settings.horizontalPageBreakRepeat,Array.isArray(p.settings.horizontalPageBreakRepeat)?x=p.settings.horizontalPageBreakRepeat:(typeof p.settings.horizontalPageBreakRepeat=="string"||typeof p.settings.horizontalPageBreakRepeat=="number")&&(x=[p.settings.horizontalPageBreakRepeat]),x.forEach(function(A){var C=p.columns.find(function(k){return k.dataKey===A||k.index===A});C&&!v.has(C.index)&&(v.set(C.index,!0),b.push(C.index),w.push(p.columns[C.index]),y-=C.wrappedWidth)});for(var E=!0,T=(_=m==null?void 0:m.start)!==null&&_!==void 0?_:0;T<p.columns.length;){if(v.has(T)){T++;continue}var S=p.columns[T].wrappedWidth;if(E||y>=S)E=!1,b.push(T),w.push(p.columns[T]),y-=S;else break;T++}return{colIndexes:b,columns:w,lastIndex:T-1}}function f(h,p){for(var m=[],_=0;_<p.columns.length;_++){var y=d(h,p,{start:_});y.columns.length&&(m.push(y),_=y.lastIndex)}return m}l.calculateAllColumnsCanFitInPage=f},324:function(o,l,u){Object.defineProperty(l,"__esModule",{value:!0}),l.ellipsize=l.resizeColumns=l.calculateWidths=void 0;var c=u(420);function d(b,w){f(b,w);var x=[],E=0;w.columns.forEach(function(S){var A=S.getMaxCustomCellWidth(w);A?S.width=A:(S.width=S.wrappedWidth,x.push(S)),E+=S.width});var T=w.getWidth(b.pageSize().width)-E;T&&(T=h(x,T,function(S){return Math.max(S.minReadableWidth,S.minWidth)})),T&&(T=h(x,T,function(S){return S.minWidth})),T=Math.abs(T),!w.settings.horizontalPageBreak&&T>.1/b.scaleFactor()&&(T=T<1?T:Math.round(T),console.warn("Of the table content, ".concat(T," units width could not fit page"))),m(w),_(w,b),p(w)}l.calculateWidths=d;function f(b,w){var x=b.scaleFactor(),E=w.settings.horizontalPageBreak,T=(0,c.getPageAvailableWidth)(b,w);w.allRows().forEach(function(S){for(var A=0,C=w.columns;A<C.length;A++){var k=C[A],M=S.cells[k.index];if(M){var D=w.hooks.didParseCell;w.callCellHooks(b,D,M,S,k,null);var $=M.padding("horizontal");M.contentWidth=(0,c.getStringWidth)(M.text,M.styles,b)+$;var V=(0,c.getStringWidth)(M.text.join(" ").split(/[^\S\u00A0]+/),M.styles,b);if(M.minReadableWidth=V+M.padding("horizontal"),typeof M.styles.cellWidth=="number")M.minWidth=M.styles.cellWidth,M.wrappedWidth=M.styles.cellWidth;else if(M.styles.cellWidth==="wrap"||E===!0)M.contentWidth>T?(M.minWidth=T,M.wrappedWidth=T):(M.minWidth=M.contentWidth,M.wrappedWidth=M.contentWidth);else{var U=10/x;M.minWidth=M.styles.minCellWidth||U,M.wrappedWidth=M.contentWidth,M.minWidth>M.wrappedWidth&&(M.wrappedWidth=M.minWidth)}}}}),w.allRows().forEach(function(S){for(var A=0,C=w.columns;A<C.length;A++){var k=C[A],M=S.cells[k.index];if(M&&M.colSpan===1)k.wrappedWidth=Math.max(k.wrappedWidth,M.wrappedWidth),k.minWidth=Math.max(k.minWidth,M.minWidth),k.minReadableWidth=Math.max(k.minReadableWidth,M.minReadableWidth);else{var D=w.styles.columnStyles[k.dataKey]||w.styles.columnStyles[k.index]||{},$=D.cellWidth||D.minCellWidth;$&&typeof $=="number"&&(k.minWidth=$,k.wrappedWidth=$)}M&&(M.colSpan>1&&!k.minWidth&&(k.minWidth=M.minWidth),M.colSpan>1&&!k.wrappedWidth&&(k.wrappedWidth=M.minWidth))}})}function h(b,w,x){for(var E=w,T=b.reduce(function(U,B){return U+B.wrappedWidth},0),S=0;S<b.length;S++){var A=b[S],C=A.wrappedWidth/T,k=E*C,M=A.width+k,D=x(A),$=M<D?D:M;w-=$-A.width,A.width=$}if(w=Math.round(w*1e10)/1e10,w){var V=b.filter(function(U){return w<0?U.width>x(U):!0});V.length&&(w=h(V,w,x))}return w}l.resizeColumns=h;function p(b){for(var w={},x=1,E=b.allRows(),T=0;T<E.length;T++)for(var S=E[T],A=0,C=b.columns;A<C.length;A++){var k=C[A],M=w[k.index];if(x>1)x--,delete S.cells[k.index];else if(M)M.cell.height+=S.height,x=M.cell.colSpan,delete S.cells[k.index],M.left--,M.left<=1&&delete w[k.index];else{var D=S.cells[k.index];if(!D)continue;if(D.height=S.height,D.rowSpan>1){var $=E.length-T,V=D.rowSpan>$?$:D.rowSpan;
807w[k.index]={cell:D,left:V,row:S}}}}}function m(b){for(var w=b.allRows(),x=0;x<w.length;x++)for(var E=w[x],T=null,S=0,A=0,C=0;C<b.columns.length;C++){var k=b.columns[C];if(A-=1,A>1&&b.columns[C+1])S+=k.width,delete E.cells[k.index];else if(T){var M=T;delete E.cells[k.index],T=null,M.width=k.width+S}else{var M=E.cells[k.index];if(!M)continue;if(A=M.colSpan,S=0,M.colSpan>1){T=M,S+=k.width;continue}M.width=k.width+S}}}function _(b,w){for(var x={count:0,height:0},E=0,T=b.allRows();E<T.length;E++){for(var S=T[E],A=0,C=b.columns;A<C.length;A++){var k=C[A],M=S.cells[k.index];if(M){w.applyStyles(M.styles,!0);var D=M.width-M.padding("horizontal");if(M.styles.overflow==="linebreak")M.text=w.splitTextToSize(M.text,D+1/w.scaleFactor(),{fontSize:M.styles.fontSize});else if(M.styles.overflow==="ellipsize")M.text=y(M.text,D,M.styles,w,"...");else if(M.styles.overflow==="hidden")M.text=y(M.text,D,M.styles,w,"");else if(typeof M.styles.overflow=="function"){var $=M.styles.overflow(M.text,D);typeof $=="string"?M.text=[$]:M.text=$}M.contentHeight=M.getContentHeight(w.scaleFactor(),w.getLineHeightFactor());var V=M.contentHeight/M.rowSpan;M.rowSpan>1&&x.count*x.height<V*M.rowSpan?x={height:V,count:M.rowSpan}:x&&x.count>0&&x.height>V&&(V=x.height),V>S.height&&(S.height=V)}}x.count--}}function y(b,w,x,E,T){return b.map(function(S){return v(S,w,x,E,T)})}l.ellipsize=y;function v(b,w,x,E,T){var S=1e4*E.scaleFactor();if(w=Math.ceil(w*S)/S,w>=(0,c.getStringWidth)(b,x,E))return b;for(;w<(0,c.getStringWidth)(b+T,x,E)&&!(b.length<=1);)b=b.substring(0,b.length-1);return b.trim()+T}},964:function(o){if(typeof r>"u"){var l=new Error("Cannot find module 'undefined'");throw l.code="MODULE_NOT_FOUND",l}o.exports=r}},i={};function a(o){var l=i[o];if(l!==void 0)return l.exports;var u=i[o]={exports:{}};return n[o].call(u.exports,u,u.exports,a),u.exports}var s={};return function(){var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.Cell=o.Column=o.Row=o.Table=o.CellHookData=o.__drawTable=o.__createTable=o.applyPlugin=void 0;var l=a(340),u=a(776),c=a(664),d=a(972),f=a(260);Object.defineProperty(o,"Table",{enumerable:!0,get:function(){return f.Table}});var h=a(172);Object.defineProperty(o,"CellHookData",{enumerable:!0,get:function(){return h.CellHookData}});var p=a(260);Object.defineProperty(o,"Cell",{enumerable:!0,get:function(){return p.Cell}}),Object.defineProperty(o,"Column",{enumerable:!0,get:function(){return p.Column}}),Object.defineProperty(o,"Row",{enumerable:!0,get:function(){return p.Row}});function m(w){(0,l.default)(w)}o.applyPlugin=m;function _(w,x){var E=(0,u.parseInput)(w,x),T=(0,d.createTable)(w,E);(0,c.drawTable)(w,T)}function y(w,x){var E=(0,u.parseInput)(w,x);return(0,d.createTable)(w,E)}o.__createTable=y;function v(w,x){(0,c.drawTable)(w,x)}o.__drawTable=v;try{var b=a(964);b.jsPDF&&(b=b.jsPDF),m(b)}catch{}o.default=_}(),s}()})})(oxe);var N1t=oxe.exports;const SM=mi(N1t),AM=["hsl(var(--primary))","hsl(var(--secondary))","hsl(142, 76%, 36%)","hsl(38, 92%, 50%)","hsl(280, 65%, 60%)","hsl(200, 70%, 50%)","hsl(340, 75%, 55%)","hsl(170, 60%, 45%)"],I1t=()=>{var w,x;const[e,t]=R.useState("month"),{logout:r}=i_(),n=ix(),i=C0t(),a=()=>{switch(e){case"week":return i.weekAgo;case"month":return i.monthAgo;case"year":return i.yearAgo;default:return i.monthAgo}},{data:s,isLoading:o}=r_({queryKey:["analytics",e],queryFn:async()=>{const{data:E,error:T}=await nn.from("page_views").select("*").gte("created_at",a()).order("created_at",{ascending:!1});if(T)throw T;return E||[]}}),l=(s==null?void 0:s.filter(E=>new Date(E.created_at)>=new Date(i.today)).length)||0,u=new Set(s==null?void 0:s.map(E=>E.session_id)).size,c=new Set(s==null?void 0:s.map(E=>E.page_path)).size,d=()=>{if(!(s!=null&&s.length))return[];const E=new Date(a());return wze({start:E,end:new Date}).map(A=>{const C=$v(A),k=bze(A),M=s.filter(D=>{const $=new Date(D.created_at);return $>=C&&$<=k}).length;return{date:Ii(A,e==="year"?"MMM":"MMM d"),views:M}})},f=()=>{if(!(s!=null&&s.length))return[];const E={};return s.forEach(T=>{const S=T.page_path||"/";E[S]=(E[S]||0)+1}),Object.entries(E).map(([T,S])=>({name:Dte(T),path:T,views:S,percentage:Math.round(S/s.length*100)})).sort((T,S)=>S.views-T.views).slice(0,10)},h=()=>
807{if(!(s!=null&&s.length))return[];const E={};return s.forEach(T=>{const S=Ite(T.referrer_host);E[S]=(E[S]||0)+1}),Object.entries(E).map(([T,S])=>({name:T,value:S,percentage:Math.round(S/s.length*100)})).sort((T,S)=>S.value-T.value).slice(0,8)},p=()=>{const E=new qr,T=E.internal.pageSize.getWidth();E.setFontSize(20),E.text("Alamo EDC Analytics Report",T/2,20,{align:"center"}),E.setFontSize(12),E.setTextColor(100);const S=e==="week"?"Last 7 Days":e==="month"?"Last 30 Days":"Last Year";E.text(S,T/2,28,{align:"center"}),E.text(`Generated: ${Ii(new Date,"MMMM d, yyyy 'at' h:mm a")}`,T/2,34,{align:"center"}),E.setTextColor(0),E.setFontSize(14),E.text("Summary",14,48),SM(E,{startY:52,head:[["Metric","Value"]],body:[["Today's Views",l.toString()],["Total Views",((s==null?void 0:s.length)||0).toString()],["Unique Sessions",u.toString()],["Unique Pages",c.toString()],["Top Referrer",v]],theme:"striped",headStyles:{fillColor:[59,130,246]}});const A=E.lastAutoTable.finalY+10;E.setFontSize(14),E.text("Top Pages",14,A),SM(E,{startY:A+4,head:[["Page","Views","Percentage"]],body:_.map(k=>[k.name,k.views.toString(),`${k.percentage}%`]),theme:"striped",headStyles:{fillColor:[59,130,246]}});const C=E.lastAutoTable.finalY+10;E.setFontSize(14),E.text("Traffic Sources",14,C),SM(E,{startY:C+4,head:[["Source","Visits","Percentage"]],body:y.map(k=>[k.name,k.value.toString(),`${k.percentage}%`]),theme:"striped",headStyles:{fillColor:[59,130,246]}}),E.addPage(),E.setFontSize(14),E.text("Recent Page Views",14,20),SM(E,{startY:24,head:[["Page","Referrer","Device","Browser","Time"]],body:(s||[]).slice(0,30).map(k=>[Dte(k.page_path),Ite(k.referrer_host),k.device_type||"unknown",k.browser||"unknown",Ii(new Date(k.created_at),"MMM d, h:mm a")]),theme:"striped",headStyles:{fillColor:[59,130,246]},styles:{fontSize:8}}),E.save(`alamo-edc-analytics-${Ii(new Date,"yyyy-MM-dd")}.pdf`)},m=d(),_=f(),y=h(),v=((w=y[0])==null?void 0:w.name)||"N/A",b={views:{label:"Views",color:"hsl(var(--primary))"}};return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx("header",{className:"border-b bg-card",children:g.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Admin Panel"}),g.jsxs(gr,{variant:"outline",onClick:r,children:[g.jsx(NA,{className:"mr-2 h-4 w-4"}),"Logout"]})]})}),g.jsx(lx,{}),g.jsxs("main",{className:"container mx-auto px-4 py-8",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl font-bold text-foreground",children:"Analytics Dashboard"}),g.jsx("p",{className:"text-muted-foreground",children:"Track visitor activity and engagement"})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs(gr,{variant:"outline",onClick:p,disabled:o||!(s!=null&&s.length),children:[g.jsx(Xw,{className:"mr-2 h-4 w-4"}),"Download PDF"]}),g.jsx(hWe,{value:e,onValueChange:E=>t(E),children:g.jsxs(lve,{children:[g.jsx(Ck,{value:"week",children:"Week"}),g.jsx(Ck,{value:"month",children:"Month"}),g.jsx(Ck,{value:"year",children:"Year"})]})})]})]}),o?g.jsx("div",{className:"flex items-center justify-center h-64",children:g.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:[g.jsxs(un,{children:[g.jsxs(zi,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[g.jsx(Ui,{className:"text-sm font-medium",children:"Today's Views"}),g.jsx(kz,{className:"h-4 w-4 text-muted-foreground"})]}),g.jsxs(kn,{children:[g.jsx("div",{className:"text-2xl font-bold",children:l}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Page views today"})]})]}),g.jsxs(un,{children:[g.jsxs(zi,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[g.jsx(Ui,{className:"text-sm font-medium",children:"Total Views"}),g.jsx(_5,{className:"h-4 w-4 text-muted-foreground"})]}),g.jsxs(kn,{children:[g.jsx("div",{className:"text-2xl font-bold",children:(s==null?void 0:s.length)||0}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last ",e==="week"?"7 days":e==="month"?"30 days":"year"]})]})]}),g.jsxs(un,{children:[g.jsxs(zi,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[g.jsx(Ui,{className:"text-sm font-medium",children:"Unique Sessions"}),g.jsx(jg,{className:"h-4 w-4 text-muted-foreground"})]}),g.jsxs(kn,{children:[g.jsx("div",{className:"text-2xl font-bold",children:u}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Unique visitors"})]})]}),g.jsxs(un,{children:[g.jsxs(zi,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[g.jsx(Ui,{className:"text-sm font-medium",children:"Top Referrer"}),g.jsx(b6,{className:"h-4 w-4 text-muted-foreground"})]}),g.jsxs(kn,{children:[g.jsx("div",{className:"text-2xl font-bold truncate",children:v}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:[((x=y[0])==null?void 0:x.percentage)||0,"% of traffic"]})]})]})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",children:[g.jsxs(un,{className:"col-span-1 lg:col-span-2",children:[g.jsxs(zi,{children:[g.jsx(Ui,{children:"Traffic Over Time"}),g.jsxs(ho,{children:["Page views per day for the last ",e==="week"?"7 days":e==="month"?"30 days":"year"]})]}),g.jsx(kn,{children:g.jsx(Mk,{config:b,className:"h-[300px] w-full",children:g.jsxs(v0t,{data:m,children:[g.jsx("defs",{children:g.jsxs("linearGradient",{id:"colorViews",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"5%",
807stopColor:"hsl(var(--primary))",stopOpacity:.3}),g.jsx("stop",{offset:"95%",stopColor:"hsl(var(--primary))",stopOpacity:0})]})}),g.jsx(Nw,{dataKey:"date",stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,axisLine:!1}),g.jsx(Dw,{stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,axisLine:!1,tickFormatter:E=>`${E}`}),g.jsx(xL,{content:g.jsx(Qbe,{})}),g.jsx(x0,{type:"monotone",dataKey:"views",stroke:"hsl(var(--primary))",strokeWidth:2,fillOpacity:1,fill:"url(#colorViews)"})]})})})]}),g.jsxs(un,{children:[g.jsxs(zi,{children:[g.jsxs(Ui,{className:"flex items-center gap-2",children:[g.jsx(av,{className:"h-5 w-5"}),"Top Pages"]}),g.jsx(ho,{children:"Most visited pages"})]}),g.jsx(kn,{children:g.jsx(Mk,{config:b,className:"h-[300px] w-full",children:g.jsxs(g0t,{data:_,layout:"vertical",children:[g.jsx(Nw,{type:"number",hide:!0}),g.jsx(Dw,{type:"category",dataKey:"name",width:120,stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,axisLine:!1}),g.jsx(xL,{content:({active:E,payload:T})=>{if(!E||!(T!=null&&T.length))return null;const S=T[0].payload;return g.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[g.jsx("div",{className:"font-medium",children:S.name}),g.jsxs("div",{className:"text-sm text-muted-foreground",children:[S.views," views (",S.percentage,"%)"]})]})}}),g.jsx(d_,{dataKey:"views",fill:"hsl(var(--primary))",radius:[0,4,4,0]})]})})})]}),g.jsxs(un,{children:[g.jsxs(zi,{children:[g.jsxs(Ui,{className:"flex items-center gap-2",children:[g.jsx(b6,{className:"h-5 w-5"}),"Traffic Sources"]}),g.jsx(ho,{children:"Where visitors come from"})]}),g.jsx(kn,{children:g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx(Mk,{config:b,className:"h-[200px] w-[200px]",children:g.jsxs(y0t,{children:[g.jsx(gm,{data:y,cx:"50%",cy:"50%",innerRadius:40,outerRadius:80,paddingAngle:2,dataKey:"value",children:y.map((E,T)=>g.jsx(XN,{fill:AM[T%AM.length]},`cell-${T}`))}),g.jsx(xL,{content:({active:E,payload:T})=>{if(!E||!(T!=null&&T.length))return null;const S=T[0].payload;return g.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[g.jsx("div",{className:"font-medium",children:S.name}),g.jsxs("div",{className:"text-sm text-muted-foreground",children:[S.value," visits (",S.percentage,"%)"]})]})}})]})}),g.jsx("div",{className:"flex-1 space-y-2",children:y.slice(0,6).map((E,T)=>g.jsxs("div",{className:"flex items-center justify-between text-sm",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:AM[T%AM.length]}}),g.jsx("span",{className:"truncate max-w-[100px]",children:E.name})]}),g.jsxs("span",{className:"text-muted-foreground",children:[E.percentage,"%"]})]},E.name))})]})})]})]}),g.jsxs(un,{children:[g.jsxs(zi,{children:[g.jsx(Ui,{children:"Page Views (Last 30 Days)"}),g.jsx(ho,{children:"Click a page to visit it"})]}),g.jsx(kn,{children:g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b",children:[g.jsx("th",{className:"text-left py-3 px-2 font-medium",children:"Page"}),g.jsx("th",{className:"text-right py-3 px-2 font-medium",children:"Views"}),g.jsx("th",{className:"text-right py-3 px-2 font-medium",children:"% of Traffic"})]})}),g.jsxs("tbody",{children:[_.map(E=>g.jsxs("tr",{className:"border-b last:border-0 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>n(E.path),children:[g.jsx("td",{className:"py-3 px-2 font-medium text-primary",children:E.name}),g.jsx("td",{className:"py-3 px-2 text-right",children:E.views.toLocaleString()}),g.jsxs("td",{className:"py-3 px-2 text-right text-muted-foreground",children:[E.percentage,"%"]})]},E.path)),_.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:3,className:"py-8 text-center text-muted-foreground",children:"No page views recorded yet. Analytics data will appear here as visitors browse your site."})})]})]})})})]})]})]})]})};function D1t(){const[e,t]=R.useState(""),[r,n]=R.useState(""),[i,a]=R.useState(!1),s=ix(),{toast:o}=Kw();R.useEffect(()=>{(async()=>{const{data:{session:c}}=await nn.auth.getSession();c||(o({title:"Invalid or Expired Link",description:"Please request a new password reset link.",variant:"destructive"}),s("/admin/login"))})()},[s,o]);const l=async u=>
807{if(u.preventDefault(),e!==r){o({title:"Passwords Don't Match",description:"Please make sure both passwords are the same.",variant:"destructive"});return}if(e.length<6){o({title:"Password Too Short",description:"Password must be at least 6 characters.",variant:"destructive"});return}a(!0);try{const{error:c}=await nn.auth.updateUser({password:e});if(c)throw c;o({title:"Password Updated",description:"Your password has been successfully updated."}),await nn.auth.signOut(),s("/admin/login")}catch(c){o({title:"Update Failed",description:c.message,variant:"destructive"})}finally{a(!1)}};return g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:g.jsxs(un,{className:"w-full max-w-md",children:[g.jsxs(zi,{className:"space-y-1",children:[g.jsx(Ui,{className:"text-2xl font-bold",children:"Reset Password"}),g.jsx(ho,{children:"Enter your new password below"})]}),g.jsx(kn,{children:g.jsxs("form",{onSubmit:l,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"newPassword",className:"text-sm font-medium",children:"New Password"}),g.jsx(Ya,{id:"newPassword",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:e,onChange:u=>t(u.target.value),required:!0,minLength:6})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"confirmPassword",className:"text-sm font-medium",children:"Confirm Password"}),g.jsx(Ya,{id:"confirmPassword",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:r,onChange:u=>n(u.target.value),required:!0,minLength:6})]}),g.jsx(gr,{type:"submit",className:"w-full",disabled:i,children:i?"Updating...":"Update Password"})]})})]})})}const lxe=R.forwardRef(({className:e,...t},r)=>g.jsx("div",{className:"relative w-full overflow-auto",children:g.jsx("table",{ref:r,className:Xt("w-full caption-bottom text-sm",e),...t})}));lxe.displayName="Table";const uxe=R.forwardRef(({className:e,...t},r)=>g.jsx("thead",{ref:r,className:Xt("[&_tr]:border-b",e),...t}));uxe.displayName="TableHeader";const cxe=R.forwardRef(({className:e,...t},r)=>g.jsx("tbody",{ref:r,className:Xt("[&_tr:last-child]:border-0",e),...t}));cxe.displayName="TableBody";const L1t=R.forwardRef(({className:e,...t},r)=>g.jsx("tfoot",{ref:r,className:Xt("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));L1t.displayName="TableFooter";const V8=R.forwardRef(({className:e,...t},r)=>g.jsx("tr",{ref:r,className:Xt("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));V8.displayName="TableRow";const CE=R.forwardRef(({className:e,...t},r)=>g.jsx("th",{ref:r,className:Xt("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));CE.displayName="TableHead";const PE=R.forwardRef(({className:e,...t},r)=>g.jsx("td",{ref:r,className:Xt("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));PE.displayName="TableCell";const j1t=R.forwardRef(({className:e,...t},r)=>g.jsx("caption",{ref:r,className:Xt("mt-4 text-sm text-muted-foreground",e),...t}));j1t.displayName="TableCaption";function R1t(){const[e,t]=R.useState(""),[r,n]=R.useState(!1),[i,a]=R.useState(null),[s,o]=R.useState(null),{toast:l}=Kw(),{logout:u}=i_(),c=jA(),{data:d,isLoading:f,error:h}=r_({queryKey:["admin-users"],queryFn:async()=>{const{data:{session:E}}=await nn.auth.getSession();if(!E)throw new Error("Not authenticated");const T=await fetch("https://omxupfqaewgxofufqoqy.supabase.co/functions/v1/manage-admin",{method:"GET",headers:{Authorization:`Bearer ${E.access_token}`,"Content-Type":"application/json"}}),S=await T.json();if(!T.ok)throw new Error(S.error||"Failed to fetch admins");return S.admins}}),p=$p({mutationFn:async E=>{const{data:{session:T}}=await nn.auth.getSession();if(!T)throw new Error("Not authenticated");const S=await fetch("https://omxupfqaewgxofufqoqy.supabase.co/functions/v1/manage-admin",{method:"POST",headers:{Authorization:`Bearer ${T.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"add",email:E})}),A=await S.json();if(!S.ok)throw new Error(A.error||"Failed to add admin");return A},onSuccess:E=>
807{l({title:"Admin Added",description:E.message}),t(""),c.invalidateQueries({queryKey:["admin-users"]})},onError:E=>{l({title:"Error",description:E.message,variant:"destructive"})}}),m=$p({mutationFn:async E=>{const{data:{session:T}}=await nn.auth.getSession();if(!T)throw new Error("Not authenticated");const S=await fetch("https://omxupfqaewgxofufqoqy.supabase.co/functions/v1/manage-admin",{method:"POST",headers:{Authorization:`Bearer ${T.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"remove",targetUserId:E})}),A=await S.json();if(!S.ok)throw new Error(A.error||"Failed to remove admin");return A},onSuccess:E=>{l({title:"Admin Removed",description:E.message}),x(),c.invalidateQueries({queryKey:["admin-users"]})},onError:E=>{l({title:"Error",description:E.message,variant:"destructive"})}}),_=$p({mutationFn:async E=>{const{data:{session:T}}=await nn.auth.getSession();if(!T)throw new Error("Not authenticated");const S=await fetch("https://omxupfqaewgxofufqoqy.supabase.co/functions/v1/manage-admin",{method:"POST",headers:{Authorization:`Bearer ${T.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"reset-password",targetUserId:E})}),A=await S.json();if(!S.ok)throw new Error(A.error||"Failed to reset password");return A},onSuccess:E=>{l({title:"Password Reset",description:E.message}),x()},onError:E=>{l({title:"Error",description:E.message,variant:"destructive"})}}),y=async E=>{if(E.preventDefault(),!!e.trim()){n(!0);try{await p.mutateAsync(e.trim())}finally{n(!1)}}},v=async()=>{i&&await m.mutateAsync(i.user_id)},b=async()=>{i&&await _.mutateAsync(i.user_id)},w=(E,T)=>{a(E),o(T)},x=()=>{a(null),o(null)};return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx("header",{className:"border-b bg-card",children:g.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Admin Panel"}),g.jsxs(gr,{variant:"outline",onClick:u,children:[g.jsx(NA,{className:"mr-2 h-4 w-4"}),"Logout"]})]})}),g.jsx(lx,{}),g.jsx("main",{className:"container mx-auto px-4 py-8",children:g.jsxs("div",{className:"grid gap-6",children:[g.jsxs(un,{children:[g.jsxs(zi,{children:[g.jsxs(Ui,{className:"flex items-center gap-2",children:[g.jsx(v5,{className:"h-5 w-5"}),"Add New Admin"]}),g.jsx(ho,{children:"Enter the email address of an existing user to grant them admin privileges."})]}),g.jsxs(kn,{children:[g.jsxs("form",{onSubmit:y,className:"flex gap-3",children:[g.jsx(Ya,{type:"email",placeholder:"[email protected]",value:e,onChange:E=>t(E.target.value),className:"flex-1",required:!0}),g.jsx(gr,{type:"submit",disabled:r||!e.trim(),children:r?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),"Adding..."]}):"Add Admin"})]}),g.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Note: The user must have an existing account before they can be made an admin."})]})]}),g.jsxs(un,{children:[g.jsxs(zi,{children:[g.jsxs(Ui,{className:"flex items-center gap-2",children:[g.jsx($b,{className:"h-5 w-5"}),"Current Administrators"]}),g.jsxs(ho,{children:[(d==null?void 0:d.length)||0," admin user",(d==null?void 0:d.length)!==1?"s":""," with access to the dashboard."]})]}),g.jsx(kn,{children:f?g.jsx("div",{className:"flex justify-center py-8",children:g.jsx(yl,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):h?g.jsxs("div",{className:"text-center py-8 text-destructive",children:["Failed to load admins: ",h.message]}):d&&d.length>0?g.jsxs(lxe,{children:[g.jsx(uxe,{children:g.jsxs(V8,{children:[g.jsx(CE,{children:"Email"}),g.jsx(CE,{children:"Added"}),g.jsx(CE,{children:"Last Login"}),g.jsx(CE,{className:"text-right",children:"Actions"})]})}),g.jsx(cxe,{children:d.map(E=>g.jsxs(V8,{children:[g.jsxs(PE,{className:"font-medium",children:[E.email,E.is_current_user&&g.jsx("span",{className:"ml-2 text-xs bg-primary/10 text-primary px-2 py-0.5 rounded",children:"You"})]}),g.jsx(PE,{children:Ii(new Date(E.created_at),"MMM d, yyyy")}),g.jsx(PE,{children:E.last_sign_in_at?Ii(new Date(E.last_sign_in_at),"MMM d, yyyy h:mm a"):g.jsx("span",{className:"text-muted-foreground",children:"Never"})}),g.jsx(PE,{className:"text-right",children:g.jsxs("div",{className:"flex justify-end gap-1",children:[g.jsx(gr,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground",onClick:()=>w(E,"reset-password"),title:"Reset password",children:g.jsx(E5e,{className:"h-4 w-4"})}),g.jsx(gr,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive hover:bg-destructive/10",disabled:E.is_current_user,onClick:()=>w(E,"remove"),title:E.is_current_user?"You cannot remove yourself":"Remove admin",children:g.jsx(DA,{className:"h-4 w-4"})})]})})]}
807,E.user_id))})]}):g.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No admin users found."})})]})]})}),g.jsx(wS,{open:s==="remove",onOpenChange:()=>x(),children:g.jsxs(rw,{children:[g.jsxs(nw,{children:[g.jsx(aw,{children:"Remove Admin Privileges?"}),g.jsxs(sw,{children:["Are you sure you want to remove admin privileges from"," ",g.jsx("strong",{children:i==null?void 0:i.email}),"? They will no longer have access to the admin dashboard."]})]}),g.jsxs(iw,{children:[g.jsx(lw,{children:"Cancel"}),g.jsx(ow,{onClick:v,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:m.isPending?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),"Removing..."]}):"Remove Admin"})]})]})}),g.jsx(wS,{open:s==="reset-password",onOpenChange:()=>x(),children:g.jsxs(rw,{children:[g.jsxs(nw,{children:[g.jsx(aw,{children:"Reset Password?"}),g.jsxs(sw,{children:["This will generate a temporary password for"," ",g.jsx("strong",{children:i==null?void 0:i.email})," and send it to them via email. They will need to use this password to log in."]})]}),g.jsxs(iw,{children:[g.jsx(lw,{children:"Cancel"}),g.jsx(ow,{onClick:b,children:_.isPending?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),"Resetting..."]}):"Reset Password"})]})]})})]})}const $1t=()=>{const{photos:e,loading:t,refetch:r}=b0e(),[n,i]=R.useState(!1),[a,s]=R.useState(null),o=R.useRef(null),l=async c=>{const d=c.target.files;if(!(!d||d.length===0)){i(!0);try{for(const f of Array.from(d)){const h=f.name.split(".").pop(),m=`gallery/${`${Date.now()}-${Math.random().toString(36).substring(7)}.${h}`}`,{error:_}=await nn.storage.from("community-photos").upload(m,f);if(_)throw _;const y=e.length>0?Math.max(...e.map(b=>b.display_order)):0,{error:v}=await nn.from("community_photos").insert({storage_path:m,alt_text:f.name.replace(/\.[^/.]+$/,""),display_order:y+1});if(v)throw v}ba.success(`${d.length} photo(s) uploaded successfully!`),r()}catch(f){console.error("Upload error:",f),ba.error("Failed to upload photo(s)")}finally{i(!1),o.current&&(o.current.value="")}}},u=async(c,d)=>{s(c);try{const{error:f}=await nn.storage.from("community-photos").remove([d]);if(f)throw f;const{error:h}=await nn.from("community_photos").delete().eq("id",c);if(h)throw h;ba.success("Photo deleted successfully"),r()}catch(f){console.error("Delete error:",f),ba.error("Failed to delete photo")}finally{s(null)}};return g.jsxs(un,{children:[g.jsx(zi,{children:g.jsxs(Ui,{className:"flex items-center justify-between",children:[g.jsx("span",{children:"Community Photos"}),g.jsxs("div",{children:[g.jsx(Ya,{ref:o,type:"file",accept:"image/*",multiple:!0,onChange:l,className:"hidden",id:"photo-upload"}),g.jsx(vs,{htmlFor:"photo-upload",children:g.jsx(gr,{asChild:!0,disabled:n,children:g.jsxs("span",{children:[n?g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}):g.jsx(b5,{className:"mr-2 h-4 w-4"}),"Upload Photos"]})})})]})]})}),g.jsx(kn,{children:t?g.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading photos..."}):e.length===0?g.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'No photos uploaded yet. Click "Upload Photos" to add images.'}):g.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:e.map(c=>g.jsxs("div",{className:"relative group rounded-lg overflow-hidden aspect-[3/4] bg-muted",children:[g.jsx("img",{src:c.url,alt:c.alt_text||"Community photo",className:"w-full h-full object-cover"}),g.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:g.jsx(gr,{size:"icon",variant:"destructive",onClick:()=>u(c.id,c.storage_path),disabled:a===c.id,children:a===c.id?g.jsx(yl,{className:"h-4 w-4 animate-spin"}):g.jsx(DA,{className:"h-4 w-4"})})}),g.jsx("div",{className:"absolute top-2 left-2 opacity-50",children:g.jsx(b5e,{className:"h-5 w-5 text-white drop-shadow"})})]},c.id))})})]})};function F1t(){const{logout:e}=i_();return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx("header",{className:"border-b bg-card",children:g.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Admin Panel"}),g.jsxs(gr,{variant:"outline",onClick:e,children:[g.jsx(NA,{className:"mr-2 h-4 w-4"}),"Logout"]})]})}),g.jsx(lx,{}),g.jsx("main",{className:"container mx-auto px-4 py-8",children:g.jsx($1t,{})})]})}const Ik=new Map,by=[],B1t=(e,t,r)=>{if(t&&typeof t.init=="function"&&typeof t.createInferenceSessionHandler=="function"){const n=Ik.get(e);if(n===void 0)Ik.set(e,{backend:t,priority:r});else{if(n.priority>r)return;if(n.priority===r&&n.backend!==t)throw new Error(`cannot register backend "${e}" using priority ${r}`)}if(r>=0){const i=by.indexOf(e);i!==-1&&by.splice(i,1);for(let a=0;a<by.length;a++)if(Ik.get(by[a]).priority<=r){by.splice(a,0,e);return}by.push(e)}return}throw new TypeError("not a valid backend")},z1t=async e=>{const t=Ik.get(e);if(!t)return"backend not found.";if(t.initialized)return t.backend;if(t.aborted)return t.error;{const r=!!t.initPromise;try{return r||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(n){return r||(t.error=`${n}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},U1t=async e=>{const t=e.executionProviders||[],r=t.map(l=>typeof l=="string"?l:l.name),n=r.length===0?by:r;let i;const a=[],s=new Set;for(const l of n){const u=await z1t(l);typeof u=="string"?a.push({name:l,err:u}):(i||(i=u),i===u&&s.add(l))}if(!i)throw new Error(`no available backend found. ERR: ${a.map(l=>`[${l.name}] ${l.err}`).join(", ")}`);for(const{name:l,err:u}of a)r.includes(l)&&console.warn(`removing requested execution provider "${l}" from session options because it is not available: ${u}`);const o=t.filter(l=>s.has(typeof l=="string"?l:l.name));return[i,new Proxy(e,{get:(l,u)=>u==="executionProviders"?o:Reflect.get(l,u)})]},W1t="1.21.0";let ane="warning";const Kf={wasm:{},webgl:{},webgpu:{},versions:{common:W1t},set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);ane=e}},get logLevel(){return ane}};Object.defineProperty(Kf,"logLevel",{enumerable:!0});const V1t=Kf,H1t=(e,t)=>
807{const r=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);r.width=e.dims[3],r.height=e.dims[2];const n=r.getContext("2d");if(n!=null){let i,a;(t==null?void 0:t.tensorLayout)!==void 0&&t.tensorLayout==="NHWC"?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);const s=(t==null?void 0:t.format)!==void 0?t.format:"RGB",o=t==null?void 0:t.norm;let l,u;o===void 0||o.mean===void 0?l=[255,255,255,255]:typeof o.mean=="number"?l=[o.mean,o.mean,o.mean,o.mean]:(l=[o.mean[0],o.mean[1],o.mean[2],0],o.mean[3]!==void 0&&(l[3]=o.mean[3])),o===void 0||o.bias===void 0?u=[0,0,0,0]:typeof o.bias=="number"?u=[o.bias,o.bias,o.bias,o.bias]:(u=[o.bias[0],o.bias[1],o.bias[2],0],o.bias[3]!==void 0&&(u[3]=o.bias[3]));const c=a*i;let d=0,f=c,h=c*2,p=-1;s==="RGBA"?(d=0,f=c,h=c*2,p=c*3):s==="RGB"?(d=0,f=c,h=c*2):s==="RBG"&&(d=0,h=c,f=c*2);for(let m=0;m<a;m++)for(let _=0;_<i;_++){const y=(e.data[d++]-u[0])*l[0],v=(e.data[f++]-u[1])*l[1],b=(e.data[h++]-u[2])*l[2],w=p===-1?255:(e.data[p++]-u[3])*l[3];n.fillStyle="rgba("+y+","+v+","+b+","+w+")",n.fillRect(_,m,1,1)}if("toDataURL"in r)return r.toDataURL();throw new Error("toDataURL is not supported")}else throw new Error("Can not access image data")},G1t=(e,t)=>{const r=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d");let n;if(r!=null){let i,a,s;(t==null?void 0:t.tensorLayout)!==void 0&&t.tensorLayout==="NHWC"?(i=e.dims[2],a=e.dims[1],s=e.dims[3]):(i=e.dims[3],a=e.dims[2],s=e.dims[1]);const o=t!==void 0&&t.format!==void 0?t.format:"RGB",l=t==null?void 0:t.norm;let u,c;l===void 0||l.mean===void 0?u=[255,255,255,255]:typeof l.mean=="number"?u=[l.mean,l.mean,l.mean,l.mean]:(u=[l.mean[0],l.mean[1],l.mean[2],255],l.mean[3]!==void 0&&(u[3]=l.mean[3])),l===void 0||l.bias===void 0?c=[0,0,0,0]:typeof l.bias=="number"?c=[l.bias,l.bias,l.bias,l.bias]:(c=[l.bias[0],l.bias[1],l.bias[2],0],l.bias[3]!==void 0&&(c[3]=l.bias[3]));const d=a*i;if(t!==void 0&&(t.format!==void 0&&s===4&&t.format!=="RGBA"||s===3&&t.format!=="RGB"&&t.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");const f=4;let h=0,p=1,m=2,_=3,y=0,v=d,b=d*2,w=-1;o==="RGBA"?(y=0,v=d,b=d*2,w=d*3):o==="RGB"?(y=0,v=d,b=d*2):o==="RBG"&&(y=0,b=d,v=d*2),n=r.createImageData(i,a);for(let x=0;x<a*i;h+=f,p+=f,m+=f,_+=f,x++)n.data[h]=(e.data[y++]-c[0])*u[0],n.data[p]=(e.data[v++]-c[1])*u[1],n.data[m]=(e.data[b++]-c[2])*u[2],n.data[_]=w===-1?255:(e.data[w++]-c[3])*u[3]}else throw new Error("Can not access image data");return n},XL=(e,t)=>{if(e===void 0)throw new Error("Image buffer must be defined");if(t.height===void 0||t.width===void 0)throw new Error("Image height and width must be defined");if(t.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");const{height:r,width:n}=t,i=t.norm??{mean:255,bias:0};let a,s;typeof i.mean=="number"?a=[i.mean,i.mean,i.mean,i.mean]:a=[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],typeof i.bias=="number"?s=[i.bias,i.bias,i.bias,i.bias]:s=[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];const o=t.format!==void 0?t.format:"RGBA",l=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:"RGB",u=r*n,c=l==="RGBA"?new Float32Array(u*4):new Float32Array(u*3);let d=4,f=0,h=1,p=2,m=3,_=0,y=u,v=u*2,b=-1;o==="RGB"&&(d=3,f=0,h=1,p=2,m=-1),l==="RGBA"?b=u*3:l==="RBG"?(_=0,v=u,y=u*2):l==="BGR"&&(v=0,y=u,_=u*2);for(let x=0;x<u;x++,f+=d,p+=d,h+=d,m+=d)c[_++]=(e[f]+s[0])/a[0],c[y++]=(e[h]+s[1])/a[1],c[v++]=(e[p]+s[2])/a[2],b!==-1&&m!==-1&&(c[b++]=(e[m]+s[3])/a[3]);return l==="RGBA"?new Ud("float32",c,[1,4,r,n]):new Ud("float32",c,[1,3,r,n])},q1t=async(e,t)=>{const r=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,n=typeof ImageData<"u"&&e instanceof ImageData,i=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,a=typeof e=="string";let s,o=t??{};const l=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=c=>typeof HTMLCanvasElement<"u"&&c instanceof HTMLCanvasElement||c instanceof OffscreenCanvas?c.getContext("2d"):null;if(r){const c=l();c.width=e.width,c.height=e.height;const d=u(c);if(d!=null){let f=e.height,h=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(f=t.resizedHeight,h=t.resizedWidth),t!==void 0){if(o=t,t.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");o.tensorFormat="RGBA",o.height=f,o.width=h}else o.tensorFormat="RGBA",o.height=f,o.width=h;d.drawImage(e,0,0),s=d.getImageData(0,0,h,f).data}else throw new Error("Can not access image data")}else if(n){let c,d;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(c=t.resizedHeight,d=t.resizedWidth):(c=e.height,d=e.width),t!==void 0&&(o=t),o.format="RGBA",o.height=c,o.width=d,t!==void 0){const f=l();f.width=d,f.height=c;const h=u(f);if(h!=null)h.putImageData(e,0,0),s=h.getImageData(0,0,d,c).data;else throw new Error("Can not access image data")}else s=e.data}else if(i){if(t===void 0)throw new Error("Please provide image config with format for Imagebitmap");const c=l();c.width=e.width,c.height=e.height;const d=u(c);if(d!=null){const f=e.height,h=e.width;return d.drawImage(e,0,0,h,f),s=d.getImageData(0,0,h,f).data,o.height=f,o.width=h,XL(s,o)}else throw new Error("Can not access image data")}else{if(a)return new Promise((c,d)=>{const f=l(),h=u(f);if(!e||!h)return d();const p=new Image;p.crossOrigin="Anonymous",p.src=e,p.onload=()=>{f.width=p.width,f.height=p.height,h.drawImage(p,0,0,f.width,f.height);const m=h.getImageData(0,0,f.width,f.height);o.height=f.height,o.width=f.width,c(XL(m.data,o))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(s!==void 0)return XL(s,o);throw new Error("Input data provided is not supported - aborted tensor creation")},K1t=(e,t)=>
vendor: 8,741 bytes, line 807
807{const{width:r,height:n,download:i,dispose:a}=t,s=[1,n,r,4];return new Ud({location:"texture",type:"float32",texture:e,dims:s,download:i,dispose:a})},Y1t=(e,t)=>{const{dataType:r,dims:n,download:i,dispose:a}=t;return new Ud({location:"gpu-buffer",type:r??"float32",gpuBuffer:e,dims:n,download:i,dispose:a})},X1t=(e,t)=>{const{dataType:r,dims:n,download:i,dispose:a}=t;return new Ud({location:"ml-tensor",type:r??"float32",mlTensor:e,dims:n,download:i,dispose:a})},Q1t=(e,t,r)=>new Ud({location:"cpu-pinned",type:e,data:t,dims:r??[t.length]}),U1=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),Dk=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);let sne=!1;const Z1t=()=>{if(!sne){sne=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,t=typeof BigUint64Array<"u"&&BigUint64Array.from,r=globalThis.Float16Array,n=typeof r<"u"&&r.from;e&&(U1.set("int64",BigInt64Array),Dk.set(BigInt64Array,"int64")),t&&(U1.set("uint64",BigUint64Array),Dk.set(BigUint64Array,"uint64")),n?(U1.set("float16",r),Dk.set(r,"float16")):U1.set("float16",Uint16Array)}},J1t=e=>{let t=1;for(let r=0;r<e.length;r++){const n=e[r];if(typeof n!="number"||!Number.isSafeInteger(n))throw new TypeError(`dims[${r}] must be an integer, got: ${n}`);if(n<0)throw new RangeError(`dims[${r}] must be a non-negative integer, got: ${n}`);t*=n}return t},ebt=(e,t)=>{switch(e.location){case"cpu":return new Ud(e.type,e.data,t);case"cpu-pinned":return new Ud({location:"cpu-pinned",data:e.data,type:e.type,dims:t});case"texture":return new Ud({location:"texture",texture:e.texture,type:e.type,dims:t});case"gpu-buffer":return new Ud({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case"ml-tensor":return new Ud({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:t});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let Ud=class{constructor(t,r,n){Z1t();let i,a;if(typeof t=="object"&&"location"in t)switch(this.dataLocation=t.location,i=t.type,a=t.dims,t.location){case"cpu-pinned":{const o=U1.get(i);if(!o)throw new TypeError(`unsupported type "${i}" to create tensor from pinned buffer`);if(!(t.data instanceof o))throw new TypeError(`buffer should be of type ${o.name}`);this.cpuData=t.data;break}case"texture":{if(i!=="float32")throw new TypeError(`unsupported type "${i}" to create tensor from texture`);this.gpuTextureData=t.texture,this.downloader=t.download,this.disposer=t.dispose;break}case"gpu-buffer":{if(i!=="float32"&&i!=="float16"&&i!=="int32"&&i!=="int64"&&i!=="uint32"&&i!=="uint8"&&i!=="bool"&&i!=="uint4"&&i!=="int4")throw new TypeError(`unsupported type "${i}" to create tensor from gpu buffer`);this.gpuBufferData=t.gpuBuffer,this.downloader=t.download,this.disposer=t.dispose;break}case"ml-tensor":{if(i!=="float32"&&i!=="float16"&&i!=="int32"&&i!=="int64"&&i!=="uint32"&&i!=="uint64"&&i!=="int8"&&i!=="uint8"&&i!=="bool"&&i!=="uint4"&&i!=="int4")throw new TypeError(`unsupported type "${i}" to create tensor from MLTensor`);this.mlTensorData=t.mlTensor,this.downloader=t.download,this.disposer=t.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let o,l;if(typeof t=="string")if(i=t,l=n,t==="string"){if(!Array.isArray(r))throw new TypeError("A string tensor's data must be a string array.");o=r}else{const u=U1.get(t);if(u===void 0)throw new TypeError(`Unsupported tensor type: ${t}.`);if(Array.isArray(r)){if(t==="float16"&&u===Uint16Array||t==="uint4"||t==="int4")throw new TypeError(`Creating a ${t} tensor from number array is not supported. Please use ${u.name} as data.`);t==="uint64"||t==="int64"?o=u.from(r,BigInt):o=u.from(r)}else if(r instanceof u)o=r;else if(r instanceof Uint8ClampedArray)if(t==="uint8")o=Uint8Array.from(r);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(t==="float16"&&r instanceof Uint16Array&&u!==Uint16Array)o=new globalThis.Float16Array(r.buffer,r.byteOffset,r.length);else throw new TypeError(`A ${i} tensor's data must be type of ${u}`)}else if(l=r,Array.isArray(t)){if(t.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const u=typeof t[0];if(u==="string")i="string",o=t;else if(u==="boolean")i="bool",o=Uint8Array.from(t);else throw new TypeError(`Invalid element type of data array: ${u}.`)}else if(t instanceof Uint8ClampedArray)i="uint8",o=Uint8Array.from(t);else{const u=Dk.get(t.constructor);if(u===void 0)throw new TypeError(`Unsupported type for tensor data: ${t.constructor}.`);i=u,o=t}if(l===void 0)l=[o.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");a=l,this.cpuData=o,this.dataLocation="cpu"}const s=J1t(a);if(this.cpuData&&s!==this.cpuData.length&&!((i==="uint4"||i==="int4")&&Math.ceil(s/2)===this.cpuData.length))throw new Error(`Tensor's size(${s}) does not match data length(${this.cpuData.length}).`);this.type=i,this.dims=a,this.size=s}static async fromImage(t,r){return q1t(t,r)}static fromTexture(t,r){return K1t(t,r)}static fromGpuBuffer(t,r){return Y1t(t,r)}static fromMLTensor(t,r){return X1t(t,r)}static fromPinnedBuffer(t,r,n){return Q1t(t,r,n)}toDataURL(t){return H1t(this,t)}toImageData(t){return G1t(this,t)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(t){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;const r=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=r,t&&this.disposer&&(this.disposer(),this.disposer=void 0),r}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(t){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return ebt(this,t)}};const y1=Ud,dxe=(e,t)=>{(typeof Kf.trace>"u"?!Kf.wasm.trace:!Kf.trace)||console.timeStamp(`${e}::ORT::${t}`)},fxe=(e,t)=>{var i;const r=((i=new Error().stack)==null?void 0:i.split(/\r\n|\r|\n/g))||[];let n=!1;for(let a=0;a<r.length;a++){if(n&&!r[a].includes("TRACE_FUNC")){let s=`FUNC_${e}::${r[a].trim().split(" ")[1]}`;t&&(s+=`::${t}`),dxe("CPU",s);return}r[a].includes("TRACE_FUNC")&&(n=!0)}},H8=e=>{(typeof Kf.trace>"u"?!Kf.wasm.trace:!Kf.trace)||fxe("BEGIN",e)},G8=e=>{(typeof Kf.trace>"u"?!Kf.wasm.trace:!Kf.trace)||fxe("END",e)};let tbt=class hxe{constructor(t){this.handler=t}async run(t,r,n){H8();const i={};let a={};if(typeof t!="object"||t===null||t instanceof y1||Array.isArray(t))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let s=!0;if(typeof r=="object"){if(r===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(r instanceof y1)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(r)){if(r.length===0)throw new TypeError("'fetches' cannot be an empty array.");s=!1;for(const u of r){if(typeof u!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(u)===-1)throw new RangeError(`'fetches' contains invali
807d output name: ${u}.`);i[u]=null}if(typeof n=="object"&&n!==null)a=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else{let u=!1;const c=Object.getOwnPropertyNames(r);for(const d of this.outputNames)if(c.indexOf(d)!==-1){const f=r[d];(f===null||f instanceof y1)&&(u=!0,s=!1,i[d]=f)}if(u){if(typeof n=="object"&&n!==null)a=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else a=r}}else if(typeof r<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const u of this.inputNames)if(typeof t[u]>"u")throw new Error(`input '${u}' is missing in 'feeds'.`);if(s)for(const u of this.outputNames)i[u]=null;const o=await this.handler.run(t,i,a),l={};for(const u in o)if(Object.hasOwnProperty.call(o,u)){const c=o[u];c instanceof y1?l[u]=c:l[u]=new y1(c.type,c.data,c.dims)}return G8(),l}async release(){return this.handler.dispose()}static async create(t,r,n,i){H8();let a,s={};if(typeof t=="string"){if(a=t,typeof r=="object"&&r!==null)s=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else if(t instanceof Uint8Array){if(a=t,typeof r=="object"&&r!==null)s=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer){const c=t;let d=0,f=t.byteLength;if(typeof r=="object"&&r!==null)s=r;else if(typeof r=="number"){if(d=r,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=c.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${c.byteLength}).`);if(f=t.byteLength-d,typeof n=="number"){if(f=n,!Number.isSafeInteger(f))throw new RangeError("'byteLength' must be an integer.");if(f<=0||d+f>c.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${c.byteLength-d}].`);if(typeof i=="object"&&i!==null)s=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else if(typeof n<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof r<"u")throw new TypeError("'options' must be an object.");a=new Uint8Array(c,d,f)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[o,l]=await U1t(s),u=await o.createInferenceSessionHandler(a,l);return G8(),new hxe(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const rbt=tbt,nbt=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:rbt,TRACE:dxe,TRACE_FUNC_BEGIN:H8,TRACE_FUNC_END:G8,Tensor:y1,env:V1t,registerBackend:B1t},Symbol.toStringTag,{value:"Module"}));/*! 808 * ONNX Runtime Web v1.22.0-dev.20250409-89f8206ba4 809 * Copyright (c) Microsoft Corporation. All rights reserved. 810 * Licensed under the MIT License. 811 */var Y9=Object.defineProperty,ibt=Object.getOwnPropertyDescriptor,abt=Object.getOwnPropertyNames,sbt=Object.prototype.hasOwnProperty,obt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Wt=(e,t)=>()=>(e&&(t=e(e=0)),t),Sx=(e,t)=>{for(var r in t)Y9(e,r,{get:t[r],enumerable:!0})},lbt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of abt(t))!sbt.call(e,i)&&i!==r&&Y9(e,i,{get:()=>t[i],enumerable:!(n=ibt(t,i))||n.enumerable});return e},fA=e=>lbt(Y9({},"__esModule",{value:!0}),e),W2,Rm,Hy,one,pxe,mxe=Wt(()=>{W2=new Map,Rm=[],Hy=(e,t,r)=>{if(t&&typeof t.init=="function"&&typeof t.createInferenceSessionHandler=="function"){let n=W2.get(e);if(n===void 0)W2.set(e,{backend:t,priority:r});else{if(n.priority>r)return;if(n.priority===r&&n.backend!==t)throw new Error(`cannot register backend "${e}" using priority ${r}`)}if(r>=0){let i=Rm.indexOf(e);i!==-1&&Rm.splice(i,1);for(let a=0;a<Rm.length;a++)if(W2.get(Rm[a]).priority<=r){Rm.splice(a,0,e);return}Rm.push(e)}return}throw new TypeError("not a valid backend")},one=async e=>{let t=W2.get(e);if(!t)return"backend not found.";if(t.initialized)return t.backend;if(t.aborted)return t.error;{let r=!!t.initPromise;try{return r||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(n){return r||(t.error=`${n}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},pxe=async e=>{let t=e.executionProviders||[],r=t.map(l=>typeof l=="string"?l:l.name),n=r.length===0?Rm:r,i,a=[],s=new Set;for(let l of n){let u=await one(l);typeof u=="string"?a.push({name:l,err:u}):(i||(i=u),i===u&&s.add(l))}if(!i)throw new Error(`no available backend found. ERR: ${a.map(l=>`[${l.name}] ${l.err}`).join(", ")}`);for(let{name:l,err:u}of a)r.includes(l)&&console.warn(`removing requested execution provider "${l}" from session options because it is not available: ${u}`);let o=t.filter(l=>s.has(typeof l=="string"?l:l.name));return[i,new Proxy(e,{get:(l,u)=>u==="executionProviders"?o:Reflect.get(l,u)})]}}),ubt=Wt(()=>{mxe()}),gxe,cbt=Wt(()=>{gxe="1.22.0-dev.20250409-89f8206ba4"}),QL,kd,yxe=Wt(()=>{cbt(),QL="warning",kd={wasm:{},webgl:{},webgpu:{},versions:{common:gxe},set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);QL=e}},get logLevel(){return QL}},Object.defineProperty(kd,"logLevel",{enumerable:!0})}),_a,dbt=Wt(()=>{yxe(),_a=kd}),vxe,_xe,fbt=Wt(()=>{vxe=(e,t)=>{let r=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);
vendor: 16,212 bytes, line 811
811r.width=e.dims[3],r.height=e.dims[2];let n=r.getContext("2d");if(n!=null){let i,a;(t==null?void 0:t.tensorLayout)!==void 0&&t.tensorLayout==="NHWC"?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let s=(t==null?void 0:t.format)!==void 0?t.format:"RGB",o=t==null?void 0:t.norm,l,u;o===void 0||o.mean===void 0?l=[255,255,255,255]:typeof o.mean=="number"?l=[o.mean,o.mean,o.mean,o.mean]:(l=[o.mean[0],o.mean[1],o.mean[2],0],o.mean[3]!==void 0&&(l[3]=o.mean[3])),o===void 0||o.bias===void 0?u=[0,0,0,0]:typeof o.bias=="number"?u=[o.bias,o.bias,o.bias,o.bias]:(u=[o.bias[0],o.bias[1],o.bias[2],0],o.bias[3]!==void 0&&(u[3]=o.bias[3]));let c=a*i,d=0,f=c,h=c*2,p=-1;s==="RGBA"?(d=0,f=c,h=c*2,p=c*3):s==="RGB"?(d=0,f=c,h=c*2):s==="RBG"&&(d=0,h=c,f=c*2);for(let m=0;m<a;m++)for(let _=0;_<i;_++){let y=(e.data[d++]-u[0])*l[0],v=(e.data[f++]-u[1])*l[1],b=(e.data[h++]-u[2])*l[2],w=p===-1?255:(e.data[p++]-u[3])*l[3];n.fillStyle="rgba("+y+","+v+","+b+","+w+")",n.fillRect(_,m,1,1)}if("toDataURL"in r)return r.toDataURL();throw new Error("toDataURL is not supported")}else throw new Error("Can not access image data")},_xe=(e,t)=>{let r=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d"),n;if(r!=null){let i,a,s;(t==null?void 0:t.tensorLayout)!==void 0&&t.tensorLayout==="NHWC"?(i=e.dims[2],a=e.dims[1],s=e.dims[3]):(i=e.dims[3],a=e.dims[2],s=e.dims[1]);let o=t!==void 0&&t.format!==void 0?t.format:"RGB",l=t==null?void 0:t.norm,u,c;l===void 0||l.mean===void 0?u=[255,255,255,255]:typeof l.mean=="number"?u=[l.mean,l.mean,l.mean,l.mean]:(u=[l.mean[0],l.mean[1],l.mean[2],255],l.mean[3]!==void 0&&(u[3]=l.mean[3])),l===void 0||l.bias===void 0?c=[0,0,0,0]:typeof l.bias=="number"?c=[l.bias,l.bias,l.bias,l.bias]:(c=[l.bias[0],l.bias[1],l.bias[2],0],l.bias[3]!==void 0&&(c[3]=l.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&s===4&&t.format!=="RGBA"||s===3&&t.format!=="RGB"&&t.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");let f=4,h=0,p=1,m=2,_=3,y=0,v=d,b=d*2,w=-1;o==="RGBA"?(y=0,v=d,b=d*2,w=d*3):o==="RGB"?(y=0,v=d,b=d*2):o==="RBG"&&(y=0,b=d,v=d*2),n=r.createImageData(i,a);for(let x=0;x<a*i;h+=f,p+=f,m+=f,_+=f,x++)n.data[h]=(e.data[y++]-c[0])*u[0],n.data[p]=(e.data[v++]-c[1])*u[1],n.data[m]=(e.data[b++]-c[2])*u[2],n.data[_]=w===-1?255:(e.data[w++]-c[3])*u[3]}else throw new Error("Can not access image data");return n}}),CM,bxe,wxe,xxe,Exe,Txe,hbt=Wt(()=>{X9(),CM=(e,t)=>{if(e===void 0)throw new Error("Image buffer must be defined");if(t.height===void 0||t.width===void 0)throw new Error("Image height and width must be defined");if(t.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");let{height:r,width:n}=t,i=t.norm??{mean:255,bias:0},a,s;typeof i.mean=="number"?a=[i.mean,i.mean,i.mean,i.mean]:a=[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],typeof i.bias=="number"?s=[i.bias,i.bias,i.bias,i.bias]:s=[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let o=t.format!==void 0?t.format:"RGBA",l=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:"RGB",u=r*n,c=l==="RGBA"?new Float32Array(u*4):new Float32Array(u*3),d=4,f=0,h=1,p=2,m=3,_=0,y=u,v=u*2,b=-1;o==="RGB"&&(d=3,f=0,h=1,p=2,m=-1),l==="RGBA"?b=u*3:l==="RBG"?(_=0,v=u,y=u*2):l==="BGR"&&(v=0,y=u,_=u*2);for(let w=0;w<u;w++,f+=d,p+=d,h+=d,m+=d)c[_++]=(e[f]+s[0])/a[0],c[y++]=(e[h]+s[1])/a[1],c[v++]=(e[p]+s[2])/a[2],b!==-1&&m!==-1&&(c[b++]=(e[m]+s[3])/a[3]);return l==="RGBA"?new Rc("float32",c,[1,4,r,n]):new Rc("float32",c,[1,3,r,n])},bxe=async(e,t)=>{let r=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,n=typeof ImageData<"u"&&e instanceof ImageData,i=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,a=typeof e=="string",s,o=t??{},l=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=c=>typeof HTMLCanvasElement<"u"&&c instanceof HTMLCanvasElement||c instanceof OffscreenCanvas?c.getContext("2d"):null;if(r){let c=l();c.width=e.width,c.height=e.height;let d=u(c);if(d!=null){let f=e.height,h=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(f=t.resizedHeight,h=t.resizedWidth),t!==void 0){if(o=t,t.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");o.tensorFormat="RGBA",o.height=f,o.width=h}else o.tensorFormat="RGBA",o.height=f,o.width=h;d.drawImage(e,0,0),s=d.getImageData(0,0,h,f).data}else throw new Error("Can not access image data")}else if(n){let c,d;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(c=t.resizedHeight,d=t.resizedWidth):(c=e.height,d=e.width),t!==void 0&&(o=t),o.format="RGBA",o.height=c,o.width=d,t!==void 0){let f=l();f.width=d,f.height=c;let h=u(f);if(h!=null)h.putImageData(e,0,0),s=h.getImageData(0,0,d,c).data;else throw new Error("Can not access image data")}else s=e.data}else if(i){if(t===void 0)throw new Error("Please provide image config with format for Imagebitmap");let c=l();c.width=e.width,c.height=e.height;let d=u(c);if(d!=null){let f=e.height,h=e.width;return d.drawImage(e,0,0,h,f),s=d.getImageData(0,0,h,f).data,o.height=f,o.width=h,CM(s,o)}else throw new Error("Can not access image data")}else{if(a)return new Promise((c,d)=>{let f=l(),h=u(f);if(!e||!h)return d();let p=new Image;p.crossOrigin="Anonymous",p.src=e,p.onload=()=>{f.width=p.width,f.height=p.height,h.drawImage(p,0,0,f.width,f.height);let m=h.getImageData(0,0,f.width,f.height);o.height=f.height,o.width=f.width,c(CM(m.data,o))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(s!==void 0)return CM(s,o);throw new Error("Input data provided is not supported - aborted tensor creation")},wxe=(e,t)=>{let{width:r,height:n,download:i,dispose:a}=t,s=[1,n,r,4];return new Rc({location:"texture",type:"float32",texture:e,dims:s,download:i,dispose:a})},xxe=(e,t)=>{let{dataType:r,dims:n,download:i,dispose:a}=t;return new Rc({location:"gpu-buffer",type:r??"float32",gpuBuffer:e,dims:n,download:i,dispose:a})},Exe=(e,t)=>{let{dataType:r,dims:n,download:i,dispose:a}=t;return new Rc({location:"ml-tensor",type:r??"float32",mlTensor:e,dims:n,download:i,dispose:a})},Txe=(e,t,r)=>new Rc({location:"cpu-pinned",type:e,data:t,dims:r??[t.length]})}),Ty,ME,ZL,Sxe,pbt=Wt(()=>{Ty=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),ME=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]),ZL=!1,Sxe=()=>{if(!ZL){ZL=!0;let e=typeof BigInt64Array<"u"&&BigInt64Array.from,t=typeof BigUint64Array<"u"&&BigUint64Array.from,r=globalThis.Float16Array,n=typeof r<"u"&&r.from;e&&(Ty.set("int64",BigInt64Array),ME.set(BigInt64Array,"int64")),t&&(Ty.set("uint64",BigUint64Array),ME.set(BigUint64Array,"uint64")),n?(Ty.set("float16",r),ME.set(r,"float16")):Ty.set("float16",Uint16Array)}}}),Axe,Cxe,mbt=Wt(()=>{X9(),Axe=e=>{let t=1;for(let r=0;r<e.length;r++){let n=e[r];if(typeof n!="number"||!Number.isSafeInteger(n))throw new TypeError(`dims[${r}] must be an integer, got: ${n}`);if(n<0)throw new RangeError(`dims[${r}] must be a non-negative integer, got: ${n}`);t*=n}return t},Cxe=(e,t)=>{switch(e.location){case"cpu":return new Rc(e.type,e.data,t);case"cpu-pinned":return new Rc({location:"cpu-pinned",data:e.data,type:e.type,dims:t});case"texture":return new Rc({location:"texture",texture:e.texture,type:e.type,dims:t});case"gpu-buffer":return new Rc({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case"ml-tensor":return new Rc({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:t});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}}}),Rc,X9=Wt(()=>{fbt(),hbt(),pbt(),mbt(),Rc=class{constructor(e,t,r){Sxe();let n,i;if(typeof e=="object"&&"location"in e)switch(this.dataLocation=e.location,n=e.type,i=e.dims,e.location){case"cpu-pinned":{let s=Ty.get(n);if(!s)throw new TypeError(`unsupported type "${n}" to create tensor from pinned buffer`);if(!(e.data instanceof s))throw new TypeError(`buffer should be of type ${s.name}`);this.cpuData=e.data;break}case"texture":{if(n!=="float32")throw new TypeError(`unsupported type "${n}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break}case"gpu-buffer":{if(n!=="float32"&&n!=="float16"&&n!=="int32"&&n!=="int64"&&n!=="uint32"&&n!=="uint8"&&n!=="bool"&&n!=="uint4"&&n!=="int4")throw new TypeError(`unsupported type "${n}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break}case"ml-tensor":{if(n!=="float32"&&n!=="float16"&&n!=="int32"&&n!=="int64"&&n!=="uint32"&&n!=="uint64"&&n!=="int8"&&n!=="uint8"&&n!=="bool"&&n!=="uint4"&&n!=="int4")throw new TypeError(`unsupported type "${n}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let s,o;if(typeof e=="string")if(n=e,o=r,e==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");s=t}else{let l=Ty.get(e);if(l===void 0)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e==="float16"&&l===Uint16Array||e==="uint4"||e==="int4")throw new TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${l.name} as data.`);e==="uint64"||e==="int64"?s=l.from(t,BigInt):s=l.from(t)}else if(t instanceof l)s=t;else if(t instanceof Uint8ClampedArray)if(e==="uint8")s=Uint8Array.from(t);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(e==="float16"&&t instanceof Uint16Array&&l!==Uint16Array)s=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw new TypeError(`A ${n} tensor's data must be type of ${l}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");let l=typeof e[0];if(l==="string")n="string",s=e;else if(l==="boolean")n="bool",s=Uint8Array.from(e);else throw new TypeError(`Invalid element type of data array: ${l}.`)}else if(e instanceof Uint8ClampedArray)n="uint8",s=Uint8Array.from(e);else{let l=ME.get(e.constructor);if(l===void 0)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);n=l,s=e}if(o===void 0)o=[s.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");i=o,this.cpuData=s,this.dataLocation="cpu"}let a=Axe(i);if(this.cpuData&&a!==this.cpuData.length&&!((n==="uint4"||n==="int4")&&Math.ceil(a/2)===this.cpuData.length))throw new Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=n,this.dims=i,this.size=a}static async fromImage(e,t){return bxe(e,t)}static fromTexture(e,t){return wxe(e,t)}static fromGpuBuffer(e,t){return xxe(e,t)}static fromMLTensor(e,t){return Exe(e,t)}static fromPinnedBuffer(e,t,r){return Txe(e,t,r)}toDataURL(e){return vxe(this,e)}toImageData(e){return _xe(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return Cxe(this,e)}}}),Uf,Pxe=Wt(()=>{X9(),Uf=Rc}),hA,JL,rh,Xd,Mxe=Wt(()=>{yxe(),hA=(e,t)=>{(typeof kd.trace>"u"?!kd.wasm.trace:!kd.trace)||console.timeStamp(`${e}::ORT::${t}`)},JL=(e,t)=>{var i;let r=((i=new Error().stack)==null?void 0:i.split(/\r\n|\r|\n/g))||[],n=!1;for(let a=0;a<r.length;a++){if(n&&!r[a].includes("TRACE_FUNC")){let s=`FUNC_${e}::${r[a].trim().split(" ")[1]}`;t&&(s+=`::${t}`),hA("CPU",s);return}r[a].includes("TRACE_FUNC")&&(n=!0)}},rh=e=>{(typeof kd.trace>"u"?!kd.wasm.trace:!kd.trace)||JL("BEGIN",e)},Xd=e=>{(typeof kd.trace>"u"?!kd.wasm.trace:!kd.trace)||JL("END",e)}}),kxe,gbt=Wt(()=>{mxe(),Pxe(),Mxe(),kxe=class Oxe{constructor(t){this.handler=t}async run(t,r,n){rh();let i={},a={};if(typeof t!="object"||t===null||t instanceof Uf||Array.isArray(t))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let s=!0;if(typeof r=="object"){if(r===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(r instanceof Uf)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(r)){if(r.length===0)throw new TypeError("'fetches' cannot be an empty array.");s=!1;for(let u of r){if(typeof u!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(u)===-1)throw new RangeError(`'fetches' contains invalid output name: ${u}.`);i[u]=null}if(typeof n=="object"&&n!==null)a=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else{let u=!1,c=Object.getOwnPropertyNames(r);for(let d of this.outputNames)if(c.indexOf(d)!==-1){let f=r[d];(f===null||f instanceof Uf)&&(u=!0,s=!1,i[d]=f)}if(u){if(typeof n=="object"&&n!==null)a=n;else if(typeof n<"u")throw new TypeError("'options' must be an object.")}else a=r}}else if(typeof r<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(let u of this.inputNames)if(typeof t[u]>"u")throw new Error(`input '${u}' is missing in 'feeds'.`);if(s)for(let u of this.outputNames)i[u]=null;let o=await this.handler.run(t,i,a),l={};for(let u in o)if(Object.hasOwnProperty.call(o,u)){let c=o[u];c instanceof Uf?l[u]=c:l[u]=new Uf(c.type,c.data,c.dims)}return Xd(),l}async release(){return this.handler.dispose()}static async create(t,r,n,i){rh();let a,s={};if(typeof t=="string"){if(a=t,typeof r=="object"&&r!==null)s=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else if(t instanceof Uint8Array){if(a=t,typeof r=="object"&&r!==null)s=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer){let c=t,d=0,f=t.byteLength;if(typeof r=="object"&&r!==null)s=r;else if(typeof r=="number"){if(d=r,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=c.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${c.b
811yteLength}).`);if(f=t.byteLength-d,typeof n=="number"){if(f=n,!Number.isSafeInteger(f))throw new RangeError("'byteLength' must be an integer.");if(f<=0||d+f>c.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${c.byteLength-d}].`);if(typeof i=="object"&&i!==null)s=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else if(typeof n<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof r<"u")throw new TypeError("'options' must be an object.");a=new Uint8Array(c,d,f)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");let[o,l]=await pxe(s),u=await o.createInferenceSessionHandler(a,l);return Xd(),new Oxe(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}}),Q9,ybt=Wt(()=>{gbt(),Q9=kxe}),vbt=Wt(()=>{}),_bt=Wt(()=>{}),bbt=Wt(()=>{}),wbt=Wt(()=>{}),Nxe={};Sx(Nxe,{InferenceSession:()=>Q9,TRACE:()=>hA,TRACE_FUNC_BEGIN:()=>rh,TRACE_FUNC_END:()=>Xd,Tensor:()=>Uf,env:()=>_a,registerBackend:()=>Hy});var lh=Wt(()=>{ubt(),dbt(),ybt(),Pxe(),vbt(),_bt(),Mxe(),bbt(),wbt()}),Z9=Wt(()=>{}),Ixe={};Sx(Ixe,{default:()=>Dxe});var ej,tj,Dxe,xbt=Wt(()=>{var e;FTe(),p_(),J9(),ej="ort-wasm-proxy-worker",tj=((e=globalThis.self)==null?void 0:e.name)===ej,tj&&(self.onmessage=t=>{let{type:r,in:n}=t.data;try{switch(r){case"init-wasm":eW(n.wasm).then(()=>{vW(n).then(()=>{postMessage({type:r})},i=>{postMessage({type:r,err:i})})},i=>{postMessage({type:r,err:i})});break;case"init-ep":{let{epName:i,env:a}=n;_W(a,i).then(()=>{postMessage({type:r})},s=>{postMessage({type:r,err:s})});break}case"copy-from":{let{buffer:i}=n,a=wO(i);postMessage({type:r,out:a});break}case"create":{let{model:i,options:a}=n;bW(i,a).then(s=>{postMessage({type:r,out:s})},s=>{postMessage({type:r,err:s})});break}case"release":wW(n),postMessage({type:r});break;case"run":{let{sessionId:i,inputIndices:a,inputs:s,outputIndices:o,options:l}=n;xW(i,a,s,o,new Array(o.length).fill(null),l).then(u=>{u.some(c=>c[3]!=="cpu")?postMessage({type:r,err:"Proxy does not support non-cpu tensor location."}):postMessage({type:r,out:u},TW([...s,...u]))},u=>{postMessage({type:r,err:u})});break}case"end-profiling":EW(n),postMessage({type:r});break;default:}}catch(i){postMessage({type:r,err:i})}}),Dxe=tj?null:t=>new Worker(t??Tc,{type:"module",name:ej})}),Lxe={};Sx(Lxe,{default:()=>jxe});var rj,nj,jxe,lne,Ebt=Wt(()=>{var e,t;nj=(rj=import.meta.url,async function(r={}){var su;var n,i,a=r,s=new Promise((j,J)=>{n=j,i=J}),o=typeof window=="object",l=typeof WorkerGlobalScope<"u",u=l&&((su=self.name)==null?void 0:su.startsWith("em-pthread"));a.mountExternalData=(j,J)=>{j.startsWith("./")&&(j=j.substring(2)),(a.Eb||(a.Eb=new Map)).set(j,J)},a.unmountExternalData=()=>{delete a.Eb};var c=globalThis.SharedArrayBuffer??new WebAssembly.Memory({initial:0,maximum:0,pc:!0}).buffer.constructor;let d=j=>async(...J)=>{var oe;try{if(a.Fb)throw Error("Session already started");let ge=a.Fb={dc:J[0],errors:[]},Me=await j(...J);if(a.Fb!==ge)throw Error("Session mismatch");(oe=a.Jb)==null||oe.flush();let nt=ge.errors;if(0<nt.length){let _t=await Promise.all(nt);if(_t=_t.filter(Lt=>Lt),0<_t.length)throw Error(_t.join(` 812`))}return Me}finally{a.Fb=null}};a.jsepInit=(j,J)=>{if(j==="webgpu"){[a.Jb,a.Ub,a.Yb,a.Kb,a.Xb,a.jb,a.Zb,a.ac,a.Vb,a.Wb,a.$b]=J;let oe=a.Jb;a.jsepRegisterBuffer=(ge,Me,nt,_t)=>oe.registerBuffer(ge,Me,nt,_t),a.jsepGetBuffer=ge=>oe.getBuffer(ge),a.jsepCreateDownloader=(ge,Me,nt)=>oe.createDownloader(ge,Me,nt),a.jsepOnCreateSession=ge=>{oe.onCreateSession(ge)},a.jsepOnReleaseSession=ge=>{oe.onReleaseSession(ge)},a.jsepOnRunStart=ge=>oe.onRunStart(ge),a.bc=(ge,Me)=>{oe.upload(ge,Me)}}else if(j==="webnn"){let oe=J[0];[a.nc,a.Nb,a.webnnEnsureTensor,a.Ob,a.webnnDownloadTensor]=J.slice(1),a.webnnReleaseTensorId=a.Nb,a.webnnUploadTensor=a.Ob,a.webnnOnRunStart=ge=>oe.onRunStart(ge),a.webnnOnRunEnd=oe.onRunEnd.bind(oe),a.webnnRegisterMLContext=(ge,Me)=>{oe.registerMLContext(ge,Me)},a.webnnOnReleaseSession=ge=>{oe.onReleaseSession(ge)},a.webnnCreateMLTensorDownloader=(ge,Me)=>oe.createMLTensorDownloader(ge,Me),a.webnnRegisterMLTensor=(ge,Me,nt,_t)=>oe.registerMLTensor(ge,Me,nt,_t),a.webnnCreateMLContext=ge=>oe.createMLContext(ge),a.webnnRegisterMLConstant=(ge,Me,nt,_t,Lt,nr)=>oe.registerMLConstant(ge,Me,nt,_t,Lt,a.Eb,nr),a.webnnRegisterGraphInput=oe.registerGraphInput.bind(oe),a.webnnIsGraphInput=oe.isGraphInput.bind(oe),a.webnnCreateTemporaryTensor=oe.createTemporaryTensor.bind(oe),a.webnnIsInt64Supported=oe.isInt64Supported.bind(oe)}};let f=()=>{let j=(J,oe,ge)=>(...Me)=>{let nt=$a,_t=oe==null?void 0:oe();Me=J(...Me);let Lt=oe==null?void 0:oe();return _t!==Lt&&(J=Lt,ge(_t),oe=ge=null),$a!=nt?new Promise((nr,vr)=>{Zs={resolve:nr,reject:vr}}):Me};(()=>{for(let J of["_OrtAppendExecutionProvider","_OrtCreateSession","_OrtRun","_OrtRunWithBinding","_OrtBindInput"])a[J]=j(a[J],()=>a[J],oe=>a[J]=oe)})(),d!==void 0&&(a._OrtRun=d(a._OrtRun),a._OrtRunWithBinding=d(a._OrtRunWithBinding)),f=void 0};a.asyncInit=()=>{f==null||f()};var h,p,m=Object.assign({},a),_=(j,J)=>{throw J},y="";(o||l)&&(l?y=self.location.href:typeof document<"u"&&document.currentScript&&(y=document.currentScript.src),rj&&(y=rj),y=y.startsWith("blob:")?"":y.slice(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1),l&&(p=j=>{var J=new XMLHttpRequest;return J.open("GET",j,!1),J.responseType="arraybuffer",J.send(null),new Uint8Array(J.response)}),h=async j=>{if(K(j))return new Promise((oe,ge)=>{var Me=new XMLHttpRequest;Me.open("GET",j,!0),Me.responseType="arraybuffer",Me.onload=()=>{Me.status==200||Me.status==0&&Me.response?oe(Me.response):ge(Me.status)},Me.onerror=ge,Me.send(null)});var J=await fetch(j,{credentials:"same-origin"});if(J.ok)return J.arrayBuffer();throw Error(J.status+" : "+J.url)});var v=console.log.bind(console),b=console.error.bind(console),w=v,x=b;Object.assign(a,m),m=null;var E,T,S,A,C,k,M,D,$,V,U,B,z,q=a.wasmBinary,L=!1,K=j=>j.startsWith("file://");function O(){return E.buffer!=A.buffer&&H(),A}function N(){return E.buffer!=A.buffer&&H(),C}function X(){return E.buffer!=A.buffer&&H(),k}function ie(){return E.buffer!=A.buffer&&H(),M}function ee(){return E.buffer!=A.buffer&&H(),D}function le(){return E.buffer!=A.buffer&&H(),$}function Te(){return E.buffer!=A.buffer&&H(),V}function be(){return E.buffer!=A.buffer&&H(),z}if(u){let j=function(J){try{var oe=J.data,ge=oe.Bb;if(ge==="load"){let Me=[];self.onmessage=nt=>Me.push(nt),self.startWorker=()=>{postMessage({Bb:"loaded"});for(let nt of Me)j(nt);self.onmessage=j};for(let nt of oe.Rb)a[nt]&&!a[nt].proxy||(a[nt]=(..._t)=>{postMessage({Bb:"callHandler",Qb:nt,args:_t})},nt=="print"&&(w=a[nt]),nt=="printErr"&&(x=a[nt]));E=oe.kc,H(),we(oe.lc)}else if(ge==="run"){Ir(oe.Ab),bc(oe.Ab,0,0,1,0,0),Kt(),it(oe.Ab),ae||(ma(),ae=!0);try{cn(oe.fc,oe.Hb)}catch(Me){if(Me!="unwind")throw Me}}else oe.target!=="setimmediate"&&(ge==="checkMailbox"?ae&&vt():ge&&(x(`worker: received unknown command ${ge}`),x(oe)))}catch(Me){throw df(),Me}};var we,ae=!1;x=function(...J){J=J.join(" "),console.error(J)},self.alert=function(...J){postMessage({Bb:"alert",text:J.join(" "),ic:_c()})},self.onunhandledrejection=J=>{throw J.reason||J},self.onmessage=j}function H(){var j=E.buffer;a.HEAP8=A=new Int8Array(j),a.HEAP16=k=new Int16Array(j),a.HEAPU8=C=new Uint8Array(j),a.HEAPU16=M=new Uint16Array(j),a.HEAP32=D=new Int32Array(j),a.HEAPU32=$=new Uint32Array(j),a.HEAPF32=V=new Float32Array(j),a.HEAPF64=z=new Float64Array(j),a.HEAP64=U=new BigInt64Array(j),a.HEAPU64=B=new BigUint64Array(j)}function fe(){u?startWorker(a):xr.Ca()}u||(E=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0}),H());var Se,ne=0,$e=null;function me(){if(--ne==0&&$e){var j=$e;$e=null,j()}}function Ue(j){throw x(j="Aborted("+j+")"),L=!0,j=new WebAssembly.RuntimeError(j+". Build with -sASSERTIONS for more info."),i(j),j}function ke(){return{a:{L:Re,Aa:ve,b:rr,$:wr,A:Z,pa:Pe,X:Oe,Z:Ye,qa:ct,na:Ct,ga:sr,ma:ir,J:or,Y:It,V:cr,oa:Qr,W:Zr,va:En,E:ci,Q:Ki,O:us,D:Pt,u:hr,r:$n,P:xl,z:se,R:Ce,ja:Ve,T:Bt,aa:Gt,M:dr,F:Dr,ia:it,sa:Un,t:di,Ba:Pr,w:Ps,o:Xi,l:Ba,c:sa,n:ol,j:op,v:lp,p:Wo,f:Nu,s:up,m:dd,e:cp,k:G,i:de,g:Fe,d:Qe,da:ot,ea:$r,fa:sn,ba:hn,ca:Wn,N:Si,xa:fs,ua:hs,h:Iu,C:dh,G:lf,ta:Ua,x:pc,ra:fd,U:hd,q:za,y:mc,K:Ms,S:gc,za:Js,ya:tu,ka:yc,la:fh,_:gt,B:cf,I:ru,ha:vc,H:_o,a:E,wa:Xe}}}var ce={829644:(j,J,oe,ge,Me)=>
vendor: 32,537 bytes, lines 812-819
812{if(a===void 0||!a.Eb)return 1;if((j=Ht(Number(j>>>0))).startsWith("./")&&(j=j.substring(2)),!(j=a.Eb.get(j)))return 2;if(J=Number(J>>>0),oe=Number(oe>>>0),ge=Number(ge>>>0),J+oe>j.byteLength)return 3;try{let nt=j.subarray(J,J+oe);switch(Me){case 0:N().set(nt,ge>>>0);break;case 1:a.mc?a.mc(ge,nt):a.bc(ge,nt);break;default:return 4}return 0}catch{return 4}},830468:(j,J,oe)=>{a.Ob(j,N().subarray(J>>>0,J+oe>>>0))},830532:()=>a.nc(),830574:j=>{a.Nb(j)},830611:()=>{a.Vb()},830642:()=>{a.Wb()},830671:()=>{a.$b()},830696:j=>a.Ub(j),830729:j=>a.Yb(j),830761:(j,J,oe)=>{a.Kb(Number(j),Number(J),Number(oe),!0)},830824:(j,J,oe)=>{a.Kb(Number(j),Number(J),Number(oe))},830881:()=>typeof wasmOffsetConverter<"u",830938:j=>{a.jb("Abs",j,void 0)},830989:j=>{a.jb("Neg",j,void 0)},831040:j=>{a.jb("Floor",j,void 0)},831093:j=>{a.jb("Ceil",j,void 0)},831145:j=>{a.jb("Reciprocal",j,void 0)},831203:j=>{a.jb("Sqrt",j,void 0)},831255:j=>{a.jb("Exp",j,void 0)},831306:j=>{a.jb("Erf",j,void 0)},831357:j=>{a.jb("Sigmoid",j,void 0)},831412:(j,J,oe)=>{a.jb("HardSigmoid",j,{alpha:J,beta:oe})},831491:j=>{a.jb("Log",j,void 0)},831542:j=>{a.jb("Sin",j,void 0)},831593:j=>{a.jb("Cos",j,void 0)},831644:j=>{a.jb("Tan",j,void 0)},831695:j=>{a.jb("Asin",j,void 0)},831747:j=>{a.jb("Acos",j,void 0)},831799:j=>{a.jb("Atan",j,void 0)},831851:j=>{a.jb("Sinh",j,void 0)},831903:j=>{a.jb("Cosh",j,void 0)},831955:j=>{a.jb("Asinh",j,void 0)},832008:j=>{a.jb("Acosh",j,void 0)},832061:j=>{a.jb("Atanh",j,void 0)},832114:j=>{a.jb("Tanh",j,void 0)},832166:j=>{a.jb("Not",j,void 0)},832217:(j,J,oe)=>{a.jb("Clip",j,{min:J,max:oe})},832286:j=>{a.jb("Clip",j,void 0)},832338:(j,J)=>{a.jb("Elu",j,{alpha:J})},832396:j=>{a.jb("Gelu",j,void 0)},832448:j=>{a.jb("Relu",j,void 0)},832500:(j,J)=>{a.jb("LeakyRelu",j,{alpha:J})},832564:(j,J)=>{a.jb("ThresholdedRelu",j,{alpha:J})},832634:(j,J)=>{a.jb("Cast",j,{to:J})},832692:j=>{a.jb("Add",j,void 0)},832743:j=>{a.jb("Sub",j,void 0)},832794:j=>{a.jb("Mul",j,void 0)},832845:j=>{a.jb("Div",j,void 0)},832896:j=>{a.jb("Pow",j,void 0)},832947:j=>{a.jb("Equal",j,void 0)},833e3:j=>{a.jb("Greater",j,void 0)},833055:j=>{a.jb("GreaterOrEqual",j,void 0)},833117:j=>{a.jb("Less",j,void 0)},833169:j=>{a.jb("LessOrEqual",j,void 0)},833228:(j,J,oe,ge,Me)=>{a.jb("ReduceMean",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},833403:(j,J,oe,ge,Me)=>{a.jb("ReduceMax",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},833577:(j,J,oe,ge,Me)=>{a.jb("ReduceMin",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},833751:(j,J,oe,ge,Me)=>{a.jb("ReduceProd",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},833926:(j,J,oe,ge,Me)=>{a.jb("ReduceSum",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},834100:(j,J,oe,ge,Me)=>{a.jb("ReduceL1",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},834273:(j,J,oe,ge,Me)=>{a.jb("ReduceL2",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},834446:(j,J,oe,ge,Me)=>{a.jb("ReduceLogSum",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},834623:(j,J,oe,ge,Me)=>{a.jb("ReduceSumSquare",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},834803:(j,J,oe,ge,Me)=>{a.jb("ReduceLogSumExp",j,{keepDims:!!J,noopWithEmptyAxes:!!oe,axes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},834983:j=>{a.jb("Where",j,void 0)},835036:(j,J,oe)=>{a.jb("Transpose",j,{perm:J?Array.from(ee().subarray(Number(J)>>>0,Number(oe)>>>0)):[]})},835160:(j,J,oe,ge)=>{a.jb("DepthToSpace",j,{blocksize:J,mode:Ht(oe),format:ge?"NHWC":"NCHW"})},835293:(j,J,oe,ge)=>{a.jb("DepthToSpace",j,{blocksize:J,mode:Ht(oe),format:ge?"NHWC":"NCHW"})},835426:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps,yd)=>{a.jb("ConvTranspose",j,{format:nr?"NHWC":"NCHW",autoPad:J,dilations:[oe],group:ge,kernelShape:[Me],pads:[nt,_t],strides:[Lt],wIsConst:()=>!!O()[vr>>>0],outputPadding:on?Array.from(ee().subarray(Number(on)>>>0,Number(Fn)>>>0)):[],outputShape:li?Array.from(ee().subarray(Number(li)>>>0,Number(ps)>>>0)):[],activation:Ht(yd)})},835859:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps)=>{a.jb("ConvTranspose",j,{format:Lt?"NHWC":"NCHW",autoPad:J,dilations:Array.from(ee().subarray(Number(oe)>>>0,2+(Number(oe)>>>0)>>>0)),group:ge,kernelShape:Array.from(ee().subarray(Number(Me)>>>0,2+(Number(Me)>>>0)>>>0)),pads:Array.from(ee().subarray(Number(nt)>>>0,4+(Number(nt)>>>0)>>>0)),strides:Array.from(ee().subarray(Number(_t)>>>0,2+(Number(_t)>>>0)>>>0)),wIsConst:()=>!!O()[nr>>>0],outputPadding:vr?Array.from(ee().subarray(Number(vr)>>>0,Number(on)>>>0)):[],outputShape:Fn?Array.from(ee().subarray(Number(Fn)>>>0,Number(li)>>>0)):[],activation:Ht(ps)})},836520:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps,yd)=>{a.jb("ConvTranspose",j,{format:nr?"NHWC":"NCHW",autoPad:J,dilations:[oe],group:ge,kernelShape:[Me],pads:[nt,_t],strides:[Lt],wIsConst:()=>!!O()[vr>>>0],outputPadding:on?Array.from(ee().subarray(Number(on)>>>0,Number(Fn)>>>0)):[],outputShape:li?Array.from(ee().subarray(Number(li)>>>0,Number(ps)>>>0)):[],activation:Ht(yd)})},836953:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps)=>{a.jb("ConvTranspose",j,{format:Lt?"NHWC":"NCHW",autoPad:J,dilations:Array.from(ee().subarray(Number(oe)>>>0,2+(Number(oe)>>>0)>>>0)),group:ge,kernelShape:Array.from(ee().subarray(Number(Me)>>>0,2+(Number(Me)>>>0)>>>0)),pads:Array.from(ee().subarray(Number(nt)>>>0,4+(Number(nt)>>>0)>>>0)),strides:Array.from(ee().subarray(Number(_t)>>>0,2+(Number(_t)>>>0)>>>0)),wIsConst:()=>!!O()[nr>>>0],outputPadding:vr?Array.from(ee().subarray(Number(vr)>>>0,Number(on)>>>0)):[],outputShape:Fn?Array.from(ee().subarray(Number(Fn)>>>0,Number(li)>>>0)):[],activation:Ht(ps)})},837614:(j,J)=>{a.jb("GlobalAveragePool",j,{format:J?"NHWC":"NCHW"})},837705:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps)=>{a.jb("AveragePool",j,{format:ps?"NHWC":"NCHW",auto_pad:J,ceil_mode:oe,count_include_pad:ge,storage_order:Me,dilations:nt?Array.from(ee().subarray(Number(nt)>>>0,Number(_t)>>>0)):[],kernel_shape:Lt?Array.from(ee().subarray(Number(Lt)>>>0,Number(nr)>>>0)):[],pads:vr?Array.from(ee().subarray(Number(vr)>>>0,Number(on)>>>0)):[],strides:Fn?Array.from(ee().subarray(Number(Fn)>>>0,Number(li)>>>0)):[]})},838184:(j,J)=>{a.jb("GlobalAveragePool",j,{format:J?"NHWC":"NCHW"})},838275:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps)=>{a.jb("AveragePool",j,{format:ps?"NHWC":"NCHW",auto_pad:J,ceil_mode:oe,count_include_pad:ge,storage_order:Me,dilations:nt?Array.from(ee().subarray(Number(nt)>>>0,Number(_t)>>>0)):[],kernel_shape:Lt?Array.from(ee().subarray(Number(Lt)>>>0,Number(nr)>>>0)):[],pads:vr?Array.from(ee().subarray(Number(vr)>>>0,Number(on)>>>0)):[],strides:Fn?Array.from(ee().subarray(Number(Fn)>>>0,Number(li)>>>0)):[]})},838754:(j,J)=>{a.jb("GlobalMaxPool",j,{format:J?"NHWC":"NCHW"})},838841:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps)=>{a.jb("MaxPool",j,{format:ps?"NHWC":"NCHW",auto_pad:J,ceil_mode:oe,count_include_pad:ge,storage_order:Me,dilations:nt?Array.from(ee().subarray(Number(nt)>>>0,Number(_t)>>>0)):[],kernel_shape:Lt?Array.from(ee().subarray(Number(Lt)>>>0,Number(nr)>>>0)):[],pads:vr?Array.from(ee().subarray(Number(vr)>>>0,Number(on)>>>0)):[],strides:Fn?Array.from(ee().subarray(Number(Fn)>>>0,Number(li)>>>0)):[]})},839316:(j,J)=>{a.jb("GlobalMaxPool",j,{format:J?"NHWC":"NCHW"})},839403:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps)=>{a.jb("MaxPool",j,{format:ps?"NHWC":"NCHW",auto_pad:J,ceil_mode:oe,count_include_pad:ge,storage_order:Me,dilations:nt?Array.from(ee().subarray(Number(nt)>>>0,Number(_t)>>>0)):[],kernel_shape:Lt?Array.from(ee().subarray(Number(Lt)>>>0,Number(nr)>>>0)):[],pads:vr?Array.from(ee().subarray(Number(vr)>>>0,Number(on)>>>0)):[],strides:Fn?Array.from(ee().subarray(Number(Fn)>>>0,Number(li)>>>0)):[]})},839878:(j,J,oe,ge,Me)=>{a.jb("Gemm",j,{alpha:J,beta:oe,transA:ge,transB:Me})},839982:j=>{a.jb("MatMul",j,void 0)},840036:(j,J,oe,ge)=>{a.jb("ArgMax",j,{keepDims:!!J,selectLastIndex:!!oe,axis:ge})},840144:(j,J,oe,ge)=>{a.jb("ArgMin",j,{keepDims:!!J,selectLastIndex:!!oe,axis:ge})},840252:(j,J)=>{a.jb("Softmax",j,{axis:J})},840315:(j,J)=>{a.jb("Concat",j,{axis:J})},840375:(j,J,oe,ge,Me)=>{a.jb("Split",j,{axis:J,numOutputs:oe,splitSizes:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},840531:j=>{a.jb("Expand",j,void 0)},840585:(j,J)=>{a.jb("Gather",j,{axis:Number(J)})},840656:(j,J)=>{a.jb("GatherElements",j,{axis:Number(J)})},840735:(j,J)=>{a.jb("GatherND",j,{batch_dims:Number(J)})},840814:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on)=>{a.jb("Resize",j,{antialias:J,axes:oe?Array.from(ee().subarray(Number(oe)>>>0,Number(ge)>>>0)):[],coordinateTransformMode:Ht(Me),cubicCoeffA:nt,excludeOutside:_t,extrapolationValue:Lt,keepAspectRatioPolicy:Ht(nr),mode:Ht(vr),nearestMode:Ht(on)})},841176:(j,J,oe,ge,Me,nt,_t)=>{a.jb("Slice",j,{starts:J?Array.from(ee().subarray(Number(J)>>>0,Number(oe)>>>0)):[],ends:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[],axes:nt?Array.from(ee().subarray(Number(nt)>>>0,Number(_t)>>>0)):[]})},841440:j=>{a.jb("Tile",j,void 0)},841492:(j,J,oe)=>{a.jb("InstanceNormalization",j,{epsilon:J,format:oe?"NHWC":"NCHW"})},841606:(j,J,oe)=>{a.jb("InstanceNormalization",j,{epsilon:J,format:oe?"NHWC":"NCHW"})},841720:j=>{a.jb("Range",j,void 0)},841773:(j,J)=>{a.jb("Einsum",j,{equation:Ht(J)})},841854:(j,J,oe,ge,Me)=>{a.jb("Pad",j,{mode:J,value:oe,pads:ge?Array.from(ee().subarray(Number(ge)>>>0,Number(Me)>>>0)):[]})},841997:(j,J,oe,ge,Me,nt)=>{a.jb("BatchNormalization",j,{epsilon:J,momentum:oe,spatial:!!Me,trainingMode:!!ge,format:nt?"NHWC":"NCHW"})},842166:(j,J,oe,ge,Me,nt)=>{a.jb("BatchNormalization",j,{epsilon:J,momentum:oe,spatial:!!Me,trainingMode:!!ge,format:nt?"NHWC":"NCHW"})},842335:(j,J,oe)=>{a.jb("CumSum",j,{exclusive:Number(J),reverse:Number(oe)})},842432:(j,J,oe)=>{a.jb("DequantizeLinear",j,{axis:J,blockSize:oe})},842522:(j,J,oe,ge,Me)=>{a.jb("GridSample",j,{align_corners:J,mode:Ht(oe),padding_mode:Ht(ge),format:Me?"NHWC":"NCHW"})},842692:(j,J,oe,ge,Me)=>{a.jb("GridSample",j,{align_corners:J,mode:Ht(oe),padding_mode:Ht(ge),format:Me?"NHWC":"NCHW"})},842862:(j,J)=>{a.jb("ScatterND",j,{reduction:Ht(J)})},842947:(j,J,oe,ge,Me,nt,_t,Lt,nr)=>{a.jb("Attention",j,{numHeads:J,isUnidirectional:oe,maskFilterValue:ge,scale:Me,doRotary:nt,qkvHiddenSizes:_t?Array.from(ee().subarray(Number(Lt)>>>0,Number(Lt)+_t>>>0)):[],pastPresentShareBuffer:!!nr})},843219:j=>{a.jb("BiasAdd",j,void 0)},843274:j=>{a.jb("BiasSplitGelu",j,void 0)},843335:j=>{a.jb("FastGelu",j,void 0)},843391:(j,J,oe,ge,Me,nt,_t,Lt,nr,vr,on,Fn,li,ps,yd,_m)=>{a.jb("Conv",j,{format:Fn?"NHWC":"NCHW",auto_pad:J,dilations:oe?Array.from(ee().subarray(Number(oe)>>>0,Number(ge)>>>0)):[],group:Me,kernel_shape:nt?Array.from(ee().subarray(Number(nt)>>>0,Number(_t)>>>0)):[],pads:Lt?Array.from(ee().subarray(Number(Lt)>>>0,Number(nr)>>>0)):[],strides:vr?Array.from(ee().subarray(Number(vr)>>>0,Number(on)>>>0)):[],w_is_const:()=>!!O()[Number(li)>>>0],activation:Ht(ps),activation_params:yd?Array.from(Te().subarray(Number(yd)>>>0,Number(_m)>>>0)):[]})},843975:j=>{a.jb("Gelu",j,void 0)},844027:(j,J,oe,ge,Me,nt,_t,Lt,nr)=>{a.jb("GroupQueryAttention",j,{numHeads:J,kvNumHeads:oe,scale:ge,softcap:Me,doRotary:nt,rotaryInterleaved:_t,smoothSoftmax:Lt,localWindowSize:nr})},844244:(j,J,oe,ge)=>{a.jb("LayerNormalization",j,{axis:J,epsilon:oe,simplified:!!ge})},844355:(j,J,oe,ge)=>{a.jb("LayerNormalization",j,{axis:J,epsilon:oe,simplified:!!ge})},844466:(j,J,oe,ge,Me,nt)=>{a.jb("MatMulNBits",j,{k:J,n:oe,accuracyLevel:ge,bits:Me,blockSize:nt})},844593:(j,J,oe,ge,Me,nt)=>{a.jb("MultiHeadAttention",j,{numHeads:J,isUnidirectional:oe,maskFilterValue:ge,scale:Me,doRotary:nt})},844752:(j,J)=>{a.jb("QuickGelu",j,{alpha:J})},844816:(j,J,oe,ge,Me)=>{a.jb("RotaryEmbedding",j,{interleaved:!!J,numHeads:oe,rotaryEmbeddingDim:ge,scale:Me})},844955:(j,J,oe)=>{a.jb("SkipLayerNormalization",j,{epsilon:J,simplified:!!oe})},845057:(j,J,oe)=>{a.jb("SkipLayerNormalization",j,{epsilon:J,simplified:!!oe})},845159:(j,J,oe,ge)=>{a.jb("GatherBlockQuantized",j,{gatherAxis:J,quantizeAxis:oe,blockSize:ge})},845280:j=>{a.Zb(j)},845314:(j,J)=>a.ac(Number(j),Number(J),a.Fb.dc,a.Fb.errors)};function ve(j,J,oe){return ds(async()=>{await a.Xb(Number(j),Number(J),Number(oe))})}function Re(){return typeof wasmOffsetConverter<"u"}class De{constructor(J){Le(this,"name","ExitStatus");this.message=`Program terminated with exit(${J})`,this.status=J}}var tt=j=>{j.terminate(),j.onmessage=()=>{}},Ge=[],Ie=j=>{$t.length==0&&(Ot(),pr($t[0]));var J=$t.pop();if(!J)return 6;kt.push(J),fr[j.Ab]=J,J.Ab=j.Ab;var oe={Bb:"run",fc:j.ec,Hb:j.Hb,Ab:j.Ab};return J.postMessage(oe,j.Mb),0},He=0,Ke=(j,J,...oe)=>{for(var ge=2*oe.length,Me=bo(),nt=au(8*ge),_t=nt>>>3,Lt=0;Lt<oe.length;Lt++){var nr=oe[Lt];typeof nr=="bigint"?(U[_t+2*Lt]=1n,U[_t+2*Lt+1]=nr):(U[_t+2*Lt]=0n,be()[_t+2*Lt+1>>>0]=nr)}return j=ff(j,0,ge,nt,J),Sl(Me),j};function Xe(j){if(u)return Ke(0,1,j);if(S=j,!(0<He)){for(var J of kt)tt(J);for(J of $t)tt(J);$t=[],kt=[],fr={},L=!0}_(0,new De(j))}function mt(j){if(u)return Ke(1,0,j);gt(j)}var gt=j=>{if(S=j,u)throw mt(j),"unwind";Xe(j)},$t=[],kt=[],Zt=[],fr={},yr=j=>{var J=j.Ab;delete fr[J],$t.push(j),kt.splice(kt.indexOf(j),1),j.Ab=0,gd(J)};function Kt(){Zt.forEach(j=>j())}var pr=j=>new Promise(J=>{j.onmessage=Me=>{var nt=(Me=Me.data).Bb;if(Me.Gb&&Me.Gb!=_c()){var _t=fr[Me.Gb];_t?_t.postMessage(Me,Me.Mb):x(`Internal error! Worker sent a message "${nt}" to target pthread ${Me.Gb}, but that thread no longer exists!`)}else nt==="checkMailbox"?vt():nt==="spawnThread"?Ie(Me):nt==="cleanupThread"?yr(fr[Me.hc]):nt==="loaded"?(j.loaded=!0,J(j)):nt==="alert"?alert(`Thread ${Me.ic}: ${Me.text}`):Me.target==="setimmediate"?j.postMessage(Me):nt==="callHandler"?a[Me.Qb](...Me.args):nt&&x(`worker sent an unknown command ${nt}`)},j.onerror=Me=>{throw x(`worker sent an error! ${Me.filename}:${Me.lineno}: ${Me.message}`),Me};var oe,ge=[];for(oe of[])a.propertyIsEnumerable(oe)&&ge.push(oe);j.postMessage({Bb:"load",Rb:ge,kc:E,lc:T})});function Ot(){var j=new Worker((()=>{let J=URL;return import.meta.url>"file:"&&import.meta.url<"file;"?new J("ort.bundle.min.mjs",import.meta.url):new URL(import.meta.url)})(),{type:"module",workerData:"em-pthread",name:"em-pthread"});$t.push(j)}var Ir=j=>{H();var J=le()[j+52>>>2>>>0];j=le()[j+56>>>2>>>0],wc(J,J-j),Sl(J)},cn=(j,J)=>{He=0,j=Al(j,J),0<He?S=j:nu(j)};class kr{constructor(J){this.Ib=J-24}}function rr(j,J,oe){var ge=new kr(j>>>=0);throw J>>>=0,oe>>>=0,le()[ge.Ib+16>>>2>>>0]=0,le()[ge.Ib+4>>>2>>>0]=J,le()[ge.Ib+8>>>2>>>0]=oe,j}function Ut(j,J,oe,ge){return u?Ke(2,1,j,J,oe,ge):wr(j,J,oe,ge)}function wr(j,J,oe,ge){if(j>>>=0,oe>>>=0,ge>>>=0,c===void 0)return 6;var Me=[];return u&&Me.length===0?Ut(j,J>>>=0,oe,ge):(j={ec:oe,Ab:j,Hb:ge,Mb:Me},u?(j.Bb="spawnThread",postMessage(j,Me),0):Ie(j))}var Ar=typeof TextDecoder<"u"?new TextDecoder:void 0,Jt=(j,J=0,oe=NaN)=>{var ge=(J>>>=0)+oe;for(oe=J;j[oe]&&!(oe>=ge);)++oe;if(16<oe-J&&j.buffer&&Ar)return Ar.decode(j.buffer instanceof ArrayBuffer?j.subarray(J,oe):j.slice(J,oe));for(ge="";J<oe;){var Me=j[J++];if(128&Me){var nt=63&j[J++];if((224&Me)==192)ge+=String.fromCharCode((31&Me)<<6|nt);else{var _t=63&j[J++];65536>(Me=(240&Me)==224?(15&Me)<<12|nt<<6|_t:(7&Me)<<18|nt<<12|_t<<6|63&j[J++])?ge+=String.fromCharCode(Me):(Me-=65536,ge+=String.fromCharCode(55296|Me>>10,56320|1023&Me))}}else ge+=String.fromCharCode(Me)}return ge},Ht=(j,J)=>(j>>>=0)?Jt(N(),j,J):"";function Z(j,J,oe){return u?Ke(3,1,j,J,oe):0}function Pe(j,J){if(u)return Ke(4,1,j,J)}var ue=j=>{for(var J=0,oe=0;oe<j.length;++oe){var ge=j.charCodeAt(oe);127>=ge?J++:2047>=ge?J+=2:55296<=ge&&57343>=ge?(J+=4,++oe):J+=3}return J},Ee=(j,J,oe)=>{var ge=N();if(J>>>=0,0<oe){var Me=J;oe=J+oe-1;for(var nt=0;nt<j.length;++nt){var _t=j.charCodeAt(nt);if(55296<=_t&&57343>=_t&&(_t=65536+((1023&_t)<<10)|1023&j.charCodeAt(++nt)),127>=_t){if(J>=oe)break;ge[J++>>>0]=_t}else{if(2047>=_t){if(J+1>=oe)break;ge[J++>>>0]=192|_t>>6}else{if(65535>=_t){if(J+2>=oe)break;ge[J++>>>0]=224|_t>>12}else{if(J+3>=oe)break;ge[J++>>>0]=240|_t>>18,ge[J++>>>0]=128|_t>>12&63}ge[J++>>>0]=128|_t>>6&63}ge[J++>>>0]=128|63&_t}}ge[J>>>0]=0,j=J-Me}else j=0;return j};function Oe(j,J){if(u)return Ke(5,1,j,J)}function Ye(j,J,oe){if(u)return Ke(6,1,j,J,oe)}function ct(j,J,oe){return u?Ke(7,1,j,J,oe):0}function Ct(j,J){if(u)return Ke(8,1,j,J)}function sr(j,J,oe){if(u)return Ke(9,1,j,J,oe)}function ir(j,J,oe,ge){if(u)return Ke(10,1,j,J,oe,ge)}function or(j,J,oe,ge){if(u)return Ke(11,1,j,J,oe,ge)}function It(j,J,oe,ge){if(u)return Ke(12,1,j,J,oe,ge)}function cr(j){if(u)return Ke(13,1,j)}function Qr(j,J){if(u)return Ke(14,1,j,J)}function Zr(j,J,oe){if(u)return Ke(15,1,j,J,oe)}var Jn,yn,En=()=>Ue(""),pn=j=>{for(var J="";N()[j>>>0];)J+=Jn[N()[j++>>>0]];return J},si={},fa={};function aa(j,J,oe={}){return function(ge,Me,nt={}){var _t=Me.name;if(!ge)throw new yn(`type "${_t}" must have a positive integer typeid pointer`);if(fa.hasOwnProperty(ge)){if(nt.Sb)return;throw new yn(`Cannot register type '${_t}' twice`)}fa[ge]=Me,si.hasOwnProperty(ge)&&(Me=si[ge],delete si[ge],Me.forEach(Lt=>Lt()))}(j,J,oe)}var xi=(j,J,oe)=>{switch(J){case 1:return oe?ge=>O()[ge>>>0]:ge=>N()[ge>>>0];case 2:return oe?ge=>X()[ge>>>1>>>0]:ge=>ie()[ge>>>1>>>0];case 4:return oe?ge=>ee()[ge>>>2>>>0]:ge=>le()[ge>>>2>>>0];case 8:return oe?ge=>U[ge>>>3]:ge=>B[ge>>>3];default:throw new TypeError(`invalid integer width (${J}): ${j}`)}};function ci(j,J,oe){oe>>>=0,aa(j>>>=0,{name:J=pn(J>>>0),fromWireType:ge=>ge,toWireType:function(ge,Me){if(typeof Me!="bigint"&&typeof Me!="number")throw Me=Me===null?"null":(ge=typeof Me)=="object"||ge==="array"||ge==="function"?Me.toString():""+Me,new TypeError(`Cannot convert "${Me}" to ${this.name}`);return typeof Me=="number"&&(Me=BigInt(Me)),Me},Cb:oi,readValueFromPointer:xi(J,oe,J.indexOf("u")==-1),Db:null})}var oi=8;function Ki(j,J,oe,ge){aa(j>>>=0,{name:J=pn(J>>>0),fromWireType:function(Me){return!!Me},toWireType:function(Me,nt){return nt?oe:ge},Cb:oi,readValueFromPointer:function(Me){return this.fromWireType(N()[Me>>>0])},Db:null})}var ls=[],Yi=[];function sa(j){9<(j>>>=0)&&--Yi[j+1]==0&&(Yi[j]=void 0,ls.push(j))}var Ei=j=>{if(!j)throw new yn("Cannot use deleted val. handle = "+j);return Yi[j]},gi=j=>{switch(j){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let J=ls.pop()||Yi.length;return Yi[J]=j,Yi[J+1]=1,J}};function Ta(j){return this.fromWireType(le()[j>>>2>>>0])}var Qs={name:"emscripten::val",fromWireType:j=>{var J=Ei(j);return sa(j),J},toWireType:(j,J)=>gi(J),Cb:oi,readValueFromPointer:Ta,Db:null};function us(j){return aa(j>>>0,Qs)}var jt=(j,J)=>{switch(J){case 4:return function(oe){return this.fromWireType(Te()[oe>>>2>>>0])};case 8:return function(oe){return this.fromWireType(be()[oe>>>3>>>0])};default:throw new TypeError(`invalid float width (${J}): ${j}`)}};function Pt(j,J,oe){oe>>>=0,aa(j>>>=0,{name:J=pn(J>>>0),fromWireType:ge=>ge,toWireType:(ge,Me)=>Me,Cb:oi,readValueFromPointer:jt(J,oe),Db:null})}function hr(j,J,oe,ge,Me){if(j>>>=0,oe>>>=0,J=pn(J>>>0),Me===-1&&(Me=4294967295),Me=Lt=>Lt,ge===0){var nt=32-8*oe;Me=Lt=>Lt<<nt>>>nt}var _t=J.includes("unsigned")?function(Lt,nr){return nr>>>0}:function(Lt,nr){return nr};aa(j,{name:J,fromWireType:Me,toWireType:_t,Cb:oi,readValueFromPointer:xi(J,oe,ge!==0),Db:null})}function $n(j,J,oe){function ge(nt){var _t=le()[nt>>>2>>>0];return nt=le()[nt+4>>>2>>>0],new Me(O().buffer,nt,_t)}var Me=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][J];aa(j>>>=0,{name:oe=pn(oe>>>0),fromWireType:ge,Cb:oi,readValueFromPointer:ge},{Sb:!0})}function xl(j,J){aa(j>>>=0,{name:J=pn(J>>>0),fromWireType:function(oe){for(var ge,Me=le()[oe>>>2>>>0],nt=oe+4,_t=nt,Lt=0;Lt<=Me;++Lt){var nr=nt+Lt;Lt!=Me&&N()[nr>>>0]!=0||(_t=Ht(_t,nr-_t),ge===void 0?ge=_t:(ge+="\0",ge+=_t),_t=nr+1)}return Za(oe),ge},toWireType:function(oe,ge){ge instanceof ArrayBuffer&&(ge=new Uint8Array(ge));var Me=typeof ge=="string";if(!(Me||ge instanceof Uint8Array||ge instanceof Uint8ClampedArray||ge instanceof Int8Array))throw new yn("Cannot pass non-string to std::string");var nt=Me?ue(ge):ge.length,_t=Go(4+nt+1),Lt=_t+4;if(le()[_t>>>2>>>0]=nt,Me)Ee(ge,Lt,nt+1);else if(Me)for(Me=0;Me<nt;++Me){var nr=ge.charCodeAt(Me);if(255<nr)throw Za(_t),new yn("String has UTF-16 code units that do not fit in 8 bits");N()[Lt+Me>>>0]=nr}else for(Me=0;Me<nt;++Me)N()[Lt+Me>>>0]=ge[Me];return oe!==null&&oe.push(Za,_t),_t},Cb:oi,readValueFromPointer:Ta,Db(oe){Za(oe)}})}var El=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Sa=(j,J)=>{for(var oe=j>>1,ge=oe+J/2;!(oe>=ge)&&ie()[oe>>>0];)++oe;if(32<(oe<<=1)-j&&El)return El.decode(N().slice(j,oe));for(oe="",ge=0;!(ge>=J/2);++ge){var Me=X()[j+2*ge>>>1>>>0];if(Me==0)break;oe+=String.fromCharCode(Me)}return oe},ha=(j,J,oe)=>{if(oe??(oe=2147483647),2>oe)return 0;var ge=J;oe=(oe-=2)<2*j.length?oe/2:j.length;for(var Me=0;Me<oe;++Me){var nt=j.charCodeAt(Me);X()[J>>>1>>>0]=nt,J+=2}return X()[J>>>1>>>0]=0,J-ge},sl=j=>2*j.length,ud=(j,J)=>{for(var oe=0,ge="";!(oe>=J/4);){var Me=ee()[j+4*oe>>>2>>>0];if(Me==0)break;++oe,65536<=Me?(Me-=65536,ge+=String.fromCharCode(55296|Me>>10,56320|1023&Me)):ge+=String.fromCharCode(Me)}return ge},sf=(j,J,oe)=>{if(J>>>=0,oe??(oe=2147483647),4>oe)return 0;var ge=J;oe=ge+oe-4;for(var Me=0;Me<j.length;++Me){var nt=j.charCodeAt(Me);if(55296<=nt&&57343>=nt&&(nt=65536+((1023&nt)<<10)|1023&j.charCodeAt(++Me)),ee()[J>>>2>>>0]=nt,(J+=4)+4>oe)break}return ee()[J>>>2>>>0]=0,J-ge},st=j=>{for(var J=0,oe=0;oe<j.length;++oe){var ge=j.charCodeAt(oe);55296<=ge&&57343>=ge&&++oe,J+=4}return J};function se(j,J,oe){if(j>>>=0,J>>>=0,oe=pn(oe>>>=0),J===2)var ge=Sa,Me=ha,nt=sl,_t=Lt=>ie()[Lt>>>1>>>0];else J===4&&(ge=ud,Me=sf,nt=st,_t=Lt=>le()[Lt>>>2>>>0]);aa(j,{name:oe,fromWireType:Lt=>{for(var nr,vr=le()[Lt>>>2>>>0],on=Lt+4,Fn=0;Fn<=vr;++Fn){var li=Lt+4+Fn*J;Fn!=vr&&_t(li)!=0||(on=ge(on,li-on),nr===void 0?nr=on:(nr+="\0",nr+=on),on=li+J)}return Za(Lt),nr},toWireType:(Lt,nr)=>{if(typeof nr!="string")throw new yn(`Cannot pass non-string to C++ string type ${oe}`);var vr=nt(nr),on=Go(4+vr+J);return le()[on>>>2>>>0]=vr/J,Me(nr,on+4,vr+J),Lt!==null&&Lt.push(Za,on),on},Cb:oi,readValueFromPointer:Ta,Db(Lt){Za(Lt)}})}function Ce(j,J){aa(j>>>=0,{Tb:!0,name:J=pn(J>>>0),Cb:0,fromWireType:()=>{},toWireType:()=>{}})}function Ve(j){bc(j>>>0,!l,1,!o,131072,!1),Kt()}var Je=j=>{if(!L)try{if(j(),!(0<He))try{u?nu(S):gt(S)}catch(J){J instanceof De||J=="unwind"||_(0,J)}}catch(J){J instanceof De||J=="unwind"||_(0,J)}};function it(j){j>>>=0,typeof Atomics.jc=="function"&&(Atomics.jc(ee(),j>>>2,j).value.then(vt),j+=128,Atomics.store(ee(),j>>>2,1))}var vt=()=>{var j=_c();j&&(it(j),Je(iu))};function Bt(j,J){(j>>>=0)==J>>>0?setTimeout(vt):u?postMessage({Gb:j,Bb:"checkMailbox"}):(j=fr[j])&&j.postMessage({Bb:"checkMailbox"})}var er=[];function Gt(j,J,oe,ge,Me){for(J>>>=0,ge/=2,er.length=ge,oe=Me>>>0>>>3,Me=0;Me<ge;Me++)er[Me]=U[oe+2*Me]?U[oe+2*Me+1]:be()[oe+2*Me+1>>>0];return(J?ce[J]:hh[j])(...er)}var dr=()=>{He=0};function Dr(j){j>>>=0,u?postMessage({Bb:"cleanupThread",hc:j}):yr(fr[j])}function Un(j){}var Tn=(j,J)=>{var oe=fa[j];if(oe===void 0)throw j=md(j),oe=pn(j),Za(j),new yn(`${J} has unknown type ${oe}`);return oe},Oi=(j,J,oe)=>{var ge=[];return j=j.toWireType(ge,oe),ge.length&&(le()[J>>>2>>>0]=gi(ge)),j};function di(j,J,oe){return J>>>=0,oe>>>=0,j=Ei(j>>>0),J=Tn(J,"emval::as"),Oi(J,oe,j)}function Pr(j,J){return J>>>=0,j=Ei(j>>>0),(J=Tn(J,"emval::as")).toWireType(null,j)}var Ra=j=>{try{j()}catch(J){Ue(J)}},pa=0,$a=null,Wi=0,cs=[],ji={},Fa={},Aa=0,Zs=null,yo=[];function ds(j){return function(J){if(!L){if(pa===0){var oe=!1,ge=!1;J((Me=0)=>{if(!L&&(Wi=Me,oe=!0,ge)){pa=2,Ra(()=>ga($a)),typeof MainLoop<"u"&&MainLoop.Pb&&MainLoop.resume(),Me=!1;try{var nt=function(){var nr=ee()[$a+8>>>2>>>0];return nr=xr[Fa[nr]],--He,nr()}()}catch(nr){nt=nr,Me=!0}var _t=!1;if(!$a){var Lt=Zs;Lt&&(Zs=null,(Me?Lt.reject:Lt.resolve)(nt),_t=!0)}if(Me&&!_t)throw nt}}),ge=!0,oe||(pa=1,$a=function(){var Me=Go(65548),nt=Me+12;le()[Me>>>2>>>0]=nt,le()[Me+4>>>2>>>0]=nt+65536,nt=cs[0];var _t=ji[nt];return _t===void 0&&(_t=Aa++,ji[nt]=_t,Fa[_t]=nt),nt=_t,ee()[Me+8>>>2>>>0]=nt,Me}(),typeof MainLoop<"u"&&MainLoop.Pb&&MainLoop.pause(),Ra(()=>ei($a)))}else pa===2?(pa=0,Ra(Ca),Za($a),$a=null,yo.forEach(Je)):Ue(`invalid state: ${pa}`);return Wi}}(J=>{j().then(J)})}function Ps(j){return j>>>=0,ds(async()=>{var J=await Ei(j);return gi(J)})}var oa=[];function Xi(j,J,oe,ge){return oe>>>=0,ge>>>=0,(j=oa[j>>>0])(null,J=Ei(J>>>0),oe,ge)}var la={},Ri=j=>{var J=la[j];return J===void 0?pn(j):J};function Ba(j,J,oe,ge,Me){return oe>>>=0,ge>>>=0,Me>>>=0,(j=oa[j>>>0])(J=Ei(J>>>0),J[oe=Ri(oe)],ge,Me)}var Jl=()=>typeof globalThis=="object"?globalThis:Function("return this")();function ol(j){return(j>>>=0)==0?gi(Jl()):(j=Ri(j),gi(Jl()[j]))}var ch=j=>{var J=oa.length;return oa.push(j),J},cd=(j,J)=>{for(var oe=Array(j),ge=0;ge<j;++ge)oe[ge]=Tn(le()[J+4*ge>>>2>>>0],"parameter "+ge);return oe},of=(j,J)=>Object.defineProperty(J,"name",{value:j});function op(j,J,oe){var ge=(J=cd(j,J>>>0)).shift();j--;var Me=`return function (obj, func, destructorsRef, args) { 813`,nt=0,_t=[];oe===0&&_t.push("obj");for(var Lt=["retType"],nr=[ge],vr=0;vr<j;++vr)_t.push("arg"+vr),Lt.push("argType"+vr),nr.push(J[vr]),Me+=` var arg${vr} = argType${vr}.readValueFromPointer(args${nt?"+"+nt:""}); 814`,nt+=J[vr].Cb;return Me+=` var rv = ${oe===1?"new func":"func.call"}(${_t.join(", ")}); 815`,ge.Tb||(Lt.push("emval_returnValue"),nr.push(Oi),Me+=` return emval_returnValue(retType, destructorsRef, rv); 816`),Lt.push(Me+`}; 817`),j=function(on){var Fn=Function;if(!(Fn instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof Fn} which is not a function`);var li=of(Fn.name||"unknownFunctionName",function(){});return li.prototype=Fn.prototype,li=new li,(on=Fn.apply(li,on))instanceof Object?on:li}(Lt)(...nr),oe=`methodCaller<(${J.map(on=>on.name).join(", ")}) => ${ge.name}>`,ch(of(oe,j))}function lp(j){return j=Ri(j>>>0),gi(a[j])}function Wo(j,J){return J>>>=0,j=Ei(j>>>0),J=Ei(J),gi(j[J])}function Nu(j){9<(j>>>=0)&&(Yi[j+1]+=1)}function up(){return gi([])}function dd(j){j=Ei(j>>>0);for(var J=Array(j.length),oe=0;oe<j.length;oe++)J[oe]=j[oe];return gi(J)}function cp(j){return gi(Ri(j>>>0))}function G(){return gi({})}function de(j){for(var J=Ei(j>>>=0);J.length;){var oe=J.pop();J.pop()(oe)}sa(j)}function Fe(j,J,oe){J>>>=0,oe>>>=0,j=Ei(j>>>0),J=Ei(J),oe=Ei(oe),j[J]=oe}function Qe(j,J){return J>>>=0,j=(j=Tn(j>>>0,"_emval_take_value")).readValueFromPointer(J),gi(j)}function ot(j,J){j=-9007199254740992>j||9007199254740992<j?NaN:Number(j),J>>>=0,j=new Date(1e3*j),ee()[J>>>2>>>0]=j.getUTCSeconds(),ee()[J+4>>>2>>>0]=j.getUTCMinutes(),ee()[J+8>>>2>>>0]=j.getUTCHours(),ee()[J+12>>>2>>>0]=j.getUTCDate(),ee()[J+16>>>2>>>0]=j.getUTCMonth(),ee()[J+20>>>2>>>0]=j.getUTCFullYear()-1900,ee()[J+24>>>2>>>0]=j.getUTCDay(),j=(j.getTime()-Date.UTC(j.getUTCFullYear(),0,1,0,0,0,0))/864e5|0,ee()[J+28>>>2>>>0]=j}var Tt=j=>j%4==0&&(j%100!=0||j%400==0),Nt=[0,31,60,91,121,152,182,213,244,274,305,335],Er=[0,31,59,90,120,151,181,212,243,273,304,334];function $r(j,J){j=-9007199254740992>j||9007199254740992<j?NaN:Number(j),J>>>=0,j=new Date(1e3*j),ee()[J>>>2>>>0]=j.getSeconds(),ee()[J+4>>>2>>>0]=j.getMinutes(),ee()[J+8>>>2>>>0]=j.getHours(),ee()[J+12>>>2>>>0]=j.getDate(),ee()[J+16>>>2>>>0]=j.getMonth(),ee()[J+20>>>2>>>0]=j.getFullYear()-1900,ee()[J+24>>>2>>>0]=j.getDay();var oe=(Tt(j.getFullYear())?Nt:Er)[j.getMonth()]+j.getDate()-1|0;ee()[J+28>>>2>>>0]=oe,ee()[J+36>>>2>>>0]=-60*j.getTimezoneOffset(),oe=new Date(j.getFullYear(),6,1).getTimezoneOffset();var ge=new Date(j.getFullYear(),0,1).getTimezoneOffset();j=0|(oe!=ge&&j.getTimezoneOffset()==Math.min(ge,oe)),ee()[J+32>>>2>>>0]=j}function sn(j){j>>>=0;var J=new Date(ee()[j+20>>>2>>>0]+1900,ee()[j+16>>>2>>>0],ee()[j+12>>>2>>>0],ee()[j+8>>>2>>>0],ee()[j+4>>>2>>>0],ee()[j>>>2>>>0],0),oe=ee()[j+32>>>2>>>0],ge=J.getTimezoneOffset(),Me=new Date(J.getFullYear(),6,1).getTimezoneOffset(),nt=new Date(J.getFullYear(),0,1).getTimezoneOffset(),_t=Math.min(nt,Me);return 0>oe?ee()[j+32>>>2>>>0]=+(Me!=nt&&_t==ge):0<oe!=(_t==ge)&&(Me=Math.max(nt,Me),J.setTime(J.getTime()+6e4*((0<oe?_t:Me)-ge))),ee()[j+24>>>2>>>0]=J.getDay(),oe=(Tt(J.getFullYear())?Nt:Er)[J.getMonth()]+J.getDate()-1|0,ee()[j+28>>>2>>>0]=oe,ee()[j>>>2>>>0]=J.getSeconds(),ee()[j+4>>>2>>>0]=J.getMinutes(),ee()[j+8>>>2>>>0]=J.getHours(),ee()[j+12>>>2>>>0]=J.getDate(),ee()[j+16>>>2>>>0]=J.getMonth(),ee()[j+20>>>2>>>0]=J.getYear(),j=J.getTime(),BigInt(isNaN(j)?-1:j/1e3)}function hn(j,J,oe,ge,Me,nt,_t){return u?Ke(16,1,j,J,oe,ge,Me,nt,_t):-52}function Wn(j,J,oe,ge,Me,nt){if(u)return Ke(17,1,j,J,oe,ge,Me,nt)}var Ti={},za=()=>performance.timeOrigin+performance.now();function Si(j,J){if(u)return Ke(18,1,j,J);if(Ti[j]&&(clearTimeout(Ti[j].id),delete Ti[j]),!J)return 0;var oe=setTimeout(()=>{delete Ti[j],Je(()=>Lu(j,performance.timeOrigin+performance.now()))},J);return Ti[j]={id:oe,qc:J},0}function fs(j,J,oe,ge){j>>>=0,J>>>=0,oe>>>=0,ge>>>=0;var Me=new Date().getFullYear(),nt=new Date(Me,0,1).getTimezoneOffset();Me=new Date(Me,6,1).getTimezoneOffset();var _t=Math.max(nt,Me);le()[j>>>2>>>0]=60*_t,ee()[J>>>2>>>0]=+(nt!=Me),j=(J=Lt=>{var nr=Math.abs(Lt);return`UTC${0<=Lt?"-":"+"}${String(Math.floor(nr/60)).padStart(2,"0")}${String(nr%60).padStart(2,"0")}`})(nt),J=J(Me),Me<nt?(Ee(j,oe,17),Ee(J,ge,17)):(Ee(j,ge,17),Ee(J,oe,17))}var Ua=()=>Date.now();function hs(j,J,oe){return 0<=j&&3>=j?(j===0?j=Date.now():j=performance.timeOrigin+performance.now(),U[oe>>>0>>>3]=BigInt(Math.round(1e6*j)),0):28}var ll=[],vo=(j,J)=>{ll.length=0;for(var oe;oe=N()[j++>>>0];){var ge=oe!=105;J+=(ge&=oe!=112)&&J%8?4:0,ll.push(oe==112?le()[J>>>2>>>0]:oe==106?U[J>>>3]:oe==105?ee()[J>>>2>>>0]:be()[J>>>3>>>0]),J+=ge?8:4}return ll};function Iu(j,J,oe){return j>>>=0,J=vo(J>>>0,oe>>>0),ce[j](...J)}function dh(j,J,oe){return j>>>=0,J=vo(J>>>0,oe>>>0),ce[j](...J)}var lf=()=>{};function pc(j,J){return x(Ht(j>>>0,J>>>0))}var fd=()=>{throw He+=1,"unwind"};function hd(){return 4294901760}var mc=()=>navigator.hardwareConcurrency;function Ms(){return Ue("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER"),0}function gc(j){j>>>=0;var J=N().length;if(j<=J||4294901760<j)return!1;for(var oe=1;4>=oe;oe*=2){var ge=J*(1+.2/oe);ge=Math.min(ge,j+100663296);e:{ge=(Math.min(4294901760,65536*Math.ceil(Math.max(j,ge)/65536))-E.buffer.byteLength+65535)/65536|0;try{E.grow(ge),H();var Me=1;break e}catch{}Me=void 0}if(Me)return!0}return!1}var eu=()=>(Ue("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER"),0),Tl={},pd=j=>{j.forEach(J=>{eu()})};function Js(){var j=Error().stack.toString().split(` 818`);return j[0]=="Error"&&j.shift(),pd(j),Tl.Lb=eu(),Tl.cc=j,Tl.Lb}function tu(j,J,oe){if(j>>>=0,J>>>=0,Tl.Lb==j)var ge=Tl.cc;else(ge=Error().stack.toString().split(` 819`))[0]=="Error"&&ge.shift(),pd(ge);for(var Me=3;ge[Me]&&eu()!=j;)++Me;for(j=0;j<oe&&ge[j+Me];++j)ee()[J+4*j>>>2>>>0]=eu();return j}var Vo,uf={},ul=()=>{if(!Vo){var j,J={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:"./this.program"};for(j in uf)uf[j]===void 0?delete J[j]:J[j]=uf[j];var oe=[];for(j in J)oe.push(`${j}=${J[j]}`);Vo=oe}return Vo};function yc(j,J){if(u)return Ke(19,1,j,J);j>>>=0,J>>>=0;var oe=0;return ul().forEach((ge,Me)=>{var nt=J+oe;for(Me=le()[j+4*Me>>>2>>>0]=nt,nt=0;nt<ge.length;++nt)O()[Me++>>>0]=ge.charCodeAt(nt);O()[Me>>>0]=0,oe+=ge.length+1}),0}function fh(j,J){if(u)return Ke(20,1,j,J);j>>>=0,J>>>=0;var oe=ul();le()[j>>>2>>>0]=oe.length;var ge=0;return oe.forEach(Me=>ge+=Me.length+1),le()[J>>>2>>>0]=ge,0}function cf(j){return u?Ke(21,1,j):52}function ru(j,J,oe,ge){return u?Ke(22,1,j,J,oe,ge):52}function vc(j,J,oe,ge){return u?Ke(23,1,j,J,oe,ge):70}var Ho=[null,[],[]];function _o(j,J,oe,ge){if(u)return Ke(24,1,j,J,oe,ge);J>>>=0,oe>>>=0,ge>>>=0;for(var Me=0,nt=0;nt<oe;nt++){var _t=le()[J>>>2>>>0],Lt=le()[J+4>>>2>>>0];J+=8;for(var nr=0;nr<Lt;nr++){var vr=N()[_t+nr>>>0],on=Ho[j];
819vr===0||vr===10?((j===1?w:x)(Jt(on)),on.length=0):on.push(vr)}Me+=Lt}return le()[ge>>>2>>>0]=Me,0}u||function(){for(var j=a.numThreads-1;j--;)Ot();Ge.unshift(()=>{ne++,function(J){u?J():Promise.all($t.map(pr)).then(J)}(()=>me())})}();for(var Du=Array(256),cl=0;256>cl;++cl)Du[cl]=String.fromCharCode(cl);Jn=Du,yn=a.BindingError=class extends Error{constructor(j){super(j),this.name="BindingError"}},a.InternalError=class extends Error{constructor(j){super(j),this.name="InternalError"}},Yi.push(0,1,void 0,1,null,1,!0,1,!1,1),a.count_emval_handles=()=>Yi.length/2-5-ls.length;var xr,hh=[Xe,mt,Ut,Z,Pe,Oe,Ye,ct,Ct,sr,ir,or,It,cr,Qr,Zr,hn,Wn,Si,yc,fh,cf,ru,vc,_o];(async function(){function j(ge,Me){return xr=ge.exports,xr=function(){var nt=xr,_t={};for(let[Lt,nr]of Object.entries(nt))_t[Lt]=typeof nr=="function"?(...vr)=>{cs.push(Lt);try{return nr(...vr)}finally{L||(cs.pop(),$a&&pa===1&&cs.length===0&&(pa=0,He+=1,Ra(Ai),typeof Fibers<"u"&&Fibers.rc()))}}:nr;return _t}(),xr=function(){var nt=xr,_t=nr=>vr=>nr(vr)>>>0,Lt=nr=>()=>nr()>>>0;return(nt=Object.assign({},nt)).Da=_t(nt.Da),nt.fb=Lt(nt.fb),nt.hb=_t(nt.hb),nt.tb=_t(nt.tb),nt.ub=Lt(nt.ub),nt.__cxa_get_exception_ptr=_t(nt.__cxa_get_exception_ptr),nt}(),Zt.push(xr.ib),T=Me,me(),xr}ne++;var J=ke();if(a.instantiateWasm)return new Promise(ge=>{a.instantiateWasm(J,(Me,nt)=>{j(Me,nt),ge(Me.exports)})});if(u)return new Promise(ge=>{we=Me=>{var nt=new WebAssembly.Instance(Me,ke());ge(j(nt,Me))}});Se??(Se=a.locateFile?a.locateFile?a.locateFile("ort-wasm-simd-threaded.jsep.wasm",y):y+"ort-wasm-simd-threaded.jsep.wasm":new URL("/assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",import.meta.url).href);try{var oe=await async function(ge){var Me=Se;if(!q&&typeof WebAssembly.instantiateStreaming=="function"&&!K(Me))try{var nt=fetch(Me,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(nt,ge)}catch(_t){x(`wasm streaming compile failed: ${_t}`),x("falling back to ArrayBuffer instantiation")}return async function(_t,Lt){try{var nr=await async function(vr){if(!q)try{var on=await h(vr);return new Uint8Array(on)}catch{}if(vr==Se&&q)vr=new Uint8Array(q);else{if(!p)throw"both async and sync fetching of the wasm failed";vr=p(vr)}return vr}(_t);return await WebAssembly.instantiate(nr,Lt)}catch(vr){x(`failed to asynchronously prepare wasm: ${vr}`),Ue(vr)}}(Me,ge)}(J);return j(oe.instance,oe.module)}catch(ge){return i(ge),Promise.reject(ge)}})();var md=j=>(md=xr.Da)(j),ma=()=>(ma=xr.Ea)();a._OrtInit=(j,J)=>(a._OrtInit=xr.Fa)(j,J),a._OrtGetLastError=(j,J)=>(a._OrtGetLastError=xr.Ga)(j,J),a._OrtCreateSessionOptions=(j,J,oe,ge,Me,nt,_t,Lt,nr,vr)=>(a._OrtCreateSessionOptions=xr.Ha)(j,J,oe,ge,Me,nt,_t,Lt,nr,vr),a._OrtAppendExecutionProvider=(j,J,oe,ge,Me)=>(a._OrtAppendExecutionProvider=xr.Ia)(j,J,oe,ge,Me),a._OrtAddFreeDimensionOverride=(j,J,oe)=>(a._OrtAddFreeDimensionOverride=xr.Ja)(j,J,oe),a._OrtAddSessionConfigEntry=(j,J,oe)=>(a._OrtAddSessionConfigEntry=xr.Ka)(j,J,oe),a._OrtReleaseSessionOptions=j=>(a._OrtReleaseSessionOptions=xr.La)(j),a._OrtCreateSession=(j,J,oe)=>(a._OrtCreateSession=xr.Ma)(j,J,oe),a._OrtReleaseSession=j=>(a._OrtReleaseSession=xr.Na)(j),a._OrtGetInputOutputCount=(j,J,oe)=>(a._OrtGetInputOutputCount=xr.Oa)(j,J,oe),a._OrtGetInputOutputMetadata=(j,J,oe,ge)=>(a._OrtGetInputOutputMetadata=xr.Pa)(j,J,oe,ge),a._OrtFree=j=>(a._OrtFree=xr.Qa)(j),a._OrtCreateTensor=(j,J,oe,ge,Me,nt)=>(a._OrtCreateTensor=xr.Ra)(j,J,oe,ge,Me,nt),a._OrtGetTensorData=(j,J,oe,ge,Me)=>(a._OrtGetTensorData=xr.Sa)(j,J,oe,ge,Me),a._OrtReleaseTensor=j=>(a._OrtReleaseTensor=xr.Ta)(j),a._OrtCreateRunOptions=(j,J,oe,ge)=>(a._OrtCreateRunOptions=xr.Ua)(j,J,oe,ge),a._OrtAddRunConfigEntry=(j,J,oe)=>(a._OrtAddRunConfigEntry=xr.Va)(j,J,oe),a._OrtReleaseRunOptions=j=>(a._OrtReleaseRunOptions=xr.Wa)(j),a._OrtCreateBinding=j=>(a._OrtCreateBinding=xr.Xa)(j),a._OrtBindInput=(j,J,oe)=>(a._OrtBindInput=xr.Ya)(j,J,oe),a._OrtBindOutput=(j,J,oe,ge)=>(a._OrtBindOutput=xr.Za)(j,J,oe,ge),a._OrtClearBoundOutputs=j=>(a._OrtClearBoundOutputs=xr._a)(j),a._OrtReleaseBinding=j=>(a._OrtReleaseBinding=xr.$a)(j),a._OrtRunWithBinding=(j,J,oe,ge,Me)=>
vendor: 5,342 bytes, line 819
819(a._OrtRunWithBinding=xr.ab)(j,J,oe,ge,Me),a._OrtRun=(j,J,oe,ge,Me,nt,_t,Lt)=>(a._OrtRun=xr.bb)(j,J,oe,ge,Me,nt,_t,Lt),a._OrtEndProfiling=j=>(a._OrtEndProfiling=xr.cb)(j),a._JsepOutput=(j,J,oe)=>(a._JsepOutput=xr.db)(j,J,oe),a._JsepGetNodeName=j=>(a._JsepGetNodeName=xr.eb)(j);var _c=()=>(_c=xr.fb)(),Za=a._free=j=>(Za=a._free=xr.gb)(j),Go=a._malloc=j=>(Go=a._malloc=xr.hb)(j),bc=(j,J,oe,ge,Me,nt)=>(bc=xr.kb)(j,J,oe,ge,Me,nt),df=()=>(df=xr.lb)(),ff=(j,J,oe,ge,Me)=>(ff=xr.mb)(j,J,oe,ge,Me),gd=j=>(gd=xr.nb)(j),nu=j=>(nu=xr.ob)(j),Lu=(j,J)=>(Lu=xr.pb)(j,J),iu=()=>(iu=xr.qb)(),wc=(j,J)=>(wc=xr.rb)(j,J),Sl=j=>(Sl=xr.sb)(j),au=j=>(au=xr.tb)(j),bo=()=>(bo=xr.ub)(),Al=a.dynCall_ii=(j,J)=>(Al=a.dynCall_ii=xr.vb)(j,J),ei=j=>(ei=xr.wb)(j),Ai=()=>(Ai=xr.xb)(),ga=j=>(ga=xr.yb)(j),Ca=()=>(Ca=xr.zb)();return a.stackSave=()=>bo(),a.stackRestore=j=>Sl(j),a.stackAlloc=j=>au(j),a.setValue=function(j,J,oe="i8"){switch(oe.endsWith("*")&&(oe="*"),oe){case"i1":case"i8":O()[j>>>0]=J;break;case"i16":X()[j>>>1>>>0]=J;break;case"i32":ee()[j>>>2>>>0]=J;break;case"i64":U[j>>>3]=BigInt(J);break;case"float":Te()[j>>>2>>>0]=J;break;case"double":be()[j>>>3>>>0]=J;break;case"*":le()[j>>>2>>>0]=J;break;default:Ue(`invalid type for setValue: ${oe}`)}},a.getValue=function(j,J="i8"){switch(J.endsWith("*")&&(J="*"),J){case"i1":case"i8":return O()[j>>>0];case"i16":return X()[j>>>1>>>0];case"i32":return ee()[j>>>2>>>0];case"i64":return U[j>>>3];case"float":return Te()[j>>>2>>>0];case"double":return be()[j>>>3>>>0];case"*":return le()[j>>>2>>>0];default:Ue(`invalid type for getValue: ${J}`)}},a.UTF8ToString=Ht,a.stringToUTF8=Ee,a.lengthBytesUTF8=ue,function j(){if(0<ne)$e=j;else if(u)n(a),fe();else{for(;0<Ge.length;)Ge.shift()(a);0<ne?$e=j:(a.calledRun=!0,L||(fe(),n(a)))}}(),a.PTR_SIZE=4,s}),jxe=nj,lne=(t=(e=globalThis.self)==null?void 0:e.name)==null?void 0:t.startsWith("em-pthread"),lne&&nj()}),ij,q8,une,Tc,Rxe,PM,cne,dne,aj,fne,sj,$xe,oj,Fxe,J9=Wt(()=>{Z9(),ij=typeof location>"u"?void 0:location.origin,q8=import.meta.url>"file:"&&import.meta.url<"file;",une=()=>{{if(q8){let e=URL;return new URL(new e("ort.bundle.min.mjs",import.meta.url).href,ij).href}return import.meta.url}},Tc=une(),Rxe=()=>{if(Tc&&!Tc.startsWith("blob:"))return Tc.substring(0,Tc.lastIndexOf("/")+1)},PM=(e,t)=>{try{let r=t??Tc;return(r?new URL(e,r):new URL(e)).origin===ij}catch{return!1}},cne=(e,t)=>{let r=t??Tc;try{return(r?new URL(e,r):new URL(e)).href}catch{return}},dne=(e,t)=>`${t??"./"}${e}`,aj=async e=>{let t=await(await fetch(e,{credentials:"same-origin"})).blob();return URL.createObjectURL(t)},fne=async e=>(await import(e)).default,sj=(xbt(),fA(Ixe)).default,$xe=async()=>{if(!Tc)throw new Error("Failed to load proxy worker: cannot determine the script source URL.");if(PM(Tc))return[void 0,sj()];let e=await aj(Tc);return[e,sj(e)]},oj=(Ebt(),fA(Lxe)).default,Fxe=async(e,t,r)=>{if(!e&&!t&&oj&&Tc&&PM(Tc))return[void 0,oj];{let n="ort-wasm-simd-threaded.jsep.mjs",i=e??cne(n,t),a=r&&i&&!PM(i,t),s=a?await aj(i):i??dne(n,t);return[a?s:void 0,await fne(s)]}}}),lj,MM,V2,uj,hne,pne,mne,eW,ca,p_=Wt(()=>{J9(),MM=!1,V2=!1,uj=!1,hne=()=>{if(typeof SharedArrayBuffer>"u")return!1;try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch{return!1}},pne=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,30,1,28,0,65,0,253,15,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,186,1,26,11]))}catch{return!1}},mne=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,19,1,17,0,65,1,253,15,65,2,253,15,65,3,253,15,253,147,2,11]))}catch{return!1}},eW=async e=>{if(MM)return Promise.resolve();if(V2)throw new Error("multiple calls to 'initializeWebAssembly()' detected.");if(uj)throw new Error("previous call to 'initializeWebAssembly()' failed.");V2=!0;let t=e.initTimeout,r=e.numThreads;if(e.simd!==!1){if(e.simd==="relaxed"){if(!mne())throw new Error("Relaxed WebAssembly SIMD is not supported in the current environment.")}else if(!pne())throw new Error("WebAssembly SIMD is not supported in the current environment.")}let n=hne();r>1&&!n&&(typeof self<"u"&&!self.crossOriginIsolated&&console.warn("env.wasm.numThreads is set to "+r+", but this will not work unless you enable crossOriginIsolated mode. See https://web.dev/cross-origin-isolation-guide/ for more info."),console.warn("WebAssembly multi-threading is not supported in the current environment. Falling back to single-threading."),e.numThreads=r=1);let i=e.wasmPaths,a=typeof i=="string"?i:void 0,s=i==null?void 0:i.mjs,o=(s==null?void 0:s.href)??s,l=i==null?void 0:i.wasm,u=(l==null?void 0:l.href)??l,c=e.wasmBinary,[d,f]=await Fxe(o,a,r>1),h=!1,p=[];if(t>0&&p.push(new Promise(m=>{setTimeout(()=>{h=!0,m()},t)})),p.push(new Promise((m,_)=>{let y={numThreads:r};if(c)y.wasmBinary=c;else if(u||a)y.locateFile=v=>u??a+v;else if(o&&o.indexOf("blob:")!==0)y.locateFile=v=>new URL(v,o).href;else if(d){let v=Rxe();v&&(y.locateFile=b=>v+b)}f(y).then(v=>{V2=!1,MM=!0,lj=v,m(),d&&URL.revokeObjectURL(d)},v=>{V2=!1,uj=!0,_(v)})})),await Promise.race(p),h)throw new Error(`WebAssembly backend initializing failed due to timeout: ${t}ms`)},ca=()=>
vendor: 10,034 bytes, line 819
819{if(MM&&lj)return lj;throw new Error("WebAssembly is not initialized yet.")}}),$f,mO,Bi,tW=Wt(()=>{p_(),$f=(e,t)=>{let r=ca(),n=r.lengthBytesUTF8(e)+1,i=r._malloc(n);return r.stringToUTF8(e,i,n),t.push(i),i},mO=(e,t,r,n)=>{if(typeof e=="object"&&e!==null){if(r.has(e))throw new Error("Circular reference in options");r.add(e)}Object.entries(e).forEach(([i,a])=>{let s=t?t+i:i;if(typeof a=="object")mO(a,s+".",r,n);else if(typeof a=="string"||typeof a=="number")n(s,a.toString());else if(typeof a=="boolean")n(s,a?"1":"0");else throw new Error(`Can't handle extra config type: ${typeof a}`)})},Bi=e=>{let t=ca(),r=t.stackSave();try{let n=t.PTR_SIZE,i=t.stackAlloc(2*n);t._OrtGetLastError(i,i+n);let a=Number(t.getValue(i,n===4?"i32":"i64")),s=t.getValue(i+n,"*"),o=s?t.UTF8ToString(s):"";throw new Error(`${e} ERROR_CODE: ${a}, ERROR_MESSAGE: ${o}`)}finally{t.stackRestore(r)}}}),Bxe,Tbt=Wt(()=>{p_(),tW(),Bxe=e=>{let t=ca(),r=0,n=[],i=e||{};try{if((e==null?void 0:e.logSeverityLevel)===void 0)i.logSeverityLevel=2;else if(typeof e.logSeverityLevel!="number"||!Number.isInteger(e.logSeverityLevel)||e.logSeverityLevel<0||e.logSeverityLevel>4)throw new Error(`log serverity level is not valid: ${e.logSeverityLevel}`);if((e==null?void 0:e.logVerbosityLevel)===void 0)i.logVerbosityLevel=0;else if(typeof e.logVerbosityLevel!="number"||!Number.isInteger(e.logVerbosityLevel))throw new Error(`log verbosity level is not valid: ${e.logVerbosityLevel}`);(e==null?void 0:e.terminate)===void 0&&(i.terminate=!1);let a=0;return(e==null?void 0:e.tag)!==void 0&&(a=$f(e.tag,n)),r=t._OrtCreateRunOptions(i.logSeverityLevel,i.logVerbosityLevel,!!i.terminate,a),r===0&&Bi("Can't create run options."),(e==null?void 0:e.extra)!==void 0&&mO(e.extra,"",new WeakSet,(s,o)=>{let l=$f(s,n),u=$f(o,n);t._OrtAddRunConfigEntry(r,l,u)!==0&&Bi(`Can't set a run config entry: ${s} - ${o}.`)}),[r,n]}catch(a){throw r!==0&&t._OrtReleaseRunOptions(r),n.forEach(s=>t._free(s)),a}}}),gne,yne,vne,H2,_ne,zxe,Sbt=Wt(()=>{p_(),tW(),gne=e=>{switch(e){case"disabled":return 0;case"basic":return 1;case"extended":return 2;case"all":return 99;default:throw new Error(`unsupported graph optimization level: ${e}`)}},yne=e=>{switch(e){case"sequential":return 0;case"parallel":return 1;default:throw new Error(`unsupported execution mode: ${e}`)}},vne=e=>{e.extra||(e.extra={}),e.extra.session||(e.extra.session={});let t=e.extra.session;t.use_ort_model_bytes_directly||(t.use_ort_model_bytes_directly="1"),e.executionProviders&&e.executionProviders.some(r=>(typeof r=="string"?r:r.name)==="webgpu")&&(e.enableMemPattern=!1)},H2=(e,t,r,n)=>{let i=$f(t,n),a=$f(r,n);ca()._OrtAddSessionConfigEntry(e,i,a)!==0&&Bi(`Can't set a session config entry: ${t} - ${r}.`)},_ne=async(e,t,r)=>{for(let n of t){let i=typeof n=="string"?n:n.name,a=[];switch(i){case"webnn":if(i="WEBNN",typeof n!="string"){let c=n==null?void 0:n.deviceType;c&&H2(e,"deviceType",c,r)}break;case"webgpu":if(i="JS",typeof n!="string"){let c=n;if(c!=null&&c.preferredLayout){if(c.preferredLayout!=="NCHW"&&c.preferredLayout!=="NHWC")throw new Error(`preferredLayout must be either 'NCHW' or 'NHWC': ${c.preferredLayout}`);H2(e,"preferredLayout",c.preferredLayout,r)}}break;case"wasm":case"cpu":continue;default:throw new Error(`not supported execution provider: ${i}`)}let s=$f(i,r),o=a.length,l=0,u=0;if(o>0){l=ca()._malloc(o*ca().PTR_SIZE),r.push(l),u=ca()._malloc(o*ca().PTR_SIZE),r.push(u);for(let c=0;c<o;c++)ca().setValue(l+c*ca().PTR_SIZE,a[c][0],"*"),ca().setValue(u+c*ca().PTR_SIZE,a[c][1],"*")}await ca()._OrtAppendExecutionProvider(e,s,l,u,o)!==0&&Bi(`Can't append execution provider: ${i}.`)}},zxe=async e=>{let t=ca(),r=0,n=[],i=e||{};vne(i);try{let a=gne(i.graphOptimizationLevel??"all"),s=yne(i.executionMode??"sequential"),o=typeof i.logId=="string"?$f(i.logId,n):0,l=i.logSeverityLevel??2;if(!Number.isInteger(l)||l<0||l>4)throw new Error(`log serverity level is not valid: ${l}`);let u=i.logVerbosityLevel??0;if(!Number.isInteger(u)||u<0||u>4)throw new Error(`log verbosity level is not valid: ${u}`);let c=typeof i.optimizedModelFilePath=="string"?$f(i.optimizedModelFilePath,n):0;if(r=t._OrtCreateSessionOptions(a,!!i.enableCpuMemArena,!!i.enableMemPattern,s,!!i.enableProfiling,0,o,l,u,c),r===0&&Bi("Can't create session options."),i.executionProviders&&await _ne(r,i.executionProviders,n),i.enableGraphCapture!==void 0){if(typeof i.enableGraphCapture!="boolean")throw new Error(`enableGraphCapture must be a boolean value: ${i.enableGraphCapture}`);H2(r,"enableGraphCapture",i.enableGraphCapture.toString(),n)}if(i.freeDimensionOverrides)for(let[d,f]of Object.entries(i.freeDimensionOverrides)){if(typeof d!="string")throw new Error(`free dimension override name must be a string: ${d}`);if(typeof f!="number"||!Number.isInteger(f)||f<0)throw new Error(`free dimension override value must be a non-negative integer: ${f}`);let h=$f(d,n);t._OrtAddFreeDimensionOverride(r,h,f)!==0&&Bi(`Can't set a free dimension override: ${d} - ${f}.`)}return i.extra!==void 0&&mO(i.extra,"",new WeakSet,(d,f)=>{H2(r,d,f,n)}),[r,n]}catch(a){throw r!==0&&t._OrtReleaseSessionOptions(r)!==0&&Bi("Can't release session options."),n.forEach(s=>t._free(s)),a}}}),v1,Dp,Sy,rW,gO,nW,iW,K8,tn=Wt(()=>{v1=e=>{switch(e){case"int8":return 3;case"uint8":return 2;case"bool":return 9;case"int16":return 5;case"uint16":return 4;case"int32":return 6;case"uint32":return 12;case"float16":return 10;case"float32":return 1;case"float64":return 11;case"string":return 8;case"int64":return 7;case"uint64":return 13;case"int4":return 22;case"uint4":return 21;default:throw new Error(`unsupported data type: ${e}`)}},Dp=e=>{switch(e){case 3:return"int8";case 2:return"uint8";case 9:return"bool";case 5:return"int16";case 4:return"uint16";case 6:return"int32";case 12:return"uint32";case 10:return"float16";case 1:return"float32";case 11:return"float64";case 8:return"string";case 7:return"int64";case 13:return"uint64";case 22:return"int4";case 21:return"uint4";default:throw new Error(`unsupported data type: ${e}`)}},Sy=(e,t)=>{let r=[-1,4,1,1,2,2,4,8,-1,1,2,8,4,8,-1,-1,-1,-1,-1,-1,-1,.5,.5][e],n=typeof t=="number"?t:t.reduce((i,a)=>i*a,1);return r>0?Math.ceil(n*r):void 0},rW=e=>{switch(e){case"float16":return typeof Float16Array<"u"&&Float16Array.from?Float16Array:Uint16Array;case"float32":return Float32Array;case"uint8":return Uint8Array;case"int8":return Int8Array;case"uint16":return Uint16Array;case"int16":return Int16Array;case"int32":return Int32Array;case"bool":return Uint8Array;case"float64":return Float64Array;case"uint32":return Uint32Array;case"int64":return BigInt64Array;case"uint64":return BigUint64Array;default:throw new Error(`unsupported type: ${e}`)}},gO=e=>{switch(e){case"verbose":return 0;case"info":return 1;case"warning":return 2;case"error":return 3;case"fatal":return 4;default:throw new Error(`unsupported logging level: ${e}`)}},nW=e=>e==="float32"||e==="float16"||e==="int32"||e==="int64"||e==="uint32"||e==="uint8"||e==="bool"||e==="uint4"||e==="int4",iW=e=>e==="float32"||e==="float16"||e==="int32"||e==="int64"||e==="uint32"||e==="uint64"||e==="int8"||e==="uint8"||e==="bool"||e==="uint4"||e==="int4",K8=e=>{switch(e){case"none":return 0;case"cpu":return 1;case"cpu-pinned":return 2;case"texture":return 3;case"gpu-buffer":return 4;case"ml-tensor":return 5;default:throw new Error(`unsupported data location: ${e}`)}}}),aW,Uxe=Wt(()=>{Z9(),aW=async e=>{if(typeof e=="string"){let t=await fetch(e);if(!t.ok)throw new Error(`failed to load external data file: ${e}`);let r=t.headers.get("Content-Length"),n=r?parseInt(r,10):0;if(n<1073741824)return new Uint8Array(await t.arrayBuffer());{if(!t.body)throw new Error(`failed to load external data file: ${e}, no response body.`);let i=t.body.getReader(),a;try{a=new ArrayBuffer(n)}catch(o){if(o instanceof RangeError){let l=Math.ceil(n/65536);a=new WebAssembly.Memory({initial:l,maximum:l}).buffer}else throw o}let s=0;for(;;){let{done:o,value:l}=await i.read();if(o)break;let u=l.byteLength;new Uint8Array(a,s,u).set(l),s+=u}return new Uint8Array(a,0,n)}}else return e instanceof Blob?new Uint8Array(await e.arrayBuffer()):e instanceof Uint8Array?e:new Uint8Array(e)}}),bne,wne,xne,Ene,sW,Tne,ti,ym=Wt(()=>{tn(),bne=["V","I","W","E","F"],wne=(e,t)=>{console.log(`[${bne[e]},${new Date().toISOString()}]${t}`)},sW=(e,t)=>{xne=e,Ene=t},Tne=(e,t)=>{let r=gO(e),n=gO(xne);r>=n&&wne(r,typeof t=="function"?t():t)},ti=(...e)=>{Ene&&Tne(...e)}}),Sne,Bw,yt,yO,Wxe,Vxe,Hxe,_n=Wt(()=>{Sne=class{static calcMatMulShape(e,t){return e[1]!==t[0]?void 0:[e[0],t[1]]}},Bw=class{static calcShape(e,t,r=!1){let n=e.length,i=t.length;if(n===0)return t;if(i===0)return e;let a=Math.max(e.length,t.length),s=new Array(a);if(r){if(n<2||i<2)return;let o=Sne.calcMatMulShape([e[n-2],e[n-1]],[t[i-2],t[i-1]]);if(o===void 0)return;[s[a-2],s[a-1]]=o}for(let o=r?3:1;o<=a;o++){let l=n-o<0?1:e[n-o],u=i-o<0?1:t[i-o];if(l!==u&&l>1&&u>1)return;let c=Math.max(l,u);if(l&&u)s[a-o]=Math.max(l,u);else{if(c>1)return;s[a-o]=0}}return s}static isValidBroadcast(e,t){let r=e.length,n=t.length;if(r>n)return!1;for(let i=1;i<=r;i++)if(e[r-i]!==1&&e[r-i]!==t[n-i])return!1;return!0}},yt=class Lk{static size(t){return Lk.getSizeFromDimensionRange(t,0,t.length)}static convertShape(t,r=4){let n=t.length;if(n===0)return[];let i=new Array(n),a=n-1;for(;a>=0;){if(t[a]%r===0){i[a]=t[a]/r;break}if(r%t[a]!==0)throw new Error("cannot convert shape");i[a]=1,r/=t[a],a--}for(a--;a>=0;a--)i[a]=t[a];return i}static sizeFromDimension(t,r){if(r<0||r>t.length)throw new Error(`invalid dimension of ${r} for sizeFromDimension as Tensor has ${t.length} dimensions.`);return Lk.getSizeFromDimensionRange(t,r,t.length)}static sizeToDimension(t,r){if(r<0||r>t.length)throw new Error(`invalid dimension of ${r} for sizeToDimension as Tensor has ${t.length} dimensions.`);return Lk.getSizeFromDimensionRange(t,0,r)}static getSizeFromDimensionRange(t,r,n){let i=1;for(let a=r;a<n;a++){if(t[a]<0)throw new Error("cannot get valid size from specified dimension range. Most likely the range contains
819negative values in them.");i*=Number(t[a])}return i}static computeStrides(t){let r=t.length;if(r===0)return[];if(r===1)return[1];let n=new Array(r);n[r-1]=1,n[r-2]=t[r-1];for(let i=r-3;i>=0;--i)n[i]=n[i+1]*t[i+1];return n}static normalizeAxis(t,r){if(t<-r&&t>=r)throw new Error("unsupported axis for this operation.");return t<0?t+r:t}static normalizeAxes(t,r){return t.map(n=>this.normalizeAxis(n,r??t.length))}static sortBasedOnPerm(t,r){return r?r.map(n=>t[n]):t.slice().reverse()}static padShape(t,r){let n=t.length;return t.map((i,a)=>i+r[a]+r[a+n])}static areEqual(t,r){return t.length!==r.length?!1:t.every((n,i)=>n===r[i])}},yO=class kE{static adjustPoolAttributes(t,r,n,i,a,s){if(!t&&n.length!==r.length-2)throw new Error("length of specified kernel shapes should be 2 less than length of input dimensions");if(t)for(let o=0;o<r.length-2;o++)o>=n.length?n.push(r[o+2]):n[o]=r[o+2];for(let o=0;o<n.length;o++)if(o<i.length){if(i[o]<0)throw new Error("strides should be greater than or equal to 1")}else i.push(1);for(let o=0;o<n.length;o++)if(o<a.length){if(a[o]<0)throw new Error("dilations should be greater than or equal to 1")}else a.push(1);for(let o=0;o<n.length*2;o++)if(o<s.length){if(s[o]<0)throw new Error("pad should be greater than or equal to 1")}else s.push(0);for(let o=0;o<n.length;o++){if(n[o]<=0)throw new Error("kernel shapes need to be greater than 0");if(s[o]>=n[o]||s[o+n.length]>=n[o])throw new Error("pads should be smaller than kernel")}}static adjustPadsBasedOnAutoPad(t,r,n,i,a,s,o){if(o){if(a.length!==2*(t.length-2))throw new Error("length of pads should be twice the length of data dimensions");if(r.length!==t.length-2)throw new Error("length of strides should be the length of data dimensions");if(i.length!==t.length-2)throw new Error("length of kernel shapes should be the length of data dimensions");for(let l=0;l<t.length-2;l++)kE.adjustPadAndReturnShape(t[l+(s?1:2)],r[l],n[l],i[l],a,l,l+t.length-2,o)}}static computePoolOutputShape(t,r,n,i,a,s,o){if(r.length<=0)throw new Error("input shape must be of size greater than 0");let l=[r[0],r[1]];return kE.computeShapeHelper(t,r,l,n,i,a,s,o),l}static computeConvOutputShape(t,r,n,i,a,s,o){if(t.length<=0||r.length<=0)throw new Error("invalid input tensor dims or invalid filter tensor dims");let l=[t[0],r[0]];return kE.computeShapeHelper(!1,t,l,n,i,a,s,o),l}static computeShapeHelper(t,r,n,i,a,s,o,l){if(t)for(let u=0;u<r.length-2;u++)n.push(1);else for(let u=0;u<r.length-2;u++)n.push(kE.adjustPadAndReturnShape(r[u+2],i[u],a[u],s[u],o,u,u+r.length-2,l))}static adjustPadAndReturnShape(t,r,n,i,a,s,o,l){let u=n*(i-1)+1;if(l&&l!=="NOTSET")switch(l){case"VALID":return a[s]=0,a[o]=0,Math.floor((t-u)/r+1);case"SAME_LOWER":case"SAME_UPPER":if(n!==1)throw new Error("Dilation not supported for SAME_UPPER or SAME_LOWER");{let c=((t+r-1)/r-1)*r+i-t;return a[s]=Math.floor(l==="SAME_LOWER"?(c+1)/2:c/2),a[o]=c-a[s],Math.floor((t+c-i)/r+1)}default:throw new Error("Unsupported AutoPad type")}else return Math.floor((t+a[s]+a[o]-u)/r+1)}},Wxe=class{static getShapeOfGemmResult(e,t,r,n,i){if(e.length!==2||r.length!==2)throw new Error("shape need to be of size 2");let a,s,o;t?(a=e[1],s=e[0]):(a=e[0],s=e[1]);let l=-1;if(n?(o=r[0],l=1):(o=r[1],l=0),r[l]!==s)throw new Error("dimension mismatch");if(a<=0||o<=0||s<=0)throw new Error("invalid shape specified");if(i&&!Bw.isValidBroadcast(i,[a,o]))throw new Error("gemm: invalid bias shape for broadcast");return[a,o,s]}},Vxe=-34028234663852886e22,Hxe=34028234663852886e22}),oW,Gxe=Wt(()=>{tn(),oW=(e,t)=>new(rW(t))(e)}),Y8,cj,Ane,dj,Cne,fj,hj,pj,Pne,qxe,Abt=Wt(()=>{ym(),Y8=(e,t=!0)=>{if(e.byteLength%8!==0)throw new Error("Invalid Uint8Array length - must be a multiple of 8 (BigInt).");let r=e.byteLength/8,n=new BigInt64Array(e.buffer,e.byteOffset,r),i=new Int32Array(r);for(let a=0;a<r;a++){let s=n[a];if(s>2147483647n||s<-2147483648n)throw new Error(`Overflow occurred when converting BigInt to Int32 at index ${a}: ${s}`);i[a]=Number(s)}return t?new Uint8Array(i.buffer):i},cj=(e,t=!0)=>{if(e.byteLength%4!==0)throw new Error("Invalid Uint8Array length - must be a multiple of 4 (Int32).");let r=e.byteLength/4,n=new Int32Array(e.buffer,e.byteOffset,r),i=BigInt64Array.from(n,BigInt);return t?new Uint8Array(i.buffer):i},Ane=1,dj=()=>Ane++,Cne=new Map([["float32",32],["float16",16],["int32",32],["uint32",32],["int64",64],["uint64",64],["int8",8],["uint8",8],["int4",4],["uint4",4]]),fj=(e,t)=>{let r=Cne.get(e);if(!r)throw new Error("Unsupported data type.");return t.length>0?Math.ceil(t.reduce((n,i)=>n*i)*r/8):0},hj=class{constructor(e){this.shouldConvertInt64toInt32=!1,this.isInt64ToInt32Converted=!1;let{sessionId:t,context:r,tensor:n,dataType:i,shape:a,shouldConvertInt64toInt32:s=!1}=e;this.sessionId=t,this.mlContext=r,this.mlTensor=n,this.dataType=i,this.tensorShape=a,this.shouldConvertInt64toInt32=s}get tensor(){return this.mlTensor}get type(){return this.dataType}get shape(){return this.tensorShape}get byteLength(){return fj(this.dataType,this.tensorShape)}destroy(){ti("verbose",()=>"[WebNN] TensorWrapper.destroy"),this.mlTensor.destroy()}write(e){this.mlContext.writeTensor(this.mlTensor,e)}async read(e,t){if(e){let r=await this.mlContext.readTensor(this.mlTensor),n=cj(new Uint8Array(r));if(t){(t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).set(n);return}else return n.buffer}else return t?this.mlContext.readTensor(this.mlTensor,t):this.mlContext.readTensor(this.mlTensor)}canReuseTensor(e,t,r){return this.mlContext===e&&this.dataType===t&&this.tensorShape.length===r.length&&this.tensorShape.every((n,i)=>n===r[i])}setIsInt64ToInt32Converted(e){this.isInt64ToInt32Converted=e}},pj=class{constructor(e,t){this.tensorManager=e,this.wrapper=t}get tensorWrapper(){return this.wrapper}releaseTensor(){this.tensorWrapper&&(this.tensorManager.releaseTensor(this.tensorWrapper),this.wrapper=void 0)}async ensureTensor(e,t,r,n){let i=t,a=this.tensorManager.getMLContext(e),s=i==="int64"&&!a.opSupportLimits().input.dataTypes.includes("int64");if(s&&(i="int32",ti("verbose",()=>"[WebNN] TensorIdTracker.ensureTensor: convert dataType from int64 to int32")),this.wrapper){if(this.wrapper.canReuseTensor(a,i,r))return this.wrapper.tensor;if(n){if(this.wrapper.byteLength!==fj(i,r))throw new Error("Unable to copy data to tensor with different size.");this.activeUpload=new Uint8Array(await this.wrapper.read())}this.tensorManager.releaseTensor(this.wrapper)}let o=typeof MLTensorUsage>"u"?void 0:MLTensorUsage.READ|MLTensorUsage.WRITE;return this.wrapper=await this.tensorManager.getCachedTensor(e,i,r,o,!0,!0,s),n&&this.activeUpload&&(this.wrapper.write(this.activeUpload),this.activeUpload=void 0),this.wrapper.tensor}upload(e){let t=e;if(this.wrapper)if(this.wrapper.shouldConvertInt64toInt32&&(t=Y8(e,!0),this.wrapper.setIsInt64ToInt32Converted(!0)),t.byteLength===this.wrapper.byteLength){this.wrapper.write(t);return}else ti("verbose",()=>"Data size does not match tensor size. Releasing tensor."),this.releaseTensor();this.activeUpload?this.activeUpload.set(t):this.activeUpload=new Uint8Array(t)}async download(e){var t,r,n;if(this.activeUpload){let i=(t=this.wrapper)!=null&&t.isInt64ToInt32Converted?cj(this.activeUpload):this.activeUpload;if(e){e instanceof ArrayBuffer?new Uint8Array(e).set(i):new Uint8Array(e.buffer,e.byteOffset,e.byteLength).set(i);return}else return i.buffer}if(!this.wrapper)throw new Error("Tensor has not been created.");return e?this.wrapper.read((r=this.wrapper)==null?void 0:r.shouldConvertInt64toInt32,e):this.wrapper.read((n=this.wrapper)==null?void 0:n.shouldConvertInt64toInt32)}},Pne=class{constructor(e){this.backend=e,this.tensorTrackersById=new Map,this.freeTensors=[],this.externalTensors=new Set}getMLContext(e){let t=this.backend.getMLContext(e);if(!t)throw new Error("MLContext not found for session.");return t}reserveTensorId(){let e=dj();return this.tensorTrackersById.set(e,new pj(this)),e}releaseTensorId(e){let t=this.tensorTrackersById.get(e);t&&(this.tensorTrackersById.delete(e),t.tensorWrapper&&this.releaseTensor(t.tensorWrapper))}async ensureTensor(e,t,r,n,i){ti("verbose",()=>`[WebNN] TensorManager.ensureTensor {tensorId: ${t}, dataType: ${r}, shape: ${n}, copyOld: ${i}}`);let a=this.tensorTrackersById.get(t);if(!a)throw new Error("Tensor not found.");return a.ensureTensor(e,r,n,i)}upload(e,t){let r=this.tensorTrackersById.get(e);if(!r)throw new Error("Tensor not found.");r.upload(t)}async download(e,t){ti("verbose",()=>`[WebNN] TensorManager.download {tensorId: ${e}, dstBuffer: ${t==null?void 0:t.byteLength}}`);let r=this.tensorTrackersById.get(e);if(!r)throw new Error("Tensor not found.");return r.download(t)}releaseTensorsForSession(e){for(let t of this.freeTensors)t.sessionId===e&&t.destroy();this.freeTensors=this.freeTensors.filter(t=>t.sessionId!==e)}registerTensor(e,t,r,n){let i=this.getMLContext(e),a=dj(),s=new hj({sessionId:e,context:i,tensor:t,dataType:r,shape:n});return this.tensorTrackersById.set(a,new pj(this,s)),this.externalTensors.add(s),a}async getCachedTensor(e,t,r,n,i,a,s=!1){let o=this.getMLContext(e);for(let[u,c]of this.freeTensors.entries())if(c.canReuseTensor(o,t,r)){t
vendor: 5,239 bytes, line 819
819i("verbose",()=>`[WebNN] Reusing tensor {dataType: ${t}, shape: ${r}}`);let d=this.freeTensors.splice(u,1)[0];return d.sessionId=e,d}ti("verbose",()=>`[WebNN] MLContext.createTensor {dataType: ${t}, shape: ${r}}`);let l=await o.createTensor({dataType:t,shape:r,dimensions:r,usage:n,writable:i,readable:a});return new hj({sessionId:e,context:o,tensor:l,dataType:t,shape:r,shouldConvertInt64toInt32:s})}releaseTensor(e){this.externalTensors.has(e)&&this.externalTensors.delete(e),this.freeTensors.push(e)}},qxe=(...e)=>new Pne(...e)}),kM,Mne,Kxe,Cbt=Wt(()=>{tn(),p_(),Gxe(),Abt(),ym(),kM=new Map([[1,"float32"],[10,"float16"],[6,"int32"],[12,"uint32"],[7,"int64"],[13,"uint64"],[22,"int4"],[21,"uint4"],[3,"int8"],[2,"uint8"],[9,"uint8"]]),Mne=(e,t)=>{if(e===t)return!0;if(e===void 0||t===void 0)return!1;let r=Object.keys(e).sort(),n=Object.keys(t).sort();return r.length===n.length&&r.every((i,a)=>i===n[a]&&e[i]===t[i])},Kxe=class{constructor(e){this.tensorManager=qxe(this),this.mlContextBySessionId=new Map,this.sessionIdsByMLContext=new Map,this.mlContextCache=[],this.sessionGraphInputs=new Map,this.temporaryGraphInputs=[],this.temporarySessionTensorIds=new Map,sW(e.logLevel,!!e.debug)}get currentSessionId(){if(this.activeSessionId===void 0)throw new Error("No active session");return this.activeSessionId}onRunStart(e){ti("verbose",()=>`[WebNN] onRunStart {sessionId: ${e}}`),this.activeSessionId=e}onRunEnd(e){ti("verbose",()=>`[WebNN] onRunEnd {sessionId: ${e}}`);let t=this.temporarySessionTensorIds.get(e);if(t){for(let r of t)ti("verbose",()=>`[WebNN] releasing temporary tensor {tensorId: ${r}}`),this.tensorManager.releaseTensorId(r);this.temporarySessionTensorIds.delete(e),this.activeSessionId=void 0}}async createMLContext(e){if(e instanceof GPUDevice){let r=this.mlContextCache.findIndex(n=>n.gpuDevice===e);if(r!==-1)return this.mlContextCache[r].mlContext;{let n=await navigator.ml.createContext(e);return this.mlContextCache.push({gpuDevice:e,mlContext:n}),n}}else if(e===void 0){let r=this.mlContextCache.findIndex(n=>n.options===void 0&&n.gpuDevice===void 0);if(r!==-1)return this.mlContextCache[r].mlContext;{let n=await navigator.ml.createContext();return this.mlContextCache.push({mlContext:n}),n}}let t=this.mlContextCache.findIndex(r=>Mne(r.options,e));if(t!==-1)return this.mlContextCache[t].mlContext;{let r=await navigator.ml.createContext(e);return this.mlContextCache.push({options:e,mlContext:r}),r}}registerMLContext(e,t){this.mlContextBySessionId.set(e,t);let r=this.sessionIdsByMLContext.get(t);r||(r=new Set,this.sessionIdsByMLContext.set(t,r)),r.add(e),this.temporaryGraphInputs.length>0&&(this.sessionGraphInputs.set(e,this.temporaryGraphInputs),this.temporaryGraphInputs=[])}onReleaseSession(e){this.sessionGraphInputs.delete(e);let t=this.mlContextBySessionId.get(e);if(!t)return;this.tensorManager.releaseTensorsForSession(e),this.mlContextBySessionId.delete(e);let r=this.sessionIdsByMLContext.get(t);if(r.delete(e),r.size===0){this.sessionIdsByMLContext.delete(t);let n=this.mlContextCache.findIndex(i=>i.mlContext===t);n!==-1&&this.mlContextCache.splice(n,1)}}getMLContext(e){return this.mlContextBySessionId.get(e)}reserveTensorId(){return this.tensorManager.reserveTensorId()}releaseTensorId(e){ti("verbose",()=>`[WebNN] releaseTensorId {tensorId: ${e}}`),this.tensorManager.releaseTensorId(e)}async ensureTensor(e,t,r,n,i){let a=kM.get(r);if(!a)throw new Error(`Unsupported ONNX data type: ${r}`);return this.tensorManager.ensureTensor(e??this.currentSessionId,t,a,n,i)}async createTemporaryTensor(e,t,r){ti("verbose",()=>`[WebNN] createTemporaryTensor {onnxDataType: ${t}, shape: ${r}}`);let n=kM.get(t);if(!n)throw new Error(`Unsupported ONNX data type: ${t}`);let i=this.tensorManager.reserveTensorId();await this.tensorManager.ensureTensor(e,i,n,r,!1);let a=this.temporarySessionTensorIds.get(e);return a?a.push(i):this.temporarySessionTensorIds.set(e,[i]),i}uploadTensor(e,t){if(!ca().shouldTransferToMLTensor)throw new Error("Trying to upload to a MLTensor while shouldTransferToMLTensor is false");ti("verbose",()=>`[WebNN] uploadTensor {tensorId: ${e}, data: ${t.byteLength}}`),this.tensorManager.upload(e,t)}async downloadTensor(e,t){return this.tensorManager.download(e,t)}createMLTensorDownloader(e,t){return async()=>{let r=await this.tensorManager.download(e);return oW(r,t)}}registerMLTensor(e,t,r,n){let i=kM.get(r);if(!i)throw new Error(`Unsupported ONNX data type: ${r}`);let a=this.tensorManager.registerTensor(e,t,i,n);return ti("verbose",()=>`[WebNN] registerMLTensor {tensor: ${t}, dataType: ${i}, dimensions: ${n}} -> {tensorId: ${a}}`),a}registerMLConstant(e,t,r,n,i,a,s=!1){if(!a)throw new Error("External mounted files are not available.");let o=e;e.startsWith("./")&&(o=e.substring(2));let l=a.get(o);if(!l)throw new Error(`File with name ${o} not found in preloaded files.`);if(t+r>l.byteLength)throw new Error("Out of bounds: data offset and length exceed the external file data size.");let u=l.slice(t,t+r).buffer,c;switch(i.dataType){case"float32":c=new Float32Array(u);break;case"float16":c=typeof Float16Array<"u"&&Float16Array.from?new Float16Array(u):new Uint16Array(u);break;case"int32":c=new Int32Array(u);break;case"uint32":c=new Uint32Array(u);break;
819case"int64":s?(c=Y8(new Uint8Array(u),!1),i.dataType="int32"):c=new BigInt64Array(u);break;case"uint64":c=new BigUint64Array(u);break;case"int8":c=new Int8Array(u);break;case"int4":case"uint4":case"uint8":c=new Uint8Array(u);break;default:throw new Error(`Unsupported data type: ${i.dataType} in creating WebNN Constant from external data.`)}return ti("verbose",()=>`[WebNN] registerMLConstant {dataType: ${i.dataType}, shape: ${i.shape}}} ${s?"(Note: it was int64 data type and registered to int32 as workaround)":""}`),n.constant(i,c)}registerGraphInput(e){this.temporaryGraphInputs.push(e)}isGraphInput(e,t){let r=this.sessionGraphInputs.get(e);return r?r.includes(t):!1}isInt64Supported(e){var t;return!!((t=this.mlContextBySessionId.get(e))!=null&&t.opSupportLimits().input.dataTypes.includes("int64"))}flush(){}}}),lW=Wt(()=>{}),mj,OM,NM,kne,One,gj,X8,Nne,Yxe,Pbt=Wt(()=>{ym(),lW(),mj=new Map([[64,250],[128,200],[256,200],[512,200],[2048,230],[4096,200],[8192,50],[16384,50],[32768,50],[65536,50],[131072,50],[262144,50],[524288,50],[1048576,50],[2097152,30],[4194304,20],[8388608,10],[12582912,10],[16777216,10],[26214400,15],[33554432,22],[44236800,2],[58982400,6],[67108864,6],[134217728,6],[167772160,6]]),OM=[],NM=e=>Math.ceil(Number(e)/16)*16,kne=e=>{for(let t=0;t<OM.length;t++){let r=OM[t];if(e<=r)return r}return Math.ceil(e/16)*16},One=1,gj=()=>One++,X8=async(e,t,r,n)=>{let i=NM(r),a=e.device.createBuffer({size:i,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ});try{let s=e.getCommandEncoder();e.endComputePass(),s.copyBufferToBuffer(t,0,a,0,i),e.flush(),await a.mapAsync(GPUMapMode.READ);let o=a.getMappedRange();if(n){let l=n();return l.set(new Uint8Array(o,0,r)),l}else return new Uint8Array(o.slice(0,r))}finally{a.destroy()}},Nne=class{constructor(e){this.backend=e,this.storageCache=new Map,this.freeBuffers=new Map,this.freeUniformBuffers=new Map,this.buffersPending=[],this.capturedPendingBuffers=new Map;for(let[t]of mj)OM.push(t),this.freeBuffers.set(t,[]),this.freeUniformBuffers.set(t,[]);this.sessionCount=0}upload(e,t){let r=t.buffer,n=t.byteOffset,i=t.byteLength,a=NM(i),s=this.storageCache.get(e);if(!s)throw new Error("gpu data for uploading does not exist");if(Number(s.originalSize)!==i)throw new Error(`inconsistent data size. gpu data size=${s.originalSize}, data size=${i}`);let o=this.backend.device.createBuffer({mappedAtCreation:!0,size:a,usage:GPUBufferUsage.MAP_WRITE|GPUBufferUsage.COPY_SRC}),l=o.getMappedRange();new Uint8Array(l).set(new Uint8Array(r,n,i)),o.unmap();let u=this.backend.device.createCommandEncoder();u.copyBufferToBuffer(o,0,s.gpuData.buffer,0,a),this.backend.device.queue.submit([u.finish()]),o.destroy(),ti("verbose",()=>`[WebGPU] GpuDataManager.upload(id=${e})`)}memcpy(e,t){let r=this.storageCache.get(e);if(!r)throw new Error("source gpu data for memcpy does not exist");let n=this.storageCache.get(t);if(!n)throw new Error("destination gpu data for memcpy does not exist");if(r.originalSize!==n.originalSize)throw new Error("inconsistent source and destination gpu data size");let i=NM(r.originalSize),a=this.backend.getCommandEncoder();this.backend.endComputePass(),a.copyBufferToBuffer(r.gpuData.buffer,0,n.gpuData.buffer,0,i)}registerExternalBuffer(e,t,r){let n;if(r){if(n=r[0],e===r[1])return ti("verbose",()=>`[WebGPU] GpuDataManager.registerExternalBuffer(size=${t}) => id=${n}, buffer is the same, skip.`),n;if(this.backend.capturedCommandList.has(this.backend.currentSessionId))throw new Error(`Registering a different external buffer under graph capture mode is not supported yet. 820 Please use the previous external buffer!`)}else n=gj();return this.storageCache.set(n,{gpuData:{id:n,type:0,buffer:e},originalSize:t}),ti("verbose",()=>`[WebGPU] GpuDataManager.registerExternalBuffer(size=${t}) => id=${n}, registered.`),n}unregisterExternalBuffer(e){e!==void 0&&(this.storageCache.delete(e),ti("verbose",()=>`[WebGPU] GpuDataManager.unregisterExternalBuffer() => id=${e}`))}create(e,t=GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST){let r=kne(e),n,i=(t&GPUBufferUsage.STORAGE)===GPUBufferUsage.STORAGE,a=(t&GPUBufferUsage.UNIFORM)===GP
vendor: 17,473 bytes, lines 820-904
820UBufferUsage.UNIFORM;if(i||a){let o=(i?this.freeBuffers:this.freeUniformBuffers).get(r);o?o.length>0?n=o.pop():n=this.backend.device.createBuffer({size:r,usage:t}):n=this.backend.device.createBuffer({size:r,usage:t})}else n=this.backend.device.createBuffer({size:r,usage:t});let s={id:gj(),type:0,buffer:n};return this.storageCache.set(s.id,{gpuData:s,originalSize:Number(e)}),ti("verbose",()=>`[WebGPU] GpuDataManager.create(size=${e}) => id=${s.id}`),s}get(e){var t;return(t=this.storageCache.get(e))==null?void 0:t.gpuData}release(e){let t=typeof e=="bigint"?Number(e):e,r=this.storageCache.get(t);if(!r){if(this.storageCache.size===0)return 0;throw new Error("releasing data does not exist")}return ti("verbose",()=>`[WebGPU] GpuDataManager.release(id=${t}), gpuDataId=${r.gpuData.id}`),this.storageCache.delete(t),this.buffersPending.push(r.gpuData.buffer),r.originalSize}async download(e,t){let r=this.storageCache.get(Number(e));if(!r)throw new Error("data does not exist");await X8(this.backend,r.gpuData.buffer,r.originalSize,t)}refreshPendingBuffers(){if(this.buffersPending.length!==0)if(this.backend.sessionStatus==="default"){for(let e of this.buffersPending){let t=mj.get(e.size);if((e.usage&GPUBufferUsage.STORAGE)===GPUBufferUsage.STORAGE){let r=this.freeBuffers.get(e.size)||[];t===void 0||r.length>=t?e.destroy():r.push(e)}else if((e.usage&GPUBufferUsage.UNIFORM)===GPUBufferUsage.UNIFORM){let r=this.freeUniformBuffers.get(e.size)||[];t===void 0||r.length>=t?e.destroy():r.push(e)}else e.destroy()}this.buffersPending=[]}else{let e=this.capturedPendingBuffers.get(this.backend.currentSessionId);e||(e=[],this.capturedPendingBuffers.set(this.backend.currentSessionId,e));for(let t of this.buffersPending)e.push(t);this.buffersPending=[]}}dispose(){this.freeBuffers.forEach(e=>{e.forEach(t=>{t.destroy()})}),this.freeUniformBuffers.forEach(e=>{e.forEach(t=>{t.destroy()})}),this.storageCache.forEach(e=>{e.gpuData.buffer.destroy()}),this.capturedPendingBuffers.forEach(e=>{e.forEach(t=>{t.destroy()})}),this.storageCache=new Map,this.freeBuffers=new Map,this.freeUniformBuffers=new Map,this.capturedPendingBuffers=new Map}onCreateSession(){this.sessionCount+=1}onReleaseSession(e){let t=this.capturedPendingBuffers.get(e);t&&(t.forEach(r=>{r.destroy()}),this.capturedPendingBuffers.delete(e)),this.sessionCount-=1,this.sessionCount===0&&(ti("warning",()=>"[WebGPU] Clearing webgpu buffer cache"),this.storageCache.forEach(r=>{r.gpuData.buffer.destroy()}),this.storageCache=new Map)}},Yxe=(...e)=>new Nne(...e)}),Ine,Mi,Cs=Wt(()=>{Ine=class{constructor(e){Object.assign(this,e)}get cacheKey(){return this.key||(this.key=Object.getOwnPropertyNames(this).sort().map(e=>`${this[e]}`).join(";")),this.key}},Mi=e=>new Ine(e)}),zw,IM,zo,Wl,zr,ss,Q8,W1,s0,Rr,G2,Et,Mr,Xxe,uW,Dne,Qxe,xn=Wt(()=>{tn(),_n(),zw=64,IM=(e,t)=>{if(t===3)throw new Error("vec3 has same alignment as vec4, use vec4 instead");switch(Number(e)){case 10:return t>1?`vec${t}<f16>`:"f16";case 1:return t>1?`vec${t}<f32>`:"f32";case 6:return t>1?`vec${t}<i32>`:"i32";case 12:return t>1?`vec${t}<u32>`:"u32";case 7:if(t>1)throw new Error("currently not supported vecX of uint64 yet");return["vec2<u32>","i32"];case 13:if(t>1)throw new Error("currently not supported vecX of uint64 yet");return["vec2<u32>","u32"];case 9:if(t!==4)throw new Error("bool must be vec4");return["u32","vec4<bool>"];case 22:return"i32";case 21:return"u32";default:throw new Error(`Unknown data type: ${e}`)}},zo=(e,t=1)=>{let r=IM(e,t);return typeof r=="string"?r:r[0]},Wl=(e,t=1)=>{let r=IM(e,t);return typeof r=="string"?r:r[1]},zr=(...e)=>{let t=[];return e.forEach(r=>{r.length!==0&&t.push({type:12,data:r},{type:12,data:yt.computeStrides(r)})}),t},ss=e=>e%4===0?4:e%2===0?2:1,Q8=(e="f32",t,r="0")=>!t||t===1?`${e}(${r})`:`vec${t}<${e}>(${r})`,W1=(e,t,r)=>e==="f32"?r:t===1?`f32(${r})`:`vec${t}<f32>(${r})`,s0=(e,t)=>t===4?`(${e}.x + ${e}.y + ${e}.z + ${e}.w)`:t===2?`(${e}.x + ${e}.y)`:t===3?`(${e}.x + ${e}.y + ${e}.z)`:e,Rr=(e,t,r,n)=>e.startsWith("uniforms.")&&r>4?typeof t=="string"?n==="f16"?`${e}[(${t}) / 8][(${t}) % 8 / 4][(${t}) % 8 % 4]`:`${e}[(${t}) / 4][(${t}) % 4]`:n==="f16"?`${e}[${Math.floor(t/8)}][${Math.floor(t%8/4)}][${t%8%4}]`:`${e}[${Math.floor(t/4)}][${t%4}]`:r>1?`${e}[${t}]`:e,G2=(e,t,r,n,i)=>{let a=typeof r=="number",s=a?r:r.length,o=[...new Array(s).keys()],l=s<2?"u32":s<=4?`vec${s}<u32>`:`array<u32, ${s}>`,u=IM(t,i),c=typeof u=="string"?u:u[1],d=typeof u=="string"?u:u[0],f={indices:l,value:c,storage:d,tensor:t},h=K=>typeof K=="string"?K:`${K}u`,p={offsetToIndices:!1,indicesToOffset:!1,broadcastedIndicesToOffset:!1,set:!1,setByIndices:!1,get:!1,getByIndices:!1},m=a?"uniforms.":"",_=`${m}${e}_shape`,y=`${m}${e}_strides`,v="";for(let K=0;K<s-1;K++)v+=` 821 let dim${K} = current / ${Rr(y,K,s)}; 822 let rest${K} = current % ${Rr(y,K,s)}; 823 indices[${K}] = dim${K}; 824 current = rest${K}; 825 `;v+=`indices[${s-1}] = current;`;let b=s<2?"":` 826 fn o2i_${e}(offset: u32) -> ${f.indices} { 827 var indices: ${f.indices}; 828 var current = offset; 829 ${v} 830 return indices; 831 }`,w=K=>(p.offsetToIndices=!0,s<2?K:`o2i_${e}(${K})`),x=[];if(s>=2)for(let K=s-1;K>=0;K--)x.push(`${Rr(y,K,s)} * (indices[${K}])`);let E=s<2?"":` 832 fn i2o_${e}(indices: ${f.indices}) -> u32 { 833 return ${x.join("+")}; 834 }`,T=K=>(p.indicesToOffset=!0,s<2?K:`i2o_${e}(${K})`),S=(...K)=>s===0?"0u":`${f.indices}(${K.map(h).join(",")})`,A=(K,O)=>s<2?`${K}`:`${Rr(K,O,s)}`,C=(K,O,N)=>s<2?`${K}=${N};`:`${Rr(K,O,s)}=${N};`,k={},M=(K,O)=>{p.broadcastedIndicesToOffset=!0;let N=`${O.name}broadcastedIndicesTo${e}Offset`;if(N in k)return`${N}(${K})`;let X=[];for(let ie=s-1;ie>=0;ie--){let ee=O.indicesGet("outputIndices",ie+O.rank-s);X.push(`${A(y,ie)} * (${ee} % ${A(_,ie)})`)}return k[N]=`fn ${N}(outputIndices: ${O.type.indices}) -> u32 { 835 return ${X.length>0?X.join("+"):"0u"}; 836 }`,`${N}(${K})`},D=(K,O)=>(()=>{if(f.storage===f.value)return`${e}[${K}]=${O};`;if(f.storage==="vec2<u32>"&&f.value==="i32")return`${e}[${K}]=vec2<u32>(u32(${O}), select(0u, 0xFFFFFFFFu, ${O} < 0));`;if(f.storage==="vec2<u32>"&&f.value==="u32")return`${e}[${K}]=vec2<u32>(u32(${O}), 0u);`;if(f.storage==="u32"&&f.value==="vec4<bool>")return`${e}[${K}]=dot(vec4<u32>(0x1, 0x100, 0x10000, 0x1000000), vec4<u32>(${O}));`;throw new Error(`not supported combination of storage type ${f.storage} and value type ${f.value} yet`)})(),$=K=>(()=>{if(f.storage===f.value)return`${e}[${K}]`;if(f.storage==="vec2<u32>"&&f.value==="i32")return`i32(${e}[${K}].x)`;if(f.storage==="vec2<u32>"&&f.value==="u32")return`u32(${e}[${K}].x)`;if(f.storage==="u32"&&f.value==="vec4<bool>")return`vec4<bool>(bool(${e}[${K}] & 0xFFu), bool(${e}[${K}] & 0xFF00u), bool(${e}[${K}] & 0xFF0000u), bool(${e}[${K}] & 0xFF000000u))`;throw new Error(`not supported combination of storage type ${f.storage} and value type ${f.value} yet`)})(),V=s<2?"":` 837 fn get_${e}ByIndices(indices: ${f.indices}) -> ${c} { 838 return ${$(`i2o_${e}(indices)`)}; 839 }`,U=s<2?"":(()=>{let K=o.map(N=>`d${N}: u32`).join(", "),O=o.map(N=>`d${N}`).join(", ");return` 840 fn get_${e}(${K}) -> ${c} { 841 return get_${e}ByIndices(${S(O)}); 842 }`})(),B=(...K)=>{if(K.length!==s)throw new Error(`indices length must be ${s}`);let O=K.map(h).join(",");return s===0?$("0u"):s===1?$(O[0]):(p.get=!0,p.getByIndices=!0,p.indicesToOffset=!0,`get_${e}(${O})`)},z=K=>s<2?$(K):(p.getByIndices=!0,p.indicesToOffset=!0,`get_${e}ByIndices(${K})`),q=s<2?"":` 843 fn set_${e}ByIndices(indices: ${f.indices}, value: ${c}) { 844 ${D(`i2o_${e}(indices)`,"value")} 845 }`,L=s<2?"":(()=>{let K=o.map(N=>`d${N}: u32`).join(", "),O=o.map(N=>`d${N}`).join(", ");return` 846 fn set_${e}(${K}, value: ${c}) { 847 set_${e}ByIndices(${S(O)}, value); 848 }`})();return{impl:()=>{let K=[],O=!1;return p.offsetToIndices&&(K.push(b),O=!0),p.indicesToOffset&&(K.push(E),O=!0),p.broadcastedIndicesToOffset&&(Object.values(k).forEach(N=>K.push(N)),O=!0),p.set&&(K.push(L),O=!0),p.setByIndices&&(K.push(q),O=!0),p.get&&(K.push(U),O=!0),p.getByIndices&&(K.push(V),O=!0),!a&&O&&K.unshift(`const ${_} = ${f.indices}(${r.join(",")});`,`const ${y} = ${f.indices}(${yt.computeStrides(r).join(",")});`),K.join(` 849`)},type:f,offsetToIndices:w,indicesToOffset:T,broadcastedIndicesToOffset:M,indices:S,indicesGet:A,indicesSet:C,set:(...K)=>{if(K.length!==s+1)throw new Error(`indices length must be ${s}`);let O=K[s];if(typeof O!="string")throw new Error("value must be string");let N=K.slice(0,s).map(h).join(",");return s===0?D("0u",O):s===1?D(N[0],O):(p.set=!0,p.setByIndices=!0,p.indicesToOffset=!0,`set_${e}(${N}, ${O})`)},setByOffset:D,setByIndices:(K,O)=>s<2?D(K,O):(p.setByIndices=!0,p.indicesToOffset=!0,`set_${e}ByIndices(${K}, ${O});`),get:B,getByOffset:$,getByIndices:z,usage:n,name:e,strides:y,shape:_,rank:s}},Et=(e,t,r,n=1)=>G2(e,t,r,"input",n),Mr=(e,t,r,n=1)=>G2(e,t,r,"output",n),Xxe=(e,t,r)=>G2(e,t,r,"atomicOutput",1),uW=(e,t,r,n=1)=>G2(e,t,r,"internal",n),Dne=class{constructor(e,t){this.normalizedDispatchGroup=e,this.limits=t,this.internalVariables=[],this.variables=[],this.uniforms=[],this.variableIndex=0}guardAgainstOutOfBoundsWorkgroupSizes(e){return`if (global_idx >= ${typeof e=="number"?`${e}u`:e}) { return; }`}mainStart(e=zw){let t=typeof e=="number"?e:e[0],r=typeof e=="number"?1:e[1],n=typeof e=="number"?1:e[2];if(t>this.limits.maxComputeWorkgroupSizeX||r>this.limits.maxComputeWorkgroupSizeY||n>this.limits.maxComputeWorkgroupSizeZ)throw new Error(`workgroup size [${t}, ${r}, ${n}] exceeds the maximum workgroup size [${this.limits.maxComputeWorkgroupSizeX}, ${this.limits.maxComputeWorkgroupSizeY}, ${this.limits.maxComputeWorkgroupSizeZ}].`);if(t*r*n>this.limits.maxComputeInvocationsPerWorkgroup)throw new Error(`workgroup size [${t}, ${r}, ${n}] exceeds the maximum workgroup invocations ${this.limits.maxComputeInvocationsPerWorkgroup}.`);let i=this.normalizedDispatchGroup[1]===1&&this.normalizedDispatchGroup[2]===1,a=i?`@builtin(global_invocation_id) global_id : vec3<u32>, 850 @builtin(workgroup_id) workgroup_id : vec3<u32>, 851 @builtin(local_invocation_index) local_idx : u32, 852 @builtin(local_invocation_id) local_id : vec3<u32>`:`@builtin(global_invocation_id) global_id : vec3<u32>, 853 @builtin(local_invocation_id) local_id : vec3<u32>, 854 @builtin(local_invocation_index) local_idx : u32, 855 @builtin(workgroup_id) workgroup_id : vec3<u32>, 856 @builtin(num_workgroups) num_workgroups : vec3<u32>`,s=i?`let global_idx = global_id.x; 857 let workgroup_index = workgroup_id.x;`:`let workgroup_index = workgroup_id.z * num_workgroups[0] * num_workgroups[1] + 858 workgroup_id.y * num_workgroups[0] + workgroup_id.x; 859 let global_idx = workgroup_index * ${t*r*n}u + local_idx;`;return`@compute @workgroup_size(${t}, ${r}, ${n}) 860 fn main(${a}) { 861 ${s} 862 `}appendVariableUniforms(e){e.rank!==0&&(e.shape.startsWith("uniforms.")&&this.uniforms.push({name:e.shape.replace("uniforms.",""),type:"u32",length:e.rank}),e.strides.startsWith("uniforms.")&&this.uniforms.push({name:e.strides.replace("uniforms.",""),type:"u32",length:e.rank}))}declareVariable(e,t){if(e.usage==="internal")throw new Error("cannot use internal variable with declareVariable(). use registerInternalVariables() instead.");this.variables.push(e),this.appendVariableUniforms(e);let r=e.usage==="input"?"read":"read_write",n=e.usage==="atomicOutput"?"atomic<i32>":e.type.storage;return`@group(0) @binding(${t}) var<storage, ${r}> ${e.name}: array<${n}>;`}declareVariables(...e){return e.map(t=>this.declareVariable(t,this.variableIndex++)).join(` 863`)}registerInternalVariable(e){if(e.usage!=="internal")throw new Error("cannot use input or output variable with registerInternalVariable(). use declareVariables() instead.");this.internalVariables.push(e),this.appendVariableUniforms(e)}registerInternalVariables(...e){return e.forEach(t=>this.registerInternalVariable(t)),this}registerUniform(e,t,r=1){return this.uniforms.push({name:e,type:t,length:r}),this}registerUniforms(e){return this.uniforms=this.uniforms.concat(e),this}uniformDeclaration(){if(this.uniforms.length===0)return"";let e=[];for(let{name:t,type:r,length:n}of this.uniforms)if(n&&n>4)r==="f16"?e.push(`@align(16) ${t}:array<mat2x4<${r}>, ${Math.ceil(n/8)}>`):e.push(`${t}:array<vec4<${r}>, ${Math.ceil(n/4)}>`);else{let i=n==null||n===1?r:`vec${n}<${r}>`;e.push(`${t}:${i}`)}return` 864 struct Uniforms { ${e.join(", ")} }; 865 @group(0) @binding(${this.variableIndex}) var<uniform> uniforms: Uniforms;`}get additionalImplementations(){return this.uniformDeclaration()+this.variables.map(e=>e.impl()).join(` 866`)+this.internalVariables.map(e=>e.impl()).join(` 867`)}get variablesInfo(){if(this.uniforms.length===0)return;let e=t=>[12,10,1,6][["u32","f16","f32","i32"].indexOf(t)];return this.uniforms.map(t=>[e(t.type),t.length??1])}},Qxe=(e,t)=>new Dne(e,t)}),Lne,yj,jne,Rne,$ne,Fne,Jc,Zxe,Jxe,E0=Wt(()=>{tn(),_n(),Cs(),xn(),Lne=(e,t)=>{if(!e||e.length!==1)throw new Error("Transpose requires 1 input.");if(t.length!==0&&t.length!==e[0].dims.length)throw new Error(`perm size ${t.length} does not match input rank ${e[0].dims.length}`)},yj=(e,t)=>t.length!==0?t:[...new Array(e).keys()].reverse(),jne=(e,t)=>yt.sortBasedOnPerm(e,yj(e.length,t)),Rne=(e,t,r,n)=>{let i=`fn perm(i: ${n.type.indices}) -> ${r.type.indices} { 868 var a: ${r.type.indices};`;for(let a=0;a<t;++a)i+=`a[${e[a]}]=i[${a}];`;return i+="return a;}"},$ne=(e,t)=>{let r=[],n=[];for(let i=0;i<e.length;++i)e[i]!==1&&r.push(e[i]),e[t[i]]!==1&&n.push(t[i]);return{newShape:r,newPerm:n}},Fne=(e,t)=>{let r=0;for(let n=0;n<e.length;++n)if(t[e[n]]!==1){if(e[n]<r)return!1;r=e[n]}return!0},Jc=(e,t)=>{let r=e.dataType,n=e.dims.length,i=yj(n,t),a=jne(e.dims,i),s=e.dims,o=a,l=n<2||Fne(i,e.dims),u;if(l)return u=p=>{let m=Et("input",r,s,4),_=Mr("output",r,o,4);return` 869 ${p.registerUniform("output_size","u32").declareVariables(m,_)} 870 ${p.mainStart()} 871 ${p.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 872 output[global_idx] = input[global_idx]; 873 }`},{name:"TransposeCopy",shaderCache:{inputDependencies:["type"]},getRunData:()=>{let p=yt.size(a);return{outputs:[{dims:a,dataType:e.dataType}],dispatchGroup:{x:Math.ceil(p/64/4)},programUniforms:[{type:12,data:Math.ceil(p/4)}]}},getShaderSource:u};let{newShape:c,newPerm:d}=$ne(e.dims,i),f=yt.areEqual(d,[2,3,1]),h=yt.areEqual(d,[3,1,2]);if(c.length===2||f||h){s=f?[c[0],c[1]*c[2]]:h?[c[0]*c[1],c[2]]:c,o=[s[1],s[0]];let p=16;return u=m=>{let _=Et("a",r,s.length),y=Mr("output",r,o.length);return` 874 ${m.registerUniform("output_size","u32").declareVariables(_,y)} 875 var<workgroup> tile : array<array<${y.type.value}, ${p+1}>, ${p}>; 876 ${m.mainStart([p,p,1])} 877 let stride = (uniforms.output_shape[1] - 1) / ${p} + 1; 878 let workgroup_id_x = workgroup_index % stride; 879 let workgroup_id_y = workgroup_index / stride; 880 let input_col = workgroup_id_y * ${p}u + local_id.x; 881 let input_row = workgroup_id_x * ${p}u + local_id.y; 882 if (input_row < uniforms.a_shape[0] && input_col < uniforms.a_shape[1]) { 883 tile[local_id.y][local_id.x] = ${_.getByIndices(`${_.type.indices}(input_row, input_col)`)}; 884 } 885 workgroupBarrier(); 886 887 let output_col = workgroup_id_x * ${p}u + local_id.x; 888 let output_row = workgroup_id_y * ${p}u + local_id.y; 889 if (output_row < uniforms.output_shape[0] && output_col < uniforms.output_shape[1]) { 890 ${y.setByIndices(`${y.type.indices}(output_row, output_col)`,"tile[local_id.x][local_id.y]")} 891 } 892 }`},{name:"TransposeShared",shaderCache:{inputDependencies:["type"]},getRunData:()=>{let m=yt.size(a);return{outputs:[{dims:a,dataType:e.dataType}],dispatchGroup:{x:Math.ceil(o[1]/p),y:Math.ceil(o[0]/p)},programUniforms:[{type:12,data:m},...zr(s,o)]}},getShaderSource:u}}return u=p=>{let m=Et("a",r,s.length),_=Mr("output",r,o.length);return` 893 ${p.registerUniform("output_size","u32").declareVariables(m,_)} 894 895 ${Rne(i,n,m,_)} 896 897 ${p.mainStart()} 898 ${p.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 899 900 let indices = ${_.offsetToIndices("global_idx")}; 901 let aIndices = perm(indices); 902 903 ${_.setByOffset("global_idx",m.getByIndices("aIndices"))} 904 }`},{name:"Transpose",shaderCache:{hint:`${t}`,inputDependencies:["rank"]},getRunData:()=>{let p=yt.size(a);return{outputs:[{dims:a,dataType:e.dataType}],dispatchGroup:{x:Math.ceil(p/64)},programUniforms:[{type:12,data:p},...zr(s,o)]}},getShaderSource:u}},Zxe=(e,t)=>{Lne(e.inputs,t.perm),e.compute(Jc(e.inputs[0],t.perm))},Jxe=e=>Mi({perm:e.perm})}),Bne,zne,Une,Wne,Vne,Hne,Gne,qne,Kne,Yne,xf,e2e,t2e,r2e,n2e,i2e,a2e,s2e,o2e,l2e,u2e,Mbt=Wt(()=>{tn(),_n(),xn(),cW(),E0(),Bne={max:"select(bestValue, candidate, candidate > bestValue)",min:"select(bestValue, candidate, candidate < bestValue)",mean:"bestValue + candidate",sum:"bestValue + candidate",prod:"bestValue * candidate",sumSquare:"bestValue + candidate * candidate",logSumExp:"bestValue + exp(candidate)",l1:"bestValue + abs(candidate)",l2:"bestValue + candidate * candidate",logSum:"bestValue + candidate"},zne={max:"select(bestValue, candidate, candidate > bestValue)",min:"select(bestValue, candidate, candidate < bestValue)",mean:"bestValue + candidate",sum:"bestValue + candidate",prod:"bestValue * candidate",sumSquare:"bestValue + candidate",logSumExp:"bestValue + candidate",l1:"bestValue + candidate",l2:"bestValue + candidate",logSum:"bestValue + candidate"},Une={max:"_A[offset]",min:"_A[offset]",mean:"0",sum:"0",prod:"1",sumSquare:"
9040",logSumExp:"0",l1:"0",l2:"0",logSum:"0"},Wne={max:"bestValue",min:"bestValue",sum:"bestValue",prod:"bestValue",sumSquare:"bestValue",logSumExp:"log(bestValue)",l1:"bestValue",l2:"sqrt(bestValue)",logSum:"log(bestValue)"},Vne=(e,t)=>{let r=[];for(let n=t-e;n<t;++n)r.push(n);return r},Hne=(e,t)=>{let r=[],n=e.length;for(let a=0;a<n;a++)t.indexOf(a)===-1&&r.push(e[a]);let i=t.map(a=>e[a]);return[r,i]},Gne=(e,t)=>{let r=e.length+t.length,n=[],i=0;for(let a=0;a<r;a++)t.indexOf(a)===-1?n.push(e[i++]):n.push(1);return n},qne=(e,t)=>{for(let r=0;r<e.length;++r)if(e[e.length-r-1]!==t-1-r)return!1;return!0},Kne=(e,t)=>{let r=[];if(!qne(e,t)){for(let n=0;n<t;++n)e.indexOf(n)===-1&&r.push(n);e.forEach(n=>r.push(n))}return r},Yne=(e,t,r,n,i,a,s)=>{let o=r[0].dims,l=yt.size(a),u=yt.size(s),c=Et("_A",r[0].dataType,o),d=Mr("output",i,a),f=64;l===1&&(f=256);let h=` 905 var<workgroup> aBestValues : array<f32, ${f}>; 906 `,p=m=>` 907 ${m.registerUniform("reduceSize","u32").declareVariables(c,d)} 908 ${h} 909 fn DIV_CEIL(a : u32, b : u32) -> u32 { 910 return ((a - 1u) / b + 1u); 911 } 912 ${m.mainStart(f)} 913 914 let outputIndex = global_idx / ${f}; 915 let offset = outputIndex * uniforms.reduceSize; 916 917 var bestValue = f32(${Une[n]}); 918 let Length = uniforms.reduceSize; 919 for (var k = local_idx; k < Length; k = k + ${f}) { 920 let candidate = f32(${c.getByOffset("offset + k")}); 921 bestValue = ${Bne[n]}; 922 } 923 aBestValues[local_idx] = bestValue; 924 workgroupBarrier(); 925 926 var reduceSize = min(Length, ${f}u); 927 for (var currentSize = reduceSize / 2u; reduceSize > 1u; 928 currentSize = reduceSize / 2u) { 929 let interval = DIV_CEIL(reduceSize, 2u); 930 if (local_idx < currentSize) { 931 let candidate = aBestValues[local_idx + interval]; 932 bestValue = ${zne[n]}; 933 aBestValues[local_idx] = bestValue; 934 } 935 reduceSize = interval; 936 workgroupBarrier(); 937 } 938 939 if (local_idx == 0u) { 940 ${d.setByOffset("outputIndex",`${n==="mean"?`${d.type.storage}(bestValue / f32(uniforms.reduceSize))`:`${d.type.storage}(${Wne[n]})`}`)}; 941 } 942 }`;return{name:e,shaderCache:{hint:`${t};${f}`,inputDependencies:["type"]},getShaderSource:p,getRunData:()=>({outputs:[{dims:a,dataType:i}],dispatchGroup:{x:l},programUniforms:[{type:12,data:u}]})}},xf=(e,t,r,n)=>{let i=e.inputs.length===1?r:Z8(e.inputs,r),a=i.axes;a.length===0&&!i.noopWithEmptyAxes&&(a=e.inputs[0].dims.map((h,p)=>p));let s=yt.normalizeAxes(a,e.inputs[0].dims.length),o=s,l=e.inputs[0],u=Kne(o,e.inputs[0].dims.length);u.length>0&&(l=e.compute(Jc(e.inputs[0],u),{inputs:[0],outputs:[-1]})[0],o=Vne(o.length,l.dims.length));let[c,d]=Hne(l.dims,o),f=c;i.keepDims&&(f=Gne(c,s)),e.compute(Yne(t,i.cacheKey,[l],n,e.inputs[0].dataType,f,d),{inputs:[l]})},e2e=(e,t)=>{xf(e,"ReduceMeanShared",t,"mean")},t2e=(e,t)=>{xf(e,"ReduceL1Shared",t,"l1")},r2e=(e,t)=>{xf(e,"ReduceL2Shared",t,"l2")},n2e=(e,t)=>{xf(e,"ReduceLogSumExpShared",t,"logSumExp")},i2e=(e,t)=>{xf(e,"ReduceMaxShared",t,"max")},a2e=(e,t)=>{xf(e,"ReduceMinShared",t,"min")},s2e=(e,t)=>{xf(e,"ReduceProdShared",t,"prod")},o2e=(e,t)=>{xf(e,"ReduceSumShared",t,"sum")},l2e=(e,t)=>{xf(e,"ReduceSumSquareShared",t,"sumSquare")},u2e=(e,t)=>{xf(e,"ReduceLogSumShared",t,"logSum")}}),Ef,Xne,vO,Z8,Tf,Qne,Zne,Jne,eie,tie,rie,nie,iie,aie,sie,Sf,c2e,d2e,f2e,h2e,p2e,m2e,g2e,y2e,v2e,_2e,cW=Wt(()=>{tn(),_n(),Cs(),xn(),Mbt(),Ef=e=>{if(!e||e.length===0||e.length>2)throw new Error("Reduce op requires 1 or 2 inputs.");if(e.length===2&&e[1].dims.length!==1)throw new Error("Invalid axes input dims.")},Xne=e=>["","",`var value = ${e.getByIndices("input_indices")};`,""],vO=(e,t,r,n,i,a,s=!1,o=!1)=>{let l=[],u=r[0].dims,c=u.length,d=yt.normalizeAxes(i,c),f=!o&&d.length===0;u.forEach((m,_)=>{f||d.indexOf(_)>=0?s&&l.push(1):l.push(m)});let h=l.length,p=yt.size(l);return{name:e,shaderCache:t,getShaderSource:m=>{let _=[],y=Et("_A",r[0].dataType,c),v=Mr("output",a,h),b=n(y,v,d),w=b[2];for(let x=0,E=0;x<c;x++)f||d.indexOf(x)>=0?(s&&E++,w=`for(var j${x}: u32 = 0; j${x} < ${u[x]}; j${x}++) { 943 ${b[2].includes("last_index")?`let last_index = j${x};`:""} 944 ${y.indicesSet("input_indices",x,`j${x}`)} 945 ${w} 946 }`):(_.push(`${y.indicesSet("input_indices",x,v.indicesGet("output_indices",E))};`),E++);return` 947 948 ${m.registerUniform("output_size","u32").declareVariables(y,v)} 949 950 ${m.mainStart()} 951 ${m.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 952 var input_indices: ${y.type.indices}; 953 let output_indices = ${v.offsetToIndices("global_idx")}; 954 955 ${_.join(` 956`)} 957 ${b[0]} // init ops for reduce max/min 958 ${b[1]} 959 ${w} 960 ${b[3]} 961 ${b.length===4?v.setByOffset("global_idx","value"):b.slice(4).join(` 962`)} 963 }`},getRunData:()=>({outputs:[{dims:l,dataType:a}],dispatchGroup:{x:Math.ceil(p/64)},programUniforms:[{type:12,data:p},...zr(u,l)]})}},Z8=(e,t)=>{let r=[];return e[1].dims[0]>
vendor: 8,875 bytes, lines 963-988
9630&&e[1].getBigInt64Array().forEach(n=>r.push(Number(n))),Mi({axes:r,keepDims:t.keepDims,noopWithEmptyAxes:t.noopWithEmptyAxes})},Tf=(e,t,r,n)=>{let i=e.inputs,a=i.length===1?r:Z8(i,r);e.compute(vO(t,{hint:a.cacheKey,inputDependencies:["rank"]},[i[0]],a.noopWithEmptyAxes&&a.axes.length===0?Xne:n,a.axes,i[0].dataType,a.keepDims,a.noopWithEmptyAxes),{inputs:[0]})},Qne=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceLogSum",t,(r,n)=>[`var value = ${n.type.storage}(0);`,"",`value += ${r.getByIndices("input_indices")};`,"value = log(value);"])},Zne=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceL1",t,(r,n)=>[`var value = ${n.type.storage}(0);`,"",`value += abs(${r.getByIndices("input_indices")});`,""])},Jne=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceL2",t,(r,n)=>[`var t = ${n.type.value}(0); var value = ${n.type.value}(0);`,"",`t = ${r.getByIndices("input_indices")}; value += (t * t);`,"value = sqrt(value);"])},eie=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceLogSumExp",t,(r,n)=>[`var value = ${n.type.storage}(0);`,"",`value += exp(${r.getByIndices("input_indices")});`,"value = log(value);"])},tie=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceMax",t,(r,n,i)=>{let a=[];for(let s=0;s<r.rank;s++)(i.indexOf(s)>=0||i.length===0)&&a.push(r.indicesSet("input_indices",s,0));return[`${a.join(` 964`)}`,`var value = ${r.getByIndices("input_indices")};`,`value = max(value, ${r.getByIndices("input_indices")});`,""]})},rie=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceMean",t,(r,n,i)=>{let a=1;for(let s=0;s<r.rank;s++)(i.indexOf(s)>=0||i.length===0)&&(a*=e.inputs[0].dims[s]);return["var sum = f32(0);","",`sum += f32(${r.getByIndices("input_indices")});`,`let value = ${n.type.value}(sum / ${a});`]})},nie=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceMin",t,(r,n,i)=>{let a=[];for(let s=0;s<r.rank;s++)(i.indexOf(s)>=0||i.length===0)&&a.push(`input_indices[${s}] = 0;`);return[`${a.join(` 965`)}`,`var value = ${r.getByIndices("input_indices")};`,`value = min(value, ${r.getByIndices("input_indices")});`,""]})},iie=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceProd",t,(r,n)=>[`var value = ${n.type.storage}(1);`,"",`value *= ${r.getByIndices("input_indices")};`,""])},aie=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceSum",t,(r,n)=>[`var value = ${n.type.storage}(0);`,"",`value += ${r.getByIndices("input_indices")};`,""])},sie=(e,t)=>{Ef(e.inputs),Tf(e,"ReduceSumSquare",t,(r,n)=>[`var t = ${n.type.value}(0); var value = ${n.type.value}(0);`,"",`t = ${r.getByIndices("input_indices")}; value += t * t;`,""])},Sf=(e,t,r)=>{if(t.length===0)return r;let n=1,i=1;for(let a=0;a<t.length;a++)t.indexOf(a)===-1?n*=e[a]:i*=e[a];return i<32&&n>1024},c2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?rie(e,t):e2e(e,t)},d2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?Zne(e,t):t2e(e,t)},f2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?Jne(e,t):r2e(e,t)},h2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?eie(e,t):n2e(e,t)},p2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?tie(e,t):i2e(e,t)},m2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?nie(e,t):a2e(e,t)},g2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?iie(e,t):s2e(e,t)},y2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?aie(e,t):o2e(e,t)},v2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?sie(e,t):l2e(e,t)},_2e=(e,t)=>{Sf(e.inputs[0].dims,t.axes,t.noopWithEmptyAxes)?Qne(e,t):u2e(e,t)}}),vj,b2e,w2e,J8,kbt=Wt(()=>{tn(),Cs(),cW(),vj=e=>{if(!e||e.length===0||e.length>2)throw new Error("ArgMinMaxOp op requires 1 or 2 inputs.");if(e[0].dataType!==1)throw new Error("Invalid input type.")},b2e=(e,t)=>{vj(e.inputs);let r=(n,i,a)=>{let s=[];for(let o=0;o<n.rank;o++)(a.indexOf(o)>=0||a.length===0)&&s.push(`input_indices[${o}] = 0;`);return[`${s.join(` 966`)}`,`var value = ${n.getByIndices("input_indices")}; 967var best_index : i32 = 0;`,`if (${n.getByIndices("input_indices")} ${t.selectLastIndex>0?"<=":"<"} value) { 968 value = ${n.getByIndices("input_indices")}; 969 best_index = i32(last_index); 970 }`,"",i.setByOffset("global_idx","best_index")]};e.compute(vO("ArgMin",{hint:t.cacheKey,inputDependencies:["rank"]},[e.inputs[0]],r,[t.axis],7,t.keepDims),{inputs:[0]})},w2e=(e,t)=>{vj(e.inputs);let r=(n,i,a)=>{let s=[];for(let o=0;o<n.rank;o++)(a.indexOf(o)>=0||a.length===0)&&s.push(`input_indices[${o}] = 0;`);return[`${s.join(` 971`)}`,`var value = ${n.getByIndices("input_indices")}; 972var best_index : i32 = 0;`,`if (${n.getByIndices("input_indices")} ${t.selectLastIndex>0?">=":">"} value) { 973 value = ${n.getByIndices("input_indices")}; 974 best_index = i32(last_index); 975 }`,"",i.setByOffset("global_idx","best_index")]};e.compute(vO("argMax",{hint:t.cacheKey,inputDependencies:["rank"]},[e.inputs[0]],r,[t.axis],7,t.keepDims),{inputs:[0]})},J8=e=>Mi(e)}),oie,DM,lie,uie,cie,pA,die,x2e,dW=Wt(()=>{tn(),_n(),lW(),xn(),oie=(e,t)=>{let r=e[0],n=e[1],i=e[2],a=e[3],s=e[4],o=e[5];if(s&&o)throw new Error("Attention cannot have both past and attention_bias");if(r.dims.length!==3)throw new Error('Input "input" must have 3 dimensions');let l=r.dims[0],u=r.dims[1],c=r.dims[2];if(i.dims.length!==1)throw new Error('Input "bias" is expected to have 1 dimensions');if(n.dims.length!==2)throw new Error('Input "weights" is expected to have 2 dimensions');if(n.dims[0]!==c)throw new Error("Input 1 dimension 0 should have same length as dimension 2 of input 0");if(i.dims[0]!==n.dims[1])throw new Error('Input "bias" dimension 0 should have same length as dimension 1 of input "weights"');let d=i.dims[0]/3,f=d,h=f;if(t.qkvHiddenSizes.length>0){if(t.qkvHiddenSizes.length!==3)throw new Error("qkv_hidden_sizes attribute should have 3 elements");for(let b of t.qkvHiddenSizes)if(b%t.numHeads!==0)throw new Error("qkv_hidden_sizes should be divisible by num_heads");d=t.qkvHiddenSizes[0],f=t.qkvHiddenSizes[1],h=t.qkvHiddenSizes[2]}let p=u;if(d!==f)throw new Error("qkv_hidden_sizes first element should be same as the second");if(i.dims[0]!==d+f+h)throw new Error('Input "bias" dimension 0 should have same length as sum of Q/K/V hidden sizes');let m=0;if(s){if(f!==h)throw new Error('Input "past" expect k_hidden_size == v_hidden_size');if(s.dims.length!==5)throw new Error('Input "past" must have 5 dimensions');if(s.dims[0]!==2)throw new Error('Input "past" first dimension must be 2');if(s.dims[1]!==l)throw new Error('Input "past" second dimension must be batch_size');if(s.dims[2]!==t.numHeads)throw new Error('Input "past" third dimension must be num_heads');if(s.dims[4]!==f/t.numHeads)throw new Error('Input "past" fifth dimension must be k_hidden_size / num_heads');t.pastPresentShareBuffer||(m=s.dims[3])}let _=p+m,y=-1,v=0;if(a)throw new Error("Mask not supported");if(s)throw new Error("past is not supported");if(o){if(o.dims.length!==4)throw new Error('Input "attention_bias" must have 4 dimensions');if(o.dims[0]!==l||o.dims[1]!==t.numHeads||o.dims[2]!==u||o.dims[3]!==_)throw new Error('Expect "attention_bias" shape (batch_size, num_heads, sequence_length, total_sequence_length)')}return{batchSize:l,sequenceLength:u,pastSequenceLength:m,kvSequenceLength:p,totalSequenceLength:_,maxSequenceLength:y,inputHiddenSize:c,hiddenSize:d,vHiddenSize:h,headSize:Math.floor(d/t.numHeads),vHeadSize:Math.floor(h/t.numHeads),numHeads:t.numHeads,isUnidirectional:!1,pastPresentShareBuffer:!1,maskFilterValue:t.maskFilterValue,maskType:v,scale:t.scale,broadcastResPosBias:!1,passPastInKv:!1,qkvFormat:1}},DM=(e,t,r)=>t&&e?` 976 let total_sequence_length_input = u32(${t.getByOffset("0")}); 977 let present_sequence_length = max(total_sequence_length_input, uniforms.past_sequence_length); 978 let is_subsequent_prompt: bool = sequence_length > 1 && sequence_length != total_sequence_length_input; 979 let is_first_prompt: bool = is_subsequent_prompt == false && sequence_length == total_sequence_length_input; 980 total_sequence_length = u32(${e==null?void 0:e.getByOffset("batchIdx")}) + 1; 981 var past_sequence_length: u32 = 0; 982 if (is_first_prompt == false) { 983 past_sequence_length = total_sequence_length - sequence_length; 984 } 985 `:` 986 ${r?"let past_sequence_length = uniforms.past_sequence_length":""}; 987 let present_sequence_length = total_sequence_length; 988 `,lie=(e,t,r,n,i,a,s,o)=>{let l=ss(s?1:a),u=64,c=a/l;c<u&&(u=32);let d=Math.ceil(a/l/u),f=[{type:12,data:t},{type:12,data:r},{type:12,data:n},{type:12,data:i},{type:12,data:c},{type:12,data:d}],h=zo(e.dataType,l),p=Wl(1,l),m=["type"];s&&m.push("type"),o&&m.push("type");let _=y=>{let v=Mr("x",e.dataType,e.dims,l),b=[v],w=s?Et("seq_lens",s.dataType,s.dims):void 0;w&&b.push(w);let x=o?Et("total_sequence_length_input",o.dataType,o.dims):void 0;x&&b.push(x);let E=Wl(e.dataType),T=[{name:"batch_size",type:"u32"},{name:"num_heads",type:"u32"},{name:"past_sequence_length",type:"u32"},{name:"sequence_length",type:"u32"},{name:"total_sequence_length",type:"u32"},{name:"elements_per_thread",type:"u32"}];return`
989 var<workgroup> thread_max: array<f32, ${u}>; 990 var<workgroup> thread_sum: array<f32, ${u}>; 991 ${y.registerUniforms(T).declareVariables(...b)} 992 ${y.mainStart([u,1,1])} 993 let batchIdx = workgroup_id.z / uniforms.num_heads; 994 let headIdx = workgroup_id.z % uniforms.num_heads; 995 let sequence_length = uniforms.sequence_length; 996 var total_sequence_length = uniforms.total_sequence_length; 997 ${DM(w,x,!1)} 998 let local_offset = local_idx * uniforms.elements_per_thread; 999 let offset = (global_idx / ${u}) * uniforms.total_sequence_length + local_offset; 1000 let seq_causal_length = ${s?"u32(past_sequence_length + workgroup_id.y + 1)":"total_sequence_length"}; 1001 var thread_max_vector = ${p}(-3.402823e+38f); 1002 for (var i: u32 = 0; i < uniforms.elements_per_thread && i + local_offset < seq_causal_length; i++) { 1003 thread_max_vector = max(${p}(x[offset + i]), thread_max_vector); 1004 } 1005 thread_max[local_idx] = ${(()=>{switch(l){case 1:return"thread_max_vector";case 2:return"max(thread_max_vector.x, thread_max_vector.y)";case 4:return"max(max(thread_max_vector.x, thread_max_vector.y), max(thread_max_vector.z, thread_max_vector.w))";default:throw new Error(`Unsupported components: ${l}`)}})()}; 1006 workgroupBarrier(); 1007 1008 var max_value = f32(-3.402823e+38f); 1009 for (var i = 0u; i < ${u}; i++) { 1010 max_value = max(thread_max[i], max_value); 1011 } 1012 1013 var sum_vector = ${p}(0); 1014 for (var i: u32 = 0; i < uniforms.elements_per_thread && i + local_offset < seq_causal_length; i++) { 1015 sum_vector += exp(${p}(x[offset + i]) - max_value); 1016 } 1017 thread_sum[local_idx] = ${(()=>{switch(l){case 1:return"sum_vector";case 2:return"sum_vector.x + sum_vector.y";case 4:return"sum_vector.x + sum_vector.y + sum_vector.z + sum_vector.w";default:throw new Error(`Unsupported components: ${l}`)}})()}; 1018 workgroupBarrier(); 1019 1020 var sum: f32 = 0; 1021 for (var i = 0u; i < ${u}; i++) { 1022 sum += thread_sum[i]; 1023 } 1024 1025 if (sum == 0) { 1026 for (var i: u32 = 0; i < uniforms.elements_per_thread && i + local_offset < seq_causal_length; i++) { 1027 x[offset + i] = ${v.type.value}(${E}(1.0) / ${E}(seq_causal_length)); 1028 } 1029 } else { 1030 for (var i: u32 = 0; i < uniforms.elements_per_thread && i + local_offset < seq_causal_length; i++) { 1031 var f32input = ${p}(x[offset + i]); 1032 x[offset + i] = ${v.type.value}(exp(f32input - max_value) / sum); 1033 } 1034 } 1035 ${s?` 1036 for (var total_seq_id: u32 = seq_causal_length; total_seq_id + local_offset < uniforms.total_sequence_length; total_seq_id++) { 1037 x[offset + total_seq_id] = ${v.type.value}(${E}(0)); 1038 }`:""}; 1039 }`};return{name:"AttentionProbsSoftmax",shaderCache:{hint:`${u};${h};${l}`,inputDependencies:m},getShaderSource:_,getRunData:()=>({outputs:[],dispatchGroup:{x:1,y:i,z:t*r},programUniforms:f})}},uie=(e,t,r,n,i,a,s,o,l)=>{let u=s+a.kvSequenceLength,c=[a.batchSize,a.numHeads,a.sequenceLength,u],d=e>1&&n,f=a.kvNumHeads?a.kvNumHeads:a.numHeads,h=d?[a.batchSize,f,u,a.headSize]:void 0,p=a.nReps?a.nReps:1,m=a.scale===0?1/Math.sqrt(a.headSize):a.scale,_=ss(a.headSize),y=a.headSize/_,v=12,b={x:Math.ceil(u/v),y:Math.ceil(a.sequenceLength/v),z:a.batchSize*a.numHeads},w=[{type:12,data:a.sequenceLength},{type:12,data:y},{type:12,data:u},{type:12,data:a.numHeads},{type:12,data:a.headSize},{type:1,data:m},{type:12,data:s},{type:12,data:a.kvSequenceLength},{type:12,data:p}],x=d&&n&&yt.size(n.dims)>0,E=["type","type"];x&&E.push("type"),i&&E.push("type"),o&&E.push("type"),l&&E.push("type");let T=[{dims:c,dataType:t.dataType,gpuDataType:0}];d&&T.push({dims:h,dataType:t.dataType,gpuDataType:0});let S=A=>{let C=Et("q",t.dataType,t.dims,_),k=Et("key",r.dataType,r.dims,_),M=[C,k];if(x){let q=Et("past_key",n.dataType,n.dims,_);M.push(q)}i&&M.push(Et("attention_bias",i.dataType,i.dims));let D=o?Et("seq_lens",o.dataType,o.dims):void 0;D&&M.push(D);let $=l?Et("total_sequence_length_input",l.dataType,l.dims):void 0;$&&M.push($);let V=Mr("output",t.dataType,c),U=[V];d&&U.push(Mr("present_key",t.dataType,h,_));let B=Wl(1,_),z=[{name:"M",type:"u32"},{name:"K",type:"u32"},{name:"N",type:"u32"},{name:"num_heads",type:"u32"},{name:"head_size",type:"u32"},{name:"alpha",type:"f32"},{name:"past_sequence_length",type:"u32"},{name:"kv_sequence_length",type:"u32"},{name:"n_reps",type:"u32"}];return` 1040 const TILE_SIZE = ${v}u; 1041 1042 var<workgroup> tileQ: array<${C.type.storage}, ${v*v}>;
1043 var<workgroup> tileK: array<${C.type.storage}, ${v*v}>; 1044 ${A.registerUniforms(z).declareVariables(...M,...U)} 1045 ${A.mainStart([v,v,1])} 1046 // x holds the N and y holds the M 1047 let headIdx = workgroup_id.z % uniforms.num_heads; 1048 let kvHeadIdx = ${p===1?"headIdx":"headIdx / uniforms.n_reps"}; 1049 let kv_num_heads = ${p===1?"uniforms.num_heads":"uniforms.num_heads / uniforms.n_reps"}; 1050 let batchIdx = workgroup_id.z / uniforms.num_heads; 1051 let m = workgroup_id.y * TILE_SIZE; 1052 let n = workgroup_id.x * TILE_SIZE; 1053 let sequence_length = uniforms.M; 1054 var total_sequence_length = uniforms.N; 1055 ${DM(D,$,!0)} 1056 let absKvHeadIdx = batchIdx * kv_num_heads + kvHeadIdx; 1057 let qOffset = workgroup_id.z * uniforms.M * uniforms.K + m * uniforms.K; 1058 ${x&&d?"let pastKeyOffset = absKvHeadIdx * uniforms.past_sequence_length * uniforms.K;":""}; 1059 let kOffset = absKvHeadIdx * uniforms.kv_sequence_length * uniforms.K; 1060 ${d?"let presentKeyOffset = absKvHeadIdx * uniforms.N * uniforms.K;":""} 1061 var value = ${B}(0); 1062 for (var w: u32 = 0u; w < uniforms.K; w += TILE_SIZE) { 1063 if (global_id.y < uniforms.M && w + local_id.x < uniforms.K) { 1064 tileQ[TILE_SIZE * local_id.y + local_id.x] = q[qOffset + local_id.y * uniforms.K + w + local_id.x]; 1065 } 1066 if (n + local_id.y < uniforms.N && w + local_id.x < uniforms.K) { 1067 var idx = TILE_SIZE * local_id.y + local_id.x; 1068 ${x&&d?` 1069 if (n + local_id.y < past_sequence_length) { 1070 tileK[idx] = past_key[pastKeyOffset + (n + local_id.y) * uniforms.K + w + local_id.x]; 1071 } else if (n + local_id.y - past_sequence_length < uniforms.kv_sequence_length) { 1072 tileK[idx] = key[kOffset + (n + local_id.y - past_sequence_length) * uniforms.K + w + local_id.x]; 1073 }`:` 1074 if (n + local_id.y < uniforms.kv_sequence_length) { 1075 tileK[idx] = key[kOffset + (n + local_id.y) * uniforms.K + w + local_id.x]; 1076 }`} 1077 ${d?`if (n + local_id.y < present_sequence_length) { 1078 present_key[presentKeyOffset + (n + local_id.y) * uniforms.K + w + local_id.x] = tileK[idx]; 1079 }`:""} 1080 } 1081 workgroupBarrier(); 1082 1083 for (var k: u32 = 0u; k < TILE_SIZE && w+k < uniforms.K; k++) { 1084 value += ${B}(tileQ[TILE_SIZE * local_id.y + k] * tileK[TILE_SIZE * local_id.x + k]); 1085 } 1086 1087 workgroupBarrier(); 1088 } 1089 1090 if (global_id.y < uniforms.M && global_id.x < total_sequence_length) { 1091 let headOffset = workgroup_id.z * uniforms.M * uniforms.N; 1092 let outputIdx = headOffset + global_id.y * uniforms.N + global_id.x; 1093 var sum: f32 = ${(()=>{switch(_){case 1:return"value";case 2:return"value.x + value.y";case 4:return"value.x + value.y + value.z + value.w";default:throw new Error(`Unsupported components: ${_}`)}})()}; 1094 output[outputIdx] = ${V.type.value} (sum * uniforms.alpha) + ${i?"attention_bias[outputIdx]":"0.0"}; 1095 } 1096 }`};return{name:"AttentionProbs",shaderCache:{hint:`${_};${i!==void 0};${n!==void 0};${e}`,inputDependencies:E},getRunData:()=>({outputs:T,dispatchGroup:b,programUniforms:w}),getShaderSource:S}},cie=(e,t,r,n,i,a,s=void 0,o=void 0)=>{let l=a+i.kvSequenceLength,u=i.nReps?i.nReps:1,c=i.vHiddenSize*u,d=e>1&&n,f=i.kvNumHeads?i.kvNumHeads:i.numHeads,h=d?[i.batchSize,f,l,i.headSize]:void 0,p=[i.batchSize,i.sequenceLength,c],m=12,_={x:Math.ceil(i.vHeadSize/m),y:Math.ceil(i.sequenceLength/m),z:i.batchSize*i.numHeads},y=[{type:12,data:i.sequenceLength},{type:12,data:l},{type:12,data:i.vHeadSize},{type:12,data:i.numHeads},{type:12,data:i.headSize},{type:12,data:c},{type:12,data:a},{type:12,data:i.kvSequenceLength},{type:12,data:u}],v=d&&n&&yt.size(n.dims)>0,b=["type","type"];v&&b.push("type"),s&&b.push("type"),o&&b.push("type");let w=[{dims:p,dataType:t.dataType,gpuDataType:0}];d&&w.push({dims:h,dataType:t.dataType,gpuDataType:0});let x=E=>{let T=Et("probs",t.dataType,t.dims),S=Et("v",r.dataType,r.dims),A=[T,S];v&&A.push(Et("past_value",n.dataType,n.dims));let C=s?Et("seq_lens",s.dataType,s.dims):void 0;s&&A.push(C);let k=o?Et("total_sequence_length_input",o.dataType,o.dims):void 0;o&&A.push(k);let M=[Mr("output",t.dataType,p)];d&&M.push(Mr("present_value",t.dataType,h));let D=[{name:"M",type:"u32"},{name:"K",type:"u32"},{name:"N",type:"u32"},{name:"num_heads",type:"u32"},{name:"head_size",type:"u32"},{name:"v_hidden_size",type:"u32"},{name:"past_sequence_length",type:"u32"},{name:"kv_sequence_length",type:"u32"},{name:"n_reps",type:"u32"}];return` 1097 const TILE_SIZE = ${m}u; 1098 var<workgroup> tileQ: array<${T.type.value}, ${m*m}>;
1099 var<workgroup> tileV: array<${T.type.value}, ${m*m}>; 1100 ${E.registerUniforms(D).declareVariables(...A,...M)} 1101 ${E.mainStart([m,m,1])} 1102 let headIdx = workgroup_id.z % uniforms.num_heads; 1103 let batchIdx = workgroup_id.z / uniforms.num_heads; 1104 let kvHeadIdx = ${u===1?"headIdx":"headIdx / uniforms.n_reps"}; 1105 let kv_num_heads = ${u===1?"uniforms.num_heads":"uniforms.num_heads / uniforms.n_reps"}; 1106 let m = global_id.y; 1107 let n = global_id.x; 1108 let sequence_length = uniforms.M; 1109 var total_sequence_length = uniforms.K; 1110 ${DM(C,k,!0)} 1111 let offsetA = workgroup_id.z * uniforms.M * uniforms.K + m * uniforms.K; 1112 let absKvHeadIdx = batchIdx * kv_num_heads + kvHeadIdx; // kvHeadIdx is relative to the batch 1113 ${v&&d?"let pastValueOffset = absKvHeadIdx * uniforms.N * uniforms.past_sequence_length + n;":""}; 1114 let vOffset = absKvHeadIdx * uniforms.N * uniforms.kv_sequence_length + n; 1115 ${d?"let presentValueOffset = absKvHeadIdx * uniforms.N * uniforms.K + n;":""} 1116 var value = ${T.type.storage}(0); 1117 for (var w: u32 = 0u; w < uniforms.K; w += TILE_SIZE) { 1118 if (m < uniforms.M && w + local_id.x < uniforms.K) { 1119 tileQ[TILE_SIZE * local_id.y + local_id.x] = probs[offsetA + w + local_id.x]; 1120 } 1121 if (n < uniforms.N && w + local_id.y < uniforms.K) { 1122 var idx = TILE_SIZE * local_id.y + local_id.x; 1123 ${v&&d?` 1124 if (w + local_id.y < past_sequence_length) { 1125 tileV[idx] = past_value[pastValueOffset + (w + local_id.y) * uniforms.N]; 1126 } else if (w + local_id.y - past_sequence_length < uniforms.kv_sequence_length) { 1127 tileV[idx] = v[vOffset + (w + local_id.y - past_sequence_length) * uniforms.N]; 1128 } 1129 `:` 1130 if (w + local_id.y < uniforms.kv_sequence_length) { 1131 tileV[idx] = v[vOffset + (w + local_id.y) * uniforms.N]; 1132 }`} 1133 ${d?` 1134 if (w + local_id.y < present_sequence_length) { 1135 present_value[presentValueOffset + (w + local_id.y) * uniforms.N] = tileV[idx]; 1136 }`:""} 1137 } 1138 workgroupBarrier(); 1139 for (var k: u32 = 0u; k < TILE_SIZE && w+k < total_sequence_length; k++) { 1140 value += tileQ[TILE_SIZE * local_id.y + k] * tileV[TILE_SIZE * k + local_id.x]; 1141 } 1142 workgroupBarrier(); 1143 } 1144 1145 // we need to transpose output from BNSH_v to BSND_v 1146 if (m < uniforms.M && n < uniforms.N) { 1147 let outputIdx = batchIdx * uniforms.M * uniforms.v_hidden_size + m * uniforms.v_hidden_size 1148 + headIdx * uniforms.N + n; 1149 output[outputIdx] = value; 1150 } 1151 }`};return{name:"AttentionScore",shaderCache:{hint:`${n!==void 0};${e}`,inputDependencies:b},getRunData:()=>({outputs:w,dispatchGroup:_,programUniforms:y}),getShaderSource:x}},pA=(e,t,r,n,i,a,s,o,l,u,c=void 0,d=void 0)=>{let f=Math.min(e.outputCount,1+(s?1:0)+(o?1:0)),h=f>1?u.pastSequenceLength:0,p=h+u.kvSequenceLength,m=l&&yt.size(l.dims)>0?l:void 0,_=[t,r];f>1&&s&&yt.size(s.dims)>0&&_.push(s),m&&_.push(m),c&&_.push(c),d&&_.push(d);let y=e.compute(uie(f,t,r,s,m,u,h,c,d),{inputs:_,outputs:f>1?[-1,1]:[-1]})[0];e.compute(lie(y,u.batchSize,u.numHeads,h,u.sequenceLength,p,c,d),{inputs:c&&d?[y,c,d]:[y],outputs:[]});let v=[y,n];f>1&&o&&yt.size(o.dims)>0&&v.push(o),c&&v.push(c),d&&v.push(d),e.compute(cie(f,y,n,o,u,h,c,d),{inputs:v,outputs:f>1?[0,2]:[0]})},die=(e,t)=>{let r=[t.batchSize,t.numHeads,t.sequenceLength,t.headSize],n=t.sequenceLength,i=t.inputHiddenSize,a=t.headSize,s=12,o={x:Math.ceil(t.headSize/s),y:Math.ceil(t.sequenceLength/s),z:t.batchSize*t.numHeads},l=[e.inputs[0],e.inputs[1],e.inputs[2]],u=[{type:12,data:n},{type:12,data:i},{type:12,data:a},{type:12,data:t.numHeads},{type:12,data:t.headSize},{type:12,data:t.hiddenSize},{type:12,data:t.hiddenSize+t.hiddenSize+t.vHiddenSize}],c=d=>{let f=Mr("output_q",l[0].dataType,r),h=Mr("output_k",l[0].dataType,r),p=Mr("output_v",l[0].dataType,r),m=Et("input",l[0].dataType,l[0].dims),_=Et("weight",l[1].dataType,l[1].dims),y=Et("bias",l[2].dataType,l[2].dims),v=m.type.storage,b=[{name:"M",type:"u32"},{name:"K",type:"u32"},{name:"N",type:"u32"},{name:"num_heads",type:"u32"},{name:"head_size",type:"u32"},{name:"hidden_size",type:"u32"},{name:"ldb",type:"u32"}];return` 1152 const TILE_SIZE = ${s}u; 1153 var<workgroup> tileInput: array<${v}, ${s*s}>;
1154 var<workgroup> tileWeightQ: array<${v}, ${s*s}>; 1155 var<workgroup> tileWeightK: array<${v}, ${s*s}>; 1156 var<workgroup> tileWeightV: array<${v}, ${s*s}>; 1157 ${d.registerUniforms(b).declareVariables(m,_,y,f,h,p)} 1158 ${d.mainStart([s,s,1])} 1159 let batchIndex = workgroup_id.z / uniforms.num_heads; 1160 let headNumber = workgroup_id.z % uniforms.num_heads; 1161 let m = global_id.y; 1162 let n = global_id.x; 1163 1164 let inputOffset = batchIndex * (uniforms.M * uniforms.K) + m * uniforms.K; 1165 let biasOffsetQ = headNumber * uniforms.head_size; 1166 let biasOffsetK = uniforms.hidden_size + biasOffsetQ; 1167 let biasOffsetV = uniforms.hidden_size + biasOffsetK; 1168 1169 var valueQ = ${v}(0); 1170 var valueK = ${v}(0); 1171 var valueV = ${v}(0); 1172 for (var w: u32 = 0u; w < uniforms.K; w += TILE_SIZE) { 1173 if (m < uniforms.M && w + local_id.x < uniforms.K) { 1174 tileInput[TILE_SIZE * local_id.y + local_id.x] = input[inputOffset + w + local_id.x]; 1175 } 1176 if (n < uniforms.N && w + local_id.y < uniforms.K) { 1177 let offset = n + (w + local_id.y) * uniforms.ldb; 1178 tileWeightQ[TILE_SIZE * local_id.y + local_id.x] = weight[biasOffsetQ + offset]; 1179 tileWeightK[TILE_SIZE * local_id.y + local_id.x] = weight[biasOffsetK + offset]; 1180 tileWeightV[TILE_SIZE * local_id.y + local_id.x] = weight[biasOffsetV + offset]; 1181 } 1182 workgroupBarrier(); 1183 for (var k: u32 = 0u; k<TILE_SIZE && w+k < uniforms.K; k++) { 1184 let inputTileOffset = TILE_SIZE * local_id.y + k; 1185 let weightTileOffset = TILE_SIZE * k + local_id.x; 1186 valueQ += tileInput[inputTileOffset] * tileWeightQ[weightTileOffset]; 1187 valueK += tileInput[inputTileOffset] * tileWeightK[weightTileOffset]; 1188 valueV += tileInput[inputTileOffset] * tileWeightV[weightTileOffset]; 1189 } 1190 1191 workgroupBarrier(); 1192 } 1193 1194 let headOffset = (m * uniforms.N + n) % uniforms.head_size; 1195 valueQ += bias[headOffset + biasOffsetQ]; 1196 valueK += bias[headOffset + biasOffsetK]; 1197 valueV += bias[headOffset + biasOffsetV]; 1198 1199 let offset = workgroup_id.z * uniforms.M * uniforms.N; 1200 if (m < uniforms.M && n < uniforms.N) { 1201 let outputIdx = offset + m * uniforms.N + n; 1202 output_q[outputIdx] = valueQ; 1203 output_k[outputIdx] = valueK; 1204 output_v[outputIdx] = valueV; 1205 } 1206 }`};return e.compute({name:"AttentionPrepare",shaderCache:{inputDependencies:["type","type","type"]},getRunData:()=>({outputs:[{dims:r,dataType:e.inputs[0].dataType,gpuDataType:0},{dims:r,dataType:e.inputs[0].dataType,gpuDataType:0},{dims:r,dataType:e.inputs[0].dataType,gpuDataType:0}],dispatchGroup:o,programUniforms:u}),getShaderSource:c},{inputs:l,outputs:[-1,-1,-1]})},x2e=(e,t)=>{let r=oie(e.inputs,t),[n,i,a]=die(e,r);return pA(e,n,i,a,e.inputs[4],void 0,void 0,void 0,e.inputs[5],r)}}),fie,hie,pie,E2e,Obt=Wt(()=>{lh(),tn(),_n(),Cs(),xn(),fie=(e,t)=>{if(!e||e.length!==5)throw new Error("BatchNormalization requires 5 inputs");let r=(n,i,a)=>{let s=i.length;if(s!==n.length)throw new Error(`${a}: num dimensions != ${s}`);i.forEach((o,l)=>{if(o!==n[l])throw new Error(`${a}: dim[${l}] do not match`)})};if(e[0].dims.length>1){let n=t.format==="NHWC"?t.spatial?e[0].dims.slice(-1):e[0].dims.slice(-1).concat(e[0].dims.slice(1,e[0].dims.length-1)):e[0].dims.slice(1,t.spatial?2:void 0);r(e[1].dims,n,"Invalid input scale"),r(e[2].dims,n,"Invalid input B"),r(e[3].dims,n,"Invalid input mean"),r(e[4].dims,n,"Invalid input var")}else r(e[1].dims,[1],"Invalid input scale"),r(e[2].dims,[1],"Invalid input B"),r(e[3].dims,[1],"Invalid input mean"),r(e[4].dims,[1],"Invalid input var")},hie=(e,t)=>{let{epsilon:r,spatial:n,format:i}=t,a=e[0].dims,s=n?ss(a[a.length-1]):1,o=i==="NHWC"&&a.length>1?s:1,l=yt.size(a)/s,u=n,c=u?a.length:a,d=Et("x",e[0].dataType,e[0].dims,s),f=Et("scale",e[1].dataType,e[1].dims,o),h=Et("bias",e[2].dataType,e[2].dims,o),p=Et("inputMean",e[3].dataType,e[3].dims,o),m=Et("inputVar",e[4].dataType,e[4].dims,o),_=Mr("y",e[0].dataType,c,s),y=()=>{let b="";if(n)b=`let cOffset = ${a.length===1?"0u":i==="NHWC"?`outputIndices[${a.length-1}] / ${s}`:"outputIndices[1]"};`;else if(i==="NCHW")b=`
1207 ${_.indicesSet("outputIndices","0","0")} 1208 let cOffset = ${_.indicesToOffset("outputIndices")};`;else{b=`var cIndices = ${f.type.indices}(0); 1209 cIndices[0] = outputIndices[${a.length-1}];`;for(let w=1;w<f.rank;w++)b+=`cIndices[${w}] = outputIndices[${w}];`;b+=`let cOffset = ${f.indicesToOffset("cIndices")};`}return b},v=b=>` 1210 const epsilon = ${r}; 1211 ${b.registerUniform("outputSize","u32").declareVariables(d,f,h,p,m,_)} 1212 ${b.mainStart()} 1213 ${b.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 1214 var outputIndices = ${_.offsetToIndices(`global_idx * ${s}`)}; 1215 ${y()} 1216 let scale = ${f.getByOffset("cOffset")}; 1217 let bias = ${h.getByOffset("cOffset")}; 1218 let inputMean = ${p.getByOffset("cOffset")}; 1219 let inputVar = ${m.getByOffset("cOffset")}; 1220 let x = ${d.getByOffset("global_idx")}; 1221 let value = (x - inputMean) * inverseSqrt(inputVar + epsilon) * scale + bias; 1222 ${_.setByOffset("global_idx","value")} 1223 }`;return{name:"BatchNormalization",shaderCache:{hint:`${t.epsilon}_${t.format}_${n}_${s}`,inputDependencies:u?["rank","type","type","type","type"]:void 0},getShaderSource:v,getRunData:()=>({outputs:[{dims:e[0].dims,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(l/64)},programUniforms:u?[{type:12,data:l},...zr(a)]:[{type:12,data:l}]})}},pie=e=>Mi(e),E2e=(e,t)=>{let{inputs:r,outputCount:n}=e,i=pie({...t,outputCount:n});if(_a.webgpu.validateInputContent&&fie(r,i),t.trainingMode)throw new Error("BatchNormalization trainingMode is not supported yet.");e.compute(hie(r,i))}}),mie,gie,T2e,Nbt=Wt(()=>{_n(),xn(),mie=e=>{if(e[0].dims.length!==3)throw new Error("input should have 3 dimensions");if(![320,640,1280].includes(e[0].dims[2]))throw new Error("number of channels should be 320, 640 or 1280");if(e[1].dims.length!==1)throw new Error("bias is expected to have 1 dimensions");if(e[0].dims[2]!==e[1].dims[0])throw new Error("last dimension of input and bias are not the same")},gie=e=>{let t=e[0].dims,r=e[0].dims[2],n=yt.size(t)/4,i=e[0].dataType,a=Et("input",i,t,4),s=Et("bias",i,[r],4),o=Et("residual",i,t,4),l=Mr("output",i,t,4);return{name:"BiasAdd",getRunData:()=>({outputs:[{dims:t,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(n/64)}}),getShaderSource:u=>` 1224 const channels = ${r}u / 4; 1225 ${u.declareVariables(a,s,o,l)} 1226 1227 ${u.mainStart()} 1228 ${u.guardAgainstOutOfBoundsWorkgroupSizes(n)} 1229 let value = ${a.getByOffset("global_idx")} 1230 + ${s.getByOffset("global_idx % channels")} + ${o.getByOffset("global_idx")}; 1231 ${l.setByOffset("global_idx","value")} 1232 }`}},T2e=e=>{mie(e.inputs),e.compute(gie(e.inputs))}}),yie,_i,S2e,A2e,C2e,P2e,M2e,k2e,O2e,N2e,I2e,vie,D2e,L2e,j2e,R2e,OE,$2e,jk,F2e,B2e,z2e,U2e,W2e,V2e,H2e,G2e,q2e,K2e,Y2e,X2e,Q2e,Z2e,J2e,eEe,_j,tEe,eB,tB,rEe,nEe,iEe,_ie,bie,aEe,fW=Wt(()=>{tn(),_n(),Cs(),xn(),yie=(e,t,r,n,i,a,s)=>{let o=Math.ceil(t/4),l="";typeof i=="string"?l=`${i}(a)`:l=i("a");let u=Et("inputData",r,[o],4),c=Mr("outputData",n,[o],4),d=[{name:"vec_size",type:"u32"}];return s&&d.push(...s),` 1233 ${e.registerUniforms(d).declareVariables(u,c)} 1234 1235 ${a??""} 1236 1237 ${e.mainStart()} 1238 ${e.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.vec_size")} 1239 1240 let a = ${u.getByOffset("global_idx")}; 1241 ${c.setByOffset("global_idx",l)} 1242 }`},_i=(e,t,r,n,i,a=e.dataType,s,o)=>{let l=[{type:12,data:Math.ceil(yt.size(e.dims)/4)}];return s&&l.push(...s),{name:t,shaderCache:{hint:i,inputDependencies:["type"]},getShaderSource:u=>yie(u,yt.size(e.dims),e.dataType,a,r,n,o),getRunData:u=>({outputs:[{dims:e.dims,dataType:a}],dispatchGroup:{x:Math.ceil(yt.size(u[0].dims)/64/4)},programUniforms:l})}},S2e=e=>{e.compute(_i(e.inputs[0],"Abs","abs"))},A2e=e=>{e.compute(_i(e.inputs[0],"Acos","acos"))},C2e=e=>{e.compute(_i(e.inputs[0],"Acosh","acosh"))},P2e=e=>{e.compute(_i(e.inputs[0],"Asin","asin"))},M2e=e=>{e.compute(_i(e.inputs[0],"Asinh","asinh"))},k2e=e=>{e.compute(_i(e.inputs[0],"Atan","atan"))},O2e=e=>{e.compute(_i(e.inputs[0],"Atanh","atanh"))},N2e=e=>Mi(e),I2e=(e,t)=>{let r;switch(t.to){case 10:r="vec4<f16>";break;case 1:r="vec4<f32>";break;case 12:r="vec4<u32>";break;case 6:r="vec4<i32>";break;case 9:r="vec4<bool>";break;default:throw new RangeError(`not supported type (specified in attribute 'to' from 'Cast' operator): ${t.to}`)}
vendor: 4,246 bytes, lines 1242-1288
1242e.compute(_i(e.inputs[0],"Cast",r,void 0,t.cacheKey,t.to))},vie=e=>{let t,r,n=e.length>=2&&e[1].data!==0,i=e.length>=3&&e[2].data!==0;switch(e[0].dataType){case 1:t=n?e[1].getFloat32Array()[0]:-34028234663852886e22,r=i?e[2].getFloat32Array()[0]:34028234663852886e22;break;case 10:t=n?e[1].getUint16Array()[0]:64511,r=i?e[2].getUint16Array()[0]:31743;break;default:throw new Error("Unsupport data type")}return Mi({min:t,max:r})},D2e=(e,t)=>{let r=t||vie(e.inputs),n=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"Clip",i=>`clamp(${i}, vec4<${n}>(uniforms.min), vec4<${n}>(uniforms.max))`,void 0,r.cacheKey,void 0,[{type:e.inputs[0].dataType,data:r.min},{type:e.inputs[0].dataType,data:r.max}],[{name:"min",type:n},{name:"max",type:n}]),{inputs:[0]})},L2e=e=>{e.compute(_i(e.inputs[0],"Ceil","ceil"))},j2e=e=>{e.compute(_i(e.inputs[0],"Cos","cos"))},R2e=e=>{e.compute(_i(e.inputs[0],"Cosh","cosh"))},OE=e=>Mi(e),$2e=(e,t)=>{let r=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"Elu",n=>`elu_vf32(${n})`,` 1243 const elu_alpha_ = ${r}(${t.alpha}); 1244 1245 fn elu_f32(a: ${r}) -> ${r} { 1246 return select((exp(a) - 1.0) * elu_alpha_, a, a >= 0.0); 1247 } 1248 1249 fn elu_vf32(v: vec4<${r}>) -> vec4<${r}> { 1250 return vec4(elu_f32(v.x), elu_f32(v.y), elu_f32(v.z), elu_f32(v.w)); 1251 }`,t.cacheKey))},jk=(e="f32")=>` 1252const r0: ${e} = 0.3275911; 1253const r1: ${e} = 0.254829592; 1254const r2: ${e} = -0.284496736; 1255const r3: ${e} = 1.421413741; 1256const r4: ${e} = -1.453152027; 1257const r5: ${e} = 1.061405429; 1258 1259fn erf_vf32(v: vec4<${e}>) -> vec4<${e}> { 1260 let absv = abs(v); 1261 let x = 1.0 / (1.0 + r0 * absv); 1262 return sign(v) * (1.0 - ((((r5 * x + r4) * x + r3) * x + r2) * x + r1) * x * exp(-absv * absv)); 1263}`,F2e=e=>{let t=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"Erf",r=>`erf_vf32(${r})`,jk(t)))},B2e=e=>{e.compute(_i(e.inputs[0],"Exp","exp"))},z2e=e=>{e.compute(_i(e.inputs[0],"Floor","floor"))},U2e=e=>{let t=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"Gelu",r=>`0.5 * ${r} * (1.0 + erf_vf32(${r} * 0.7071067811865475))`,jk(t)))},W2e=(e,t)=>{let r=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"LeakyRelu",n=>`select(leaky_relu_alpha_ * ${n}, ${n}, ${n} >= vec4<${r}>(0.0))`,`const leaky_relu_alpha_ = ${r}(${t.alpha});`,t.cacheKey))},V2e=e=>{e.compute(_i(e.inputs[0],"Not",t=>`!${t}`))},H2e=e=>{e.compute(_i(e.inputs[0],"Neg",t=>`-${t}`))},G2e=e=>{e.compute(_i(e.inputs[0],"Reciprocal",t=>`1.0/${t}`))},q2e=e=>{let t=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"Relu",r=>`select(vec4<${t}>(0.0), ${r}, ${r} > vec4<${t}>(0.0))`))},K2e=e=>{e.compute(_i(e.inputs[0],"Sigmoid",t=>`(1.0 / (1.0 + exp(-${t})))`))},Y2e=e=>Mi(e),X2e=(e,t)=>{let r=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"HardSigmoid",n=>`max(vec4<${r}>(0.0), min(vec4<${r}>(1.0), ${t.alpha} * ${n} + vec4<${r}>(${t.beta})))`,void 0,t.cacheKey))},Q2e=e=>{e.compute(_i(e.inputs[0],"Sin","sin"))},Z2e=e=>{e.compute(_i(e.inputs[0],"Sinh","sinh"))},J2e=e=>{e.compute(_i(e.inputs[0],"Sqrt","sqrt"))},eEe=e=>{e.compute(_i(e.inputs[0],"Tan","tan"))},_j=e=>`sign(${e}) * (1 - exp(-2 * abs(${e}))) / (1 + exp(-2 * abs(${e})))`,tEe=e=>{e.compute(_i(e.inputs[0],"Tanh",_j))},eB=(e="f32")=>` 1264const fast_gelu_a: ${e} = 0.5; 1265const fast_gelu_b: ${e} = 0.7978845608028654; 1266const fast_gelu_c: ${e} = 0.035677408136300125; 1267 1268fn tanh_v(v: vec4<${e}>) -> vec4<${e}> { 1269 return ${_j("v")}; 1270} 1271`,tB=e=>`(fast_gelu_a + fast_gelu_a * tanh_v(${e} * (fast_gelu_c * ${e} * ${e} + fast_gelu_b))) * ${e}`,rEe=e=>{let t=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"FastGelu",tB,eB(t),void 0,e.inputs[0].dataType))},nEe=(e,t)=>{let r=Wl(e.inputs[0].dataType);return e.compute(_i(e.inputs[0],"ThresholdedRelu",n=>`select(vec4<${r}>(0.0), ${n}, ${n} > thresholded_relu_alpha_)`,`const thresholded_relu_alpha_ = vec4<${r}>(${t.alpha});`,t.cacheKey)),0},iEe=e=>{e.compute(_i(e.inputs[0],"Log","log"))},_ie=(e,t)=>` 1272const alpha = vec4<${e}>(${t}); 1273const one = ${e}(1.0); 1274const zero = ${e}(0.0); 1275 1276fn quick_gelu_impl(x: vec4<${e}>) -> vec4<${e}> { 1277 let v = x *alpha; 1278 var x1 : vec4<${e}>; 1279 for (var i = 0; i < 4; i = i + 1) { 1280 if (v[i] >= zero) { 1281 x1[i] = one / (one + exp(-v[i])); 1282 } else { 1283 x1[i] = one - one / (one + exp(v[i])); 1284 } 1285 } 1286 return x * x1; 1287} 1288`,bie=e=>`quick_gelu_impl(${e}
1288)`,aEe=(e,t)=>{let r=Wl(e.inputs[0].dataType);e.compute(_i(e.inputs[0],"QuickGelu",bie,_ie(r,t.alpha),t.cacheKey,e.inputs[0].dataType))}}),wie,xie,sEe,Ibt=Wt(()=>{_n(),xn(),fW(),wie=e=>{if(e[0].dims.length!==3)throw new Error("input should have 3 dimensions");if(![2560,5120,10240].includes(e[0].dims[2]))throw new Error("hidden state should be 2560, 5120 or 10240");if(e[1].dims.length!==1)throw new Error("bias is expected to have 1 dimensions");if(e[0].dims[2]!==e[1].dims[0])throw new Error("last dimension of input and bias are not the same")},xie=e=>{let t=e[0].dims.slice();t[2]=t[2]/2;let r=Et("input",e[0].dataType,e[0].dims,4),n=Et("bias",e[0].dataType,[e[0].dims[2]],4),i=Mr("output",e[0].dataType,t,4),a=yt.size(t)/4,s=zo(e[0].dataType);return{name:"BiasSplitGelu",getRunData:()=>({outputs:[{dims:t,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(a/64)}}),getShaderSource:o=>` 1289 const M_SQRT2 = sqrt(2.0); 1290 const halfChannels = ${e[0].dims[2]/4/2}u; 1291 1292 ${o.declareVariables(r,n,i)} 1293 1294 ${jk(s)} 1295 1296 ${o.mainStart()} 1297 ${o.guardAgainstOutOfBoundsWorkgroupSizes(a)} 1298 let biasIdx = global_idx % halfChannels; 1299 let batchIndex = global_idx / halfChannels; 1300 let inputOffset = biasIdx + batchIndex * halfChannels * 2; 1301 let valueLeft = input[inputOffset] + bias[biasIdx]; 1302 let valueRight = input[inputOffset + halfChannels] + bias[biasIdx + halfChannels]; 1303 let geluRight = valueRight * 0.5 * (erf_vf32(valueRight / M_SQRT2) + 1); 1304 1305 ${i.setByOffset("global_idx","valueLeft * geluRight")} 1306 }`}},sEe=e=>{wie(e.inputs),e.compute(xie(e.inputs))}}),Eie,Tie,Af,oEe,lEe,uEe,cEe,dEe,fEe,hEe,pEe,mEe,gEe,Dbt=Wt(()=>{tn(),_n(),xn(),Eie=(e,t,r,n,i,a,s,o,l,u,c,d)=>{let f,h;typeof o=="string"?f=h=(v,b)=>`${o}((${v}),(${b}))`:typeof o=="function"?f=h=o:(f=o.scalar,h=o.vector);let p=Mr("outputData",c,n.length,4),m=Et("aData",l,t.length,4),_=Et("bData",u,r.length,4),y;if(i)if(a){let v=yt.size(t)===1,b=yt.size(r)===1,w=t.length>0&&t[t.length-1]%4===0,x=r.length>0&&r[r.length-1]%4===0;v||b?y=p.setByOffset("global_idx",h(v?`${m.type.value}(${m.getByOffset("0")}.x)`:m.getByOffset("global_idx"),b?`${_.type.value}(${_.getByOffset("0")}.x)`:_.getByOffset("global_idx"))):y=` 1307 let outputIndices = ${p.offsetToIndices("global_idx * 4u")}; 1308 let offsetA = ${m.broadcastedIndicesToOffset("outputIndices",p)}; 1309 let offsetB = ${_.broadcastedIndicesToOffset("outputIndices",p)}; 1310 ${p.setByOffset("global_idx",h(s||w?m.getByOffset("offsetA / 4u"):`${m.type.value}(${m.getByOffset("offsetA / 4u")}[offsetA % 4u])`,s||x?_.getByOffset("offsetB / 4u"):`${_.type.value}(${_.getByOffset("offsetB / 4u")}[offsetB % 4u])`))} 1311 `}else y=p.setByOffset("global_idx",h(m.getByOffset("global_idx"),_.getByOffset("global_idx")));else{if(!a)throw new Error("no necessary to use scalar implementation for element-wise binary op implementation.");let v=(b,w,x="")=>{let E=`aData[indexA${w}][componentA${w}]`,T=`bData[indexB${w}][componentB${w}]`;return` 1312 let outputIndices${w} = ${p.offsetToIndices(`global_idx * 4u + ${w}u`)}; 1313 let offsetA${w} = ${m.broadcastedIndicesToOffset(`outputIndices${w}`,p)}; 1314 let offsetB${w} = ${_.broadcastedIndicesToOffset(`outputIndices${w}`,p)}; 1315 let indexA${w} = offsetA${w} / 4u; 1316 let indexB${w} = offsetB${w} / 4u; 1317 let componentA${w} = offsetA${w} % 4u; 1318 let componentB${w} = offsetB${w} % 4u; 1319 ${b}[${w}] = ${x}(${f(E,T)}); 1320 `};c===9?y=` 1321 var data = vec4<u32>(0); 1322 ${v("data",0,"u32")} 1323 ${v("data",1,"u32")} 1324 ${v("data",2,"u32")} 1325 ${v("data",3,"u32")} 1326 outputData[global_idx] = dot(vec4<u32>(0x1, 0x100, 0x10000, 0x1000000), vec4<u32>(data));`:y=` 1327 ${v("outputData[global_idx]",0)} 1328 ${v("outputData[global_idx]",1)} 1329 ${v("outputData[global_idx]",2)} 1330 ${v("outputData[global_idx]",3)} 1331 `}return` 1332 ${e.registerUniform("vec_size","u32").declareVariables(m,_,p)} 1333 1334 ${d??""} 1335 1336 ${e.mainStart()} 1337 ${e.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.vec_size")} 1338 ${y} 1339 }`},Tie=(e,t,r,n,i,a,s=r.dataType)=>{let o=r.dims.map(m=>Number(m)??1),l=n.dims.map(m=>Number(m)??1),u=!yt.areEqual(o,l),c=o,d=yt.size(o),f=!1,h=!1,p=[u];if(u){let m=Bw.calcShape(o,l,!1);if(!m)throw new Error("Can't perform binary op on the given tensors");c=m.slice(),d=yt.size(c);let _=yt.size(o)===1,y=yt.size(l)===1,v=o.length>0&&o[o.length-1]%4===0,b=l.length>0&&l[l.length-1]%4===0;p.push(_),p.push(y),p.push(v),p.push(b);let w=1;for(let x=1;x<c.length;x++){let E=o[o.length-x],T=l[l.length-x];if(E===T)w*=E;else break}w%4===0?(h=!0,f=!0):(_||y||v||b)&&(f=!0)}else f=!0;return p.push(f),{name:e,shaderCache:{hint:t+p.map(m=>m.toString()).join("_"),inputDependencies:["rank","rank"]},getShaderSource:m=>Eie(m,o,l,c,f,u,h,i,r.dataType,n.dataType,s,a),getRunData:()=>({outputs:[{dims:c,dataType:s}],dispatchGroup:{x:Math.ceil(d/64/4)},programUniforms:[{type:12,data:Math.ceil(yt.size(c)/4)},...zr(o,l,c)]})}},Af=(e,t,r,n,i,a)=>{e.compute(Tie(t,i??"",e.inputs[0],e.inputs[1],r,n,a))},oEe=e=>{Af(e,"Add",(t,r)=>`${t}+${r}`)},lEe=e=>{Af(e,"Div",(t,r)=>`${t}/${r}`)},uEe=e=>{Af(e,"Equal",{scalar:(t,r)=>`u32(${t}==${r})`,vector:(t,r)=>`vec4<u32>(${t}==${r})`},void 0,void 0,9)},cEe=e=>{Af(e,"Mul",(t,r)=>`${t}*${r}`)},dEe=e=>{let t=Et("input",e.inputs[0].dataType,e.inputs[0].dims).type.value;Af(e,"Pow",{scalar:(r,n)=>`pow_custom(${r},${n})`,vector:(r,n)=>`pow_vector_custom(${r},${n})`},` 1340 fn pow_custom(a : ${t}, b : ${t}) -> ${t} { 1341 if (b == ${t}(0.0)) { 1342 return ${t}(1.0); 1343 } else if (a < ${t}(0.0) && f32(b) != floor(f32(b))) { 1344 return ${t}(pow(f32(a), f32(b))); // NaN 1345 } 1346 return select(sign(a), ${t}(1.0), round(f32(abs(b) % ${t}(2.0))) != 1.0) * ${t}(${t==="i32"?"round":""}(pow(f32(abs(a)), f32(b)))); 1347 } 1348 fn pow_vector_custom(a : vec4<${t}>, b : vec4<${t}>
1348) -> vec4<${t}> { 1349 // TODO: implement vectorized pow 1350 return vec4<${t}>(pow_custom(a.x, b.x), pow_custom(a.y, b.y), pow_custom(a.z, b.z), pow_custom(a.w, b.w)); 1351 } 1352 `)},fEe=e=>{Af(e,"Sub",(t,r)=>`${t}-${r}`)},hEe=e=>{Af(e,"Greater",{scalar:(t,r)=>`u32(${t}>${r})`,vector:(t,r)=>`vec4<u32>(${t}>${r})`},void 0,void 0,9)},pEe=e=>{Af(e,"Less",{scalar:(t,r)=>`u32(${t}<${r})`,vector:(t,r)=>`vec4<u32>(${t}<${r})`},void 0,void 0,9)},mEe=e=>{Af(e,"GreaterOrEqual",{scalar:(t,r)=>`u32(${t}>=${r})`,vector:(t,r)=>`vec4<u32>(${t}>=${r})`},void 0,void 0,9)},gEe=e=>{Af(e,"LessOrEqual",{scalar:(t,r)=>`u32(${t}<=${r})`,vector:(t,r)=>`vec4<u32>(${t}<=${r})`},void 0,void 0,9)}}),Sie,Aie,Cie,Pie,yEe,vEe,Lbt=Wt(()=>{tn(),_n(),Cs(),xn(),Sie=(e,t)=>{if(!e||e.length<1)throw new Error("too few inputs");let r=0,n=e[r],i=n.dataType,a=n.dims.length;e.forEach((s,o)=>{if(o!==r){if(s.dataType!==i)throw new Error("input tensors should be one type");if(s.dims.length!==a)throw new Error("input tensors should have the same shape");s.dims.forEach((l,u)=>{if(u!==t&&l!==n.dims[u])throw new Error("non concat dimensions must match")})}})},Aie=(e,t)=>` 1353 fn calculateInputIndex(index: u32) -> u32 { 1354 let sizeInConcatAxis = array<u32, ${e}u>(${t}); 1355 for (var i: u32 = 0u; i < ${e}; i += 1u ) { 1356 if (index < sizeInConcatAxis[i]) { 1357 return i; 1358 } 1359 } 1360 return ${e}u; 1361 }`,Cie=(e,t)=>{let r=e.length,n=[];for(let i=0;i<r;++i){let a=t.setByOffset("global_idx",e[i].getByIndices("indices"));r===1?n.push(a):i===0?n.push(`if (inputIndex == ${i}u) { ${a} }`):i===r-1?n.push(`else { ${a} }`):n.push(`else if (inputIndex == ${i}) { ${a} }`)}return n.join(` 1362`)},Pie=(e,t,r,n)=>{let i=yt.size(r),a=new Array(e.length),s=new Array(e.length),o=0,l=[],u=[],c=[{type:12,data:i}];for(let m=0;m<e.length;++m)o+=e[m].dims[t],a[m]=o,u.push(e[m].dims.length),s[m]=Et(`input${m}`,n,u[m]),l.push("rank"),c.push({type:12,data:a[m]});for(let m=0;m<e.length;++m)c.push(...zr(e[m].dims));c.push(...zr(r));let d=Mr("output",n,r.length),f=d.indicesGet("indices",t),h=Array.from(Array(a.length).keys()).map(m=>`uniforms.sizeInConcatAxis${m}`).join(","),p=m=>` 1363 1364 ${(()=>{m.registerUniform("outputSize","u32");for(let _=0;_<e.length;_++)m.registerUniform(`sizeInConcatAxis${_}`,"u32");return m.declareVariables(...s,d)})()} 1365 1366 ${Aie(a.length,h)} 1367 1368 ${m.mainStart()} 1369 ${m.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 1370 1371 var indices = ${d.offsetToIndices("global_idx")}; 1372 1373 let inputIndex = calculateInputIndex(${f}); 1374 if (inputIndex != 0u) { 1375 let sizeInConcatAxis = array<u32, ${a.length}u>(${h}); 1376 ${f} -= sizeInConcatAxis[inputIndex - 1u]; 1377 } 1378 1379 ${Cie(s,d)} 1380 }`;return{name:"Concat",shaderCache:{hint:`${t}`,inputDependencies:l},getRunData:()=>({outputs:[{dims:r,dataType:n}],dispatchGroup:{x:Math.ceil(i/64)},programUniforms:c}),getShaderSource:p}},yEe=(e,t)=>{let r=e.inputs,n=r[0].dims,i=yt.normalizeAxis(t.axis,n.length);Sie(r,i);let a=n.slice();a[i]=r.reduce((o,l)=>o+(l.dims.length>i?l.dims[i]:0),0);let s=r.filter(o=>yt.size(o.dims)>0);e.compute(Pie(s,i,a,r[0].dataType),{inputs:s})},vEe=e=>Mi({axis:e.axis})}),qv,Kv,Yv,hW,m_=Wt(()=>{tn(),_n(),qv=(e,t,r="f32")=>{switch(e.activation){case"Relu":return`value = max(value, ${t}(0.0));`;case"Sigmoid":return`value = (${t}(1.0) / (${t}(1.0) + exp(-value)));`;case"Clip":return`value = clamp(value, ${t}(${r}(uniforms.clip_min)), ${t}(${r}(uniforms.clip_max)));`;case"HardSigmoid":return`value = max(${t}(0.0), min(${t}(1.0), ${r}(uniforms.alpha) * value + ${r}(uniforms.beta)));`;case"LeakyRelu":return`value = select(${r}(uniforms.alpha) * value, value, value >= ${t}(0.0));`;case"Tanh":return`let e2x = exp(-2.0 * abs(value)); 1381 value = sign(value) * (1.0 - e2x) / (1.0 + e2x); 1382 `;case"":return"";default:throw new Error(`Unsupported activation ${e.activation}`)}},Kv=(e,t)=>{e.activation==="Clip"?t.push({type:1,data:e.clipMax},{type:1,data:e.clipMin}):e.activation==="HardSigmoid"?t.push({type:1,data:e.alpha},{type:1,data:e.beta}):e.activation==="LeakyRelu"&&t.push({type:1,data:e.alpha})},Yv=(e,t)=>
vendor: 13,583 bytes, lines 1382-1644
1382{e.activation==="Clip"?t.push({name:"clip_max",type:"f32"},{name:"clip_min",type:"f32"}):e.activation==="HardSigmoid"?t.push({name:"alpha",type:"f32"},{name:"beta",type:"f32"}):e.activation==="LeakyRelu"&&t.push({name:"alpha",type:"f32"})},hW=e=>{let t=(e==null?void 0:e.activation)||"";if(t==="HardSigmoid"){let[r,n]=(e==null?void 0:e.activation_params)||[.2,.5];return{activation:t,alpha:r,beta:n}}else if(t==="Clip"){let[r,n]=(e==null?void 0:e.activation_params)||[Vxe,Hxe];return{activation:t,clipMax:n,clipMin:r}}else if(t==="LeakyRelu"){let[r]=(e==null?void 0:e.activation_params)||[.01];return{activation:t,alpha:r}}return{activation:t}}}),Zo,_Ee,pW=Wt(()=>{Zo=(e,t)=>{switch(e){case 1:return t;case 2:return`vec2<${t}>`;case 3:return`vec3<${t}>`;case 4:return`vec4<${t}>`;default:throw new Error(`${e}-component is not supported.`)}},_Ee=e=>` 1383 ${e?"value = value + getBiasByOutputCoords(coords);":""} 1384 `}),bEe,jbt=Wt(()=>{bEe=e=>` 1385fn getIndexFromCoords4D(coords : vec4<i32>, shape : vec4<i32>) -> i32 { 1386 return dot(coords, vec4<i32>( 1387 shape.y * shape.z * shape.w, shape.z * shape.w, shape.w, 1)); 1388} 1389fn getOutputIndexFromCoords(coords : vec4<i32>) -> i32 { 1390 return dot(coords, vec4<i32>( 1391 i32(${e}.x), i32(${e}.y), i32(${e}.z), 1)); 1392} 1393`}),xT,mW,gW=Wt(()=>{tn(),_n(),xn(),m_(),xT=(e,t,r,n,i)=>{let a=n-r;return` 1394 ${Array.from({length:r}).map((s,o)=>` 1395 if (${Rr(t.shape,o,t.rank)} != 1) { 1396 ${t.indicesSet(e,o,Rr(i,o+a,n))} 1397 } else { 1398 ${t.indicesSet(e,o,0)} 1399 }`).join("")} 1400`},mW=(e,t,r,n,i=!1,a)=>{let s=e[0].dims,o=e[1].dims,l=s[s.length-2],u=o[o.length-1],c=s[s.length-1],d=ss(u),f=ss(c),h=ss(l),p=yt.size(r)/d/h,m=e.length>2,_=n?n.slice(0,-2):r.slice(0,-2),y=[yt.size(_),l,u],v=[{type:12,data:p},{type:12,data:l},{type:12,data:u},{type:12,data:c}];Kv(t,v),v.push(...zr(_,s,o)),m&&v.push(...zr(e[2].dims)),v.push(...zr(y));let b=w=>{let x=uW("batch_dims",e[0].dataType,_.length),E=Et("a",e[0].dataType,s.length,f),T=Et("b",e[1].dataType,o.length,d),S=Mr("output",e[0].dataType,y.length,d),A=zo(S.type.tensor),C=qv(t,S.type.value,A),k=[E,T],M="";if(m){let V=i?d:1;k.push(Et("bias",e[2].dataType,e[2].dims.length,V)),M=`${i?`value += bias[col / ${V}];`:`value += ${S.type.value}(bias[row + i]);`}`}let D=[{name:"output_size",type:"u32"},{name:"M",type:"u32"},{name:"N",type:"u32"},{name:"K",type:"u32"}];Yv(t,D);let $=()=>{let V=`var a_data: ${E.type.value};`;for(let U=0;U<f;U++)V+=` 1401 let b_data${U} = b[(b_offset + (k + ${U}) * uniforms.N + col) / ${d}];`;for(let U=0;U<h;U++){V+=`a_data = a[(a_offset + (row + ${U}) * uniforms.K + k) / ${f}];`;for(let B=0;B<f;B++)V+=` 1402 values[${U}] = fma(${T.type.value}(a_data${f===1?"":`[${B}]`}), b_data${B}, values[${U}]); 1403`}return V};return` 1404 ${w.registerUniforms(D).registerInternalVariables(x).declareVariables(...k,S)} 1405 ${w.mainStart()} 1406 ${w.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 1407 let col = (global_idx % (uniforms.N / ${d})) * ${d}; 1408 var index1 = global_idx / (uniforms.N / ${d}); 1409 let stride1 = uniforms.M / ${h}; 1410 let row = (index1 % stride1) * ${h}; 1411 let batch = index1 / stride1; 1412 1413 ${r.length===2?"":`let batch_indices = ${x.offsetToIndices("batch")};`} 1414 1415 var a_indices: ${E.type.indices}; 1416 ${xT("a_indices",E,E.rank-2,x.rank,"batch_indices")} 1417 ${E.indicesSet("a_indices",E.rank-2,0)} 1418 ${E.indicesSet("a_indices",E.rank-1,0)} 1419 let a_offset = ${E.indicesToOffset("a_indices")}; 1420 1421 var b_indices: ${T.type.indices}; 1422 ${xT("b_indices",T,T.rank-2,x.rank,"batch_indices")} 1423 ${T.indicesSet("b_indices",T.rank-2,0)} 1424 ${T.indicesSet("b_indices",T.rank-1,0)} 1425 let b_offset = ${T.indicesToOffset("b_indices")}; 1426 var values: array<${S.type.value}, ${h}>; 1427 for (var k: u32 = 0u; k < uniforms.K; k = k + ${f}) { 1428 ${$()} 1429 } 1430 for (var i = 0u; i < ${h}u; i++) { 1431 var value = values[i]; 1432 ${M} 1433 ${C} 1434 let cur_indices = ${S.type.indices}(batch, row + i, col); 1435 let offset = ${S.indicesToOffset("cur_indices")}; 1436 ${S.setByOffset(`offset / ${d}`,"value")}; 1437 } 1438 } 1439 `};return{name:"MatMulNaive",shaderCache:{hint:`${t.activation};${d};${f};${h};${i}`,inputDependencies:m?["rank","rank","rank"]:["rank","rank"]},getRunData:()=>({outputs:[{dims:a?a(r):r,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(p/64)},programUniforms:v}),getShaderSource:b}}}),Mie,kie,rB,bj,Oie,nB,Nie,_O,yW=Wt(()=>{tn(),_n(),xn(),m_(),gW(),pW(),Mie=(e,t)=>e?` 1440 mm_Asub[inputRow][inputCol] = mm_readA(batch, 1441 kStart + inputRow, 1442 globalRowStart / innerElementSize + inputCol${t?", batchIndices":""}); 1443 `:` 1444 mm_Asub[inputRow][inputCol] = mm_readA(batch, 1445 globalRow + innerRow, 1446 kStart / innerElementSize + inputCol${t?", batchIndices":""}); 1447 `,kie=(e,t)=>e?` 1448 let ACached0 = mm_Asub[k * innerElementSize][localRow]; 1449 let ACached1 = mm_Asub[k * innerElementSize + 1][localRow]; 1450 let ACached2 = mm_Asub[k * innerElementSize + 2][localRow]; 1451 ${t===3?"":"let ACached3 = mm_Asub[k * innerElementSize + 3][localRow];"} 1452 for (var i = 0; i < rowPerThread; i = i + 1) { 1453 acc[i] = BCached0 * ACached0[i] + acc[i]; 1454 acc[i] = BCached1 * ACached1[i] + acc[i]; 1455 acc[i] = BCached2 * ACached2[i] + acc[i]; 1456 ${t===3?"":"acc[i] = BCached3 * ACached3[i] + acc[i];"} 1457 }`:` 1458 for (var i = 0; i < rowPerThread; i = i + 1) { 1459 let ACached = mm_Asub[tileRow + i][k]; 1460 acc[i] = BCached0 * ACached.x + acc[i]; 1461 acc[i] = BCached1 * ACached.y + acc[i]; 1462 acc[i] = BCached2 * ACached.z + acc[i]; 1463 ${t===3?"":"acc[i] = BCached3 * ACached.w + acc[i];"} 1464 }`,rB=(e,t,r="f32",n,i=!1,a=32,s=!1,o=32)=>{let l=t[1]*e[1],u=t[0]*e[0],c=i?l:a,d=i?a:l,f=c/t[0],h=a/t[1];if(!((i&&f===4&&e[1]===4||!i&&(f===3||f===4))&&c%t[0]===0&&a%t[1]===0&&e[0]===4))throw new Error(`If transposeA ${i} is true, innerElementSize ${f} and workPerThread[1] ${e[1]} must be 4. 1465 Otherwise, innerElementSize ${f} must be 3 or 4. 1466 tileAWidth ${c} must be divisible by workgroupSize[0]${t[0]}. tileInner ${a} must be divisible by workgroupSize[1] ${t[1]}. colPerThread ${e[0]} must be 4.`);return` 1467var<workgroup> mm_Asub: array<array<vec${f}<${r}>, ${c/f}>, ${d}>; 1468var<workgroup> mm_Bsub: array<array<vec4<${r}>, ${u/e[0]}>, ${a}>; 1469 1470const rowPerThread = ${e[1]}; 1471const colPerThread = ${e[0]}; 1472const innerElementSize = ${f}; 1473const tileInner = ${a}; 1474 1475@compute @workgroup_size(${t[0]}, ${t[1]}, ${t[2]}) 1476fn main(@builtin(local_invocation_id) localId : vec3<u32>, 1477 @builtin(global_invocation_id) globalId : vec3<u32>, 1478 @builtin(workgroup_id) workgroupId : vec3<u32>) { 1479 let localRow = i32(localId.y); 1480 let tileRow = localRow * rowPerThread; 1481 let tileCol = i32(localId.x); 1482 1483 let globalRow =i32(globalId.y) * rowPerThread; 1484 let globalCol = i32(globalId.x); 1485 let batch = ${s?"0":"i32(globalId.z)"}; 1486 ${n?`let batchIndices = ${n.offsetToIndices("u32(batch)")};`:""} 1487 let globalRowStart = i32(workgroupId.y) * ${l}; 1488 1489 let num_tiles = ${s?`${Math.ceil(o/a)}`:"(uniforms.dim_inner - 1) / tileInner + 1"}; 1490 var kStart = ${s?`i32(globalId.z) * ${o}`:"0"}; 1491 1492 var acc: array<vec4<${r}>, rowPerThread>; 1493 1494 // Loop over shared dimension. 1495 let tileRowB = localRow * ${h}; 1496 for (var t = 0; t < num_tiles; t = t + 1) { 1497 // Load one tile of A into local memory. 1498 for (var innerRow = 0; innerRow < rowPerThread; innerRow = innerRow + 1) { 1499 let inputRow = tileRow + innerRow; 1500 let inputCol = tileCol; 1501 ${Mie(i,n)} 1502 } 1503 1504 // Load one tile of B into local memory. 1505 for (var innerRow = 0; innerRow < ${h}; innerRow = innerRow + 1) { 1506 let inputRow = tileRowB + innerRow; 1507 let inputCol = tileCol; 1508 mm_Bsub[inputRow][inputCol] = mm_readB(batch, kStart + inputRow, globalCol${n?", batchIndices":""}); 1509 } 1510 kStart = kStart + tileInner; 1511 workgroupBarrier(); 1512 1513 // Compute acc values for a single thread. 1514 for (var k = 0; k < tileInner / innerElementSize; k = k + 1) { 1515 let BCached0 = mm_Bsub[k * innerElementSize][tileCol]; 1516 let BCached1 = mm_Bsub[k * innerElementSize + 1][tileCol]; 1517 let BCached2 = mm_Bsub[k * innerElementSize + 2][tileCol]; 1518 ${f===3?"":"let BCached3 = mm_Bsub[k * innerElementSize + 3][tileCol];"} 1519 1520 ${kie(i,f)} 1521 } 1522 1523 workgroupBarrier(); 1524 } 1525 1526 for (var innerRow = 0; innerRow < rowPerThread; innerRow = innerRow + 1) { 1527 mm_write(batch, globalRow + innerRow, globalCol, acc[innerRow]); 1528 } 1529}`},bj=(e,t)=>e?` 1530 mm_Asub[inputRow][inputCol] = mm_readA(batch, 1531 kStart + inputRow, 1532 globalRowStart + inputCol${t?", batchIndices":""}); 1533 `:` 1534 mm_Asub[inputRow][inputCol] = mm_readA(batch, 1535 globalRowStart + inputRow, 1536 kStart + inputCol${t?", batchIndices":""}); 1537 `,Oie=e=>e?"let ACached = mm_Asub[k][tileRow + innerRow];":"let ACached = mm_Asub[tileRow + innerRow][k];",nB=(e,t,r="f32",n,i=!1,a=32,s=!1,o=32,l=!1)=>{let u=e[1]*t[1],c=e[0]*t[0],d=i?u:a,f=i?a:u;if(!(f%t[1]===0&&d%t[0]===0&&a%t[1]===0))throw new Error(`tileAHight ${f} must be divisible by workgroupSize[1]${t[1]}, tileAWidth ${d} must be divisible by workgroupSize[0]${t[0]}, tileInner ${a} must be divisible by workgroupSize[1]${t[1]}`);let h=f/t[1],p=d/t[0],m=a/t[1],_=l?` 1538 let localRow = i32(localId.y); 1539 let localCol = i32(localId.x); 1540 let globalRowStart = i32(workgroupId.y) * ${u}; 1541 let globalColStart = i32(workgroupId.x) * ${c}; 1542 1543 // Loop over shared dimension. 1544 for (var t = 0; t < num_tiles; t = t + 1) { 1545 // Load one tile of A into local memory. 1546 for (var inputRow = localRow; inputRow < ${f}; inputRow = inputRow + ${t[1]}) { 1547 for (var inputCol = localCol; inputCol < ${d}; inputCol = inputCol + ${t[0]}) { 1548 ${bj(i,n)} 1549 } 1550 } 1551 // Load one tile of B into local memory. 1552 for (var inputRow = localRow; inputRow < ${a}; inputRow = inputRow + ${t[1]}) { 1553 for (var inputCol = localCol; inputCol < ${c}; inputCol = inputCol + ${t[0]}) { 1554 mm_Bsub[inputRow][inputCol] = mm_readB(batch, 1555 kStart + inputRow, 1556 globalColStart + inputCol${n?", batchIndices":""}); 1557 } 1558 } 1559 kStart = kStart + tileInner; 1560 workgroupBarrier(); 1561 1562 // Compute acc values for a single thread. 1563 var BCached : array<${r}, colPerThread>; 1564 for (var k = 0; k < tileInner; k = k + 1) { 1565 for (var inner = 0; inner < colPerThread; inner = inner + 1) { 1566 BCached[inner] = mm_Bsub[k][localCol + inner * ${t[0]}]; 1567 } 1568 for (var innerRow = 0; innerRow < rowPerThread; innerRow = innerRow + 1) { 1569 let ACached = ${i?`mm_Asub[k][localRow + innerRow * ${t[1]}];`:`mm_Asub[localRow + innerRow * ${t[1]}][k];`} 1570 for (var innerCol = 0; innerCol < colPerThread; innerCol = innerCol + 1) { 1571 acc[innerRow][innerCol] = acc[innerRow][innerCol] + 1572 ACached * BCached[innerCol]; 1573 } 1574 } 1575 } 1576 workgroupBarrier(); 1577 } 1578 for (var innerRow = 0; innerRow < rowPerThread; innerRow = innerRow + 1) { 1579 let gRow = globalRowStart + localRow + innerRow * ${t[1]}; 1580 for (var innerCol = 0; innerCol < colPerThread; innerCol = innerCol + 1) { 1581 let gCol = globalColStart + localCol + innerCol * ${t[0]}; 1582 mm_write(batch, gRow, gCol, acc[innerRow][innerCol]); 1583 } 1584 } 1585 `:` 1586let tileRow = i32(localId.y) * rowPerThread; 1587let tileCol = i32(localId.x) * colPerThread; 1588 1589let globalRow = i32(globalId.y) * rowPerThread; 1590let globalCol = i32(globalId.x) * colPerThread; 1591let globalRowStart = i32(workgroupId.y) * ${u}; 1592 1593let tileRowA = i32(localId.y) * ${h}; 1594let tileColA = i32(localId.x) * ${p}; 1595let tileRowB = i32(localId.y) * ${m}; 1596// Loop over shared dimension. 1597for (var t = 0; t < num_tiles; t = t + 1) { 1598 // Load one tile of A into local memory. 1599 for (var innerRow = 0; innerRow < ${h}; innerRow = innerRow + 1) { 1600 for (var innerCol = 0; innerCol < ${p}; innerCol = innerCol + 1) { 1601 let inputRow = tileRowA + innerRow; 1602 let inputCol = tileColA + innerCol; 1603 ${bj(i,n)} 1604 } 1605 } 1606 1607 // Load one tile of B into local memory. 1608 for (var innerRow = 0; innerRow < ${m}; innerRow = innerRow + 1) { 1609 for (var innerCol = 0; innerCol < colPerThread; innerCol = innerCol + 1) { 1610 let inputRow = tileRowB + innerRow; 1611 let inputCol = tileCol + innerCol; 1612 mm_Bsub[inputRow][inputCol] = mm_readB(batch, 1613 kStart + inputRow, 1614 globalCol + innerCol${n?", batchIndices":""}); 1615 } 1616 } 1617 kStart = kStart + tileInner; 1618 workgroupBarrier(); 1619 1620 // Compute acc values for a single thread. 1621 var BCached : array<${r}, colPerThread>; 1622 for (var k = 0; k < tileInner; k = k + 1) { 1623 for (var inner = 0; inner < colPerThread; inner = inner + 1) { 1624 BCached[inner] = mm_Bsub[k][tileCol + inner]; 1625 } 1626 1627 for (var innerRow = 0; innerRow < rowPerThread; innerRow = innerRow + 1) { 1628 ${Oie(i)} 1629 for (var innerCol = 0; innerCol < colPerThread; innerCol = innerCol + 1) { 1630 acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol]; 1631 } 1632 } 1633 } 1634 1635 workgroupBarrier(); 1636} 1637 1638for (var innerRow = 0; innerRow < rowPerThread; innerRow = innerRow + 1) { 1639 for (var innerCol = 0; innerCol < colPerThread; innerCol = innerCol + 1) { 1640 mm_write(batch, globalRow + innerRow, globalCol + innerCol, 1641 acc[innerRow][innerCol]); 1642 } 1643} 1644`;return`
1645 var<workgroup> mm_Asub : array<array<${r}, ${d}>, ${f}>; 1646 var<workgroup> mm_Bsub : array<array<${r}, ${c}>, ${a}>; 1647 const rowPerThread = ${e[1]}; 1648 const colPerThread = ${e[0]}; 1649 const tileInner = ${a}; 1650 1651@compute @workgroup_size(${t[0]}, ${t[1]}, ${t[2]}) 1652fn main(@builtin(local_invocation_id) localId : vec3<u32>, 1653 @builtin(global_invocation_id) globalId : vec3<u32>, 1654 @builtin(workgroup_id) workgroupId : vec3<u32>) { 1655 let batch = ${s?"0":"i32(globalId.z)"}; 1656 ${n?`let batchIndices = ${n.offsetToIndices("u32(batch)")};`:""} 1657 let num_tiles = ${s?`${Math.ceil(o/a)}`:"(uniforms.dim_inner - 1) / tileInner + 1"}; 1658 var kStart = ${s?`i32(globalId.z) * ${o}`:"0"}; 1659 1660 var acc : array<array<${r}, colPerThread>, rowPerThread>; 1661 ${_} 1662 } 1663`},Nie=(e,t,r,n,i=!1)=>{let[a,s,o,l]=n,u=zo(n[0].type.tensor);return` 1664 fn mm_readA(batch: i32, row: i32, colIn: i32, batchIndices: ${a.type.indices}) -> ${Zo(e,u)} { 1665 var value = ${Zo(e,u)}(0.0); 1666 let col = colIn * ${e}; 1667 if(row < uniforms.dim_a_outer && col < uniforms.dim_inner) 1668 { 1669 var aIndices: ${s.type.indices}; 1670 ${xT("aIndices",s,s.rank-2,a.rank,"batchIndices")} 1671 ${s.indicesSet("aIndices",s.rank-2,"u32(row)")} 1672 ${s.indicesSet("aIndices",s.rank-1,"u32(colIn)")} 1673 value = ${s.getByIndices("aIndices")}; 1674 } 1675 return value; 1676 } 1677 1678 fn mm_readB(batch: i32, row: i32, colIn: i32, batchIndices: ${a.type.indices}) -> ${Zo(e,u)} { 1679 var value = ${Zo(e,u)}(0.0); 1680 let col = colIn * ${e}; 1681 if(row < uniforms.dim_inner && col < uniforms.dim_b_outer) 1682 { 1683 var bIndices: ${o.type.indices}; 1684 ${xT("bIndices",o,o.rank-2,a.rank,"batchIndices")} 1685 ${o.indicesSet("bIndices",o.rank-2,"u32(row)")} 1686 ${o.indicesSet("bIndices",o.rank-1,"u32(colIn)")} 1687 value = ${o.getByIndices("bIndices")}; 1688 } 1689 return value; 1690 } 1691 1692 fn mm_write(batch: i32, row: i32, colIn: i32, valueIn: ${Zo(e,u)}) { 1693 let col = colIn * ${e}; 1694 if (row < uniforms.dim_a_outer && col < uniforms.dim_b_outer) { 1695 var value = valueIn; 1696 let coords = vec3<i32>(batch, row, colIn); 1697 ${t?`value = value + ${i?"bias[colIn]":`${Zo(e,u)}(bias[row])`};`:""} 1698 ${r} 1699 ${l.setByIndices("vec3<u32>(coords)","value")} 1700 } 1701 } 1702 `},_O=(e,t,r,n,i=!1,a)=>{let s=e[0].dims,o=e[1].dims,l=s.slice(0,-2),u=o.slice(0,-2),c=n?n.slice(0,-2):r.slice(0,-2),d=yt.size(c),f=s[s.length-2],h=s[s.length-1],p=o[o.length-1],m=h%4===0&&p%4===0,_=f<=8?[4,1,1]:[4,4,1],y=[8,8,1],v=[Math.ceil(p/y[0]/_[0]),Math.ceil(f/y[1]/_[1]),Math.ceil(d/y[2]/_[2])],b=m?4:1,w=[...l,f,h/b],x=w.length,E=[...u,h,p/b],T=E.length,S=[d,f,p/b],A=[{type:6,data:f},{type:6,data:p},{type:6,data:h}];Kv(t,A),A.push(...zr(c,w,E));let C=["rank","rank"],k=e.length>2;k&&(A.push(...zr(e[2].dims)),C.push("rank")),A.push(...zr(S));let M=D=>{let $=c.length,V=uW("batchDims",e[0].dataType,$,1),U=zo(e[0].dataType),B=Et("a",e[0].dataType,x,b),z=Et("b",e[1].dataType,T,b),q=Mr("result",e[0].dataType,S.length,b),L=[B,z];if(k){let ie=i?b:1;L.push(Et("bias",e[2].dataType,e[2].dims.length,ie))}let K=[{name:"dim_a_outer",type:"i32"},{name:"dim_b_outer",type:"i32"},{name:"dim_inner",type:"i32"}];Yv(t,K);let O=zo(q.type.tensor),N=qv(t,q.type.value,O),X=Nie(b,k,N,[V,B,z,q],i);return` 1703 ${D.registerUniforms(K).registerInternalVariables(V).declareVariables(...L,q)} 1704 ${X} 1705 ${m?rB(_,y,U,V):nB(_,y,U,V)} 1706 `};return{name:"MatMul",shaderCache:{hint:`${_};${t.activation};${m};${i}`,inputDependencies:C},getRunData:()=>({outputs:[{dims:a?a(r):r,dataType:e[0].dataType}],dispatchGroup:{x:v[0],y:v[1],z:v[2]},programUniforms:A}),getShaderSource:M}}}),Iie,wEe,Rbt=Wt(()=>{tn(),ym(),xn(),m_(),pW(),jbt(),yW(),Iie=(e,t,r,n,i=!1,a,s=4,o=4,l=4,u="f32")=>{let c=A=>{switch(A){case 1:return"resData = x[xIndex];";case 3:return`resData = vec3<${u}>(x[xIndex], x[xIndex + 1], x[xIndex + 2]);`;case 4:return"resData = x[xIndex / 4];";default:throw new Error(`innerElementSize ${A} is not supported.`)}},d=A=>{switch(A){case 1:return"return w[row * i32(uniforms.w_shape[3]) + colIn];";case 4:return"return w[row * i32(uniforms.w_shape[3]) / 4 + colIn];";default:throw new Error(`innerElementSize ${A} is not supported.`)}},f=e?`
1707 let coord = vec4<i32>(batch, xRow, xCol, xCh); 1708 `:` 1709 let coord = vec4<i32>(batch, xCh, xRow, xCol); 1710 `,h=e?` 1711 let coords = vec4<i32>( 1712 batch, 1713 row / outWidth, 1714 row % outWidth, 1715 col); 1716 `:` 1717 let coords = vec4<i32>( 1718 batch, 1719 row, 1720 col / outWidth, 1721 col % outWidth); 1722 `,p=e?"i32(uniforms.x_shape[1])":"i32(uniforms.x_shape[2])",m=e?"i32(uniforms.x_shape[2])":"i32(uniforms.x_shape[3])",_=e?"row":"col",y=e?"col":"row",v=` 1723 let inChannels = i32(uniforms.w_shape[2]); 1724 let outWidth = ${e?"i32(uniforms.result_shape[2])":"i32(uniforms.result_shape[3])"}; 1725 let outRow = ${_} / outWidth; 1726 let outCol = ${_} % outWidth; 1727 1728 let WRow = ${y} / (i32(uniforms.w_shape[1]) * inChannels); 1729 let WCol = ${y} / inChannels % i32(uniforms.w_shape[1]); 1730 let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * WRow - uniforms.pad[0]; 1731 let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * WCol - uniforms.pad[1]; 1732 let xCh = ${y} % inChannels; 1733 var resData = ${Zo(s,u)}(0.0); 1734 // The bounds checking is always needed since we use it to pad zero for 1735 // the 'same' padding type. 1736 if (xRow >= 0 && xRow < ${p} && xCol >= 0 && xCol < ${m}) { 1737 ${f} 1738 let xIndex = getIndexFromCoords4D(coord, vec4<i32>(uniforms.x_shape)); 1739 ${c(s)} 1740 } 1741 return resData;`,b=e?t&&n?` 1742 let col = colIn * ${s}; 1743 ${v}`:` 1744 let col = colIn * ${s}; 1745 if (row < uniforms.dim_a_outer && col < uniforms.dim_inner) { 1746 ${v} 1747 } 1748 return ${Zo(s,u)}(0.0);`:n&&r?`
1749 let col = colIn * ${s}; 1750 ${v}`:` 1751 let col = colIn * ${s}; 1752 if (row < uniforms.dim_inner && col < uniforms.dim_b_outer) { 1753 ${v} 1754 } 1755 return ${Zo(s,u)}(0.0);`,w=e?n&&r?d(o):` 1756 let col = colIn * ${o}; 1757 if (row < uniforms.dim_inner && col < uniforms.dim_b_outer) { 1758 ${d(o)} 1759 } 1760 return ${Zo(o,u)}(0.0);`:` 1761 let col = colIn * ${o}; 1762 if (row < uniforms.dim_inner && col < uniforms.dim_a_outer) { 1763 ${d(o)} 1764 } 1765 return ${Zo(o,u)}(0.0);`,x=Zo(l,u),E=Zo(e?s:o,u),T=Zo(e?o:s,u),S=qv(a,x,u);return` 1766 fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${E} { 1767 ${e?b:w} 1768 } 1769 1770 fn mm_readB(batch: i32, row : i32, colIn : i32) -> ${T} { 1771 ${e?w:b} 1772 } 1773 1774 fn mm_write(batch: i32, row : i32, colIn : i32, valueIn : ${x}) { 1775 let col = colIn * ${l}; 1776 if (row < uniforms.dim_a_outer && col < uniforms.dim_b_outer) 1777 { 1778 var value = valueIn; 1779 let outWidth = ${e?"i32(uniforms.result_shape[2])":"i32(uniforms.result_shape[3])"}; 1780 ${h} 1781 ${_Ee(i)} 1782 ${S} 1783 setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value); 1784 } 1785 }`},wEe=(e,t,r,n,i,a,s,o,l)=>{let u=t.format==="NHWC",c=u?e[0].dims[3]:e[0].dims[1],d=r[0],f=u?r[2]:r[3],h=u?r[1]:r[2],p=u?r[3]:r[1],m=u&&(c%4===0||c%3===0)&&p%4===0,_=u?p:f*h,y=u?f*h:p,v=[8,8,1],b=n<=8?[4,1,1]:[4,4,1],w=[Math.ceil(_/v[0]/b[0]),Math.ceil(y/v[1]/b[1]),Math.ceil(d/v[2]/b[2])];ti("verbose",()=>`[conv2d_mm_webgpu] dispatch = ${w}`);let x=m?u&&c%4!==0?3:4:1,E=v[1]*b[1],T=v[0]*b[0],S=Math.max(v[0]*x,v[1]),A=n%E===0,C=i%T===0,k=a%S===0,M=m?[x,4,4]:[1,1,1],D=[{type:6,data:n},{type:6,data:i},{type:6,data:a},{type:6,data:[t.pads[0],t.pads[1]]},{type:6,data:t.strides},{type:6,data:t.dilations}];Kv(t,D),D.push(...zr(e[0].dims,e[1].dims));let $=["rank","rank"];s&&(D.push(...zr(e[2].dims)),$.push("rank")),D.push(...zr(r));let V=U=>{let B=[{name:"dim_a_outer",type:"i32"},{name:"dim_b_outer",type:"i32"},{name:"dim_inner",type:"i32"},{name:"pad",type:"i32",length:2},{name:"stride",type:"i32",length:2},{name:"dilation",type:"i32",length:2}];Yv(t,B);let z=m?4:1,q=zo(e[0].dataType),L=` 1786 fn setOutputAtIndex(flatIndex : i32, value : ${m?`vec4<${q}>`:q}) { 1787 result[flatIndex] = ${m?`vec4<${q}>`:q}(value); 1788 } 1789 fn setOutputAtCoords(d0 : i32, d1 : i32, d2 : i32, d3 : i32, value : ${m?`vec4<${q}>`:q}) { 1790 let flatIndex = getOutputIndexFromCoords(vec4<i32>(d0, d1, d2, d3)); 1791 setOutputAtIndex(flatIndex ${m?"/ 4":""}, value); 1792 }`,K=Et("x",e[0].dataType,e[0].dims.length,x===3?1:x),O=Et("w",e[1].dataType,e[1].dims.length,z),N=[K,O],X=Mr("result",e[0].dataType,r.length,z);if(s){let ie=Et("bias",e[2].dataType,e[2].dims.length,z);N.push(ie),L+=` 1793 fn getBiasByOutputCoords(coords : vec4<i32>) -> ${m?`vec4<${q}>`:q} { 1794 return bias[coords.${u?"w":"y"}${m?"/ 4":""}]; 1795 }`}return` 1796 ${bEe("uniforms.result_strides")} 1797 //struct Uniforms { xShape : vec4<i32>, wShape : vec4<i32>, outShape : vec4<i32>, 1798 // outShapeStrides: vec3<i32>, filterDims : vec2<i32>, pad : vec2<i32>, stride : vec2<i32>, 1799 // dilation : vec2<i32>, dimAOuter : i32, dimBOuter : i32, dimInner : i32 }; 1800 ${U.registerUniforms(B).declareVariables(...N,X)} 1801 ${L} 1802 ${Iie(u,A,C,k,s,t,M[0],M[1],M[2],q)} 1803 ${m?rB(b,v,q,void 0,!u,S):nB(b,v,q,void 0,!u,S,!1,void 0,o)}`};return{name:"Conv2DMatMul",shaderCache:{hint:`${t.cacheKey};${x};${m};${A};${C};${k};${E};${T};${S}`,inputDependencies:$},getRunData:()=>({outputs:[{dims:l?l(r):r,dataType:e[0].dataType}],dispatchGroup:{x:w[0],y:w[1],z:w[2]},programUniforms:D}),getShaderSource:V}}}),Die,wj,q2,Lie,xj,jie,xEe,EEe,$bt=Wt(()=>{tn(),ym(),_n(),xn(),m_(),pW(),Die=e=>{let t=1;for(let r=0;r<e.length;r++)t*=e[r];return t},wj=e=>typeof e=="number"?[e,e,e]:e,q2=(e,t)=>t<=1?e:e+(e-1)*(t-1),Lie=(e,t,r,n=1)=>{let i=q2(t,n);return Math.floor((e[0]*(r-1)-r+i)/2)},xj=(e,t,r,n,i)=>{i==null&&(i=Lie(e,t[0],n[0]));let a=[0,0,0,r];for(let s=0;s<3;s++)e[s]+2*i>=t[s]&&(a[s]=Math.trunc((e[s]-t[s]+2*i)/n[s]+1));return a},jie=(e,t,r,n,i,a,s,o,l,u)=>{let c,d,f,h;if(e==="VALID"&&(e=0),typeof e=="number"){c={top:e,bottom:e,left:e,right:e,front:e,back:e};let p=xj([t,r,n,1],[o,l,u],1,[i,a,s],e);d=p[0],f=p[1],h=p[2]}else if(Array.isArray(e)){if(!e.every((m,_,y)=>m===y[0]))throw Error(`Unsupported padding parameter: ${e}`);c={top:e[0],bottom:e[1],left:e[2],right:e[3],front:e[4],back:e[5]};let p=xj([t,r,n,1],[o,l,u],1,[i,a,s],e[0]);d=p[0],f=p[1],h=p[2]}else if(e==="SAME_UPPER"){d=Math.ceil(t/i),f=Math.ceil(r/a),h=Math.ceil(n/s);
vendor: 4,691 bytes, lines 1803-1854
1803let p=(d-1)*i+o-t,m=(f-1)*a+l-r,_=(h-1)*s+u-n,y=Math.floor(p/2),v=p-y,b=Math.floor(m/2),w=m-b,x=Math.floor(_/2),E=_-x;c={top:b,bottom:w,left:x,right:E,front:y,back:v}}else throw Error(`Unknown padding parameter: ${e}`);return{padInfo:c,outDepth:d,outHeight:f,outWidth:h}},xEe=(e,t,r,n,i,a=!1,s="channelsLast")=>{let o,l,u,c,d;if(s==="channelsLast")[o,l,u,c,d]=e;else if(s==="channelsFirst")[o,d,l,u,c]=e;else throw new Error(`Unknown dataFormat ${s}`);let[f,,h,p,m]=t,[_,y,v]=wj(r),[b,w,x]=wj(n),E=q2(h,b),T=q2(p,w),S=q2(m,x),{padInfo:A,outDepth:C,outHeight:k,outWidth:M}=jie(i,l,u,c,_,y,v,E,T,S),D=a?f*d:f,$=[0,0,0,0,0];return s==="channelsFirst"?$=[o,D,C,k,M]:s==="channelsLast"&&($=[o,C,k,M,D]),{batchSize:o,dataFormat:s,inDepth:l,inHeight:u,inWidth:c,inChannels:d,outDepth:C,outHeight:k,outWidth:M,outChannels:D,padInfo:A,strideDepth:_,strideHeight:y,strideWidth:v,filterDepth:h,filterHeight:p,filterWidth:m,effectiveFilterDepth:E,effectiveFilterHeight:T,effectiveFilterWidth:S,dilationDepth:b,dilationHeight:w,dilationWidth:x,inShape:e,outShape:$,filterShape:t}},EEe=(e,t,r,n,i,a)=>{let s=a==="channelsLast";s?e[0].dims[3]:e[0].dims[1];let o=[64,1,1],l={x:r.map((_,y)=>y)},u=[Math.ceil(Die(l.x.map(_=>r[_]))/o[0]),1,1];ti("verbose",()=>`[conv3d_naive_webgpu] dispatch = ${u}`);let c=1,d=yt.size(r),f=[{type:12,data:d},{type:12,data:n},{type:12,data:i},{type:12,data:t.strides},{type:12,data:t.dilations}];Kv(t,f),f.push(...zr(e[0].dims,e[1].dims));let h=["rank","rank"],p=e.length===3;p&&(f.push(...zr(e[2].dims)),h.push("rank")),f.push(...zr(r));let m=_=>{let y=[{name:"output_size",type:"u32"},{name:"filter_dims",type:"u32",length:n.length},{name:"pads",type:"u32",length:i.length},{name:"strides",type:"u32",length:t.strides.length},{name:"dilations",type:"u32",length:t.dilations.length}];Yv(t,y);let v=1,b=zo(e[0].dataType),w=Et("x",e[0].dataType,e[0].dims.length,c),x=Et("W",e[1].dataType,e[1].dims.length,v),E=[w,x],T=Mr("result",e[0].dataType,r.length,v),S="";if(p){let k=Et("bias",e[2].dataType,e[2].dims.length,v);E.push(k),S+=` 1804 fn getBiasByOutputCoords(coords : array<u32, 5>) -> ${b} { 1805 return bias[${s?Rr("coords",4,5):Rr("coords",1,5)}]; 1806 }`}let A=Zo(c,b),C=qv(t,A,b);return` 1807 ${S} 1808 fn getX(d0 : u32, d1 : u32, d2 : u32, d3 : u32, d4 : u32) -> f32 { 1809 let aIndices = array<u32, 5>(d0, d1, d2, d3, d4); 1810 return ${w.getByIndices("aIndices")}; 1811 } 1812 fn getW(d0 : u32, d1 : u32, d2 : u32, d3 : u32, d4 : u32) -> f32 { 1813 let aIndices = array<u32, 5>(d0, d1, d2, d3, d4); 1814 return ${x.getByIndices("aIndices")}; 1815 } 1816 ${_.registerUniforms(y).declareVariables(...E,T)} 1817 ${_.mainStart()} 1818 ${_.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 1819 let coords = ${T.offsetToIndices("global_idx")}; 1820 let batch = ${Rr("coords",0,w.rank)}; 1821 let d2 = ${s?Rr("coords",w.rank-1,w.rank):Rr("coords",1,w.rank)}; 1822 let xFRCCorner = vec3<u32>(${s?Rr("coords",1,w.rank):Rr("coords",2,w.rank)}, 1823 ${s?Rr("coords",2,w.rank):Rr("coords",3,w.rank)}, 1824 ${s?Rr("coords",3,w.rank):Rr("coords",4,w.rank)}) * uniforms.strides - uniforms.pads; 1825 let xFCorner = xFRCCorner.x; 1826 let xRCorner = xFRCCorner.y; 1827 let xCCorner = xFRCCorner.z; 1828 let xShapeY = ${s?Rr("uniforms.x_shape",1,w.rank):Rr("uniforms.x_shape",2,w.rank)}; 1829 let xShapeZ = ${s?Rr("uniforms.x_shape",2,w.rank):Rr("uniforms.x_shape",3,w.rank)}; 1830 let xShapeW = ${s?Rr("uniforms.x_shape",3,w.rank):Rr("uniforms.x_shape",4,w.rank)}; 1831 let xShapeU = ${s?Rr("uniforms.x_shape",4,w.rank):Rr("uniforms.x_shape",1,w.rank)}; 1832 let inputDepthNearestVec4 = (xShapeU / 4) * 4; 1833 let inputDepthVec4Remainder = xShapeU % 4; 1834 1835 var value = 0.0; 1836 for (var wF = 0u; wF < uniforms.filter_dims[0]; wF++) { 1837 let xF = xFCorner + wF * uniforms.dilations[0]; 1838 if (xF < 0 || xF >= xShapeY) { 1839 continue; 1840 } 1841 1842 for (var wR = 0u; wR < uniforms.filter_dims[1]; wR++) { 1843 let xR = xRCorner + wR * uniforms.dilations[1]; 1844 if (xR < 0 || xR >= xShapeZ) { 1845 continue; 1846 } 1847 1848 for (var wC = 0u; wC < uniforms.filter_dims[2]; wC++) { 1849 let xC = xCCorner + wC * uniforms.dilations[2]; 1850 if (xC < 0 || xC >= xShapeW) { 1851 continue; 1852 } 1853 1854 for (var d1 = 0u;
1854 d1 < inputDepthNearestVec4; d1 += 4) { 1855 ${s?`let xValues = vec4<f32>( 1856 getX(batch, xF, xR, xC, d1), 1857 getX(batch, xF, xR, xC, d1 + 1), 1858 getX(batch, xF, xR, xC, d1 + 2), 1859 getX(batch, xF, xR, xC, d1 + 3)); 1860 `:`let xValues = vec4<f32>( 1861 getX(batch, d1, xF, xR, xC), 1862 getX(batch, d1 + 1, xF, xR, xC), 1863 getX(batch, d1 + 2, xF, xR, xC), 1864 getX(batch, d1 + 3, xF, xR, xC)); 1865 `} 1866 let wValues = vec4<f32>( 1867 getW(d2, d1, wF, wR, wC), 1868 getW(d2, d1 + 1, wF, wR, wC), 1869 getW(d2, d1 + 2, wF, wR, wC), 1870 getW(d2, d1 + 3, wF, wR, wC)); 1871 value += dot(xValues, wValues); 1872 } 1873 if (inputDepthVec4Remainder == 1) { 1874 ${s?`value += getX(batch, xF, xR, xC, inputDepthNearestVec4) 1875 * getW(d2, inputDepthNearestVec4, wF, wR, wC);`:`value += getX(batch, inputDepthNearestVec4, xF, xR, xC) 1876 * getW(d2, inputDepthNearestVec4, wF, wR, wC);`} 1877 } else if (inputDepthVec4Remainder == 2) { 1878 ${s?`let xValues = vec2<f32>( 1879 getX(batch, xF, xR, xC, inputDepthNearestVec4), 1880 getX(batch, xF, xR, xC, inputDepthNearestVec4 + 1)); 1881 `:`let xValues = vec2<f32>( 1882 getX(batch, inputDepthNearestVec4, xF, xR, xC), 1883 getX(batch, inputDepthNearestVec4 + 1, xF, xR, xC)); 1884 `} 1885 let wValues = vec2<f32>( 1886 getW(d2, inputDepthNearestVec4, wF, wR, wC), 1887 getW(d2, inputDepthNearestVec4 + 1, wF, wR, wC)); 1888 value += dot(xValues, wValues); 1889 } else if (inputDepthVec4Remainder == 3) { 1890 ${s?`let xValues = vec3<f32>( 1891 getX(batch, xF, xR, xC, inputDepthNearestVec4), 1892 getX(batch, xF, xR, xC, inputDepthNearestVec4 + 1), 1893 getX(batch, xF, xR, xC, inputDepthNearestVec4 + 2)); 1894 `:`let xValues = vec3<f32>( 1895 getX(batch, inputDepthNearestVec4, xF, xR, xC), 1896 getX(batch, inputDepthNearestVec4 + 1, xF, xR, xC), 1897 getX(batch, inputDepthNearestVec4 + 2, xF, xR, xC)); 1898 `} 1899 let wValues = vec3<f32>( 1900 getW(d2, inputDepthNearestVec4, wF, wR, wC), 1901 getW(d2, inputDepthNearestVec4 + 1, wF, wR, wC), 1902 getW(d2, inputDepthNearestVec4 + 2, wF, wR, wC)); 1903 value += dot(xValues, wValues); 1904 } 1905 } 1906 } 1907 } 1908 ${p?"value = value + getBiasByOutputCoords(coords)":""}; 1909 ${C} 1910 result[global_idx] = f32(value); 1911 }`};return{name:"Conv3DNaive",shaderCache:{hint:`${t.cacheKey};${s};${c};${p}`,inputDependencies:h},getRunData:()=>({outputs:[{dims:r,dataType:e[0].dataType}],dispatchGroup:{x:u[0],y:u[1],z:u[2]},programUniforms:f}),getShaderSource:m}}}),TEe,SEe,Fbt=Wt(()=>{tn(),_n(),xn(),m_(),TEe=(e,t,r,n)=>{let i=e.length>2,a=i?"value += b[output_channel];":"",s=e[0].dims,o=e[1].dims,l=t.format==="NHWC",u=l?r[3]:r[1],c=u/t.group,d=l&&c>=4?ss(u):1,f=yt.size(r)/d,h=[{type:12,data:f},{type:12,data:t.dilations},{type:12,data:[t.strides[0],t.strides[1]]},{type:12,data:[t.pads[0],t.pads[1]]},{type:12,data:c}];Kv(t,h),h.push(...zr(s,[o[0],o[1],o[2],o[3]/d]));let p=i?["rank","rank","rank"]:["rank","rank"];h.push(...zr([r[0],r[1],r[2],r[3]/d]));let m=_=>{let y=Mr("output",e[0].dataType,r.length,d),v=zo(y.type.tensor),b=qv(t,y.type.value,v),w=Et("x",e[0].dataType,s.length),x=Et("w",e[1].dataType,o.length,d),E=[w,x];i&&E.push(Et("b",e[2].dataType,e[2].dims,d));let T=[{name:"output_size",type:"u32"},{name:"dilations",type:"u32",length:t.dilations.length},{name:"strides",type:"u32",length:2},{name:"pads",type:"u32",length:2},{name:"output_channels_per_group",type:"u32"}];Yv(t,T);let S=l?` 1912 for (var wHeight: u32 = 0u; wHeight < uniforms.w_shape[0]; wHeight++) { 1913 let xHeight = xRCCorner.x + wHeight * uniforms.dilations[0]; 1914 1915 if (xHeight < 0u || xHeight >= uniforms.x_shape[1]) { 1916 continue; 1917 } 1918 1919 for (var wWidth: u32 = 0u; wWidth < uniforms.w_shape[1]; wWidth++) { 1920 let xWidth = xRCCorner.y + wWidth * uniforms.dilations[1]; 1921 if (xWidth < 0u || xWidth >= uniforms.x_shape[2]) { 1922 continue; 1923 } 1924 1925 for (var wInChannel: u32 = 0u; wInChannel < uniforms.w_shape[2]; wInChannel++) { 1926 let input_channel = in_channel_offset + wInChannel; 1927 let xVal = ${w.get("batch","xHeight","xWidth","input_channel")}; 1928 let wVal = ${x.get("wHeight","wWidth","wInChannel","output_channel")}; 1929 value += xVal * wVal; 1930 } 1931 } 1932 } 1933 `:` 1934 for (var wInChannel: u32 = 0u; wInChannel < uniforms.w_shape[1]; wInChannel++) { 1935 let input_channel = in_channel_offset + wInChannel; 1936 for (var wHeight: u32 = 0u; wHeight < uniforms.w_shape[2]; wHeight++) { 1937 let xHeight = xRCCorner.x + wHeight * uniforms.dilations[0]; 1938 1939 if (xHeight < 0u || xHeight >= uniforms.x_shape[2]) { 1940 continue; 1941 } 1942 1943 for (var wWidth: u32 = 0u; wWidth < uniforms.w_shape[3]; wWidth++) { 1944 let xWidth = xRCCorner.y + wWidth * uniforms.dilations[1]; 1945 if (xWidth < 0u || xWidth >= uniforms.x_shape[3]) { 1946 continue; 1947 } 1948 1949 let xVal = ${w.get("batch","input_channel","xHeight","xWidth")}; 1950 let wVal = ${x.get("output_channel","wInChannel","wHeight","wWidth")}; 1951 value += xVal * wVal; 1952 } 1953 } 1954 } 1955 `;return` 1956 ${_.registerUniforms(T).declareVariables(...E,y)} 1957 1958 ${_.mainStart()} 1959 ${_.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 1960 1961 let outputIndices = ${y.offsetToIndices("global_idx")}; 1962 let batch: u32 = outputIndices[0]; 1963 let output_channel: u32 = outputIndices[${l?3:1}]; 1964 let xRCCorner: vec2<u32> = vec2<u32>(outputIndices[${l?1:2}
1964], outputIndices[${l?2:3}]) * uniforms.strides - uniforms.pads; 1965 let group_id: u32 = output_channel * ${d} / uniforms.output_channels_per_group; 1966 var in_channel_offset = group_id * uniforms.w_shape[${l?2:1}]; 1967 1968 var value: ${y.type.value} = ${y.type.value}(0); 1969 ${S} 1970 ${a} 1971 ${b} 1972 ${y.setByOffset("global_idx","value")} 1973 }`};return{name:"GroupedConv",shaderCache:{hint:`${t.cacheKey}_${d}`,inputDependencies:p},getRunData:()=>({outputs:[{dims:n?n(r):r,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(f/64)},programUniforms:h}),getShaderSource:m}},SEe=(e,t,r,n)=>{let i=e.length>2,a=ss(r[3]),s=ss(r[2]),o=yt.size(r)/a/s,l=[e[0].dims[0],e[0].dims[1],e[0].dims[2],e[0].dims[3]/a],u=[e[1].dims[0],e[1].dims[1],e[1].dims[2],e[1].dims[3]/a],c=[r[0],r[1],r[2],r[3]/a],d=[{type:12,data:o},{type:6,data:[t.strides[0],t.strides[1]]},{type:6,data:[t.pads[0],t.pads[1]]}];Kv(t,d),d.push(...zr(l,u,c));let f=(s-1)*t.strides[1]+u[1],h=p=>{let m=Mr("output",e[0].dataType,c.length,a),_=zo(m.type.tensor),y=qv(t,m.type.value,_),v=Et("x",e[0].dataType,l.length,a),b=Et("w",e[1].dataType,u.length,a),w=[v,b];i&&w.push(Et("b",e[2].dataType,e[2].dims,a));let x=i?"value += b[output_channel];":"",E=[{name:"output_size",type:"u32"},{name:"strides",type:"i32",length:2},{name:"pads",type:"i32",length:2}];return Yv(t,E),` 1974 ${p.registerUniforms(E).declareVariables(...w,m)} 1975 ${p.mainStart()} 1976 ${p.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 1977 let width0 = uniforms.output_shape[3]; 1978 let output_channel = global_idx % width0; 1979 var index1 = global_idx / width0; 1980 let width1 = uniforms.output_shape[2] / ${s}u; 1981 let col = (index1 % width1) * ${s}u; 1982 index1 = index1 / width1; 1983 let row = index1 % uniforms.output_shape[1]; 1984 let batch = index1 / uniforms.output_shape[1]; 1985 1986 let x_corner = vec2<i32>(i32(row), i32(col)) * uniforms.strides - uniforms.pads; 1987 1988 var x_vals: array<${v.type.value}, ${f}>; 1989 var values: array<${m.type.value}, ${s}>; 1990 let input_channel = output_channel; 1991 // Use constant instead of uniform can give better performance for w's height/width. 1992 for (var w_height: u32 = 0u; w_height < ${u[0]}; w_height++) { 1993 let x_height = x_corner.x + i32(w_height); 1994 if (x_height >= 0 && u32(x_height) < uniforms.x_shape[1]) { 1995 for (var i = 0; i < ${f}; i++) { 1996 let x_width = x_corner.y + i; 1997 if (x_width >= 0 && u32(x_width) < uniforms.x_shape[2]) { 1998 x_vals[i] = ${v.get("batch","u32(x_height)","u32(x_width)","input_channel")}; 1999 } else { 2000 x_vals[i] = ${v.type.value}(0); 2001 } 2002 } 2003 for (var w_width: u32 = 0u; w_width < ${u[1]}; w_width++) { 2004 let w_val = ${b.get("w_height","w_width","0","output_channel")}; 2005 for (var i = 0u; i < ${s}u; i++) { 2006 values[i] = fma(x_vals[i * u32(uniforms.strides[1]) + w_width], w_val, values[i]); 2007 } 2008 } 2009 } 2010 } 2011 2012 for (var i = 0u; i < ${s}u; i++) { 2013 var value = values[i]; 2014 ${x} 2015 ${y} 2016 ${m.set("batch","row","col + i","output_channel","value")}; 2017 } 2018 }`};return{name:"GroupedConv-Vectorize",shaderCache:{hint:`${t.cacheKey};${a};${s};${f};${u[0]};${u[1]}`,inputDependencies:i?["rank","rank","type"]:["rank","rank"]},getRunData:()=>({outputs:[{dims:n?n(r):r,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(o/64)},programUniforms:d}),getShaderSource:h}}}),Rie,LM,$ie,jM,iB,Ej,Fie,Bie,aB,Bbt=Wt(()=>{_n(),Rbt(),$bt(),yW(),Fbt(),m_(),gW(),E0(),Rie=(e,t,r,n,i,a)=>{let s=e[0],o=e.slice(a?1:2,a?3:4),l=o.length,u=t[0],c=t.slice(2).map((f,h)=>f+(f-1)*(r[h]-1)),d=o.map((f,h)=>f+n[h]+n[h+l]).map((f,h)=>Math.floor((f-c[h]+i[h])/i[h]));return d.splice(0,0,s),d.splice(a?3:1,0,u),d},LM=[2,3,1,0],$ie=(e,t)=>{if(!e||e.length!==2&&e.length!==3)throw new Error("Conv requires 2 or 3 inputs");if(e[0].dims.length>5)throw new Error("greater than 5D is not supported");if(e[0].dims.length!==e[1].dims.length)throw new Error("filter does not have same dimension as input");let r=e[0].dims[t.format==="NHWC"?e[0].dims.length-1:1],n=e[1].dims[1]*t.group;if(r!==n)throw new Error("FILTER_IN_CHANNEL should be equal to DATA_CHANNEL");if(e.length===3&&(e[2].dims.length!==1||e[1].dims[0]!==e[2].dims[
vendor: 6,982 bytes, lines 2018-2036
20180]))throw new Error("invalid bias");let i=e[0].dims.length-2;if(t.dilations.length!==i)throw new Error(`dilations should be ${i}D`);if(t.strides.length!==i)throw new Error(`strides should be ${i}D`);if(t.pads.length!==i*2)throw new Error(`pads should be ${i*2}D`);if(t.kernelShape.length!==0&&t.kernelShape.length!==e[1].dims.length-2)throw new Error("invalid kernel shape")},jM=(e,t)=>{let r=e.kernelShape.slice();r.length<t[1].dims.length-2&&r.push(...Array(t[1].dims.length-2-r.length).fill(0));for(let a=2;a<t[1].dims.length;++a)r[a-2]===0&&(r[a-2]=t[1].dims[a]);let n=e.pads.slice();yO.adjustPadsBasedOnAutoPad(t[0].dims,e.strides,e.dilations,r,n,e.format==="NHWC",e.autoPad);let i=Object.assign({},e);return Object.assign(i,{kernelShape:r,pads:n}),i},iB=e=>{let t=hW(e),r=e.format,n=["NOTSET","VALID","SAME_UPPER","SAME_LOWER"][e.auto_pad],i=e.dilations,a=e.group,s=e.kernel_shape,o=e.pads,l=e.strides,u=e.w_is_const();return{autoPad:n,format:r,dilations:i,group:a,kernelShape:s,pads:o,strides:l,wIsConst:u,...t,cacheKey:`${e.format};${t.activation};`}},Ej=(e,t,r,n)=>{let i=r.format==="NHWC",a=Rie(t[0].dims,t[1].dims,r.dilations,r.pads,r.strides,i);if(r.group!==1){let E=[t[0]];if(i){let T=e.kernelCustomData.wT??e.compute(Jc(t[1],LM),{inputs:[1],outputs:[r.wIsConst?-2:-1]})[0];r.wIsConst&&!e.kernelCustomData.wT&&(e.kernelCustomData.wT=T),E.push(T)}else E.push(t[1]);t.length===3&&E.push(t[2]),!e.adapterInfo.isArchitecture("ampere")&&i&&t[1].dims[0]===r.group&&t[1].dims[1]===1&&r.dilations[0]===1&&r.dilations[1]===1?e.compute(SEe(E,r,a,n),{inputs:E}):e.compute(TEe(E,r,a,n),{inputs:E});return}let s=t.length===3,o=t[0].dims[i?1:2],l=t[0].dims[i?2:3],u=t[0].dims[i?3:1],c=t[1].dims[2],d=t[1].dims[3],f=a[i?1:2],h=a[i?2:3],p=a[i?3:1],m=i&&c===o&&d===l&&r.pads[0]===0&&r.pads[1]===0;if(m||c===1&&d===1&&r.dilations[0]===1&&r.dilations[1]===1&&r.strides[0]===1&&r.strides[1]===1&&r.pads[0]===0&&r.pads[1]===0){let E=a[0],T,S,A,C=[];if(i){let D=e.kernelCustomData.wT??e.compute(Jc(t[1],LM),{inputs:[1],outputs:[r.wIsConst?-2:-1]})[0];if(r.wIsConst&&!e.kernelCustomData.wT&&(e.kernelCustomData.wT=D),m){let $=o*l*u;T=t[0].reshape([1,E,$]),S=D.reshape([1,$,p]),A=[1,E,p]}else T=t[0].reshape([E,o*l,u]),S=D.reshape([1,u,p]),A=[E,f*h,p];C.push(T),C.push(S)}else T=t[0].reshape([E,u,o*l]),S=t[1].reshape([1,p,u]),A=[E,p,f*h],C.push(S),C.push(T);s&&C.push(t[2]);let k=A[2],M=C[0].dims[C[0].dims.length-1];k<8&&M<8?e.compute(mW(C,r,a,A,i,n),{inputs:C}):e.compute(_O(C,r,a,A,i,n),{inputs:C});return}let _=!0,y=e.kernelCustomData.wT??e.compute(Jc(t[1],LM),{inputs:[1],outputs:[r.wIsConst?-2:-1]})[0];r.wIsConst&&!e.kernelCustomData.wT&&(e.kernelCustomData.wT=y);let v=[t[0],y];s&&v.push(t[2]);let b=i?f*h:p,w=i?p:f*h,x=c*d*u;e.compute(wEe(v,r,a,b,w,x,s,_,n),{inputs:v})},Fie=(e,t)=>{let r=t.format==="NHWC",n=[e.inputs[0].reshape(r?[e.inputs[0].dims[0],1,e.inputs[0].dims[1],e.inputs[0].dims[2]]:[e.inputs[0].dims[0],e.inputs[0].dims[1],1,e.inputs[0].dims[2]]),e.inputs[1].reshape([e.inputs[1].dims[0],e.inputs[1].dims[1],1,e.inputs[1].dims[2]])];e.inputs.length===3&&n.push(e.inputs[2]);let i=[0,t.pads[0],0,t.pads[1]],a=[1].concat(t.strides),s=[1].concat(t.dilations),o=[1].concat(t.kernelShape),l=jM({...t,pads:i,strides:a,dilations:s,kernelShape:o},n);Ej(e,n,l,u=>r?[u[0],u[2],u[3]]:[u[0],u[1],u[3]])},Bie=(e,t,r)=>{let n=r.format==="NHWC"?"channelsLast":"channelsFirst",i=jM(r,t),a=r.autoPad==="NOTSET"?r.pads:r.autoPad,s=xEe(t[0].dims,t[1].dims,r.strides,r.dilations,a,!1,n);e.compute(EEe(t,i,s.outShape,[s.filterDepth,s.filterHeight,s.filterWidth],[s.padInfo.front,s.padInfo.top,s.padInfo.left],n))},aB=(e,t)=>{if($ie(e.inputs,t),e.inputs[0].dims.length===3)Fie(e,t);else if(e.inputs[0].dims.length===5)Bie(e,e.inputs,t);else{let r=jM(t,e.inputs);Ej(e,e.inputs,r)}}}),AEe,zbt=Wt(()=>{tn(),ym(),_n(),xn(),AEe=(e,t,r)=>{let n=e.length>2,i=t.outputShape,a=t.format==="NHWC",s=t.group,o=e[1].dims,l=o[2]/s,u=o[3],c=a?ss(l):1,d=a&&u===1&&l>=4,f=d?Math.floor(l/4)*4:Math.floor(l/c)*c,h=l-f,p=a?ss(u):1,m=a?u===1?c:p:1,_=yt.size(i)/p,y=[Math.ceil(_/64),1,1];ti("verbose",()=>`[conv2d_backprop_webgpu] dispatch = ${y}`);let v=["rank","rank"],b=[t.strides[0],t.strides[1]],w=[t.kernelShape[a?1:2],t.kernelShape[a?2:3]],x=[t.dilations[0],t.dilations[1]],E=[w[0]+(t.dilations[0]<=1?0:(t.kernelShape[a?1:2]-1)*(t.dilations[0]-1)),w[1]+(t.dilations[1]<=1?0:(t.kernelShape[a?2:3]-1)*(t.dilations[1]-1))],T=[E[0]-1-Math.floor((t.pads[0]+t.pads[2])/2),E[1]-1-Math.floor((t.pads[1]+t.pads[3])/2)],S=[{type:12,data:_},{type:12,data:b},{type:12,data:w},{type:12,data:x},{type:12,data:E},{type:6,data:T},{type:12,data:f},{type:12,data:l},{type:12,data:u},...zr(e[0].dims,e[1].dims)];n&&(S.push(...zr(e[2].dims)),v.push("rank")),S.push(...zr(i));let A=C=>{let k=[{name:"output_size",type:"u32"},{name:"strides",type:"u32",length:b.length},{name:"filter_dims",type:"u32",length:w.length},{name:"dilations",type:"u32",length:w.length},{name:"effective_filter_dims",type:"u32",length:E.length},{name:"pads",type:"i32",length:T.length},{name:"input_channels_per_group_int",type:"u32"},{name:"input_channels_per_group",type:"u32"},{name:"output_channels_per_group",type:"u32"}],M=zo(e[0].dataType),D=a?1:2,$=a?2:3,V=a?3:1,U=Et("W",e[1].dataType,e[1].dims.length,m),B=Et("Dy",e[0].dataType,e[0].dims.length,c),z=[B,U];n&&z.push(Et("bias",e[2].dataType,[i[V]].length,p));let q=Mr("result",e[0].dataType,i.length,p),L=()=>{let N="";if(d)c===4?N+=` 2019 let xValue = ${B.getByOffset("x_offset")}; 2020 let wValue = ${U.getByOffset("w_offset")}; 2021 dotProd = dotProd + dot(xValue, wValue); 2022 x_offset += 1u; 2023 w_offset += 1u;`:c===2?N+=` 2024 dotProd = dotProd + dot(vec4<${M}>(${B.getByOffset("x_offset")}, ${B.getByOffset("x_offset + 1u")}), vec4<${M}>(${U.getByOffset("w_offset")}, ${U.getByOffset("w_offset + 1u")})); 2025 x_offset += 2u; 2026 w_offset += 2u;`:c===1&&(N+=` 2027 dotProd = dotProd + dot(vec4<${M}>(${B.getByOffset("x_offset")}, ${B.getByOffset("x_offset + 1u")}, ${B.getByOffset("x_offset + 2u")}, ${B.getByOffset("x_offset + 3u")}), vec4<${M}>(${U.getByOffset("w_offset")}, ${U.getByOffset("w_offset + 1u")}, ${U.getByOffset("w_offset + 2u")}, ${U.getByOffset("w_offset + 3u")})); 2028 x_offset += 4u; 2029 w_offset += 4u;`);else if(N+=` 2030 let xValue = ${a?B.getByOffset(`${B.indicesToOffset(`${B.type.indices}(batch, idyR, idyC, inputChannel)`)} / ${c}`):B.get("batch","inputChannel","idyR","idyC")}; 2031 `,c===1)N+=` 2032 let w_offset = ${U.indicesToOffset(`${U.type.indices}(u32(wRPerm), u32(wCPerm), inputChannel, wOutChannel)`)}; 2033 let wValue = ${U.getByOffset(`w_offset / ${m}`)}; 2034 dotProd = dotProd + xValue * wValue;`;else for(let X=0;X<c;X++)N+=` 2035 let wValue${X} = ${U.getByOffset(`${U.indicesToOffset(`${U.type.indices}(u32(wRPerm), u32(wCPerm), inputChannel + ${X}, wOutChannel)`)} / ${m}`)}; 2036 dotProd = dotProd + xValue[${X}] * wValue${X};`;return N},K=()=>
2036{if(h===0)return"";if(!d)throw new Error(`packInputAs4 ${d} is not true.`);let N="";if(c===1){N+="dotProd = dotProd";for(let X=0;X<h;X++)N+=` 2037 + ${B.getByOffset(`x_offset + ${X}`)} * ${U.getByOffset(`w_offset + ${X}`)}`;N+=";"}else if(c===2){if(h!==2)throw new Error(`Invalid inputChannelsRemainder ${h}.`);N+=` 2038 let xValue = ${B.getByOffset("x_offset")}; 2039 let wValue = ${U.getByOffset("w_offset")}; 2040 dotProd = dotProd + dot(xValue, wValue);`}return N},O=` 2041 let outputIndices = ${q.offsetToIndices(`global_idx * ${p}`)}; 2042 let batch = ${q.indicesGet("outputIndices",0)}; 2043 let d1 = ${q.indicesGet("outputIndices",V)}; 2044 let r = ${q.indicesGet("outputIndices",D)}; 2045 let c = ${q.indicesGet("outputIndices",$)}; 2046 let dyCorner = vec2<i32>(i32(r), i32(c)) - uniforms.pads; 2047 let dyRCorner = dyCorner.x; 2048 let dyCCorner = dyCorner.y; 2049 let groupId = d1 / uniforms.output_channels_per_group; 2050 let wOutChannel = d1 - groupId * uniforms.output_channels_per_group; 2051 // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1). 2052 // ? = to be determined. : = across all values in that axis. 2053 var dotProd = ${q.type.value}(0.0); 2054 var wR: u32 = 0; 2055 if (uniforms.dilations.x == 1) { 2056 // Minimum wR >= 0 that satisfies (dyRCorner + wR) % (uniforms.strides.x) == 0 2057 wR = u32(((dyRCorner + i32(uniforms.strides.x) - 1) / i32(uniforms.strides.x)) * i32(uniforms.strides.x) - dyRCorner); 2058 } 2059 for (; wR < uniforms.effective_filter_dims.x; wR = wR + 1) { 2060 if (wR % uniforms.dilations.x != 0) { 2061 continue; 2062 } 2063 let dyR = (${M}(dyRCorner) + ${M}(wR)) / ${M}(uniforms.strides[0]); 2064 let wRPerm = uniforms.filter_dims.x - 1 - wR / uniforms.dilations.x; 2065 if (dyR < 0.0 || dyR >= ${M}(uniforms.Dy_shape[${D}]) || fract(dyR) > 0.0 || 2066 wRPerm < 0) { 2067 continue; 2068 } 2069 let idyR: u32 = u32(dyR); 2070 var wC: u32 = 0; 2071 if (uniforms.dilations.y == 1) { 2072 // Minimum wC >= 0 that satisfies (dyCCorner + wC) % (uniforms.strides.y) == 0 2073 wC = u32(((dyCCorner + i32(uniforms.strides.y) - 1) / i32(uniforms.strides.y)) * i32(uniforms.strides.y) - dyCCorner); 2074 } 2075 for (; wC < uniforms.effective_filter_dims.y; wC = wC + 1) { 2076 if (wC % uniforms.dilations.y != 0) { 2077 continue; 2078 } 2079 let dyC = (${M}(dyCCorner) + ${M}(wC)) / ${M}(uniforms.strides.y); 2080 let wCPerm = uniforms.filter_dims.y - 1 - wC / uniforms.dilations.y; 2081 if (dyC < 0.0 || dyC >= ${M}(uniforms.Dy_shape[${$}]) || 2082 fract(dyC) > 0.0 || wCPerm < 0) { 2083 continue; 2084 } 2085 let idyC: u32 = u32(dyC); 2086 var inputChannel = groupId * uniforms.input_channels_per_group; 2087 ${d?` 2088 var x_offset = ${B.indicesToOffset(`${B.type.indices}(batch, idyR, idyC, inputChannel)`)} / ${c}; 2089 var w_offset = ${U.indicesToOffset(`${U.type.indices}(wRPerm, wCPerm, inputChannel, wOutChannel)`)} / ${m}; 2090 `:""} 2091 for (var d2: u32 = 0; d2 < uniforms.input_channels_per_group_int; d2 = d2 + ${d?4:c}) { 2092 ${L()} 2093 inputChannel = inputChannel + ${d?4:c}; 2094 } 2095 ${K()} 2096 wC = wC + uniforms.strides.y - 1; 2097 } 2098 wR = wR + uniforms.strides[0] - 1; 2099 } 2100 let value = dotProd${n?` + bias[d1 / ${p}]`:""}; 2101 ${q.setByOffset("global_idx","value")}; 2102 `;return` 2103 ${C.registerUniforms(k).declareVariables(...z,q)} 2104 ${C.mainStart()} 2105 ${C.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")}; 2106 ${O}}`};
vendor: 21,375 bytes, lines 2106-2236
2106return{name:"ConvTranspose2D",shaderCache:{hint:`${t.cacheKey};${c}${m}${p}${d}${h}`,inputDependencies:v},getRunData:()=>({dispatchGroup:{x:y[0],y:y[1],z:y[2]},outputs:[{dims:r?r(i):i,dataType:e[0].dataType}],programUniforms:S}),getShaderSource:A}}}),zie,Uie,Wie,Tj,CEe,Vie,Sj,Hie,PEe,Ubt=Wt(()=>{zbt(),m_(),E0(),zie=(e,t,r,n,i,a)=>(e-1)*t+r+(n-1)*i+1-a,Uie=(e,t,r,n,i)=>{let a=Math.floor(e/2);t==="SAME_UPPER"?(r[n]=a,r[i]=e-a):t==="SAME_LOWER"&&(r[n]=e-a,r[i]=a)},Wie=(e,t,r,n,i,a,s,o,l,u)=>{let c=e.length-2,d=u.length===0;l.length<c&&l.push(...Array(c-l.length).fill(0));let f=e[0],h=t[o?3:1]*i;for(let p=0,m=e.length-c-(o?1:0);p<c;++p,++m){let _=e[m],y=d?_*s[p]:u[p],v=zie(_,s[p],a[p],t[m],r[p],y);Uie(v,n,a,p,p+c),d&&u.push(s[p]*(_-1)+l[p]+(t[m]-1)*r[p]+1-a[p]-a[p+c])}u.splice(0,0,f),u.splice(o?3:1,0,h)},Tj=(e,t)=>{let r=e.kernelShape.slice();if(e.kernelShape.length===0||e.kernelShape.reduce((d,f)=>d*f,1)===0){r.length=0;for(let d=2;d<t[1].dims.length;++d)r.push(t[1].dims[d])}let n=e.format==="NHWC";r.splice(0,0,t[1].dims[0]),r.splice(n?3:1,0,t[1].dims[1]);let i=e.pads.slice(),a=e.outputShape.slice(),s=e.outputPadding.slice(),o=t[0].dims,l=e.dilations.slice();if(l.reduce((d,f)=>d+f,0)===0){let d=t[0].dims.length-2;l=new Array(d).fill(1)}let u=e.strides.slice();if(u.reduce((d,f)=>d+f,0)===0){let d=t[0].dims.length-2;u=new Array(d).fill(1)}Wie(o,r,l,e.autoPad,e.group,i,u,n,s,a);let c=Object.assign({},e);return Object.assign(c,{kernelShape:r,pads:i,outputPadding:s,outputShape:a,dilations:l,strides:u}),c},CEe=e=>{let t=hW(e),r=e.format,n=["NOTSET","VALID","SAME_UPPER","SAME_LOWER"][typeof e.autoPad>"u"?0:e.autoPad],i=e.dilations,a=e.group,s=e.kernelShape,o=e.pads,l=e.strides,u=e.wIsConst(),c=e.outputPadding,d=e.outputShape;return{autoPad:n,format:r,dilations:i,group:a,kernelShape:s,outputPadding:c,outputShape:d,pads:o,strides:l,wIsConst:u,...t,cacheKey:`${e.format};${t.activation};`}},Vie=(e,t)=>{if(!e||e.length!==2&&e.length!==3)throw new Error("Conv requires 2 or 3 inputs");if(e[0].dims.length!==4&&e[0].dims.length!==3)throw new Error("currently only support 2-dimensional conv");if(e[0].dims.length!==e[1].dims.length)throw new Error("filter does not have same dimension as input");let r=e[0].dims[t.format==="NHWC"?e[0].dims.length-1:1],n=e[1].dims[0];if(r!==n)throw new Error("FILTER_IN_CHANNEL should be equal to DATA_CHANNEL");let i=e[1].dims[1]*t.group;if(e.length===3&&(e[2].dims.length!==1||e[2].dims[0]!==i))throw new Error("invalid bias");let a=e[0].dims.length-2;if(t.dilations.reduce((s,o)=>s+o,0)>0&&t.dilations.length!==a)throw new Error(`dilations should be ${a}D`);if(t.strides.reduce((s,o)=>s+o,0)>0&&t.strides.length!==a)throw new Error(`strides should be ${a}D`);if(t.pads.reduce((s,o)=>s+o,0)>0&&t.pads.length!==a*2)throw new Error(`pads should be ${a*2}D`);if(t.outputPadding.length!==a&&t.outputPadding.length!==0)throw new Error(`output_padding should be ${a}D`);if(t.kernelShape.reduce((s,o)=>s+o,0)>0&&t.kernelShape.length!==0&&t.kernelShape.length!==e[1].dims.length-2)throw new Error("invalid kernel shape");if(t.outputShape.length!==0&&t.outputShape.length!==e[0].dims.length-2)throw new Error("invalid output shape")},Sj=(e,t,r,n)=>{let i=e.kernelCustomData.wT??e.compute(Jc(t[1],[2,3,0,1]),{inputs:[1],outputs:[r.wIsConst?-2:-1]})[0];r.wIsConst&&!e.kernelCustomData.wT&&(e.kernelCustomData.wT=i);let a=[t[0],i];t.length===3&&a.push(t[2]),e.compute(AEe(a,r,n),{inputs:a})},Hie=(e,t)=>{let r=t.format==="NHWC",n=[e.inputs[0].reshape(r?[e.inputs[0].dims[0],1,e.inputs[0].dims[1],e.inputs[0].dims[2]]:[e.inputs[0].dims[0],e.inputs[0].dims[1],1,e.inputs[0].dims[2]]),e.inputs[1].reshape([e.inputs[1].dims[0],e.inputs[1].dims[1],1,e.inputs[1].dims[2]])];e.inputs.length===3&&n.push(e.inputs[2]);let i=t.kernelShape;(i.length===0||i[0]===0)&&(i=[e.inputs[1].dims[2]]);let a=t.dilations;(a.length===0||a[0]===0)&&(a=[1]);let s=t.strides;(s.length===0||s[0]===0)&&(s=[1]);let o=t.pads;o.length===0&&(o=[0,0]),o=[0,o[0],0,o[1]],s=[1].concat(s),a=[1].concat(a),i=[1].concat(i);let l=t.outputPadding;l=[0].concat(l);let u=Tj({...t,pads:o,strides:s,dilations:a,kernelShape:i,outputPadding:l},n);Sj(e,n,u,c=>r?[c[0],c[2],c[3]]:[c[0],c[1],c[3]])},PEe=(e,t)=>{if(Vie(e.inputs,t),e.inputs[0].dims.length===3)Hie(e,t);else{let r=Tj(t,e.inputs);Sj(e,e.inputs,r)}}}),Gie,MEe,kEe,Wbt=Wt(()=>{tn(),_n(),Cs(),xn(),Gie=(e,t,r,n)=>{let i=yt.size(t),a=t.length,s=Et("input",e,a),o=Mr("output",e,a),l=r.dataType===6?r.getInt32Array()[0]:Number(r.getBigInt64Array()[0]),u=yt.normalizeAxis(l,a),c=d=>{let f=` i32(${s.indicesGet("inputIndices","uniforms.axis")}) `,h=Rr("uniforms.input_shape","uniforms.axis",a),p=n.reverse?f+(n.exclusive?" + 1":""):"0",m=n.reverse?h:f+(n.exclusive?"":" + 1");return` 2107 ${d.registerUniform("outputSize","u32").registerUniform("axis","u32").declareVariables(s,o)} 2108 ${d.mainStart()} 2109 ${d.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 2110 var inputIndices = ${o.offsetToIndices("global_idx")}; 2111 var sum = ${o.type.value}(0); 2112 let first : i32 = ${p}; 2113 let last : i32 = ${m}; 2114 for (var i : i32 = first; i < last; i++) { 2115 ${s.indicesSet("inputIndices","uniforms.axis","u32(i)")}; 2116 sum = sum + ${s.getByIndices("inputIndices")}; 2117 } 2118 ${o.setByOffset("global_idx","sum")}; 2119 }`};return{name:"CumSum",shaderCache:{hint:n.cacheKey,inputDependencies:["rank"]},getRunData:()=>({outputs:[{dims:t,dataType:e}],dispatchGroup:{x:Math.ceil(i/64)},programUniforms:[{type:12,data:i},{type:12,data:u},...zr(t,t)]}),getShaderSource:c}},MEe=(e,t)=>{let r=e.inputs[0].dims,n=e.inputs[0].dataType,i=e.inputs[1];e.compute(Gie(n,r,i,t),{inputs:[0]})},kEe=e=>{let t=e.exclusive===1,r=e.reverse===1;return Mi({exclusive:t,reverse:r})}}),qie,Kie,Yie,OEe,NEe,Vbt=Wt(()=>{tn(),_n(),Cs(),xn(),qie=e=>{if(!e||e.length!==1)throw new Error("DepthToSpace requires 1 input.");if(e[0].dims.length!==4)throw new Error("DepthToSpace requires 4D input.")},Kie=(e,t,r,n)=>{let i=[];i.push(`fn perm(i: ${n.type.indices}) -> ${r.type.indices} { 2120 var a: ${r.type.indices};`);for(let a=0;a<t;++a)i.push(r.indicesSet("a",e[a],`i[${a}]`));return i.push("return a;}"),i.join(` 2121`)},Yie=(e,t)=>{let r,n,i,a,s,o,l=t.format==="NHWC",u=t.blocksize,c=t.mode==="DCR";l?([r,n,i,a]=e.dims,s=c?[r,n,i,u,u,a/u**2]:[r,n,i,a/u**2,u,u],o=c?[0,1,3,2,4,5]:[0,1,4,2,5,3]):([r,n,i,a]=[e.dims[0],e.dims[2],e.dims[3],e.dims[1]],s=c?[r,u,u,a/u**2,n,i]:[r,a/u**2,u,u,n,i],o=c?[0,3,4,1,5,2]:[0,1,4,2,5,3]);let d=e.reshape(s),f=d.dims.length,h=e.dataType,p=Et("a",h,f),m=Mr("output",h,f),_=y=>` 2122 ${y.registerUniform("output_size","u32").declareVariables(p,m)} 2123 2124 ${Kie(o,f,p,m)} 2125 2126 ${y.mainStart()} 2127 ${y.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2128 2129 let indices = ${m.offsetToIndices("global_idx")}; 2130 let aIndices = perm(indices); 2131 2132 ${m.setByOffset("global_idx",p.getByIndices("aIndices"))} 2133 }`;return{name:"DepthToSpace",shaderCache:{hint:`${e.dims};${t.blocksize};${t.mode}`,inputDependencies:["rank"]},getRunData:y=>{let v=l?[r,n*u,i*u,a/u**2]:[r,a/u**2,n*u,i*u],b=yt.size(v),w=d.dims,x=yt.sortBasedOnPerm(w,o);return{outputs:[{dims:v,dataType:y[0].dataType}],dispatchGroup:{x:Math.ceil(b/64)},programUniforms:[{type:12,data:b},...zr(w,x)]}},getShaderSource:_}},OEe=(e,t)=>{qie(e.inputs),e.compute(Yie(e.inputs[0],t))},NEe=e=>Mi({blocksize:e.blocksize,mode:e.mode,format:e.format})}),RM,K2,Aj,Xie,Qie,Zie,Jie,Cj,eae,IEe,DEe,Hbt=Wt(()=>{tn(),_n(),Cs(),xn(),RM="[a-zA-Z]|\\.\\.\\.",K2="("+RM+")+",Aj="^"+K2+"$",Xie="("+K2+",)*"+K2,Qie="^"+Xie+"$",Zie=class{constructor(e=-1){this.symbolToIndices=new Map,this.inputIndex=e}addSymbol(e,t){let r=this.symbolToIndices.get(e);r===void 0?r=[t]:r.push(t),this.symbolToIndices.set(e,r)}},Jie=class{constructor(e,t){var i;this.equation=t,this.hasEllipsis=!1,this.symbolToInfo=new Map,this.lhs=new Array,this.outputDims=[];let[r,n]=t.includes("->")?t.split("->",2):[t,""];if(!r.match(RegExp(Qie)))throw new Error("Invalid LHS term");if(r.split(",").forEach((a,s)=>{let o=e[s].dims.slice();if(!a.match(RegExp(Aj)))throw new Error("Invalid LHS term");let l=this.processTerm(a,!0,o,s);this.lhs.push(l)}),n==="")n+=[...this.symbolToInfo.entries()].filter(([a,s])=>s.count===1||a==="...").map(([a])=>a).join("");else if(!n.match(RegExp(K2)))throw new Error("Invalid RHS");(i=n.match(RegExp(RM,"g")))==null||i.forEach(a=>{if(a==="...")this.outputDims=this.outputDims.concat(this.ellipsisDims);else{let s=this.symbolToInfo.get(a);if(s===void 0)throw new Error("Invalid RHS symbol");this.outputDims.push(s.dimValue)}}),this.rhs=this.processTerm(n,!1,this.outputDims)}addSymbol(e,t,r){let n=this.symbolToInfo.get(e);if(n!==void 0){if(n.dimValue!==t&&n.count!==1)throw new Error("Dimension mismatch");n.count++,n.inputIndices.push(r)}else n={count:1,dimValue:t,inputIndices:[r]};this.symbolToInfo.set(e,n)}processTerm(e,t,r,n=-1){let i=r.length,a=!1,s=[],o=0;if(!e.match(RegExp(Aj))&&!t&&e!=="")throw new Error("Invalid LHS term");let l=e.match(RegExp(RM,"g")),u=new Zie(n);return l==null||l.forEach((c,d)=>{if(c==="..."){if(a)throw new Error("Only one ellipsis is allowed per input term");a=!0;let f=i-l.length+1;if(f<0)throw new Error("Ellipsis out of bounds");if(s=r.slice(o,o+f),this.hasEllipsis){if(this.ellipsisDims.length!==s.length||this.ellipsisDims.toString()!==s.toString())throw new Error("Ellipsis dimensions mismatch")}else if(t)this.hasEllipsis=!0,this.ellipsisDims=s;else throw new Error("Ellipsis must be specified in the LHS");for(let h=0;h<s.length;h++){let p=String.fromCharCode(48+h);u.addSymbol(p,d+h),this.addSymbol(p,r[o++],n)}}else u.addSymbol(c,d+(this.hasEllipsis?this.ellipsisDims.length-1:0)),this.addSymbol(c,r[o++],n)}),u}},Cj=e=>e+"_max",eae=(e,t,r,n)=>{let i=e.map(u=>u.length).map((u,c)=>Et(`input${c}`,t,u)),a=yt.size(n),s=Mr("output",t,n.length),o=[...r.symbolToInfo.keys()].filter(u=>!r.rhs.symbolToIndices.has(u)),l=u=>{let c=[],d="var prod = 1.0;",f="var sum = 0.0;",h="sum += prod;",p=[],m=[],_=[],y=[],v=r.symbolToInfo.size===r.rhs.symbolToIndices.size;r.symbolToInfo.forEach((w,x)=>{var E;if(r.rhs.symbolToIndices.has(x)){let T=(E=r.rhs.symbolToIndices.get(x))==null?void 0:E[0];T!==void 0&&r.lhs.forEach((S,A)=>{if(w.inputIndices.includes(A)){let C=S.symbolToIndices.get(x);if(C===void 0)throw new Error("Invalid symbol error");C.forEach(k=>{c.push(`${i[A].indicesSet(`input${A}Indices`,k,s.indicesGet("outputIndices",T))}`)})}})}else r.lhs.forEach((T,S)=>{if(w.inputIndices.includes(S)){let A=T.symbolToIndices.get(x);if(A===void 0)throw new Error("Invalid symbol error");A.forEach(C=>{p.push(`${i[S].indicesSet(`input${S}Indices`,C,`${x}`)}`)}),y.push(`prod *= ${i[S].getByIndices(`input${S}Indices`)};`)}}),m.push(`for(var ${x}: u32 = 0; ${x} < uniforms.${Cj(x)}; ${x}++) {`),_.push("}")});let b=v?[...c,`let sum = ${i.map((w,x)=>w.getByIndices(`input${x}Indices`)).join(" * ")};`]:[...c,f,...m,...p,d,...y,h,..._];return` 2134 ${u.registerUniforms(o.map(w=>({name:`${Cj(w)}`,type:"u32"}))).registerUniform("outputSize","u32").declareVariables(...i,s)} 2135 2136 ${u.mainStart()} 2137 ${u.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 2138 var outputIndices = ${s.offsetToIndices("global_idx")}; 2139 ${i.map((w,x)=>`var input${x}Indices: ${i[x].type.indices};`).join(` 2140`)} 2141 ${b.join(` 2142`)}; 2143 ${s.setByOffset("global_idx","sum")}; 2144 }`};return{name:"Einsum",shaderCache:{hint:r.equation,inputDependencies:e.map(()=>"rank")},getRunData:()=>{let u=o.filter(d=>r.symbolToInfo.has(d)).map(d=>{var f;return{type:12,data:((f=r.symbolToInfo.get(d))==null?void 0:f.dimValue)||0}});u.push({type:12,data:a});let c=e.map((d,f)=>[...zr(d)]).reduce((d,f)=>d.concat(f),u);return c.push(...zr(n)),{outputs:[{dims:n,dataType:t}],dispatchGroup:{x:Math.ceil(a/64)},programUniforms:c}},getShaderSource:l}},IEe=(e,t)=>{let r=new Jie(e.inputs,t.equation),n=r.outputDims,i=e.inputs.map((a,s)=>a.dims);e.compute(eae(i,e.inputs[0].dataType,r,n))},DEe=e=>{let t=e.equation.replace(/\s+/g,"");return Mi({equation:t})}}),tae,Pj,rae,nae,LEe,Gbt=Wt(()=>{tn(),_n(),xn(),tae=e=>{if(!e||e.length!==2)throw new Error("Expand requires 2 input.");let t=e[0].dims,r=Array.from(e[1].getBigInt64Array(),Number),n=r.length<t.length?0:r.length-t.length,i=t.length<r.length?0:t.length-r.length;for(;n<r.length&&i<t.length;++n,++i)if(r[n]!==t[i]&&r[n]!==1&&t[i]!==1)throw new Error("Expand requires shape to be broadcastable to input")},Pj=(e,t)=>{let r=e.length-t.length,n=[];for(let i=0;i<r;++i)n.push(e[i]);for(let i=0;i<t.length;++i)n.push(t[i]===1?e[i+r]:t[i]);return n},rae=(e,t)=>e.length>t.length?Pj(e,t):Pj(t,e),nae=e=>{let t=e[0].dims,r=Array.from(e[1].getBigInt64Array(),Number),n=rae(t,r),i=e[0].dataType,a=i===9||yt.size(t)===1,s=i===9||t.length>0&&t[t.length-1]%4===0?4:1,o=a||n.length>0&&n[n.length-1]%4===0?4:1,l=Math.ceil(yt.size(n)/o),u=d=>{let f=Et("input",i,t.length,s),h=Mr("output",i,n.length,o),p;if(i===9){let m=(_,y,v="")=>` 2145 let outputIndices${y} = ${h.offsetToIndices(`outputOffset + ${y}u`)}; 2146 let offset${y} = ${f.broadcastedIndicesToOffset(`outputIndices${y}`,h)}; 2147 let index${y} = offset${y} / 4u; 2148 let component${y} = offset${y} % 4u; 2149 ${_}[${y}] = ${v}(${f.getByOffset(`index${y}`)}[component${y}]); 2150 `;p=` 2151 let outputOffset = global_idx * ${o}; 2152 var data = vec4<u32>(0); 2153 ${m("data",0,"u32")} 2154 ${m("data",1,"u32")} 2155 ${m("data",2,"u32")} 2156 ${m("data",3,"u32")} 2157 ${h.setByOffset("global_idx","data")} 2158 }`}else p=` 2159 let outputIndices = ${h.offsetToIndices(`global_idx * ${o}`)}; 2160 let inputOffset = ${f.broadcastedIndicesToOffset("outputIndices",h)}; 2161 let data = ${h.type.value}(${f.getByOffset(`inputOffset / ${s}`)}); 2162 ${h.setByOffset("global_idx","data")} 2163 }`;return` 2164 ${d.registerUniform("vec_size","u32").declareVariables(f,h)} 2165 ${d.mainStart()} 2166 ${d.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.vec_size")} 2167 ${p}`},c=[{type:12,data:l},...zr(t,n)];return{name:"Expand",shaderCache:{hint:`${n.length};${s}${o}`,inputDependencies:["rank"]},getShaderSource:u,getRunData:()=>({outputs:[{dims:n,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(l/64)},programUniforms:c})}},LEe=e=>{tae(e.inputs),e.compute(nae(e.inputs),{inputs:[0]})}}),iae,jEe,qbt=Wt(()=>{tn(),_n(),xn(),fW(),iae=e=>{let t=e[0].dataType,r=yt.size(e[0].dims),n=yt.size(e[1].dims),i=n%4===0,a=s=>{let o=Et("x",t,[1],4),l=Et("bias",t,[1],4),u=Mr("y",t,[1],4),c=[{name:"output_vec_size",type:"u32"},{name:"bias_size",type:"u32"}],d=h=>` 2168 let bias${h}_offset: u32 = (global_idx * 4 + ${h}) % uniforms.bias_size; 2169 let bias${h} = ${l.getByOffset(`bias${h}_offset / 4`)}[bias${h}_offset % 4];`,f=i?` 2170 let bias = ${l.getByOffset("global_idx % (uniforms.bias_size / 4)")};`:`${d(0)}${d(1)}${d(2)}${d(3)} 2171 let bias = ${o.type.value}(bias0, bias1, bias2, bias3);`;return`${s.registerUniforms(c).declareVariables(o,l,u)} 2172 2173 ${eB(Wl(t))} 2174 2175 ${s.mainStart(zw)} 2176 ${s.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_vec_size")} 2177 2178 let x = ${o.getByOffset("global_idx")}; 2179 ${f} 2180 let x_in = x + bias; 2181 ${u.setByOffset("global_idx",tB("x_in"))} 2182 }`};return{name:"FastGeluWithBias",shaderCache:{hint:`${i}`,inputDependencies:["type","type"]},getShaderSource:a,getRunData:s=>({outputs:[{dims:s[0].dims,dataType:s[0].dataType}],programUniforms:[{type:12,data:Math.ceil(r/4)},{type:12,data:n}],dispatchGroup:{x:Math.ceil(r/zw/4)}})}},jEe=e=>{e.inputs.length<2||yt.size(e.inputs[1].dims)===0?rEe(e):e.compute(iae(e.inputs))}}),aae,sae,REe,$Ee,Kbt=Wt(()=>{tn(),_n(),Cs(),xn(),aae=e=>{if(!e||e.length!==2)throw new Error("Gather requires 2 inputs.")},sae=(e,t)=>{let r=e[0].dims,n=e[1].dims,i=r.length,a=yt.normalizeAxis(t.axis,i),s=r.slice(0);s.splice(a,1,...n);let o=r[a],l=e[0].dataType===9?4:1,u=Math.ceil(yt.size(s)/l),c=[{type:12,data:u},{type:6,data:o},{type:12,data:a},...zr(e[0].dims,e[1].dims,s)],d=f=>{let h=Et("data",e[0].dataType,e[0].dims.length,l),p=Et("inputIndices",e[1].dataType,e[1].dims.length),m=Mr("output",e[0].dataType,s.length,l),_=v=>{let b=n.length,w=`var indicesIndices${v} = ${p.type.indices}(0);`;for(let x=0;x<b;x++)w+=`${b>1?`indicesIndices${v}[${x}]`:`indicesIndices${v}`} = ${s.length>1?`outputIndices${v}[uniforms.axis + ${x}]`:`outputIndices${v}`};`;w+=` 2183 var idx${v} = ${p.getByIndices(`indicesIndices${v}`)}; 2184 if (idx${v} < 0) { 2185 idx${v} = idx${v} + uniforms.axisDimLimit; 2186 } 2187 var dataIndices${v} : ${h.type.indices}; 2188 `;for(let x=0,E=0;x<i;x++)x===a?(w+=`${i>1?`dataIndices${v}[${x}]`:`dataIndices${v}`} = u32(idx${v});`,E+=b):(w+=`${i>1?`dataIndices${v}[${x}]`:`dataIndices${v}`} = ${s.length>1?`outputIndices${v}[${E}]`:`outputIndices${v}`};`,E++);return w},y;if(e[0].dataType===9){let v=(b,w,x="")=>` 2189 let outputIndices${w} = ${m.offsetToIndices(`outputOffset + ${w}u`)}; 2190 ${_(w)}; 2191 let offset${w} = ${h.indicesToOffset(`dataIndices${w}`)}; 2192 let index${w} = offset${w} / 4u; 2193 let component${w} = offset${w} % 4u; 2194 ${b}[${w}] = ${x}(${h.getByOffset(`index${w}`)}[component${w}]); 2195 `;y=` 2196 let outputOffset = global_idx * ${l}; 2197 var value = vec4<u32>(0); 2198 ${v("value",0,"u32")} 2199 ${v("value",1,"u32")} 2200 ${v("value",2,"u32")} 2201 ${v("value",3,"u32")} 2202 ${m.setByOffset("global_idx","value")} 2203 `}else y=` 2204 let outputIndices = ${m.offsetToIndices("global_idx")}; 2205 ${_("")}; 2206 let value = ${h.getByIndices("dataIndices")}; 2207 ${m.setByOffset("global_idx","value")}; 2208 `;return` 2209 ${f.registerUniform("outputSize","u32").registerUniform("axisDimLimit","i32").registerUniform("axis","u32").declareVariables(h,p,m)} 2210 ${f.mainStart()} 2211 ${f.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 2212 ${y} 2213 }`};return{name:"Gather",shaderCache:{hint:t.cacheKey,inputDependencies:["rank","rank"]},getRunData:()=>({outputs:[{dims:s,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(u/64)},programUniforms:c}),getShaderSource:d}},REe=e=>Mi({axis:e.axis}),$Ee=(e,t)=>{let r=e.inputs;aae(r),e.compute(sae(e.inputs,t))}}),oae,FEe,BEe,Ybt=Wt(()=>{tn(),_n(),xn(),oae=(e,t,r,n,i,a,s,o,l)=>{let u=[{type:12,data:a},{type:12,data:n},{type:12,data:i},{type:12,data:r},{type:12,data:s},{type:12,data:o},{type:12,data:l}],c=[a];u.push(...zr(t.dims,c));let d=f=>{let h=Et("indices_data",t.dataType,t.dims.length),p=Mr("input_slice_offsets_data",12,1,1),m=[h,p],_=[{name:"output_size",type:"u32"},{name:"batch_dims",type:"u32"},{name:"input_dims",type:"u32",length:i.length},{name:"sizes_from_slice_dims_data",type:"u32",length:r.length},{name:"num_slices_per_batch",type:"u32"},{name:"input_batch_stride",type:"u32"},{name:"num_slice_dims",type:"u32"}];return` 2214 ${f.registerUniforms(_).declareVariables(...m)} 2215 ${f.mainStart()} 2216 ${f.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2217 let batch_idx = global_idx / uniforms.num_slices_per_batch; 2218 let base_offset = batch_idx * uniforms.input_batch_stride; 2219 2220 let slice_indices_base_offset = global_idx * uniforms.num_slice_dims; 2221 var relative_slice_offset = 0; 2222 for (var dim_idx = 0u; dim_idx < uniforms.num_slice_dims; dim_idx ++) { 2223 var index = i32(indices_data[dim_idx + slice_indices_base_offset].x); 2224 let input_dim_idx = uniforms.batch_dims + dim_idx; 2225 if (index < 0) { 2226 ${i.length===1?"index += i32(uniforms.input_dims);":"index += i32(uniforms.input_dims[input_dim_idx]);"} 2227 } 2228 ${r.length===1?"relative_slice_offset += index * i32(uniforms.sizes_from_slice_dims_data);":"relative_slice_offset += index * i32(uniforms.sizes_from_slice_dims_data[dim_idx]);"} 2229 } 2230 2231 input_slice_offsets_data[global_idx] = base_offset + u32(relative_slice_offset); 2232 }`};return e.compute({name:"computeSliceOffsets",shaderCache:{hint:`${i.length}_${r.length}`,inputDependencies:["rank"]},getRunData:()=>({outputs:[{dims:c,dataType:e.inputs[1].dataType}],dispatchGroup:{x:Math.ceil(a/64)},programUniforms:u}),getShaderSource:d},{inputs:[t],outputs:[-1]})[0]},FEe=(e,t)=>{let r=e.inputs,n=r[0].dims,i=r[0].dataType,a=r[1].dims,s=a[a.length-1],o=yt.sizeToDimension(a,a.length-1),l=yt.sizeFromDimension(n,t.batchDims+s),u=yt.sizeToDimension(n,t.batchDims),c=yt.sizeFromDimension(n,t.batchDims),d=o/u,f=new Array(s),h=l;for(let w=0;w<s;++w)f[s-1-w]=h,h*=n[t.batchDims+s-1-w];let p=oae(e,r[1],f,t.batchDims,n,o,d,c,s),m=t.batchDims+s;if(m>n.length)throw new Error("last dimension of indices must not be larger than rank of input tensor");let _=a.slice(0,-1).concat(n.slice(m)),y=yt.size(_),v=[{type:12,data:y},{type:12,data:l},...zr(r[0].dims,p.dims,_)],b=w=>{let x=Et("data",r[0].dataType,r[0].dims.length),E=Et("slice_offsets",12,p.dims.length),T=Mr("output",r[0].dataType,_.length);return` 2233 ${w.registerUniform("output_size","u32").registerUniform("slice_size","u32").declareVariables(x,E,T)} 2234 ${w.mainStart()} 2235 ${w.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2236 let slice_offset = slice_offsets[global_idx / uniforms.slice_size];
2237 output[global_idx] = data[u32(slice_offset) + global_idx % uniforms.slice_size]; 2238 }`};e.compute({name:"GatherND",shaderCache:{hint:t.cacheKey,inputDependencies:["rank","rank"]},getRunData:()=>({outputs:[{dims:_,dataType:i}],dispatchGroup:{x:Math.ceil(y/64)},programUniforms:v}),getShaderSource:b},{inputs:[r[0],p]})},BEe=e=>({batchDims:e.batch_dims,cacheKey:""})}),lae,uae,zEe,UEe,Xbt=Wt(()=>{tn(),_n(),Cs(),xn(),lae=(e,t)=>{if(e.length<3||e.length>4)throw new Error("GatherBlockQuantized requires 3 or 4 inputs.");let r=yt.normalizeAxis(t.quantizeAxis,e[0].dims.length),n=t.blockSize,i=e[0],a=e[2],s=e.length===4?e[3]:void 0;if(a.dims.length!==i.dims.length||!i.dims.map((o,l)=>l===r?Math.ceil(o/n)===a.dims[l]:o===a.dims[l]).reduce((o,l)=>o&&l,!0))throw new Error("Scales must have the same rank as the input tensor and the dims should match except on gatherAxis.");if(s){if(s.dataType!==i.dataType)throw new Error("Zero point must have the same data type as the input tensor.");if(s.dims.length!==a.dims.length||!s.dims.map((o,l)=>o===a.dims[l]).reduce((o,l)=>o&&l,!0))throw new Error("Zero point must have the same rank as the input tensor and the dims should match except on quantizeAxis.")}},uae=(e,t)=>{let r=e[0].dims,n=e[1].dims,i=r.length,a=yt.normalizeAxis(t.gatherAxis,i),s=yt.normalizeAxis(t.quantizeAxis,i),o=r.slice(0);o.splice(a,1,...n);let l=yt.size(o),u=e[2].dataType,c=e[0].dataType===22,d=[{type:12,data:l},{type:12,data:s},{type:12,data:a},{type:12,data:t.blockSize},...zr(...e.map((h,p)=>h.dims),o)],f=h=>{let p=Et("data",e[0].dataType,e[0].dims.length),m=Et("inputIndices",e[1].dataType,e[1].dims.length),_=Et("scales",e[2].dataType,e[2].dims.length),y=e.length>3?Et("zeroPoint",e[3].dataType,e[3].dims.length):void 0,v=Mr("output",u,o.length),b=[p,m,_];y&&b.push(y);let w=[{name:"output_size",type:"u32"},{name:"quantize_axis",type:"u32"},{name:"gather_axis",type:"u32"},{name:"block_size",type:"u32"}];return` 2239 ${h.registerUniforms(w).declareVariables(...b,v)} 2240 ${h.mainStart()} 2241 let output_indices = ${v.offsetToIndices("global_idx")}; 2242 var indices_indices = ${m.type.indices}(0); 2243 ${n.length>1?` 2244 for (var i: u32 = 0; i < ${n.length}; i++) { 2245 let index = ${v.indicesGet("output_indices","uniforms.gather_axis + i")}; 2246 ${m.indicesSet("indices_indices","i","index")}; 2247 }`:`indices_indices = ${v.indicesGet("output_indices","uniforms.gather_axis")};`}; 2248 var data_indices = ${p.type.indices}(0); 2249 for (var i: u32 = 0; i < uniforms.gather_axis; i++) { 2250 let index = ${v.indicesGet("output_indices","i")}; 2251 ${p.indicesSet("data_indices","i","index")}; 2252 } 2253 var index_from_indices = ${m.getByIndices("indices_indices")}; 2254 if (index_from_indices < 0) { 2255 index_from_indices += ${r[a]}; 2256 } 2257 ${p.indicesSet("data_indices","uniforms.gather_axis","u32(index_from_indices)")}; 2258 for (var i = uniforms.gather_axis + 1; i < ${o.length}; i++) { 2259 let index = ${v.indicesGet("output_indices",`i + ${n.length} - 1`)}; 2260 ${p.indicesSet("data_indices","i","index")}; 2261 } 2262 let data_offset = ${p.indicesToOffset("data_indices")}; 2263 let data_index = data_offset % 8; 2264 // Convert 4-bit packed data to 8-bit packed data. 2265 let packed_4bit_quantized_data = ${p.getByOffset("data_offset / 8")}; 2266 let packed_8bit_quantized_data = (packed_4bit_quantized_data >> (4 * (data_index % 2))) & 0x0f0f0f0f; 2267 let quantized_data_vec = ${c?"unpack4xI8":"unpack4xU8"}(u32(packed_8bit_quantized_data)); 2268 let quantized_data = quantized_data_vec[data_index / 2]; 2269 var scale_indices = data_indices; 2270 let quantize_axis_index = ${_.indicesGet("data_indices","uniforms.quantize_axis")} / uniforms.block_size; 2271 ${_.indicesSet("scale_indices","uniforms.quantize_axis","quantize_axis_index")}; 2272 var scale = ${_.getByIndices("scale_indices")}; 2273 ${y?` 2274 let zero_point_indices = scale_indices; 2275 let zero_point_offset = ${y.indicesToOffset("zero_point_indices")}; 2276 let zero_point_index = zero_point_offset % 8; 2277 let packed_4bit_zero_points = ${y.getByOffset("zero_point_offset / 8")}; 2278 let packed_8bit_zero_points = (packed_4bit_zero_points >> (4 * (zero_point_index % 2))) & 0x0f0f0f0f; 2279 let zero_point_vec = ${c?"unpack4xI8":"unpack4xU8"}(u32(packed_8bit_zero_points)); 2280 let zero_point = zero_point_vec[zero_point_index / 2];`:"var zero_point = 0"}; 2281 let dequantized_data = ${Wl(u)}(quantized_data - zero_point) * scale; 2282 ${v.setByOffset("global_idx","dequantized_data")}; 2283 }`};
vendor: 7,409 bytes, lines 2283-2383
2283return{name:"GatherBlockQuantized",shaderCache:{hint:`${t.cacheKey};${e.filter((h,p)=>p!==1).map(h=>h.dims.join("_")).join(";")}`,inputDependencies:Array.from({length:e.length},(h,p)=>"rank")},getRunData:()=>({outputs:[{dims:o,dataType:u}],dispatchGroup:{x:Math.ceil(l/64)},programUniforms:d}),getShaderSource:f}},zEe=(e,t)=>{let r=e.inputs;lae(r,t),e.compute(uae(e.inputs,t))},UEe=e=>Mi({blockSize:e.blockSize,gatherAxis:e.gatherAxis,quantizeAxis:e.quantizeAxis})}),cae,dae,WEe,VEe,Qbt=Wt(()=>{tn(),_n(),Cs(),xn(),cae=e=>{if(!e||e.length!==2)throw new Error("GatherElements requires 2 inputs.");if(e[0].dims.length<1)throw new Error("GatherElements requires that the data input be rank >= 1.");if(e[0].dims.length!==e[1].dims.length)throw new Error(`GatherElements requires that the data input and 2284 indices input tensors be of same rank.`)},dae=(e,t)=>{let r=e[0].dims,n=e[0].dataType,i=r.length,a=e[1].dims,s=e[1].dataType,o=yt.normalizeAxis(t.axis,i),l=r[o],u=a.slice(0),c=yt.size(u),d=Et("input",n,i),f=Et("indicesInput",s,a.length),h=Mr("output",n,u.length),p=[{type:12,data:c},{type:6,data:l},{type:12,data:o}];return p.push(...zr(r,a,u)),{name:"GatherElements",shaderCache:{inputDependencies:["rank","rank"]},getRunData:()=>({outputs:[{dims:u,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(c/64)},programUniforms:p}),getShaderSource:m=>` 2285 ${m.registerUniform("outputSize","u32").registerUniform("axisDimLimit","i32").registerUniform("axis","u32").declareVariables(d,f,h)} 2286 ${m.mainStart()} 2287 ${m.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 2288 2289 let outputIndices = ${h.offsetToIndices("global_idx")}; 2290 2291 var idx = ${f.getByOffset("global_idx")}; 2292 if (idx < 0) { 2293 idx = idx + uniforms.axisDimLimit; 2294 } 2295 var inputIndices = ${d.type.indices}(outputIndices); 2296 ${d.indicesSet("inputIndices","uniforms.axis","u32(idx)")}; 2297 let value = ${d.getByIndices("inputIndices")}; 2298 2299 ${h.setByOffset("global_idx","value")}; 2300 }`}},WEe=e=>Mi({axis:e.axis}),VEe=(e,t)=>{let r=e.inputs;cae(r),e.compute(dae(e.inputs,t))}}),fae,hae,HEe,GEe,Zbt=Wt(()=>{tn(),_n(),xn(),fae=e=>{if(!e)throw new Error("Input is missing");if(e.length<2||e.length>3)throw new Error("Invaid input number.");if(e.length===3&&e[2].dims.length>2)throw new Error("Invalid input shape of C");if(e[0].dataType!==e[1].dataType||e.length===3&&e[0].dataType!==e[2].dataType)throw new Error("Input types are mismatched")},hae=(e,t)=>{let r=e[0].dims.slice(),n=e[1].dims.slice(),[i,a,s]=Wxe.getShapeOfGemmResult(r,t.transA,n,t.transB,e.length===3?e[2].dims:void 0),o=[i,a];if(!o)throw new Error("Can't use gemm on the given tensors");let l=16,u=Math.ceil(a/l),c=Math.ceil(i/l),d=!0,f=yt.size(o),h=[{type:12,data:d?u:f},{type:12,data:i},{type:12,data:a},{type:12,data:s},{type:1,data:t.alpha},{type:1,data:t.beta}],p=["type","type"];e.length===3&&(h.push(...zr(e[2].dims)),p.push("rank")),h.push(...zr(o));let m=y=>{let v="";t.transA&&t.transB?v="value += a[k * uniforms.M + m] * b[n * uniforms.K + k];":t.transA&&!t.transB?v="value += a[k * uniforms.M + m] * b[k * uniforms.N + n];":!t.transA&&t.transB?v="value += a[m * uniforms.K + k] * b[n * uniforms.K + k];":!t.transA&&!t.transB&&(v="value += a[m * uniforms.K + k] * b[k * uniforms.N + n];");let b=t.alpha===1?"":"value *= uniforms.alpha;",w=Et("a",e[0].dataType,e[0].dims),x=Et("b",e[1].dataType,e[1].dims),E=w.type.value,T=null,S=[w,x];e.length===3&&(T=Et("c",e[2].dataType,e[2].dims.length),S.push(T));let A=Mr("output",e[0].dataType,o.length);S.push(A);let C=[{name:"output_size",type:"u32"},{name:"M",type:"u32"},{name:"N",type:"u32"},{name:"K",type:"u32"},{name:"alpha",type:"f32"},{name:"beta",type:"f32"}];return` 2301 ${y.registerUniforms(C).declareVariables(...S)} 2302 2303 ${y.mainStart()} 2304 ${y.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2305 2306 let m = global_idx / uniforms.N; 2307 let n = global_idx % uniforms.N; 2308 2309 var value = ${E}(0); 2310 for (var k: u32 = 0u; k < uniforms.K; k++) { 2311 ${v} 2312 } 2313 2314 ${b} 2315 ${T!=null?`let cOffset = ${T.broadcastedIndicesToOffset("vec2(m, n)",A)}; value += ${E}(uniforms.beta) * ${T.getByOffset("cOffset")};`:""} 2316 output[global_idx] = value; 2317 }`},_=y=>{let v=Et("a",e[0].dataType,e[0].dims),b=Et("b",e[1].dataType,e[1].dims),w=null,x=[v,b];e.length===3&&(w=Et("c",e[2].dataType,e[2].dims.length),x.push(w));let E=Mr("output",e[0].dataType,o.length);x.push(E);let T=[{name:"num_tile_n",type:"u32"},{name:"M",type:"u32"},{name:"N",type:"u32"},{name:"K",type:"u32"},{name:"alpha",type:"f32"},{name:"beta",type:"f32"}],S="",A="";t.transA&&t.transB?(A=` 2318 var col = tile_row_start + local_id.x; 2319 var row = k_start + local_id.y; 2320 if (col < uniforms.M && row < uniforms.K) { 2321 tile_a[local_id.y][local_id.x] = a[row * uniforms.M + col]; 2322 } else { 2323 tile_a[local_id.y][local_id.x] = ${v.type.value}(0); 2324 } 2325 2326 col = k_start + local_id.x; 2327 row = tile_col_start + local_id.y; 2328 if (col < uniforms.K && row < uniforms.N) { 2329 tile_b[local_id.y][local_id.x] = b[row * uniforms.K + col]; 2330 } else { 2331 tile_b[local_id.y][local_id.x] = ${b.type.value}(0); 2332 } 2333 `,S="value += tile_a[k][local_id.y] * tile_b[local_id.x][k];"):t.transA&&!t.transB?(A=` 2334 var col = tile_row_start + local_id.x; 2335 var row = k_start + local_id.y; 2336 if (col < uniforms.M && row < uniforms.K) { 2337 tile_a[local_id.y][local_id.x] = a[row * uniforms.M + col]; 2338 } else { 2339 tile_a[local_id.y][local_id.x] = ${v.type.value}(0); 2340 } 2341 2342 col = tile_col_start + local_id.x; 2343 row = k_start + local_id.y; 2344 if (col < uniforms.N && row < uniforms.K) { 2345 tile_b[local_id.y][local_id.x] = b[row * uniforms.N + col]; 2346 } else { 2347 tile_b[local_id.y][local_id.x] = ${b.type.value}(0); 2348 } 2349 `,S="value += tile_a[k][local_id.y] * tile_b[k][local_id.x];"):!t.transA&&t.transB?(A=` 2350 var col = k_start + local_id.x; 2351 var row = tile_row_start + local_id.y; 2352 if (col < uniforms.K && row < uniforms.M) { 2353 tile_a[local_id.y][local_id.x] = a[row * uniforms.K + col]; 2354 } else { 2355 tile_a[local_id.y][local_id.x] = ${v.type.value}(0); 2356 } 2357 2358 col = k_start + local_id.x; 2359 row = tile_col_start + local_id.y; 2360 if (col < uniforms.K && row < uniforms.N) { 2361 tile_b[local_id.y][local_id.x] = b[row * uniforms.K + col]; 2362 } else { 2363 tile_b[local_id.y][local_id.x] = ${b.type.value}(0); 2364 } 2365 `,S="value += tile_a[local_id.y][k] * tile_b[local_id.x][k];"):!t.transA&&!t.transB&&(A=` 2366 var col = k_start + local_id.x; 2367 var row = tile_row_start + local_id.y; 2368 if (col < uniforms.K && row < uniforms.M) { 2369 tile_a[local_id.y][local_id.x] = a[row * uniforms.K + col]; 2370 } else { 2371 tile_a[local_id.y][local_id.x] = ${v.type.value}(0); 2372 } 2373 2374 col = tile_col_start + local_id.x; 2375 row = k_start + local_id.y; 2376 if (col < uniforms.N && row < uniforms.K) { 2377 tile_b[local_id.y][local_id.x] = b[row * uniforms.N + col]; 2378 } else { 2379 tile_b[local_id.y][local_id.x] = ${b.type.value}(0); 2380 } 2381 `,S="value += tile_a[local_id.y][k] * tile_b[k][local_id.x];");let C=t.alpha===1?"":"value *= uniforms.alpha;";return` 2382 ${y.registerUniforms(T).declareVariables(...x)} 2383 var<workgroup> tile_a: array<array<${v.type.storage}, ${l}>, ${l}>;
2384 var<workgroup> tile_b: array<array<${b.type.storage}, ${l}>, ${l}>; 2385 ${y.mainStart([l,l,1])} 2386 let tile_col_start = (workgroup_index % uniforms.num_tile_n) * ${l}; 2387 let tile_row_start = (workgroup_index / uniforms.num_tile_n) * ${l}; 2388 let num_tiles = (uniforms.K - 1) / ${l} + 1; 2389 var k_start = 0u; 2390 var value = ${E.type.value}(0); 2391 for (var t: u32 = 0u; t < num_tiles; t++) { 2392 ${A} 2393 k_start = k_start + ${l}; 2394 workgroupBarrier(); 2395 2396 for (var k: u32 = 0u; k < ${l}; k++) { 2397 ${S} 2398 } 2399 workgroupBarrier(); 2400 } 2401 2402 ${C} 2403 let m = tile_row_start + local_id.y; 2404 let n = tile_col_start + local_id.x; 2405 ${w!=null?`let cOffset = ${w.broadcastedIndicesToOffset("vec2(m, n)",E)}; value += ${E.type.value}(uniforms.beta) * ${w.getByOffset("cOffset")};`:""} 2406 if (m < uniforms.M && n < uniforms.N) { 2407 output[m * uniforms.N + n] = value; 2408 } 2409 }`};return d?{name:"GemmShared",shaderCache:{hint:`${t.cacheKey}`,inputDependencies:p},getRunData:()=>({outputs:[{dims:o,dataType:e[0].dataType}],dispatchGroup:{x:u*c},programUniforms:h}),getShaderSource:_}:{name:"Gemm",shaderCache:{hint:`${t.cacheKey}`,inputDependencies:p},getRunData:()=>({outputs:[{dims:o,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(f/64)},programUniforms:h}),getShaderSource:m}},HEe=e=>{let t=e.transA,r=e.transB,n=e.alpha,i=e.beta;return{transA:t,transB:r,alpha:n,beta:i,cacheKey:`${e.transA};${e.transB};${e.alpha===1}`}},GEe=(e,t)=>{fae(e.inputs),e.compute(hae(e.inputs,t))}}),gh,_p,iy,ay,pae,mae,gae,yae,vae,_ae,bae,wae,qEe,KEe,Jbt=Wt(()=>{tn(),_n(),Cs(),xn(),[gh,_p,iy,ay]=[0,1,2,3],pae=e=>{if(e[0].dims.length!==4)throw new Error("only 4-D tensor is supported.");if(e[0].dims.length!==e[1].dims.length)throw new Error("input dimensions must be equal to grid dimensions");if(e[0].dims.length-2!==e[1].dims[e[1].dims.length-1])throw new Error(`last dimension of grid must be equal to ${e[0].dims.length-2}`);if(e[0].dims[0]!==e[1].dims[0])throw new Error("grid batch size must match input batch size")},mae=` 2410 fn gs_get_cubic_coeffs(x: f32) -> vec4<f32> { 2411 let cubic_alpha = -0.75f; 2412 let x_abs = abs(x); 2413 var coeffs: vec4<f32>; 2414 coeffs[0] = (((cubic_alpha * (x_abs + 1) - 5 * cubic_alpha) * (x_abs + 1) + 8 * cubic_alpha) * (x_abs + 1) - 4 * cubic_alpha); 2415 coeffs[1] = (((cubic_alpha + 2) * x_abs - (cubic_alpha + 3)) * x_abs * x_abs + 1); 2416 coeffs[2] = (((cubic_alpha + 2) * (1 - x_abs) - (cubic_alpha + 3)) * (1 - x_abs) * (1 - x_abs) + 1); 2417 coeffs[3] = (((cubic_alpha * (2 - x_abs) - 5 * cubic_alpha) * (2 - x_abs) + 8 * cubic_alpha) * (2 - x_abs) - 4 * cubic_alpha); 2418 return coeffs; 2419 } 2420`,gae=e=>` 2421 fn gs_bicubic_interpolate(p: mat4x4<${e}>, x: f32, y: f32) -> ${e} { 2422 var v: vec4<f32>; 2423 var coeffs = gs_get_cubic_coeffs(x); 2424 for (var i = 0; i < 4; i++) { 2425 v[i] = coeffs[0] * p[i][0] + coeffs[1] * p[i][1] + coeffs[2] * p[i][2] + coeffs[3] * p[i][3]; 2426 } 2427 coeffs = gs_get_cubic_coeffs(y); 2428 let pixel = ${e}(coeffs[0] * v[0] + coeffs[1] * v[1] + coeffs[2] * v[2] + coeffs[3] * v[3]); 2429 return pixel; 2430 } 2431`,yae=e=>` 2432 fn gs_denormalize(n: f32, length: i32) -> f32 { 2433 ${e.alignCorners===0?` 2434 // alignCorners: false => [-1, 1] to [-0.5, length - 0.5] 2435 return ((n + 1.0) * f32(length) - 1.0) / 2.0; 2436 `:` 2437 // alignCorners: true => [-1, 1] to [0, length - 1] 2438 return (n + 1.0) / 2.0 * (f32(length - 1)); 2439 `} 2440 } 2441`,vae=e=>` 2442 ${e.paddingMode==="reflection"?` 2443 fn gs_reflect(x: i32, x_min: f32, x_max: f32) -> u32 { 2444 var dx = 0.0; 2445 var fx = f32(x); 2446 let range = x_max - x_min; 2447 if (fx < x_min) { 2448 dx = x_min - fx; 2449 let n = u32(dx / range); 2450 let r = dx - f32(n) * range; 2451 if (n % 2 == 0) { 2452 fx = x_min + r; 2453 } else { 2454 fx = x_max - r; 2455 } 2456 } else if (fx > x_max) { 2457 dx = fx - x_max; 2458 let n = u32(dx / range); 2459 let r = dx - f32(n) * range; 2460 if (n % 2 == 0) { 2461 fx = x_max - r; 2462 } else { 2463 fx = x_min + r; 2464 } 2465 } 2466 return u32(fx); 2467 }`:""} 2468`,_ae=(e,t,r)=>` 2469 fn pixel_at_grid(r: i32, c: i32, H: i32, W: i32, batch: u32, channel: u32, border: vec4<f32>) -> ${t} { 2470 var pixel = ${t}(0); 2471 var indices = vec4<u32>(0); 2472 indices[${gh}] = batch; 2473 indices[${_p}] = channel;`+(()=>{switch(r.paddingMode){case"zeros":return` 2474 if (r >= 0 && r < H && c >=0 && c < W) { 2475 indices[${iy}] = u32(r); 2476 indices[${ay}] = u32(c); 2477 } else { 2478 return ${t}(0); 2479 } 2480 `;case"border":return` 2481 indices[${iy}] = u32(clamp(r, 0, H - 1)); 2482 indices[${ay}] = u32(clamp(c, 0, W - 1)); 2483 `;case"reflection":return` 2484 indices[${iy}] = gs_reflect(r, border[1], border[3]); 2485 indices[${ay}] = gs_reflect(c, border[0], border[2]); 2486 `;default:throw new Error(`padding mode ${r.paddingMode} is not supported`)}})()+` 2487 return ${e.getByIndices("indices")}; 2488 } 2489`,bae=(e,t,r)=>(()=>{switch(r.mode){case"nearest":return` 2490 let result = pixel_at_grid(i32(round(y)), i32(round(x)), H_in, W_in, indices[${gh}], indices[${_p}], border); 2491 `;case"bilinear":return` 2492 let x1 = i32(floor(x)); 2493 let y1 = i32(floor(y)); 2494 let x2 = x1 + 1; 2495 let y2 = y1 + 1; 2496 2497 let p11 = pixel_at_grid(y1, x1, H_in, W_in, indices[${gh}], indices[${_p}], border); 2498 let p12 = pixel_at_grid(y1, x2, H_in, W_in, indices[${gh}], indices[${_p}], border); 2499 let p21 = pixel_at_grid(y2, x1, H_in, W_in, indices[${gh}], indices[${_p}], border); 2500 let p22 = pixel_at_grid(y2, x2, H_in, W_in, indices[${gh}], indices[${_p}], border); 2501 2502 let dx2 = ${t}(f32(x2) - x); 2503 let dx1 = ${t}(x - f32(x1)); 2504 let dy2 = ${t}(f32(y2) - y); 2505 let dy1 = ${t}(y - f32(y1)); 2506 let result = dy2 * (dx2 * p11 + dx1 * p12) + dy1 * (dx2 * p21 + dx1 * p22); 2507 `;case"bicubic":return` 2508 let x0 = i32(floor(x)) - 1; 2509 let y0 = i32(floor(y)) - 1; 2510 var p: mat4x4<${t}>; 2511 for (var h = 0; h < 4; h++) { 2512 for (var w = 0; w < 4; w++) {
2513 p[h][w] = pixel_at_grid(h + y0, w + x0, H_in, W_in, indices[${gh}], indices[${_p}], border); 2514 } 2515 } 2516 2517 let dx = x - f32(x0 + 1); 2518 let dy = y - f32(y0 + 1); 2519 let result = gs_bicubic_interpolate(p, dx, dy); 2520 `;default:throw new Error(`mode ${r.mode} is not supported`)}})()+`${e.setByOffset("global_idx","result")}`,wae=(e,t)=>{let r=Et("x",e[0].dataType,e[0].dims.length),n=[e[1].dims[0],e[1].dims[1],e[1].dims[2]],i=Et("grid",e[1].dataType,n.length,2),a=[e[0].dims[0],e[0].dims[1],e[1].dims[1],e[1].dims[2]];t.format==="NHWC"&&(a=[e[0].dims[0],e[1].dims[1],e[1].dims[2],e[0].dims[3]],[gh,_p,iy,ay]=[0,3,1,2]);let s=Mr("output",e[0].dataType,a.length),o=r.type.value,l=yt.size(a),u=[{type:12,data:l},...zr(e[0].dims,n,a)],c=d=>` 2521 ${d.registerUniform("output_size","u32").declareVariables(r,i,s)} 2522 ${mae} 2523 ${gae(o)} 2524 ${yae(t)} 2525 ${vae(t)} 2526 ${_ae(r,o,t)} 2527 2528 ${d.mainStart()} 2529 ${d.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2530 let H_in = i32(uniforms.x_shape[${iy}]); 2531 let W_in = i32(uniforms.x_shape[${ay}]); 2532 2533 ${t.alignCorners===0?` 2534 let x_min = -0.5; 2535 let x_max = f32(W_in) - 0.5; 2536 let y_min = -0.5; 2537 let y_max = f32(H_in) - 0.5; 2538 `:` 2539 let x_min = 0.0; 2540 let x_max = f32(W_in) - 1.0; 2541 let y_min = 0.0; 2542 let y_max = f32(H_in) - 1.0; 2543 `}; 2544 let border = vec4<f32>(x_min, y_min, x_max, y_max); 2545 2546 let indices = ${s.offsetToIndices("global_idx")}; 2547 var grid_indices = vec3<u32>(indices[${gh}], indices[${iy}], indices[${ay}]); 2548 let nxy = ${i.getByIndices("grid_indices")}; 2549 var x = gs_denormalize(f32(nxy[0]), W_in); 2550 var y = gs_denormalize(f32(nxy[1]), H_in); 2551 2552 ${bae(s,o,t)} 2553 }`;return{name:"GridSample",shaderCache:{hint:`${t.cacheKey}`,inputDependencies:["type","type"]},getRunData:d=>{let f=yt.size(a);return{outputs:[{dims:a,dataType:d[0].dataType}],dispatchGroup:{x:Math.ceil(f/64)},programUniforms:u}},getShaderSource:c}},qEe=(e,t)=>{pae(e.inputs),e.compute(wae(e.inputs,t))},KEe=e=>Mi({alignCorners:e.align_corners,mode:e.mode,paddingMode:e.padding_mode,format:e.format})}),cu,xae,YEe,Mj,Eae,NE,XEe,QEe=Wt(()=>{tn(),_n(),Cs(),lW(),dW(),xn(),E0(),cu=(e,t)=>e.length>t&&e[t].dims.length>0?e[t]:void 0,xae=(e,t)=>{let r=e[0],n=cu(e,1),i=cu(e,2),a=cu(e,3),s=cu(e,4),o=cu(e,5),l=cu(e,6),u=cu(e,7);if(r.dims.length!==3&&r.dims.length!==5)throw new Error("Input query is expected to have 3 or 5 dimensions");let c=r.dims[0],d=r.dims[1],f=r.dims.length===3?r.dims[2]:t.numHeads*r.dims[4],h=d,p=0,m=0,_=Math.floor(f/t.numHeads);if(l&&u&&yt.size(l.dims)&&yt.size(u.dims)){if(l.dims.length!==4)throw new Error('Input "past_key" is expected to have 4 dimensions');if(l.dims[0]!==c||l.dims[1]!==t.numHeads||l.dims[3]!==_)throw new Error('Input "past_key" shape (batch_size, num_heads, past_sequence_length, head_size)');if(u.dims[0]!==c||u.dims[1]!==t.numHeads||u.dims[3]!==_)throw new Error('Input "past_value" shape (batch_size, num_heads, past_sequence_length, head_size)');if(l.dims[2]!==u.dims[2])throw new Error('Input "past_key" and "past_value" shall have same dim 2 (past_sequence_length)');if(u.dims.length!==4)throw new Error('Input "past_value" is expected to have 4 dimensions');p=l.dims[2],m=l.dims[2]}else if(l&&yt.size(l.dims)||u&&yt.size(u.dims))throw new Error('Input "past_key" and "past_value" shall be both present or both absent');let y;if(n&&yt.size(n.dims)>0){if(r.dims.length!==3)throw new Error('Input "query" is expected to have 3 dimensions when key is given');if(n.dims.length<3||n.dims.length>5)throw new Error('Input "key" is expected to have 3, 4, or 5 dimensions');if(r.dims[0]!==n.dims[0])throw new Error('Input "query" and "key" shall have same dim 0 (batch size)');if(n.dims.length===3){if(n.dims[2]!==r.dims[2])throw new Error('Input "query" and "key" shall have same dim 2 (hidden_size)');y=2,h=n.dims[1]}else if(n.dims.length===5){if(n.dims[2]!==t.numHeads||n.dims[3]!==2||n.dims[4]!==_)throw new Error('Expect "key" shape (batch_size, kv_sequence_length, num_heads, 2, head_size) for packed kv');if(i)throw new Error('Expect "value" be none when "key" has packed kv format.');y=5,h=n.dims[1]}else{if(n.dims[1]!==t.numHeads||n.dims[3]!==_)throw new Error('Expect "key" shape (batch_size, num_heads, kv_sequence_length, head_size) for past_key');y=0,h=n.dims[2]}}else{if(r.dims.length!==5)throw new Error('Input "query" is expected to have 5 dimensions when key is empty');if(r.dims[2]!==t.numHeads||r.dims[3]!==3)throw new Error('Expect "query" shape (batch_size, kv_sequence_length, num_heads, 3, head_size) for packed kv');y=3}if(a&&yt.size(a.dims)>0){if(a.dims.length!==1)throw new Error('Input "bias" is expected to have 1 dimension');
vendor: 8,818 bytes, lines 2553-2591
2553if(n&&n.dims.length===5&&n.dims[3]===2)throw new Error("bias is not allowed for packed kv.")}let v=p+h,b=0;if(s&&yt.size(s.dims)>0){b=8;let T=s.dims;throw T.length===1?T[0]===c?b=1:T[0]===3*c+2&&(b=3):T.length===2&&T[0]===c&&T[1]===v&&(b=5),b===8?new Error('Input "key_padding_mask" shape shall be (batch_size) or (batch_size, total_sequence_length)'):new Error("Mask not supported")}let w=!1,x=f;if(i&&yt.size(i.dims)>0){if(i.dims.length!==3&&i.dims.length!==4)throw new Error('Input "value" is expected to have 3 or 4 dimensions');if(r.dims[0]!==i.dims[0])throw new Error('Input "query" and "value" shall have same dim 0 (batch_size)');if(i.dims.length===3){if(h!==i.dims[1])throw new Error('Input "key" and "value" shall have the same dim 1 (kv_sequence_length)');x=i.dims[2]}else{if(h!==i.dims[2])throw new Error('Input "key" and "value" shall have the same dim 2 (kv_sequence_length)');x=i.dims[1]*i.dims[3],w=!0}}let E=!1;if(s&&yt.size(s.dims)>0)throw new Error("Key padding mask is not supported");if(o&&yt.size(o.dims)>0){if(o.dims.length!==4)throw new Error('Input "attention_bias" is expected to have 4 dimensions');if(o.dims[0]!==c||o.dims[1]!==t.numHeads||o.dims[2]!==d||o.dims[3]!==v)throw new Error('Expect "attention_bias" shape (batch_size, num_heads, sequence_length, total_sequence_length)')}return{batchSize:c,sequenceLength:d,pastSequenceLength:p,kvSequenceLength:h,totalSequenceLength:v,maxSequenceLength:m,inputHiddenSize:0,hiddenSize:f,vHiddenSize:x,headSize:_,vHeadSize:Math.floor(x/t.numHeads),numHeads:t.numHeads,isUnidirectional:!1,pastPresentShareBuffer:!1,maskFilterValue:t.maskFilterValue,maskType:b,scale:t.scale,broadcastResPosBias:E,passPastInKv:w,qkvFormat:y}},YEe=e=>Mi({...e}),Mj=Mi({perm:[0,2,1,3]}),Eae=(e,t,r,n,i,a,s)=>{let o=[n,i,a],l=yt.size(o),u=[{type:12,data:l},{type:12,data:s},{type:12,data:a}],c=d=>{let f=Mr("qkv_with_bias",t.dataType,o),h=Et("qkv",t.dataType,o),p=Et("bias",r.dataType,o),m=[{name:"output_size",type:"u32"},{name:"bias_offset",type:"u32"},{name:"hidden_size",type:"u32"}];return` 2554 ${d.registerUniforms(m).declareVariables(h,p,f)} 2555 ${d.mainStart()} 2556 ${d.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2557 let bias_offset_idx = (global_idx % uniforms.hidden_size) + uniforms.bias_offset; 2558 2559 qkv_with_bias[global_idx] = qkv[global_idx] + bias[bias_offset_idx]; 2560 }`};return e.compute({name:"MultiHeadAttentionAddBias",shaderCache:{inputDependencies:["type","type"]},getRunData:()=>({outputs:[{dims:o,dataType:t.dataType,gpuDataType:0}],dispatchGroup:{x:Math.ceil(l/64)},programUniforms:u}),getShaderSource:c},{inputs:[t,r],outputs:[-1]})[0]},NE=(e,t,r,n,i,a,s,o)=>{let l=a;if(s&&yt.size(s.dims)>0){if(n===1)throw new Error("AddBiasReshape is not implemented. Please export your model with packed QKV or KV");return l=Eae(e,a,s,t,n,r*i,o),l=l.reshape([t,n,r,i]),r===1||n===1?l:e.compute(Jc(l,Mj.perm),{inputs:[l],outputs:[-1]})[0]}else return a.dims.length===3&&(l=a.reshape([t,n,r,i])),r===1||n===1?l:e.compute(Jc(l,Mj.perm),{inputs:[l],outputs:[-1]})[0]},XEe=(e,t)=>{let r=xae(e.inputs,t),n=e.inputs[0],i=cu(e.inputs,1),a=cu(e.inputs,2),s=cu(e.inputs,3),o=cu(e.inputs,4),l=cu(e.inputs,5),u=cu(e.inputs,6),c=cu(e.inputs,7);if(n.dims.length===5)throw new Error("Packed QKV is not implemented");if((i==null?void 0:i.dims.length)===5)throw new Error("Packed KV is not implemented");let d=i&&a&&i.dims.length===4&&a.dims.length===4,f=NE(e,r.batchSize,r.numHeads,r.sequenceLength,r.headSize,n,s,0);if(d)return pA(e,f,i,a,o,void 0,u,c,l,r);if(!i||!a)throw new Error("key and value must be provided");let h=NE(e,r.batchSize,r.numHeads,r.kvSequenceLength,r.headSize,i,s,r.hiddenSize),p=NE(e,r.batchSize,r.numHeads,r.kvSequenceLength,r.vHeadSize,a,s,2*r.hiddenSize);pA(e,f,h,p,o,void 0,u,c,l,r)}}),Tae,Sae,Aae,Cae,sB,ZEe,JEe,eTe=Wt(()=>{tn(),_n(),Cs(),xn(),Tae=e=>{if(!e||e.length<1)throw new Error("too few inputs")},Sae=(e,t)=>{let r=[],n=t.numOutputs;return e[1].dims[0]>0&&(e[1].getBigInt64Array().forEach(i=>r.push(Number(i))),n=r.length),Mi({numOutputs:n,axis:t.axis,splitSizes:r})},Aae=e=>` 2561fn calculateOutputIndex(index: u32) -> u32 { 2562 for (var i: u32 = 0u; i < ${e}u; i += 1u ) { 2563 if (index < ${Rr("uniforms.size_in_split_axis","i",e)}) { 2564 return i; 2565 } 2566 } 2567 return ${e}u; 2568}`,Cae=e=>{let t=e.length,r=[];for(let n=0;n<t;++n){let i=e[n].setByIndices("indices","input[global_idx]");t===1?r.push(i):n===0?r.push(`if (output_number == ${n}u) { ${i} }`):n===t-1?r.push(`else { ${i} }`):r.push(`else if (output_number == ${n}) { ${i} }`)}return` 2569 fn writeBufferData(output_number: u32, indices: ${e[0].type.indices}, global_idx: u32) { 2570 ${r.join(` 2571`)} 2572 }`},sB=(e,t)=>{let r=e[0].dims,n=yt.size(r),i=e[0].dataType,a=yt.normalizeAxis(t.axis,r.length),s=new Array(t.numOutputs),o=Et("input",i,r.length),l=new Array(t.numOutputs),u=[],c=[],d=0,f=[{type:12,data:n}];for(let p=0;p<t.numOutputs;p++){d+=t.splitSizes[p],l[p]=d;let m=r.slice();m[a]=t.splitSizes[p],c.push(m),s[p]=Mr(`output${p}`,i,m.length),u.push({dims:c[p],dataType:e[0].dataType})}f.push({type:12,data:l},...zr(r,...c));let h=p=>` 2573 ${p.registerUniform("input_size","u32").registerUniform("size_in_split_axis","u32",l.length).declareVariables(o,...s)} 2574 ${Aae(l.length)} 2575 ${Cae(s)} 2576 2577 ${p.mainStart()} 2578 ${p.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.input_size")} 2579 2580 var indices = ${o.offsetToIndices("global_idx")}; 2581 var index = ${o.indicesGet("indices",a)}; 2582 let output_number = calculateOutputIndex(index); 2583 if (output_number != 0) { 2584 index -= ${Rr("uniforms.size_in_split_axis","output_number - 1u",l.length)}; 2585 ${o.indicesSet("indices",a,"index")}; 2586 } 2587 writeBufferData(output_number, indices, global_idx); 2588 }`;return{name:"Split",shaderCache:{hint:t.cacheKey,inputDependencies:["rank"]},getShaderSource:h,getRunData:()=>({outputs:u,dispatchGroup:{x:Math.ceil(n/64)},programUniforms:f})}},ZEe=(e,t)=>{Tae(e.inputs);let r=e.inputs.length===1?t:Sae(e.inputs,t);e.compute(sB(e.inputs,r),{inputs:[0]})},JEe=e=>{let t=e.axis,r=e.splitSizes,n=e.numOutputs<0?r.length:e.numOutputs;if(n!==r.length)throw new Error("numOutputs and splitSizes lengh must be equal");return Mi({axis:t,numOutputs:n,splitSizes:r})}}),Pae,bO,tTe,rTe=Wt(()=>{tn(),_n(),Cs(),xn(),Pae=(e,t)=>{let[r,n,i,a]=e,{numHeads:s,rotaryEmbeddingDim:o}=t;if(r.dims.length!==3&&r.dims.length!==4)throw new Error(`Input 'x' is expected to have 3 or 4 dimensions, got ${r.dims.length}`);if(!yt.areEqual(n.dims,[])&&!yt.areEqual(n.dims,[1])&&n.dims.length!==2)throw new Error(`Input 'position_ids' is expected to have 0, 1, or 2 dimensions, got ${n.dims.length}`);if(i.dims.length!==2)throw new Error(`Input 'cos_cache' is expected to have 2 dimensions, got ${i.dims.length}`);if(a.dims.length!==2)throw new Error(`Input 'sin_cache' is expected to have 2 dimensions, got ${a.dims.length}`);if(!yt.areEqual(i.dims,a.dims))throw new Error("Inputs 'cos_cache' and 'sin_cache' are expected to have the same shape");if(o>0&&s===0)throw new Error("num_heads must be provided if rotary_embedding_dim is specified");let l=r.dims[0],u=r.dims[r.dims.length-2],c=i.dims[0],d=yt.sizeFromDimension(r.dims,1)/u,f=o===0?i.dims[1]*2:d/s;if(o>f)throw new Error("rotary_embedding_dim must be less than or equal to head_size");if(n.dims.length===2){if(l!==n.dims[0])throw new Error(`Input 'position_ids' dimension 0 should be of size batch_size, got ${n.dims[0]}`);if(u!==n.dims[1])throw new Error(`Input 'position_ids' dimension 1 should be of size sequence_length, got ${n.dims[1]}`)}if(f/2!==i.dims[1]&&o/2!==i.dims[1])throw new Error(`Input 'cos_cache' dimension 1 should be same as head_size / 2 or rotary_embedding_dim / 2, got ${i.dims[1]}`);if(u>c)throw new Error("Updating cos_cache and sin_cache in RotaryEmbedding is not currently supported")},bO=(e,t)=>{let{interleaved:r,numHeads:n,rotaryEmbeddingDim:i,scale:a}=t,s=e[0].dims[0],o=yt.sizeFromDimension(e[0].dims,1),l=e[0].dims[e[0].dims.length-2],u=o/l,c=e[2].dims[1],d=i===0?c*2:u/n,f=new Array(s,l,u/d,d-c),h=yt.computeStrides(f),p=[{type:1,data:a},{type:12,data:f},{type:12,data:h},...e[0].dims.length===3?new Array({type:12,data:[o,u,d,1]}):[],...e[0].dims.length===4?new Array({type:12,data:[o,d,l*d,1]}):[],...zr(e[0].dims,e[1].dims,e[2].dims,e[3].dims,e[0].dims)],m=_=>{let y=Et("input",e[0].dataType,e[0].dims.length),v=Et("position_ids",e[1].dataType,e[1].dims.length),b=Et("cos_cache",e[2].dataType,e[2].dims.length),w=Et("sin_cache",e[3].dataType,e[3].dims.length),x=Mr("output",e[0].dataType,e[0].dims.length);return _.registerUniforms([{name:"scale",type:"f32"},{name:"global_shape",type:"u32",length:f.length},{name:"global_strides",type:"u32",length:h.length},{name:"input_output_strides",type:"u32",length:h.length}]),` 2589 ${_.declareVariables(y,v,b,w,x)} 2590 2591 ${_.mainStart(zw)}
2592 let half_rotary_emb_dim = uniforms.${b.name}_shape[1]; 2593 let bsnh = global_idx / uniforms.global_strides % uniforms.global_shape; 2594 let size = uniforms.global_shape[0] * uniforms.global_strides[0]; 2595 ${_.guardAgainstOutOfBoundsWorkgroupSizes("size")} 2596 2597 if (bsnh[3] < half_rotary_emb_dim) { 2598 let position_ids_idx = 2599 ${v.broadcastedIndicesToOffset("bsnh.xy",Mr("",v.type.tensor,2))}; 2600 let position_id = 2601 u32(${v.getByOffset("position_ids_idx")}) + select(0, bsnh[1], position_ids_idx == 0); 2602 let i = dot(bsnh, uniforms.input_output_strides) + select(0, bsnh[3], ${r}); 2603 let j = i + select(half_rotary_emb_dim, 1, ${r}); 2604 let re = ${y.getByOffset("i")} * ${b.get("position_id","bsnh[3]")} - 2605 ${y.getByOffset("j")} * ${w.get("position_id","bsnh[3]")}; 2606 ${x.setByOffset("i","re")} 2607 let im = ${y.getByOffset("i")} * ${w.get("position_id","bsnh[3]")} + 2608 ${y.getByOffset("j")} * ${b.get("position_id","bsnh[3]")}; 2609 ${x.setByOffset("j","im")} 2610 } else { 2611 let k = dot(bsnh, uniforms.input_output_strides) + half_rotary_emb_dim; 2612 ${x.setByOffset("k",y.getByOffset("k"))} 2613 } 2614 }`};return{name:"RotaryEmbedding",shaderCache:{hint:Mi({interleaved:r}).cacheKey,inputDependencies:["rank","rank","rank","rank"]},getShaderSource:m,getRunData:()=>({outputs:[{dims:e[0].dims,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(yt.size(f)/zw)},programUniforms:p})}},tTe=(e,t)=>{Pae(e.inputs,t),e.compute(bO(e.inputs,t))}}),Mae,kae,kj,Oae,nTe,ewt=Wt(()=>{Cs(),tn(),dW(),QEe(),eTe(),E0(),rTe(),xn(),Mae=(e,t)=>{if(t.doRotary&&e.length<=7)throw new Error("cos_cache and sin_cache inputs are required if do_rotary is specified");let r=e[0],n=e[1],i=e[2],a=e[3],s=e[4];if(t.doRotary!==0&&e.length<=7)throw new Error("cos_cast and sin_cache are expected if do_rotary attribute is non-zero");if(t.localWindowSize!==-1)throw new Error("Local attention is not supported");if(t.softcap!==0)throw new Error("Softcap is not supported");if(t.rotaryInterleaved!==0)throw new Error("Rotary interleaved is not supported");if(t.smoothSoftmax)throw new Error("Smooth softmax is not supported");if(r.dims.length!==3&&r.dims.length!==5)throw new Error("Input query is expected to have 3 or 5 dimensions");let o=!1,l=r.dims[0],u=r.dims[1],c=r.dims.length===3?o?r.dims[2]/3:r.dims[2]:t.numHeads*r.dims[4],d=u,f=0,h=!n||n.dims.length===0,p=Math.floor(h?c/(t.numHeads+2*t.kvNumHeads):c/t.numHeads);h&&(c=p*t.numHeads);let m=a&&a.dims.length!==0,_=s&&s.dims.length!==0;if(m&&a.dims.length===4&&a.dims[0]===l&&a.dims[1]!==t.kvNumHeads&&a.dims[2]===t.kvNumHeads&&a.dims[3]===p)throw new Error("BSNH pastKey/pastValue is not supported");if(m&&_){if(a.dims.length!==4)throw new Error('Input "past_key" is expected to have 4 dimensions');if(s.dims.length!==4)throw new Error('Input "past_value" is expected to have 4 dimensions');f=a.dims[2]}else if(m||_)throw new Error('Input "past_key" and "past_value" shall be both present or both absent');let y=1;if(n&&n.dims.length>0){if(r.dims.length!==3)throw new Error('Input "query" is expected to have 3 dimensions when key is given');if(n.dims.length<3||n.dims.length>5)throw new Error('Input "key" is expected to have 3, 4, or 5 dimensions');if(r.dims[0]!==n.dims[0])throw new Error('Input "query" and "key" shall have same dim 0 (batch size)');if(n.dims.length===3){if(r.dims[2]%n.dims[2]!==0)throw new Error('Dimension 2 of "query" should be a multiple of "key"');d=n.dims[1]}else if(n.dims.length===5){if(n.dims[2]!==t.numHeads||n.dims[3]!==2||n.dims[4]!==p)throw new Error('Expect "key" shape (batch_size, kv_sequence_length, num_heads, 2, head_size) for packed kv');if(i)throw new Error('Expect "value" be none when "key" has packed kv format.');d=n.dims[1]}else{if(n.dims[1]!==t.numHeads||n.dims[3]!==p)throw new Error('Expect "key" shape (batch_size, num_heads, kv_sequence_length, head_size) for past_key');d=n.dims[2]}}else{if(r.dims.length!==3&&r.dims.length!==5)throw new Error('Input "query" is expected to have 3 or 5 dimensions when key is empty');if(r.dims.length===5&&(r.dims[2]!==t.numHeads||r.dims[3]!==3))throw new Error('Expect "query" shape (batch_size, kv_sequence_length, num_heads, 3, head_size) for packed kv');y=3}let v=0,b=!1,w=t.kvNumHeads?p*t.kvNumHeads:c;if(i&&i.dims.length>0){if(i.dims.length!==3&&i.dims.length!==4)throw new Error('Input "value" is expected to have 3 or 4 dimensions');if(r.dims[0]!==i.dims[0])throw new Error('Input "query" and "value" shall have same dim 0 (batch_size)');if(i.dims.length===3){if(d!==i.dims[1])throw new Error('Input "key" and "value" shall have the same dim 1 (kv_sequence_length)');w=i.dims[2]}else{if(d!==i.dims[2])throw new Error('Input "past_key" and "past_value" shall have the same dim 2 (kv_sequence_length)');w=i.dims[1]*i.dims[3],b=!0}}let x=e.length>4?e[5]:void 0;
vendor: 8,357 bytes, lines 2614-2696
2614if(x&&x.dims.length!==1&&x.dims[0]!==l)throw new Error('Input "seqlens" is expected to have 1 dimension and the same dim 0 as batch_size');return{batchSize:l,sequenceLength:u,pastSequenceLength:f,kvSequenceLength:d,totalSequenceLength:-1,maxSequenceLength:-1,inputHiddenSize:0,hiddenSize:c,vHiddenSize:w,headSize:p,vHeadSize:Math.floor(w/t.kvNumHeads),numHeads:t.numHeads,kvNumHeads:t.kvNumHeads,nReps:t.numHeads/t.kvNumHeads,pastPresentShareBuffer:!1,maskType:v,scale:t.scale,broadcastResPosBias:!1,passPastInKv:b,qkvFormat:y}},kae=Mi({perm:[0,2,1,3]}),kj=(e,t,r)=>{let n=t,i=r.kvNumHeads;return t.dims.length===3&&r.kvSequenceLength!==0&&(n=t.reshape([r.batchSize,r.kvSequenceLength,i,r.headSize]),n=e.compute(Jc(n,kae.perm),{inputs:[n],outputs:[-1]})[0]),n},Oae=(e,t,r,n)=>{let i=7,a=["type","type"],s=[e*t],o=e*t,l=[{type:12,data:o},{type:12,data:t},{type:12,data:e}],u=c=>{let d=Et("seq_lens",r.dataType,r.dims),f=Et("total_seq_lens",n.dataType,n.dims),h=Mr("pos_ids",i,s),p=[{name:"output_size",type:"u32"},{name:"sequence_length",type:"u32"},{name:"batch_size",type:"u32"}];return` 2615 ${c.registerUniforms(p).declareVariables(d,f,h)} 2616 ${c.mainStart()} 2617 ${c.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2618 let total_sequence_length = u32(${f.getByOffset("0")}); 2619 let is_subsequent_prompt = uniforms.sequence_length > 1 && uniforms.sequence_length != total_sequence_length; 2620 let is_first_prompt = !is_subsequent_prompt && uniforms.sequence_length == total_sequence_length; 2621 let batch_idx = global_idx / uniforms.sequence_length; 2622 let sequence_idx = i32(global_idx % uniforms.sequence_length); 2623 var pos_id: i32 = 0; 2624 let seqlen = ${d.getByOffset("batch_idx")}; 2625 let total_seqlen = seqlen + 1; 2626 if (is_first_prompt) { 2627 if (sequence_idx < total_seqlen) { 2628 pos_id = sequence_idx; 2629 } else { 2630 pos_id = 1; 2631 } 2632 ${h.setByOffset("global_idx","pos_id")} 2633 } else if (is_subsequent_prompt) { 2634 let past_seqlen = total_seqlen - i32(uniforms.sequence_length); 2635 if (past_seqlen + sequence_idx < total_seqlen) { 2636 pos_id = past_seqlen + sequence_idx; 2637 } else { 2638 pos_id = 1; 2639 } 2640 ${h.setByOffset("global_idx","pos_id")} 2641 } else if (global_idx < uniforms.batch_size) { 2642 ${h.setByOffset("global_idx","seqlen")} 2643 }; 2644 } 2645 `};return{name:"GeneratePositionIds",shaderCache:{hint:`${e};${t}`,inputDependencies:a},getRunData:()=>({outputs:[{dims:s,dataType:i}],dispatchGroup:{x:Math.ceil(o/64)},programUniforms:l}),getShaderSource:u}},nTe=(e,t)=>{var w;let r=Mae(e.inputs,t);if(e.inputs[0].dims.length===5)throw new Error("Packed QKV is not implemented");if(((w=e.inputs[1])==null?void 0:w.dims.length)===5)throw new Error("Packed KV is not implemented");let n=e.inputs[0],i=e.inputs[1]&&e.inputs[1].dims.length>0?e.inputs[1]:void 0,a=e.inputs[2]&&e.inputs[2].dims.length>0?e.inputs[2]:void 0,s=e.inputs[3]&&e.inputs[3].dims.length!==0?e.inputs[3]:void 0,o=e.inputs[4]&&e.inputs[4].dims.length!==0?e.inputs[4]:void 0,l=e.inputs.length>4?e.inputs[5]:void 0,u=e.inputs.length>5?e.inputs[6]:void 0,c=r.kvNumHeads?r.kvNumHeads:r.numHeads,d=Mi({axis:2,numOutputs:3,splitSizes:[r.numHeads*r.headSize,c*r.headSize,c*r.headSize]}),[f,h,p]=!i&&!a?e.compute(sB([n],d),{inputs:[n],outputs:[-1,-1,-1]}):[n,i,a],m,_;if(t.doRotary){let x=e.compute(Oae(r.batchSize,r.sequenceLength,l,u),{inputs:[l,u],outputs:[-1]})[0],E=e.inputs[7],T=e.inputs[8],S=Mi({interleaved:t.rotaryInterleaved!==0,numHeads:r.numHeads,rotaryEmbeddingDim:0,scale:t.scale}),A=[f,x,E,T],C=[-1];m=e.compute(bO(A,S),{inputs:A,outputs:C})[0],A.splice(0,1,h);let k=Mi({interleaved:t.rotaryInterleaved!==0,numHeads:r.kvNumHeads,rotaryEmbeddingDim:0,scale:t.scale});_=e.compute(bO(A,k),{inputs:A,outputs:C})[0]}let y=NE(e,r.batchSize,r.numHeads,r.sequenceLength,r.headSize,t.doRotary?m:f,void 0,0),v=kj(e,t.doRotary?_:h,r),b=kj(e,p,r);pA(e,y,v,b,void 0,void 0,s,o,void 0,r,l,u)}}),Oj,Nae,Iae,iTe,twt=Wt(()=>{tn(),_n(),E0(),xn(),Oj=(e,t,r,n,i,a,s,o)=>{let l=ss(a),u=l===1?"f32":`vec${l}f`,c=l===1?"vec2f":`mat2x${l}f`,d=i*s,f=64;d===1&&(f=256);let h=[i,s,a/l],p=[i,s,2],m=["rank","type","type"],_=[];_.push(...zr(h,p));let y=v=>{let b=Et("x",t.dataType,3,l),w=Et("scale",r.dataType,r.dims),x=Et("bias",n.dataType,n.dims),E=Mr("output",1,3,2),T=[b,w,x,E];return` 2646 var<workgroup> workgroup_shared : array<${c}, ${f}>; 2647 const workgroup_size = ${f}u; 2648 ${v.declareVariables(...T)} 2649 ${v.mainStart(f)} 2650 let batch = workgroup_index / uniforms.x_shape[1]; 2651 let channel = workgroup_index % uniforms.x_shape[1]; 2652 let hight = uniforms.x_shape[2]; 2653 // initialize workgroup memory 2654 var sum = ${u}(0); 2655 var squared_sum = ${u}(0); 2656 for (var h = local_idx; h < hight; h += workgroup_size) { 2657 let value = ${u}(${b.get("batch","channel","h")}); 2658 sum += value; 2659 squared_sum += value * value; 2660 } 2661 workgroup_shared[local_idx] = ${c}(sum, squared_sum); 2662 workgroupBarrier(); 2663 2664 for (var currSize = workgroup_size >> 1; currSize > 0; currSize = currSize >> 1) { 2665 if (local_idx < currSize) { 2666 workgroup_shared[local_idx] = workgroup_shared[local_idx] + workgroup_shared[local_idx + currSize]; 2667 } 2668 workgroupBarrier(); 2669 } 2670 if (local_idx == 0) { 2671 let sum_final = ${s0("workgroup_shared[0][0]",l)} / f32(hight * ${l}); 2672 let squared_sum_final = ${s0("workgroup_shared[0][1]",l)} / f32(hight * ${l}); 2673 2674 let inv_std_dev = inverseSqrt(squared_sum_final - sum_final * sum_final + f32(${o})); 2675 let channel_scale = inv_std_dev * f32(scale[channel]); 2676 let channel_shift = f32(bias[channel]) - sum_final * channel_scale; 2677 output[workgroup_index] = vec2f(channel_scale, channel_shift); 2678 } 2679 }`};return e.compute({name:"InstanceNormComputeChannelScaleShift",shaderCache:{hint:`${l};${o};${f}`,inputDependencies:m},getRunData:()=>({outputs:[{dims:p,dataType:1}],dispatchGroup:{x:d},programUniforms:_}),getShaderSource:y},{inputs:[t,r,n],outputs:[-1]})[0]},Nae=(e,t,r)=>{let n=t[0].dims,i=n,a=2,s=n[0],o=n[1],l=yt.sizeFromDimension(n,a),u=ss(l),c=yt.size(i)/u,d=Oj(e,t[0],t[1],t[2],s,l,o,r.epsilon),f=[s,o,l/u],h=[s,o],p=["type","none"],m=_=>{let y=Et("x",t[0].dataType,f.length,u),v=Et("scale_shift",1,h.length,2),b=Mr("output",t[0].dataType,f.length,u),w=[y,v,b];return` 2680 ${_.registerUniform("output_size","u32").declareVariables(...w)} 2681 ${_.mainStart()} 2682 ${_.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2683 let outputIndices = ${b.offsetToIndices("global_idx")}; 2684 let batch = outputIndices[0]; 2685 let channel = outputIndices[1]; 2686 let scale_shift = ${v.getByIndices("vec2<u32>(batch, channel)")}; 2687 let value = ${y.getByOffset("global_idx")} * ${b.type.value}(scale_shift.x) + ${b.type.value}(scale_shift.y); 2688 ${b.setByOffset("global_idx","value")}; 2689 }`};e.compute({name:"InstanceNormalization",shaderCache:{hint:`${u}`,inputDependencies:p},getRunData:()=>({outputs:[{dims:i,dataType:t[0].dataType}],dispatchGroup:{x:Math.ceil(c/64)},programUniforms:[{type:12,data:c},...zr(f,h,f)]}),getShaderSource:m},{inputs:[t[0],d]})},Iae=(e,t,r)=>{let n=t[0].dims,i=n,a=n[0],s=n[n.length-1],o=yt.sizeFromDimension(n,1)/s,l=ss(s),u=yt.size(i)/l,c=[{type:12,data:o},{type:12,data:Math.floor(s/l)}],d=["type","type"],f=!1,h=[0,n.length-1];for(let y=0;y<n.length-2;y++)f=f||n[y+1]!==1,h.push(y+1);f=f&&n[n.length-1]!==1;let p=f?e.compute(Jc(e.inputs[0],h),{inputs:[e.inputs[0]],outputs:[-1]})[0]:e.inputs[0].reshape(Array.from({length:n.length},(y,v)=>n[h[v]])),m=Oj(e,p,t[1],t[2],a,o,s,r.epsilon),_=y=>{let v=zo(t[0].dataType),b=l===1?"vec2f":`mat${l}x2f`,w=T=>{let S=T===0?"x":"y",A=l===1?"f32":`vec${l}f`;switch(l){case 1:return`${v}(${A}(scale.${S}))`;case 2:return`vec2<${v}>(${A}(scale[0].${S}, scale[1].${S}))`;case 4:return`vec4<${v}>(${A}(scale[0].${S}, scale[1].${S}, scale[2].${S}, scale[3].${S}))`;default:throw new Error(`Not supported compoents ${l}`)}},x=Et("input",t[0].dataType,t[0].dims,l),E=Mr("output",t[0].dataType,i,l);return` 2690 @group(0) @binding(0) var<storage, read> input : array<${x.type.storage}>; 2691 @group(0) @binding(1) var<storage, read> scale_input : array<${b}>; 2692 @group(0) @binding(2) var<storage, read_write> output : array<${E.type.storage}>; 2693 struct Uniforms {H: u32, C : u32}; 2694 @group(0) @binding(3) var<uniform> uniforms: Uniforms; 2695 2696 ${y.mainStart()}
2697 let current_image_number = global_idx / (uniforms.C * uniforms.H); 2698 let current_channel_number = global_idx % uniforms.C; 2699 2700 let scale_offset = current_image_number * uniforms.C + current_channel_number; 2701 let scale = scale_input[scale_offset]; 2702 output[global_idx] = fma(input[global_idx], ${w(0)}, ${w(1)}); 2703 }`};e.compute({name:"InstanceNormalizationNHWC",shaderCache:{hint:`${l}`,inputDependencies:d},getRunData:()=>({outputs:[{dims:i,dataType:t[0].dataType}],dispatchGroup:{x:Math.ceil(u/64)},programUniforms:c}),getShaderSource:_},{inputs:[t[0],m]})},iTe=(e,t)=>{t.format==="NHWC"?Iae(e,e.inputs,t):Nae(e,e.inputs,t)}}),Dae,Lae,aTe,rwt=Wt(()=>{tn(),_n(),xn(),Dae=e=>{if(!e||e.length<2)throw new Error("layerNorm requires at least 2 inputs.")},Lae=(e,t,r)=>{let n=t.simplified,i=e[0].dims,a=e[1],s=!n&&e[2],o=i,l=yt.normalizeAxis(t.axis,i.length),u=yt.sizeToDimension(i,l),c=yt.sizeFromDimension(i,l),d=yt.size(a.dims),f=s?yt.size(s.dims):0;if(d!==c||s&&f!==c)throw new Error(`Size of X.shape()[axis:] == ${c}. 2704 Size of scale and bias (if provided) must match this. 2705 Got scale size of ${d} and bias size of ${f}`);let h=[];for(let x=0;x<i.length;++x)x<l?h.push(i[x]):h.push(1);let p=ss(c),m=["type","type"],_=[{type:12,data:u},{type:1,data:c},{type:12,data:Math.floor(c/p)},{type:1,data:t.epsilon}];s&&m.push("type");let y=r>1,v=r>2,b=x=>{let E=zo(e[0].dataType),T=[Et("x",e[0].dataType,e[0].dims,p),Et("scale",a.dataType,a.dims,p)];s&&T.push(Et("bias",s.dataType,s.dims,p)),T.push(Mr("output",e[0].dataType,o,p)),y&&T.push(Mr("mean_data_output",1,h)),v&&T.push(Mr("inv_std_output",1,h));let S=[{name:"norm_count",type:"u32"},{name:"norm_size",type:"f32"},{name:"norm_size_vectorized",type:"u32"},{name:"epsilon",type:"f32"}];return` 2706 ${x.registerUniforms(S).declareVariables(...T)} 2707 ${x.mainStart()} 2708 ${x.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.norm_count")} 2709 let offset = global_idx * uniforms.norm_size_vectorized; 2710 var mean_vector = ${Q8("f32",p)}; 2711 var mean_square_vector = ${Q8("f32",p)}; 2712 2713 for (var h: u32 = 0u; h < uniforms.norm_size_vectorized; h++) { 2714 let value = ${W1(E,p,"x[h + offset]")}; 2715 mean_vector += value; 2716 mean_square_vector += value * value; 2717 } 2718 let mean = ${s0("mean_vector",p)} / uniforms.norm_size; 2719 let inv_std_dev = inverseSqrt(${s0("mean_square_vector",p)} / uniforms.norm_size ${n?"":"- mean * mean"} + uniforms.epsilon); 2720 2721 for (var j: u32 = 0; j < uniforms.norm_size_vectorized; j++) { 2722 let f32input = ${W1(E,p,"x[j + offset]")}; 2723 let f32scale = ${W1(E,p,"scale[j]")}; 2724 output[j + offset] = ${T[0].type.value}((f32input ${n?"":"- mean"}) * inv_std_dev * f32scale 2725 ${s?`+ ${W1(E,p,"bias[j]")}`:""} 2726 ); 2727 } 2728 2729 ${y?"mean_data_output[global_idx] = mean":""}; 2730 ${v?"inv_std_output[global_idx] = inv_std_dev":""}; 2731 }`},w=[{dims:o,dataType:e[0].dataType}];return y&&w.push({dims:h,dataType:1}),v&&w.push({dims:h,dataType:1}),{name:"LayerNormalization",shaderCache:{hint:`${p};${r};${n}`,inputDependencies:m},getRunData:()=>({outputs:w,dispatchGroup:{x:Math.ceil(u/64)},programUniforms:_}),getShaderSource:b}},aTe=(e,t)=>{Dae(e.inputs),e.compute(Lae(e.inputs,t,e.outputCount))}}),jae,sTe,nwt=Wt(()=>{_n(),gW(),yW(),jae=e=>{if(!e||e.length!==2)throw new Error("MatMul requires 2 inputs.");if(e[0].dims[e[0].dims.length-1]!==e[1].dims[e[1].dims.length-2])throw new Error("shared dimension does not match.")},sTe=e=>{jae(e.inputs);let t=Bw.calcShape(e.inputs[0].dims,e.inputs[1].dims,!0);if(!t)throw new Error("Can't use matmul on the given tensors");let r=t[t.length-1],n=e.inputs[0].dims[e.inputs[0].dims.length-1];
vendor: 5,152 bytes, lines 2731-2781
2731if(r<8&&n<8)e.compute(mW(e.inputs,{activation:""},t));else{let i=t[t.length-2],a=yt.size(e.inputs[0].dims.slice(0,-2)),s=yt.size(e.inputs[1].dims.slice(0,-2));if(a!==1&&i===1&&s===1){let o=e.inputs[0].reshape([1,a,n]),l=e.inputs[1].reshape([1,n,r]),u=[1,a,r],c=[o,l];e.compute(_O(c,{activation:""},t,u),{inputs:c})}else e.compute(_O(e.inputs,{activation:""},t))}}}),Rae,$ae,Fae,oTe,lTe,iwt=Wt(()=>{tn(),_n(),Cs(),xn(),Rae=(e,t)=>{if(e.length<3||e.length>4)throw new Error("MatMulNBits requires 3 or 4 inputs");let r=e[0],n=r.dims.length;if(r.dims[n-1]!==t.k)throw new Error("The last dim of input shape does not match the k value");let i=Math.floor((t.k+t.blockSize-1)/t.blockSize),a=t.blockSize/8*t.bits,s=e[1];if(!yt.areEqual(s.dims,[t.n,i,a]))throw new Error("The second inputs must be 3D tensor with shape N X nBlocksPerCol X blobSize");let o=e[2].dims;if(yt.size(o)!==t.n*i)throw new Error("scales input size error.");if(e.length===4){let l=e[3].dims,u=t.bits>4?t.n*i:t.n*Math.floor((i+1)/2);if(yt.size(l)!==u)throw new Error("zeroPoints input size error.")}},$ae=(e,t)=>{let r=e[0].dims,n=r.length,i=r[n-2],a=t.k,s=t.n,o=r.slice(0,n-2),l=yt.size(o),u=e[1].dims[2]/4,c=e[0].dataType,d=ss(t.k),f=ss(u),h=ss(s),p=o.concat([i,s]),m=i>1&&s/h%2===0?2:1,_=yt.size(p)/h/m,y=64,v=[],b=[l,i,a/d],w=yt.convertShape(e[1].dims).slice();w.splice(-1,1,u/f),v.push(...zr(b)),v.push(...zr(w)),v.push(...zr(e[2].dims)),e.length===4&&v.push(...zr(yt.convertShape(e[3].dims)));let x=[l,i,s/h];v.push(...zr(x));let E=T=>{let S=b.length,A=Et("a",e[0].dataType,S,d),C=Et("b",12,w.length,f),k=Et("scales",e[2].dataType,e[2].dims.length),M=[A,C,k],D=e.length===4?Et("zero_points",12,e[3].dims.length):void 0;D&&M.push(D);let $=x.length,V=Mr("output",e[0].dataType,$,h),U=zo(e[0].dataType),B=(()=>{switch(d){case 1:return`array<${U}, 8>`;case 2:return`mat4x2<${U}>`;case 4:return`mat2x4<${U}>`;default:throw new Error(`${d}-component is not supported.`)}})(),z=()=>{let K=` 2732 // reuse a data 2733 var input_offset = ${A.indicesToOffset(`${A.type.indices}(batch, row, word_offset)`)}; 2734 var a_data: ${B}; 2735 for (var j: u32 = 0; j < ${8/d}; j++) { 2736 a_data[j] = ${A.getByOffset("input_offset")}; 2737 input_offset++; 2738 } 2739 `;for(let O=0;O<h*m;O++)K+=` 2740 b_value = ${f===1?`b${O}_data`:`b${O}_data[i]`}; 2741 b_value_lower = unpack4xU8(b_value & b_mask); 2742 b_value_upper = unpack4xU8((b_value >> 4) & b_mask); 2743 b_quantized_values = ${B}(${Array.from({length:4},(N,X)=>`${U}(b_value_lower[${X}]), ${U}(b_value_upper[${X}])`).join(", ")}); 2744 b_dequantized_values = ${d===1?`${B}(${Array.from({length:8},(N,X)=>`(b_quantized_values[${X}] - ${D?`zero_point${O}`:"zero_point"}) * scale${O}`).join(", ")});`:`(b_quantized_values - ${B}(${Array(8).fill(`${D?`zero_point${O}`:"zero_point"}`).join(",")})) * scale${O};`}; 2745 workgroup_shared[local_id.x * ${m} + ${Math.floor(O/h)}]${h>1?`[${O%h}]`:""} += ${Array.from({length:8/d},(N,X)=>`${d===1?`a_data[${X}] * b_dequantized_values[${X}]`:`dot(a_data[${X}], b_dequantized_values[${X}])`}`).join(" + ")}; 2746 `;return K},q=()=>{let K=` 2747 var col_index = col * ${h}; 2748 ${D?` 2749 let zero_point_bytes_per_col = (nBlocksPerCol + 1) / 2; 2750 var zero_point_byte_count: u32; 2751 var zero_point_word_index: u32; 2752 var zero_point_byte_offset: u32; 2753 let zero_point_nibble_offset: u32 = block & 0x1u; 2754 var zero_point_bits_offset: u32; 2755 var zero_point_word: u32;`:` 2756 // The default zero point is 8 for unsigned 4-bit quantization. 2757 let zero_point = ${U}(8);`} 2758 `;for(let O=0;O<h*m;O++)K+=` 2759 let scale${O} = ${k.getByOffset("col_index * nBlocksPerCol + block")}; 2760 ${D?` 2761 zero_point_byte_count = col_index * zero_point_bytes_per_col + (block >> 0x1u); 2762 zero_point_word_index = zero_point_byte_count >> 0x2u; 2763 zero_point_byte_offset = zero_point_byte_count & 0x3u; 2764 zero_point_bits_offset = (zero_point_byte_offset << 3) + (zero_point_nibble_offset << 2); 2765 zero_point_word = ${D.getByOffset("zero_point_word_index")} >> zero_point_bits_offset; 2766 let zero_point${O} = ${U}((zero_point_word) & 0xFu);`:""} 2767 col_index += 1;`;return K},L=()=>{let K=`col_index = col * ${h};`;for(let O=0;O<h*m;O++)K+=` 2768 let b${O}_data = ${C.getByIndices(`${C.type.indices}(col_index, block, word)`)}; 2769 col_index += 1;`;return K+=` 2770 var b_value: u32; 2771 let b_mask: u32 = 0x0F0F0F0Fu; 2772 var b_value_lower: vec4<u32>; 2773 var b_value_upper: vec4<u32>; 2774 var b_quantized_values: ${B}; 2775 var b_dequantized_values: ${B};`,K};return` 2776 var<workgroup> workgroup_shared: array<${V.type.value}, ${m*y}>; 2777 ${T.declareVariables(...M,V)} 2778 ${T.mainStart([y,1,1])} 2779 let output_indices = ${V.offsetToIndices(`(global_idx / ${y}) * ${m}`)}; 2780 let col = output_indices[2]; 2781 let row = output_indices[1];
2782 let batch = output_indices[0]; 2783 let nBlocksPerCol = uniforms.b_shape[1]; 2784 2785 for (var block = local_id.x; block < nBlocksPerCol; block += ${y}) { 2786 //process one block 2787 var word_offset: u32 = block * ${t.blockSize/d}; 2788 ${q()} 2789 for (var word: u32 = 0; word < ${u}; word += ${f}) { 2790 ${L()} 2791 for (var i: u32 = 0; i < ${f}; i++) { 2792 ${z()} 2793 word_offset += ${8/d}; 2794 } 2795 } 2796 } 2797 workgroupBarrier(); 2798 2799 if (local_id.x < ${m}) { 2800 var output_value: ${V.type.value} = ${V.type.value}(0); 2801 var workgroup_shared_offset: u32 = local_id.x; 2802 for (var b: u32 = 0u; b < ${y}u; b++) { 2803 output_value += workgroup_shared[workgroup_shared_offset]; 2804 workgroup_shared_offset += ${m}; 2805 } 2806 ${V.setByIndices(`${V.type.indices}(batch, row, col + local_id.x)`,"output_value")}; 2807 } 2808 }`};return{name:"MatMulNBits",shaderCache:{hint:`${t.blockSize};${t.bits};${d};${f};${h};${m};${y}`,inputDependencies:Array(e.length).fill("rank")},getRunData:()=>({outputs:[{dims:p,dataType:c}],dispatchGroup:{x:_},programUniforms:v}),getShaderSource:E}},Fae=(e,t)=>{let r=e[0].dims,n=r.length,i=r[n-2],a=t.k,s=t.n,o=r.slice(0,n-2),l=yt.size(o),u=e[1].dims[2]/4,c=e[0].dataType,d=ss(t.k),f=ss(u),h=o.concat([i,s]),p=128,m=s%8===0?8:s%4===0?4:1,_=p/m,y=_*f*8,v=y/d,b=y/t.blockSize,w=yt.size(h)/m,x=[],E=[l,i,a/d],T=yt.convertShape(e[1].dims).slice();T.splice(-1,1,u/f),x.push(...zr(E)),x.push(...zr(T)),x.push(...zr(e[2].dims)),e.length===4&&x.push(...zr(yt.convertShape(e[3].dims)));let S=[l,i,s];x.push(...zr(S));let A=C=>{let k=E.length,M=Et("a",e[0].dataType,k,d),D=Et("b",12,T.length,f),$=Et("scales",e[2].dataType,e[2].dims.length),V=[M,D,$],U=e.length===4?Et("zero_points",12,e[3].dims.length):void 0;U&&V.push(U);let B=S.length,z=Mr("output",e[0].dataType,B),q=zo(e[0].dataType),L=()=>{switch(d){case 1:return` 2809 let a_data0 = vec4<${q}>(sub_a[word_offset], sub_a[word_offset + 1], sub_a[word_offset + 2], sub_a[word_offset + 3]); 2810 let a_data1 = vec4<${q}>(sub_a[word_offset + 4], sub_a[word_offset + 5], sub_a[word_offset + 6], sub_a[word_offset + 7]);`;case 2:return` 2811 let a_data0 = vec4<${q}>(sub_a[word_offset], sub_a[word_offset + 1]); 2812 let a_data1 = vec4<${q}>(sub_a[word_offset + 2], sub_a[word_offset + 3]);`;case 4:return` 2813 let a_data0 = sub_a[word_offset]; 2814 let a_data1 = sub_a[word_offset + 1];`;default:throw new Error(`${d}-component is not supported.`)}};return` 2815 var<workgroup> sub_a: array<${M.type.value}, ${v}>; 2816 var<workgroup> inter_results: array<array<${z.type.value}, ${_}>, ${m}>; 2817 ${C.declareVariables(...V,z)} 2818 ${C.mainStart([_,m,1])} 2819 let output_indices = ${z.offsetToIndices(`workgroup_index * ${m}`)}; 2820 let col = output_indices[2]; 2821 let row = output_indices[1]; 2822 let batch = output_indices[0]; 2823 let n_blocks_per_col = uniforms.b_shape[1]; 2824 let num_tiles = (n_blocks_per_col - 1) / ${b} + 1; 2825 2826 // Loop over shared dimension. 2827 for (var tile: u32 = 0; tile < num_tiles; tile += 1) { 2828 let a_col_start = tile * ${v}; 2829 // load one tile A data into shared memory. 2830 for (var a_offset = local_idx; a_offset < ${v}; a_offset += ${p}) 2831 { 2832 let a_col = a_col_start + a_offset; 2833 if (a_col < uniforms.a_shape[2]) 2834 { 2835 sub_a[a_offset] = ${M.getByIndices(`${M.type.indices}(batch, row, a_col)`)}; 2836 } else { 2837 sub_a[a_offset] = ${M.type.value}(0); 2838 } 2839 } 2840 workgroupBarrier(); 2841 2842 // each thread process one block 2843 let b_row = col + local_id.y; 2844 let block = tile * ${b} + local_id.x; 2845 ${U?` 2846 let zero_point_bytes_per_col = (n_blocks_per_col + 1) / 2; 2847 let zero_point_byte_count = b_row * zero_point_bytes_per_col + (block >> 0x1u); 2848 let zero_point_word_index = zero_point_byte_count >> 0x2u; 2849 let zero_point_byte_offset = zero_point_byte_count & 0x3u; 2850 let zero_point_nibble_offset: u32 = block & 0x1u; 2851 let zero_point_bits_offset = (zero_point_byte_offset << 3) + (zero_point_nibble_offset << 2); 2852 let zero_point_word = ${U.getByOffset("zero_point_word_index")} >> zero_point_bits_offset; 2853 let zero_point = ${q}((zero_point_word) & 0xFu);`:` 2854 // The default zero point is 8 for unsigned 4-bit quantization. 2855 let zero_point = ${q}(8);`} 2856 let scale = ${$.getByOffset("b_row * n_blocks_per_col + block")}; 2857 let b_data = ${D.getByIndices(`${D.type.indices}(b_row, block, 0)`)}; 2858 var word_offset = local_id.x * ${t.blockSize/d}; 2859 for (var i: u32 = 0; i < ${f}; i++) { 2860 ${L()} 2861 let b_value = ${f===1?"b_data":"b_data[i]"}; 2862 let b_value_lower = unpack4xU8(b_value & 0x0F0F0F0Fu); 2863 let b_value_upper = unpack4xU8((b_value >> 4) & 0x0F0F0F0Fu); 2864 let b_quantized_values = mat2x4<${q}>(${Array.from({length:4},(K,O)=>`${q}(b_value_lower[${O}]), ${q}(b_value_upper[${O}])`).join(", ")}); 2865 let b_dequantized_values = (b_quantized_values - mat2x4<${q}>(${Array(8).fill("zero_point").join(",")})) * scale; 2866 inter_results[local_id.y][local_id.x] += ${Array.from({length:2},(K,O)=>`${`dot(a_data${O}, b_dequantized_values[${O}])`}`).join(" + ")}; 2867 word_offset += ${8/d}; 2868 } 2869 workgroupBarrier(); 2870 } 2871 2872 if (local_idx < ${m}) { 2873 var output_value: ${z.type.value} = ${z.type.value}(0); 2874 for (var b = 0u; b < ${_}; b++) { 2875 output_value += inter_results[local_idx][b]; 2876 } 2877 if (col + local_idx < uniforms.output_shape[2]) 2878 { 2879 ${z.setByIndices(`${z.type.indices}
2879(batch, row, col + local_idx)`,"output_value")} 2880 } 2881 } 2882 }`};return{name:"BlockwiseMatMulNBits32",shaderCache:{hint:`${t.blockSize};${d};${f};${_};${m}`,inputDependencies:Array(e.length).fill("rank")},getRunData:()=>({outputs:[{dims:h,dataType:c}],dispatchGroup:{x:w},programUniforms:x}),getShaderSource:A}},oTe=(e,t)=>{Rae(e.inputs,t),t.blockSize===32&&e.adapterInfo.isVendor("intel")&&e.adapterInfo.isArchitecture("gen-12lp")?e.compute(Fae(e.inputs,t)):e.compute($ae(e.inputs,t))},lTe=e=>Mi(e)}),Bae,zae,Uae,Wae,Vae,Hae,Gae,qae,uTe,awt=Wt(()=>{tn(),_n(),xn(),Bae=e=>{if(!e||e.length<1)throw new Error("Too few inputs");if(e[0].dataType!==1&&e[0].dataType!==10)throw new Error("Input type must be float or float16.");if(e.length>=2){let t=e[0].dims.length*2===e[1].dims[0];if(e.length===4&&(t=e[3].dims[0]*2===e[1].dims[0]),!t)throw new Error("The pads should be a 1D tensor of shape [2 * input_rank] or [2 * num_axes].")}},zae=(e,t,r)=>{let n="";for(let i=t-1;i>=0;--i)n+=` 2883 k = i32(${e.indicesGet("indices",
2883i)}) - ${Rr("uniforms.pads",i,r)}; 2884 if (k < 0) { 2885 break; 2886 } 2887 if (k >= i32(${Rr("uniforms.x_shape",i,t)})) { 2888 break; 2889 } 2890 offset += k * i32(${Rr("uniforms.x_strides",i,t)}); 2891 `;return` 2892 value = ${e.type.value}(uniforms.constant_value); 2893 for (var i = 0; i < 1; i++) { 2894 var offset = 0; 2895 var k = 0; 2896 ${n} 2897 value = x[offset]; 2898 } 2899 `},Uae=(e,t,r)=>{let n="";for(let i=t-1;i>=0;--i)n+=` 2900 k = i32(${e.indicesGet("indices",i)}) - ${Rr("uniforms.pads",i,r)}; 2901 if (k < 0) { 2902 k = -k; 2903 } 2904 { 2905 let _2n_1 = 2 * (i32(${Rr("uniforms.x_shape",i,t)}) - 1); 2906 k = k % _2n_1; 2907 if(k >= i32(${Rr("uniforms.x_shape",i,t)})) { 2908 k = _2n_1 - k; 2909 } 2910 } 2911 offset += k * i32(${Rr("uniforms.x_strides",i,t)}); 2912 `;return` 2913 var offset = 0; 2914 var k = 0; 2915 ${n} 2916 value = x[offset]; 2917 `},Wae=(e,t,r)=>{let n="";for(let i=t-1;i>=0;--i)n+=`
2918 k = i32(${e.indicesGet("indices",i)}) - ${Rr("uniforms.pads",i,r)}; 2919 if (k < 0) { 2920 k = 0; 2921 } 2922 if (k >= i32(${Rr("uniforms.x_shape",i,t)})) { 2923 k = i32(${Rr("uniforms.x_shape",i,t)}) - 1; 2924 } 2925 offset += k * i32(${Rr("uniforms.x_strides",i,t)}); 2926 `;return` 2927 var offset = 0; 2928 var k = 0; 2929 ${n} 2930 value = x[offset]; 2931 `},Vae=(e,t,r)=>{let n="";for(let i=t-1;i>=0;--i)n+=` 2932 k = i32(${e.indicesGet("indices",i)}) - ${Rr("uniforms.pads",i,r)}; 2933 if (k < 0) { 2934 k += i32(${Rr("uniforms.x_shape",i,t)}]); 2935 } 2936 if (k >= i32(${Rr("uniforms.x_shape",i,t)})) { 2937 k -= i32(${Rr("uniforms.x_shape",i,t)}); 2938 } 2939 offset += k * i32(${Rr("uniforms.x_strides",i,t)}); 2940 `;return` 2941 var offset = 0; 2942 var k = 0; 2943 ${n} 2944 value = x[offset]; 2945 `},Hae=(e,t,r)=>{switch(r.mode){case 0:return zae(e,t,r.pads.length);case 1:return Uae(e,t,r.pads.length);case 2:return Wae(e,t,r.pads.length);case 3:return Vae(e,t,r.pads.length);default:throw new Error("Invalid mode")}},Gae=(e,t)=>{let r=yt.padShape(e[0].dims.slice(),t.pads),n=e[0].dims,i=yt.size(r),a=[{type:12,data:i},{type:6,data:t.pads}],s=e.length>=3&&e[2].data;t.mode===0&&a.push({type:s?e[2].dataType:1,data:t.value}),a.push(...zr(e[0].dims,r));let o=["rank"],l=u=>{let c=Mr("output",e[0].dataType,r.length),d=Et("x",e[0].dataType,n.length),f=d.type.value,h=Hae(c,n.length,t),p=[{name:"output_size",type:"u32"},{name:"pads",type:"i32",length:t.pads.length}];return t.mode===0&&p.push({name:"constant_value",type:s?f:"f32"}),` 2946 ${u.registerUniforms(p).declareVariables(d,c)} 2947 ${u.mainStart()} 2948 ${u.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 2949 2950 let indices = ${c.offsetToIndices("global_idx")}; 2951 2952 var value = ${f}(0); 2953 ${h} 2954 output[global_idx] = value; 2955 }`};return{name:"Pad",shaderCache:{hint:`${t.mode}${s}`,inputDependencies:o},getRunData:()=>({outputs:[{dims:r,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(yt.size(r)/64)},programUniforms:a}),getShaderSource:l}},qae=(e,t)=>{if(e.length>1){let r=e[1].getBigInt64Array(),n=e.length>=3&&e[2].data?e[2].dataType===10?e[2].getUint16Array()[0]:e[2].getFloat32Array()[0]:0,i=e[0].dims.length,a=new Int32Array(2*i).fill(0);if(e.length>=4){let o=e[3].getBigInt64Array();for(let l=0;l<o.length;l++)a[Number(o[l])]=Number(r[l]),a[Number(o[l])+i]=Number(r[l+o.length])}else r.forEach((o,l)=>a[Number(l)]=Number(o));let s=[];return a.forEach(o=>s.push(o)),{mode:t.mode,value:n,pads:s}}else return t},uTe=(e,t)=>
vendor: 5,171 bytes, lines 2955-3025
2955{Bae(e.inputs);let r=qae(e.inputs,t);e.compute(Gae(e.inputs,r),{inputs:[0]})}}),Y2,Nj,Ij,Dj,Lj,Kae,Yae,jj,Rj,cTe,dTe,$j,fTe,hTe,Fj,pTe,mTe,gTe,yTe,swt=Wt(()=>{lh(),tn(),_n(),xn(),Y2=e=>{if(_a.webgpu.validateInputContent&&(!e||e.length!==1))throw new Error("Pool ops requires 1 input.")},Nj=(e,t,r)=>{let n=t.format==="NHWC",i=e.dims.slice();n&&i.splice(1,0,i.pop());let a=Object.hasOwnProperty.call(t,"dilations"),s=t.kernelShape.slice(),o=t.strides.slice(),l=a?t.dilations.slice():[],u=t.pads.slice();yO.adjustPoolAttributes(r,i,s,o,l,u);let c=yO.computePoolOutputShape(r,i,o,l,s,u,t.autoPad),d=Object.assign({},t);a?Object.assign(d,{kernelShape:s,strides:o,pads:u,dilations:l,cacheKey:t.cacheKey}):Object.assign(d,{kernelShape:s,strides:o,pads:u,cacheKey:t.cacheKey});let f=c.slice();return f.push(f.splice(1,1)[0]),[d,n?f:c]},Ij=(e,t)=>{let r=t.format==="NHWC",n=yt.size(e),i=yt.size(t.kernelShape),a=[{type:12,data:n},{type:12,data:i}],s=[{name:"outputSize",type:"u32"},{name:"kernelSize",type:"u32"}];if(t.kernelShape.length<=2){let o=t.kernelShape[t.kernelShape.length-1],l=t.strides[t.strides.length-1],u=t.pads[t.pads.length/2-1],c=t.pads[t.pads.length-1],d=!!(u+c);a.push({type:12,data:o},{type:12,data:l},{type:12,data:u},{type:12,data:c}),s.push({name:"kw",type:"u32"},{name:"sw",type:"u32"},{name:"pwStart",type:"u32"},{name:"pwEnd",type:"u32"});let f=!1;if(t.kernelShape.length===2){let h=t.kernelShape[t.kernelShape.length-2],p=t.strides[t.strides.length-2],m=t.pads[t.pads.length/2-2],_=t.pads[t.pads.length-2];f=!!(m+_),a.push({type:12,data:h},{type:12,data:p},{type:12,data:m},{type:12,data:_}),s.push({name:"kh",type:"u32"},{name:"sh",type:"u32"},{name:"phStart",type:"u32"},{name:"phEnd",type:"u32"})}return[a,s,!0,d,f]}else{if(r)throw new Error("Pooling with kernelShape.length > 2 is not supported for NHWC format.");let o=yt.computeStrides(t.kernelShape);a.push({type:12,data:o},{type:12,data:t.pads},{type:12,data:t.strides}),s.push({name:"kernelStrides",type:"u32",length:o.length},{name:"pads",type:"u32",length:t.pads.length},{name:"strides",type:"u32",length:t.strides.length});let l=t.pads.reduce((u,c)=>u+c);return[a,s,!!l,!1,!1]}},Dj=(e,t,r,n,i,a,s,o,l,u,c,d)=>{let f=i.format==="NHWC",h=t.type.value,p=Mr("output",t.type.tensor,n);if(i.kernelShape.length<=2){let m="",_="",y="",v=r-(f?2:1);if(c?m=` 2956 for (var i: u32 = 0u; i < uniforms.kw; i++) { 2957 xIndices[${v}] = indices[${v}] * uniforms.sw - uniforms.pwStart + i; 2958 if (xIndices[${v}] < 0 || xIndices[${v}] 2959 >= uniforms.x_shape[${v}]) { 2960 pad++; 2961 continue; 2962 } 2963 let x_val = x[${t.indicesToOffset("xIndices")}]; 2964 ${a} 2965 }`:m=` 2966 for (var i: u32 = 0u; i < uniforms.kw; i++) { 2967 xIndices[${v}] = indices[${v}] * uniforms.sw - uniforms.pwStart + i; 2968 let x_val = x[${t.indicesToOffset("xIndices")}]; 2969 ${a} 2970 }`,i.kernelShape.length===2){let b=r-(f?3:2);d?_=` 2971 for (var j: u32 = 0u; j < uniforms.kh; j++) { 2972 xIndices[${b}] = indices[${b}] * uniforms.sh - uniforms.phStart + j; 2973 if (xIndices[${b}] < 0 || xIndices[${b}] >= uniforms.x_shape[${b}]) { 2974 pad += i32(uniforms.kw); 2975 continue; 2976 } 2977 `:_=` 2978 for (var j: u32 = 0u; j < uniforms.kh; j++) { 2979 xIndices[${b}] = indices[${b}] * uniforms.sh - uniforms.phStart + j; 2980 `,y=` 2981 } 2982 `}return` 2983 ${e.registerUniforms(l).declareVariables(t,p)} 2984 2985 ${e.mainStart()} 2986 ${e.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 2987 2988 let indices = ${p.offsetToIndices("global_idx")}; 2989 var xIndices = ${p.offsetToIndices("global_idx")}; 2990 2991 var value = ${h}(${o}); 2992 var pad = 0; 2993 ${_} 2994 ${m} 2995 ${y} 2996 ${s} 2997 2998 output[global_idx] = value; 2999 }`}else{if(f)throw new Error("Pooling with kernelShape.length > 2 is not supported for NHWC format.");let m=i.kernelShape.length,_=i.pads.length,y="";return u?y=` 3000 if (xIndices[j] >= uniforms.x_shape[j]) { 3001 pad++; 3002 isPad = true; 3003 break; 3004 } 3005 } 3006 if (!isPad) { 3007 let x_val = x[${t.indicesToOffset("xIndices")}]; 3008 ${a} 3009 }`:y=` 3010 } 3011 let x_val = x[${t.indicesToOffset("xIndices")}]; 3012 ${a} 3013 `,` 3014 ${e.registerUniforms(l).declareVariables(t,p)} 3015 3016 ${e.mainStart()} 3017 ${e.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 3018 let indices = ${p.offsetToIndices("global_idx")}; 3019 var xIndices = ${p.offsetToIndices("global_idx")}; 3020 3021 var offsets: array<u32, ${m}>; 3022 3023 var value = ${h}(${o}); 3024 var pad = 0; 3025 var isPad = false;
3026 3027 for (var i: u32 = 0u; i < uniforms.kernelSize; i++) { 3028 var offset = i; 3029 for (var j = 0u; j < ${m-1}u; j++) { 3030 offsets[j] = offset / ${Rr("uniforms.kernelStrides","j",m)}; 3031 offset -= offsets[j] * ${Rr("uniforms.kernelStrides","j",m)}; 3032 } 3033 offsets[${m-1}] = offset; 3034 3035 isPad = false; 3036 for (var j = ${r-m}u; j < ${r}u; j++) { 3037 xIndices[j] = indices[j] * ${Rr("uniforms.strides",`j - ${r-m}u`,m)} 3038 + offsets[j - ${r-m}u] - ${Rr("uniforms.pads","j - 2u",_)}; 3039 ${y} 3040 } 3041 ${s} 3042 3043 output[global_idx] = value; 3044 }`}},Lj=e=>`${e.format};${e.ceilMode};${e.autoPad};${e.kernelShape.length}`,Kae=e=>`${Lj(e)};${e.countIncludePad}`,Yae=e=>`${Lj(e)};${e.storageOrder};${e.dilations}`,jj=e=>({format:e.format,autoPad:["NOTSET","VALID","SAME_UPPER","SAME_LOWER"][e.auto_pad],ceilMode:e.ceil_mode,kernelShape:e.kernel_shape,strides:e.strides,pads:e.pads}),Rj=(e,t,r,n)=>{let[i,a]=Nj(t,n,r),s=Et("x",t.dataType,t.dims.length),o=s.type.value,l="value += x_val;",u="";i.countIncludePad?u+=`value /= ${o}(uniforms.kernelSize);`:u+=`value /= ${o}(i32(uniforms.kernelSize) - pad);`;let[c,d,f,h,p]=Ij(a,i);c.push(...zr(t.dims,a));let m=["rank"];return{name:e,shaderCache:{hint:`${n.cacheKey};${f};${h};${p}`,inputDependencies:m},getRunData:()=>({outputs:[{dims:a,dataType:t.dataType}],dispatchGroup:{x:Math.ceil(yt.size(a)/64)},programUniforms:c}),getShaderSource:_=>Dj(_,s,t.dims.length,a.length,i,l,u,0,d,f,h,p)}},cTe=e=>{let t=e.count_include_pad!==0,r=jj(e);if(r.ceilMode!==0)throw new Error("using ceil() in shape computation is not yet supported for AveragePool");let n={countIncludePad:t,...r,cacheKey:""};return{...n,cacheKey:Kae(n)}},dTe=(e,t)=>{Y2(e.inputs),e.compute(Rj("AveragePool",e.inputs[0],!1,t))},$j={autoPad:"",ceilMode:0,countIncludePad:!1,kernelShape:[],strides:[],pads:[],storageOrder:0,dilations:[]},fTe=e=>{let t=e.format;return{format:t,...$j,cacheKey:t}},hTe=(e,t)=>{Y2(e.inputs),e.compute(Rj("GlobalAveragePool",e.inputs[0],!0,t))},Fj=(e,t,r,n)=>{let[i,a]=Nj(t,n,r),s=` 3045 value = max(x_val, value); 3046 `,o="",l=Et("x",t.dataType,t.dims.length),u=["rank"],[c,d,f,h,p]=Ij(a,i);return c.push(...zr(t.dims,a)),{name:e,shaderCache:{hint:`${n.cacheKey};${f};${h};${p}`,inputDependencies:u},getRunData:()=>({outputs:[{dims:a,dataType:t.dataType}],dispatchGroup:{x:Math.ceil(yt.size(a)/64)},programUniforms:c}),getShaderSource:m=>Dj(m,l,t.dims.length,a.length,i,s,o,t.dataType===10?-65504:-1e5,d,f,h,p)}},pTe=(e,t)=>{Y2(e.inputs),e.compute(Fj("MaxPool",e.inputs[0],!1,t))},mTe=e=>{let t=e.storage_order,r=e.dilations,n=jj(e);if(t!==0)throw new Error("column major storage order is not yet supported for MaxPool");if(n.ceilMode!==0)throw new Error("using ceil() in shape computation is not yet supported for MaxPool");let i={storageOrder:t,dilations:r,...n,cacheKey:""};return{...i,cacheKey:Yae(i)}},gTe=e=>{let t=e.format;return{format:t,...$j,cacheKey:t}},yTe=(e,t)=>{Y2(e.inputs),e.compute(Fj("GlobalMaxPool",e.inputs[0],!0,t))}}),Xae,Qae,vTe,_Te,owt=Wt(()=>{tn(),_n(),Cs(),xn(),Xae=(e,t)=>{if(e.length<2||e.length>3)throw new Error("DequantizeLinear requires 2 or 3 inputs.");if(e.length===3&&e[1].dims===e[2].dims)throw new Error("x-scale and x-zero-point must have the same shape.");if(e.length===3&&e[0].dataType!==e[2].dataType)throw new Error("x and x-zero-point must have the same data type.");if(e[0].dataType===6&&e.length>2)throw new Error("In the case of dequantizing int32 there is no zero point.");if(e[1].dims.length!==0&&e[1].dims.length!==1&&e[1].dims.length!==e[0].dims.length)throw new Error("scale input must be a scalar, a 1D tensor, or have the same rank as the input tensor.");if(e.length>2){if(e[0].dataType!==e[2].dataType)throw new Error("x and x-zero-point must have the same data type.");if(e[1].dims.length!==e[2].dims.length)throw new Error("scale and zero-point inputs must have the same rank.");if(!e[1].dims.map((r,n)=>r===e[2].dims[n]).reduce((r,n)=>r&&n,!0))throw new Error("scale and zero-point inputs must have the same shape.")}if(t.blockSize>0){if(e[1].dims.length===0||e[1].dims.length===1&&e[1].dims[0]===1)throw new Error("blockSize must be set only for block quantization.");
vendor: 8,441 bytes, lines 3046-3136
3046if(!e[1].dims.map((i,a)=>a===t.axis||i===e[0].dims[a]).reduce((i,a)=>i&&a,!0))throw new Error("For block qunatization, scale input shape to match the input shape except for the axis");if(e[1].dims.length!==e[0].dims.length)throw new Error("For block qunatization the scale input rank must be the same as the x rank.");let r=e[0].dims[t.axis],n=e[1].dims[t.axis];if(t.blockSize<Math.ceil(r/n)||t.blockSize>Math.ceil(r/(n-1)-1))throw new Error("blockSize must be with in the range [ceil(dI / Si), ceil(dI / (Si - 1) - 1)].")}},Qae=(e,t)=>{let r=yt.normalizeAxis(t.axis,e[0].dims.length),n=e[0].dataType,i=n===3,a=e[0].dims,s=e[1].dataType,o=yt.size(a),l=n===3||n===2,u=l?[Math.ceil(yt.size(e[0].dims)/4)]:e[0].dims,c=e[1].dims,d=e.length>2?e[2]:void 0,f=d?l?[Math.ceil(yt.size(d.dims)/4)]:d.dims:void 0,h=c.length===0||c.length===1&&c[0]===1,p=h===!1&&c.length===1,m=ss(o),_=h&&(!l||m===4),y=_?m:1,v=_&&!l?m:1,b=Et("input",l?12:n,u.length,v),w=Et("scale",s,c.length),x=d?Et("zero_point",l?12:n,f.length):void 0,E=Mr("output",s,a.length,y),T=[b,w];x&&T.push(x);let S=[u,c];d&&S.push(f);let A=[{type:12,data:o/y},{type:12,data:r},{type:12,data:t.blockSize},...zr(...S,a)],C=k=>{let M=[{name:"output_size",type:"u32"},{name:"axis",type:"u32"},{name:"block_size",type:"u32"}];return` 3047 ${k.registerUniforms(M).declareVariables(...T,E)} 3048 ${k.mainStart()} 3049 ${k.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 3050 let output_indices = ${E.offsetToIndices("global_idx")}; 3051 3052 // Set input x 3053 ${l?` 3054 let input = ${b.getByOffset("global_idx / 4")}; 3055 let x_vec = ${i?"unpack4xI8(input)":"unpack4xU8(input)"}; 3056 let x_value = ${y===1?"x_vec[global_idx % 4]":"x_vec"};`:`let x_value = ${b.getByOffset("global_idx")};`}; 3057 3058 // Set scale input 3059 ${h?`let scale_value= ${w.getByOffset("0")}`:p?` 3060 let scale_index = ${E.indicesGet("output_indices","uniforms.axis")}; 3061 let scale_value= ${w.getByOffset("scale_index")};`:` 3062 var scale_indices: ${w.type.indices} = output_indices; 3063 let index = ${w.indicesGet("scale_indices","uniforms.axis")} / uniforms.block_size; 3064 ${w.indicesSet("scale_indices","uniforms.axis","index")}; 3065 let scale_value= ${w.getByIndices("scale_indices")};`}; 3066 3067 // Set zero-point input 3068 ${x?h?l?` 3069 let zero_point_input = ${x.getByOffset("0")}; 3070 let zero_point_vec = ${i?"unpack4xI8(zero_point_input)":"unpack4xU8(zero_point_input)"}; 3071 let zero_point_value= zero_point_vec[0]`:`let zero_point_value = ${x.getByOffset("0")}`:p?l?` 3072 let zero_point_index = ${E.indicesGet("output_indices","uniforms.axis")}; 3073 let zero_point_input = ${x.getByOffset("zero_point_index / 4")}; 3074 let zero_point_vec = ${i?"unpack4xI8(zero_point_input)":"unpack4xU8(zero_point_input)"}; 3075 let zero_point_value = zero_point_vec[zero_point_index % 4]`:` 3076 let zero_point_index = ${E.indicesGet("output_indices","uniforms.axis")}; 3077 let zero_point_value = ${x.getByOffset("zero_point_index")};`:l?` 3078 let zero_point_offset = ${w.indicesToOffset("scale_indices")}; 3079 let zero_point_input = ${x.getByOffset("zero_point_offset / 4")}; 3080 let zero_point_vec = ${i?"unpack4xI8(zero_point_input)":"unpack4xU8(zero_point_input)"}; 3081 let zero_point_value = zero_point_vec[zero_point_offset % 4];`:`let zero_point_value = ${x.getByIndices("scale_indices")};`:`let zero_point_value = ${l?i?"i32":"u32":b.type.value}(0);`}; 3082 // Compute and write output 3083 ${E.setByOffset("global_idx",`${E.type.value}(x_value - zero_point_value) * scale_value`)}; 3084 }`};return{name:"DequantizeLinear",shaderCache:{hint:t.cacheKey,inputDependencies:x?["rank","rank","rank"]:["rank","rank"]},getShaderSource:C,getRunData:()=>({outputs:[{dims:a,dataType:s}],dispatchGroup:{x:Math.ceil(o/y/64),y:1,z:1},programUniforms:A})}},vTe=(e,t)=>{Xae(e.inputs,t),e.compute(Qae(e.inputs,t))},_Te=e=>Mi({axis:e.axis,blockSize:e.blockSize})}),Zae,Jae,bTe,lwt=Wt(()=>{lh(),tn(),xn(),Zae=(e,t,r)=>{let n=e===t,i=e<t&&r<0,a=e>t&&r>0;if(n||i||a)throw new Error("Range these inputs' contents are invalid.")},Jae=(e,t,r,n)=>{let i=Math.abs(Math.ceil((t-e)/r)),a=[i],s=i,o=[{type:12,data:s},{type:n,data:e},{type:n,data:r},...zr(a)],l=u=>{let c=Mr("output",n,a.length),d=c.type.value,f=[{name:"outputSize",type:"u32"},{name:"start",type:d},{name:"delta",type:d}];return` 3085 ${u.registerUniforms(f).declareVariables(c)} 3086 ${u.mainStart()} 3087 ${u.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 3088 output[global_idx] = uniforms.start + ${d}(global_idx) * uniforms.delta; 3089 }`};return{name:"Range",shaderCache:{hint:`${n}`},getShaderSource:l,getRunData:()=>({outputs:[{dims:a,dataType:n}],dispatchGroup:{x:Math.ceil(s/64)},programUniforms:o})}},bTe=e=>{let t=0,r=0,n=0;e.inputs[0].dataType===6?(t=e.inputs[0].getInt32Array()[0],r=e.inputs[1].getInt32Array()[0],n=e.inputs[2].getInt32Array()[0]):e.inputs[0].dataType===1&&(t=e.inputs[0].getFloat32Array()[0],r=e.inputs[1].getFloat32Array()[0],n=e.inputs[2].getFloat32Array()[0]),_a.webgpu.validateInputContent&&Zae(t,r,n),e.compute(Jae(t,r,n,e.inputs[0].dataType),{inputs:[]})}}),ese,Bj,zj,tse,wTe,xTe,uwt=Wt(()=>{tn(),_n(),Cs(),xn(),ese=(e,t,r,n)=>{if(e!=="none"&&n!=="i32"&&n!=="u32"&&n!=="f32")throw new Error(`Input ${n} is not supported with reduction ${e}.`);let i=`{ 3090 var oldValue = 0; 3091 loop { 3092 let newValueF32 =`,a=`; 3093 let newValue = bitcast<i32>(newValueF32); 3094 let res = atomicCompareExchangeWeak(&${t}, oldValue, newValue); 3095 if res.exchanged { 3096 break; 3097 } 3098 oldValue = res.old_value; 3099 } 3100 }`;switch(e){case"none":return`${t}=${r};`;case"add":return n==="i32"||n==="u32"?`atomicAdd(&${t}, bitcast<${n}>(${r}));`:` 3101 ${i}bitcast<${n}>(oldValue) + (${r})${a}`;case"max":return n==="i32"||n==="u32"?`atomicMax(&${t}, bitcast<${n}>(${r}));`:` 3102 ${i}max(bitcast<f32>(oldValue), (${r}))${a}`;case"min":return n==="i32"||n==="u32"?`atomicMin(&${t}, bitcast<${n}>(${r}));`:`${i}min(bitcast<${n}>(oldValue), (${r}))${a}`;case"mul":return`${i}(bitcast<${n}>(oldValue) * (${r}))${a}`;default:throw new Error(`Reduction ${e} is not supported.`)}},Bj=(e,t)=>`${e===1?` 3103 let element_count_dim = uniforms.output_strides; 3104 let dim_value = uniforms.output_shape;`:` 3105 let element_count_dim = uniforms.output_strides[${t?"i - indices_start":"i"}]; 3106 let dim_value = uniforms.output_shape[${t?"i - indices_start":"i"} + uniforms.last_index_dimension];`} 3107 3108 if (index >= 0) { 3109 if (index >= i32(dim_value)) { 3110 index = i32(dim_value - 1); 3111 } 3112 } else { 3113 if (index < -i32(dim_value)) { 3114 index = 0; 3115 } else { 3116 index += i32(dim_value); 3117 } 3118 } 3119 data_offset += u32((u32(index) * element_count_dim));`,zj=(e,t,r)=>`for (var i = 0u; i < uniforms.num_updates_elements; i++) { 3120 let value = updates[uniforms.num_updates_elements * ${r?"global_idx":"idx"} + i]; 3121 ${ese(e.reduction,"output[data_offset + i]","value",t)} 3122 }`,tse=(e,t)=>{let r=e[0].dims,n=e[1].dims,i=r,a=1,s=Math.ceil(yt.size(n)/a),o=n[n.length-1],l=yt.sizeFromDimension(r,o),u=yt.sizeFromDimension(n,0)/o,c=[{type:12,data:s},{type:12,data:o},{type:12,data:l},...zr(e[1].dims,e[2].dims,i)],d=f=>{let h=Et("indices",e[1].dataType,e[1].dims.length),p=Et("updates",e[2].dataType,e[2].dims.length,a),m=t.reduction!=="none"&&t.reduction!==""?Xxe("output",e[0].dataType,i.length):Mr("output",e[0].dataType,i.length,a);return` 3123 ${f.registerUniform("output_size","u32").registerUniform("last_index_dimension","u32").registerUniform("num_updates_elements","u32").declareVariables(h,p,m)} 3124 ${f.mainStart()} 3125 ${f.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 3126 var hasDuplicates = false; 3127 if (${t.reduction==="none"}) { 3128 for (var i = 0; i < ${u}; i = i + 1) { 3129 for (var j = i + 1; j < ${u}; j = j + 1) { 3130 var index_i = i32(indices[i].x); 3131 var index_j = i32(indices[j].x); 3132 if (index_i == index_j) { 3133 hasDuplicates = true; 3134 break; 3135 } 3136 }
3137 if (hasDuplicates) { 3138 break; 3139 } 3140 } 3141 } 3142 3143 if (${t.reduction==="none"} && hasDuplicates) { 3144 if (global_idx != 0u) { 3145 return; 3146 } 3147 // Process each index-update pair individually when duplicates exist 3148 for (var idx = 0u; idx < ${u}u; idx++) { 3149 var data_offset = 0u; 3150 for (var i = 0u; i < uniforms.last_index_dimension; i++) { 3151 var index = i32(indices[idx * uniforms.last_index_dimension + i].x); 3152 ${Bj(r.length,!1)} 3153 } 3154 ${zj(t,m.type.value,!1)} 3155 } 3156 return; 3157 } 3158 3159 var data_offset = 0u; 3160 var indices_start = uniforms.last_index_dimension * global_idx; 3161 var indices_end = indices_start + uniforms.last_index_dimension; 3162 for (var i = indices_start; i < indices_end; i++) { 3163 var index = i32(indices[i].x); 3164 ${Bj(r.length,!0)} 3165 } 3166 ${zj(t,m.type.value,!0)} 3167 }`};return{name:"ScatterND",shaderCache:{hint:`${t.cacheKey}_${t.reduction}`,inputDependencies:["rank","rank"]},getRunData:()=>({outputs:[{dims:i,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(s/64)},programUniforms:c}),getShaderSource:d}},wTe=e=>Mi({reduction:e.reduction}),xTe=(e,t)=>{e.compute(tse(e.inputs,t),{inputs:[e.inputs[1],e.inputs[2]],outputs:[]})}}),rse,nse,ise,Uj,ase,sse,ose,lse,use,cse,dse,fse,Wj,hse,pse,mse,gse,yse,ETe,TTe,cwt=Wt(()=>{tn(),_n(),Cs(),xn(),rse=(e,t)=>{if(e.every(r=>r>0||(()=>{throw new Error("Resize requires scales input values to be positive")})),e.length>0){if(t.mode==="linear"){if(!(e.length===2||e.length===3||e.length===4&&e[0]===1&&e[1]===1||e.length===4&&e[0]===1&&e[3]===1||e.length===5&&e[0]===1&&e[1]===1))throw new Error(`For linear mode, Resize requires scales to be 2D, 3D, 4D with either two outermost or one innermost and 3168 one outermost scale values equal to 1, or 5D with two outermost scale values equal to 1`)}else if(t.mode==="cubic"&&!(e.length===2||e.length===4&&e[0]===1&&e[1]===1||e.length===4&&e[0]===1&&e[3]===1))throw new Error("Resize requires scales input size to be 2 or 4 for cubic mode")}},nse=(e,t,r)=>{t.every(i=>i>=0&&i<r||(()=>{throw new Error("Resize requires axes input values to be positive and less than rank")}));let n=new Array(r).fill(1);return t.forEach((i,a)=>n[i]=e[a]),n},ise=(e,t,r,n,i,a)=>{let[s,o,l]=r>10?[1,2,3]:[-1,e.length>1?1:-1,-1],u=e[0].dims.length;if(s>0&&e.length>s&&e[s].dims.length>0)e[s].getFloat32Array().forEach(c=>a.push(c));else if(t.coordinateTransformMode==="tf_crop_and_resize")throw new Error("Resize requires RoI input to be specified when coordinateTransformMode is tfCropAndResize");if(o>0&&e.length>o&&e[o].dims.length===1&&e[o].dims[0]>0){if(e[o].getFloat32Array().forEach(c=>n.push(c)),n.length!==0&&n.length!==u&&r>=18&&n.length!==t.axes.length)throw new Error("Resize requires scales input size to be same as input rank or axes size for opset 18 and up");rse(n,t),t.axes.length>0&&nse(n,t.axes,u).forEach((c,d)=>n[d]=c)}if(l>0&&e.length>l&&e[l].dims.length===1&&e[l].dims[0]>0&&(e[l].getBigInt64Array().forEach(c=>i.push(Number(c))),i.length!==0&&i.length!==u&&r>=18&&i.length!==t.axes.length))throw new Error("Resize requires sizes input size to be same as input rank or axes size for opset 18 and up");if(t.axes.length>0){if(n.length!==0&&n.length!==t.axes.length)throw new Error('Resize requires "scales" input size to be of axes rank when axes attributes is specified');if(i.length!==0&&i.length!==t.axes.length)throw new Error('Resize requires "sizes" input size to be of rank axes rank when axes attributes is specified')}if(typeof n<"u"&&typeof i<"u"&&n.length>0&&i.length>u)throw new Error("Resize requires only of scales or sizes to be specified")},Uj=(e,t,r,n)=>` 3169 // The whole part and the fractional part are calculated separately due to inaccuracy of floating 3170 // point division. As an example, f32(21) / f32(7) may evaluate to 2.99... instead of 3, causing an 3171 // offset-by-one error later in floor(). 3172 let big = (${e}) * (${t}); 3173 let whole = ${n}(big / (${r})); 3174 let fract = ${n}(big % (${r})) / ${n}(${r}); 3175 return whole + fract; 3176`,ase=(e,t)=>`fn getOriginalCoordinateFromResizedCoordinate(xResized: u32, xScale: f32, lengthResized: u32, 3177 lengthOriginal: u32, roiStart: f32, roiEnd: f32) -> ${t} { `+(()=>{switch(e){case"asymmetric":return` 3178 if (xScale < 1.0 || floor(xScale) != xScale) { 3179 return ${t}(xResized) / ${t}(xScale); 3180 } else { 3181 ${Uj("xResized","lengthOriginal","lengthResized",t)} 3182 } 3183 `;case"pytorch_half_pixel":return`if (lengthResized > 1) { 3184 return (${t}(xResized) + 0.5) / ${t}(xScale) - 0.5; 3185 } else { 3186 return 0.0; 3187 }`;case"tf_half_pixel_for_nn":return`return (${t}(xResized) + 0.5) / ${t}(xScale);`;case"align_corners":return`if (lengthResized == 1) { 3188 return 0.0; 3189 } else { 3190 ${Uj("xResized","lengthOriginal - 1","lengthResized - 1",t)} 3191 }`;case"tf_crop_and_resize":return`if (lengthResized > 1) { 3192 return ${t}(roiStart) * ${t}(lengthOriginal - 1) + 3193 (${t}(xResized) * ${t}(roiEnd - roiStart) * ${t}(lengthOriginal - 1)) / 3194 ${t}(lengthResized - 1); 3195 } else { 3196 return 0.5 * ${t}(roiStart + roiEnd) * ${t}(lengthOriginal - 1); 3197 }`;case"half_pixel_symmetric":return`const outputWidth = ${t}xScale * ${t}(lengthResized); 3198 const adjustment = ${t}(lengthResized) / outputWidth; 3199 const center = ${t}(lengthOriginal) / 2; 3200 const offset = center * (1 - adjustment); 3201 return offset + ((${t}(xResized) + 0.5) / ${t}(xScale)) - 0.5;`;case"half_pixel":return`return ((${t}(xResized) + 0.5) / ${t}(xScale)) - 0.5;`;default:throw new Error(`Coordinate transform mode ${e} is not supported`)}})()+"}",sse=(e,t,r)=>`fn getNearestPixelFromOriginal(xOriginal: ${r}, isDownSample: bool) -> ${r} {`+(()=>{switch(e){case"round_prefer_ceil":return"if (fract(xOriginal) == 0.5) { return ceil(xOriginal); } else { return round(xOriginal); }";case"floor":return"return floor(xOriginal);";case"ceil":return"return ceil(xOriginal);";case"round_prefer_floor":return"if (fract(xOriginal) == 0.5) { return floor(xOriginal); } else { return round(xOriginal); }";case"simple":default:if(t<11)return"if (isDownSample) { return ceil(xOriginal); } else { return xOriginal; }";throw new Error(`Nearest mode ${e} is not supported`)}})()+"}",ose=(e,t,r)=>{let n=new Array(r).fill(0).concat(new Array(r).fill(1)),i=e.length===0?n:e.slice();return t.length>0?(t.forEach((a,s)=>{n[a]=i[s],n[s+r]=i[t.length+s]}),n):i},lse=(e,t,r,n)=>{let i=[];if(r.length>0)if(n.length>0){if(e.forEach(a=>i.push(a)),Math.max(...n)>e.length)throw new Error("axes is out of bound");
vendor: 4,552 bytes, lines 3201-3275
3201n.forEach((a,s)=>i[a]=r[s])}else r.forEach(a=>i.push(a));else{if(t.length===0)throw new Error("Resize requires either scales or sizes.");i=e.map((a,s)=>Math.round(a*t[s]))}return i},use=(e,t,r)=>{let n=(()=>{switch(r.keepAspectRatioPolicy){case"not_larger":return r.axes.length>0?Math.min(...r.axes.map(a=>t[a]),Number.MAX_VALUE):Math.min(...t,Number.MAX_VALUE);case"not_smaller":return r.axes.length>0?Math.max(...r.axes.map(a=>t[a]),Number.MIN_VALUE):Math.max(...t,Number.MIN_VALUE);default:throw new Error(`Keep aspect ratio policy ${r.keepAspectRatioPolicy} is not supported`)}})();t.fill(1,0,t.length);let i=e.slice();return r.axes.length>0?(r.axes.forEach(a=>t[a]=n),r.axes.forEach(a=>i[a]=Math.round(e[a]*t[a]))):(t.fill(n,0,t.length),i.forEach((a,s)=>i[s]=Math.round(a*t[s]))),i},cse=(e,t,r,n,i)=>` 3202 fn calculateOriginalIndicesFromOutputIndices(output_indices: ${e.type.indices}) -> array<${e.type.value}, ${r.length}> { 3203 var original_indices: array<${e.type.value}, ${r.length}>; 3204 for (var i:u32 = 0; i < ${r.length}; i++) { 3205 var output_index = ${e.indicesGet("output_indices","i")}; 3206 var scale = ${Rr("uniforms.scales","i",n)}; 3207 var roi_low = ${Rr("uniforms.roi","i",i)}; 3208 var roi_hi = ${Rr("uniforms.roi",`i + ${t.length}`,i)}; 3209 if (scale == 1.0) { 3210 original_indices[i] = ${e.type.value}(output_index); 3211 } else { 3212 var input_shape_i = ${Rr("uniforms.input_shape","i",t.length)}; 3213 var output_shape_i = ${Rr("uniforms.output_shape","i",r.length)}; 3214 original_indices[i] = getOriginalCoordinateFromResizedCoordinate(output_index, scale, output_shape_i, 3215 input_shape_i, roi_low, roi_hi); 3216 } 3217 } 3218 return original_indices; 3219 }`,dse=(e,t,r,n,i,a,s)=>` 3220 fn calculateInputIndicesFromOutputIndices(output_indices: ${t.type.indices}) -> ${e.type.indices} { 3221 var input_indices: ${e.type.indices}; 3222 for (var i:u32 = 0; i < ${n.length}; i++) { 3223 var output_index = ${t.indicesGet("output_indices","i")}; 3224 var input_index: u32; 3225 var scale = ${Rr("uniforms.scales","i",i)}; 3226 if (scale == 1.0) { 3227 input_index = output_index; 3228 } else { 3229 var roi_low = ${Rr("uniforms.roi","i",a)}; 3230 var roi_hi = ${Rr("uniforms.roi",`i + ${r.length}`,a)}; 3231 var input_shape_i = ${Rr("uniforms.input_shape","i",r.length)}; 3232 var output_shape_i = ${Rr("uniforms.output_shape","i",n.length)}; 3233 var original_idx = getOriginalCoordinateFromResizedCoordinate(output_index, scale, output_shape_i, 3234 input_shape_i, roi_low, roi_hi); 3235 if (!${s} || (original_idx >= 0 && original_idx < ${t.type.value}(input_shape_i))) { 3236 if (original_idx < 0) { 3237 input_index = 0; 3238 } else if (original_idx > ${t.type.value}(input_shape_i - 1)) { 3239 input_index = input_shape_i - 1; 3240 } else { 3241 input_index = u32(getNearestPixelFromOriginal(original_idx, scale < 1)); 3242 } 3243 } else { 3244 input_index = u32(original_idx); 3245 } 3246 } 3247 ${e.indicesSet("input_indices","i","input_index")} 3248 } 3249 return input_indices; 3250 }`,fse=(e,t)=>` 3251 fn checkInputIndices(input_indices: ${e.type.indices}) -> bool { 3252 for (var i:u32 = 0; i < ${t.length}; i++) { 3253 var input_index = ${e.indicesGet("input_indices","i")}; 3254 if (input_index < 0 || input_index >= ${Rr("uniforms.input_shape","i",t.length)}) { 3255 return false; 3256 } 3257 } 3258 return true; 3259 }`,Wj=(e,t,r,n)=>e.rank>n?` 3260 ${e.indicesSet("input_indices",t,"channel")}; 3261 ${e.indicesSet("input_indices",r,"batch")}; 3262`:"",hse=(e,t,r,n,i)=>{let[a,s,o,l]=r.length===2?[-1,0,1,-1]:[0,2,3,1],u=e.type.value;return` 3263 fn getInputValue(batch: u32, channel: u32, row: u32, col: u32) -> ${u} { 3264 var input_indices: ${e.type.indices}; 3265 ${e.indicesSet("input_indices",s,`max(0, min(row, ${r[s]} - 1))`)}; 3266 ${e.indicesSet("input_indices",o,`max(0, min(col, ${r[o]} - 1))`)}; 3267 ${Wj(e,l,a,2)} 3268 return ${e.getByIndices("input_indices")}; 3269 } 3270 3271 fn bilinearInterpolation(output_indices: ${t.type.indices}) -> ${u} { 3272 var originalIndices = calculateOriginalIndicesFromOutputIndices(output_indices); 3273 var row:${u} = originalIndices[${s}]; 3274 var col:${u} = originalIndices[${o}]; 3275 ${n?`if (row < 0 || row > (${r[s]}
vendor: 8,942 bytes, lines 3275-3437
3275 - 1) || col < 0 || col > (${r[o]} - 1)) { 3276 return ${i}; 3277 }`:""}; 3278 row = max(0, min(row, ${r[s]} - 1)); 3279 col = max(0, min(col, ${r[o]} - 1)); 3280 var row1: u32 = u32(row); 3281 var col1: u32 = u32(col); 3282 var row2: u32 = u32(row + 1); 3283 var col2: u32 = u32(col + 1); 3284 var channel: u32 = ${r.length>2?`u32(originalIndices[${l}])`:"0"}; 3285 var batch: u32 = ${r.length>2?`u32(originalIndices[${a}])`:"0"}; 3286 var x11: ${u} = getInputValue(batch, channel, row1, col1); 3287 var x12: ${u} = getInputValue(batch, channel, row1, col2); 3288 var x21: ${u} = getInputValue(batch, channel, row2, col1); 3289 var x22: ${u} = getInputValue(batch, channel, row2, col2); 3290 var dx1: ${u} = abs(row - ${u}(row1)); 3291 var dx2: ${u} = abs(${u}(row2) - row); 3292 var dy1: ${u} = abs(col - ${u}(col1)); 3293 var dy2: ${u} = abs(${u}(col2) - col); 3294 if (row1 == row2) { 3295 dx1 = 0.5; 3296 dx2 = 0.5; 3297 } 3298 if (col1 == col2) { 3299 dy1 = 0.5; 3300 dy2 = 0.5; 3301 } 3302 return (x11 * dx2 * dy2 + x12 * dx2 * dy1 + x21 * dx1 * dy2 + x22 * dx1 * dy1); 3303 }`},pse=(e,t,r,n,i,a,s,o,l,u)=>{let c=r.length===2,[d,f]=c?[0,1]:[2,3],h=e.type.value,p=m=>{let _=m===d?"row":"col";return` 3304 fn ${_}CubicInterpolation(input_indices: ${e.type.indices}, output_indices: ${t.type.indices}) -> ${h} { 3305 var output_index = ${t.indicesGet("output_indices",m)}; 3306 var originalIdx: ${h} = getOriginalCoordinateFromResizedCoordinate(output_index, ${i[m]}, 3307 ${n[m]}, ${r[m]}, ${a[m]}, ${a[m]} + ${r.length}); 3308 var fractOriginalIdx: ${h} = originalIdx - floor(originalIdx); 3309 var coefs = getCubicInterpolationCoefs(fractOriginalIdx); 3310 3311 if (${o} && (originalIdx < 0 || originalIdx > (${r[m]} - 1))) { 3312 return ${l}; 3313 } 3314 var data: array<${h}, 4> = array<${h}, 4>(0.0, 0.0, 0.0, 0.0); 3315 for (var i: i32 = -1; i < 3; i++) { 3316 var ${_}: ${h} = originalIdx + ${h}(i); 3317 if (${_} < 0 || ${_} >= ${r[m]}) { 3318 ${u?`coefs[i + 1] = 0.0; 3319 continue;`:o?`return ${l};`:`${_} = max(0, min(${_}, ${r[m]} - 1));`}; 3320 } 3321 var input_indices_copy: ${e.type.indices} = input_indices; 3322 ${e.indicesSet("input_indices_copy",m,`u32(${_})`)}; 3323 data[i + 1] = ${m===d?e.getByIndices("input_indices_copy"):"rowCubicInterpolation(input_indices_copy, output_indices)"}; 3324 } 3325 return cubicInterpolation1D(data, coefs); 3326 }`};return` 3327 ${p(d)}; 3328 ${p(f)}; 3329 fn getCubicInterpolationCoefs(s: ${h}) -> array<${h}, 4> { 3330 var absS = abs(s); 3331 var coeffs: array<${h}, 4> = array<${h}, 4>(0.0, 0.0, 0.0, 0.0); 3332 var oneMinusAbsS: ${h} = 1.0 - absS; 3333 var twoMinusAbsS: ${h} = 2.0 - absS; 3334 var onePlusAbsS: ${h} = 1.0 + absS; 3335 coeffs[0] = ((${s} * onePlusAbsS - 5 * ${s}) * onePlusAbsS + 8 * ${s}) * onePlusAbsS - 4 * ${s}; 3336 coeffs[1] = ((${s} + 2) * absS - (${s} + 3)) * absS * absS + 1; 3337 coeffs[2] = ((${s} + 2) * oneMinusAbsS - (${s} + 3)) * oneMinusAbsS * oneMinusAbsS + 1; 3338 coeffs[3] = ((${s} * twoMinusAbsS - 5 * ${s}) * twoMinusAbsS + 8 * ${s}) * twoMinusAbsS - 4 * ${s}; 3339 return coeffs; 3340 } 3341 3342 fn cubicInterpolation1D(x: array<${h}, 4>, coefs: array<${h}, 4>) -> ${h} { 3343 var coefsSum: ${h} = coefs[0] + coefs[1] + coefs[2] + coefs[3]; 3344 return (x[0] * coefs[0] + x[1] * coefs[1]+ x[2] * coefs[2]+ x[3] * coefs[3]) / coefsSum; 3345 } 3346 3347 fn bicubicInterpolation(output_indices: ${t.type.indices}) -> ${h} { 3348 var input_indices: ${e.type.indices} = output_indices; 3349 return colCubicInterpolation(input_indices, output_indices); 3350 } 3351 `},mse=(e,t,r,n,i)=>{let[a,s,o,l,u]=r.length===3?[-1,0,1,2,-1]:[0,2,3,4,1],c=e.type.value;return` 3352 fn getInputValue(batch: u32, channel: u32, depth:u32, height: u32, width: u32) -> ${c} { 3353 var input_indices: ${e.type.indices}; 3354 ${e.indicesSet("input_indices",s,`max(0, min(depth, ${r[s]} - 1))`)}; 3355 ${e.indicesSet("input_indices",o,`max(0, min(height, ${r[o]} - 1))`)}; 3356 ${e.indicesSet("input_indices",l,`max(0, min(width, ${r[l]} - 1))`)}; 3357 ${Wj(e,u,a,3)} 3358 return ${e.getByIndices("input_indices")}; 3359 } 3360 3361 fn trilinearInterpolation(output_indices: ${t.type.indices}) -> ${c} { 3362 var originalIndices = calculateOriginalIndicesFromOutputIndices(output_indices); 3363 var depth:${c} = originalIndices[${s}]; 3364 var height:${c} = originalIndices[${o}]; 3365 var width:${c} = originalIndices[${l}]; 3366 ${n?`if (depth < 0 || depth > (${r[s]} - 1) || height < 0 || height > (${r[o]} - 1) || width < 0 || (width > ${r[l]} - 1)) { 3367 return ${i}; 3368 }`:""}; 3369 3370 depth = max(0, min(depth, ${r[s]} - 1)); 3371 height = max(0, min(height, ${r[o]} - 1)); 3372 width = max(0, min(width, ${r[l]} - 1)); 3373 var depth1: u32 = u32(depth); 3374 var height1: u32 = u32(height); 3375 var width1: u32 = u32(width); 3376 var depth2: u32 = u32(depth + 1); 3377 var height2: u32 = u32(height + 1); 3378 var width2: u32 = u32(width + 1); 3379 var channel: u32 = ${r.length>3?`u32(originalIndices[${u}])`:"0"}; 3380 var batch: u32 = ${r.length>3?`u32(originalIndices[${a}])`:"0"}; 3381 3382 var x111: ${c} = getInputValue(batch, channel, depth1, height1, width1); 3383 var x112: ${c} = getInputValue(batch, channel, depth1, height1, width2); 3384 var x121: ${c} = getInputValue(batch, channel, depth1, height2, width1); 3385 var x122: ${c} = getInputValue(batch, channel, depth1, height2, width2); 3386 var x211: ${c} = getInputValue(batch, channel, depth2, height1, width1); 3387 var x212: ${c} = getInputValue(batch, channel, depth2, height1, width2); 3388 var x221: ${c} = getInputValue(batch, channel, depth2, height2, width1); 3389 var x222: ${c} = getInputValue(batch, channel, depth2, height2, width2); 3390 var dx1: ${c} = abs(depth - ${c}(depth1)); 3391 var dx2: ${c} = abs(${c}(depth2) - depth); 3392 var dy1: ${c} = abs(height - ${c}(height1)); 3393 var dy2: ${c} = abs(${c}(height2) - height); 3394 var dz1: ${c} = abs(width - ${c}(width1)); 3395 var dz2: ${c} = abs(${c}(width2) - width); 3396 if (depth1 == depth2) { 3397 dx1 = 0.5; 3398 dx2 = 0.5; 3399 } 3400 if (height1 == height2) { 3401 dy1 = 0.5; 3402 dy2 = 0.5; 3403 } 3404 if (width1 == width2) { 3405 dz1 = 0.5; 3406 dz2 = 0.5; 3407 } 3408 return (x111 * dx2 * dy2 * dz2 + x112 * dx2 * dy2 * dz1 + x121 * dx2 * dy1 *dz2 + x122 * dx2 * dy1 * dz1 + 3409 x211 * dx1 * dy2 * dz2 + x212 * dx1 * dy2 * dz1 + x221 * dx1 * dy1 *dz2 + x222 * dx1 * dy1 * dz1); 3410 }`},gse=(e,t,r,n,i,a)=>{let s=e.dims,o=ose(a,t.axes,s.length),l=lse(s,n,i,t.axes),u=n.slice();n.length===0&&(u=s.map((v,b)=>v===0?1:l[b]/v),t.keepAspectRatioPolicy!=="stretch"&&(l=use(s,u,t)));let c=Mr("output",e.dataType,l.length),d=Et("input",e.dataType,s.length),f=yt.size(l),h=s.length===l.length&&s.every((v,b)=>v===l[b]),p=t.coordinateTransformMode==="tf_crop_and_resize",m=t.extrapolationValue,_=d.type.value,y=v=>` 3411 ${h?"":` 3412 ${ase(t.coordinateTransformMode,_)}; 3413 ${(()=>{switch(t.mode){case"nearest":return` 3414 ${fse(d,s)}; 3415 ${sse(t.nearestMode,r,_)}; 3416 ${dse(d,c,s,l,u.length,o.length,p)}; 3417 `;case"linear":return` 3418 ${cse(c,s,l,u.length,o.length)}; 3419 ${(()=>{if(s.length===2||s.length===4)return`${hse(d,c,s,p,m)}`;if(s.length===3||s.length===5)return`${mse(d,c,s,p,m)}`;throw Error("Linear mode only supports input dims 2, 3, 4 and 5 are supported in linear mode.")})()}; 3420 `;case"cubic":return` 3421 ${(()=>{if(s.length===2||s.length===4)return`${pse(d,c,s,l,u,o,t.cubicCoeffA,p,t.extrapolationValue,t.excludeOutside)}`;throw Error("Cubic mode only supports input dims 2 and 4 are supported in linear mode.")})()}; 3422 `;default:throw Error("Invalid resize mode")}})()}; 3423 `} 3424 ${v.registerUniform("output_size","u32").registerUniform("scales","f32",u.length).registerUniform("roi","f32",o.length).declareVariables(d,c)} 3425 ${v.mainStart()} 3426 ${v.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 3427 ${h?"output[global_idx] = input[global_idx];":` 3428 let output_indices = ${c.offsetToIndices("global_idx")}; 3429 var input_indices: ${d.type.indices}; 3430 ${(()=>{switch(t.mode){case"nearest":return`input_indices = calculateInputIndicesFromOutputIndices(output_indices); 3431 if (checkInputIndices(input_indices)) { 3432 output[global_idx] = ${d.getByIndices("input_indices")}; 3433 } else { 3434 output[global_idx] = ${t.extrapolationValue}; 3435 }`;case"linear":return`output[global_idx] = ${s.length===2||s.length===4?"bilinearInterpolation":"trilinearInterpolation"}(output_indices);`;case"cubic":return"output[global_idx] = bicubicInterpolation(output_indices);";default:throw Error(`Unsupported resize mode: ${t.mode}`)}})()}; 3436`} 3437 }`;
vendor: 19,722 bytes, lines 3437-3629
3437return{name:"Resize",shaderCache:{hint:`${t.cacheKey}|${r}|${u.length>0?t.mode==="cubic"?u:u.length:""}|${i.length>0?i:""}|${o.length>0?o:""}|${h}|${t.mode==="nearest"?s.length:s}`,inputDependencies:["rank"]},getShaderSource:y,getRunData:()=>({outputs:[{dims:l,dataType:e.dataType}],dispatchGroup:{x:Math.ceil(f/64)},programUniforms:[{type:12,data:f},{type:1,data:u},{type:1,data:o},...zr(s,l)]})}},yse=e=>{let t=e.customDataBuffer;return new Uint32Array(t,t.byteOffset,1)[0]},ETe=(e,t)=>{let r=[],n=[],i=[],a=yse(e);if(t.antialias!==0)throw Error("Only default value (0) for Antialias attribute is supported");ise(e.inputs,t,a,r,n,i),e.compute(gse(e.inputs[0],t,a,r,n,i),{inputs:[0]})},TTe=e=>{let t=e.antialias,r=e.axes,n=e.coordinateTransformMode,i=e.cubicCoeffA,a=e.excludeOutside!==0,s=e.extrapolationValue,o=e.keepAspectRatioPolicy,l=e.mode,u=e.nearestMode===""?"simple":e.nearestMode;return Mi({antialias:t,axes:r,coordinateTransformMode:n,cubicCoeffA:i,excludeOutside:a,extrapolationValue:s,keepAspectRatioPolicy:o,mode:l,nearestMode:u})}}),vse,_se,STe,dwt=Wt(()=>{tn(),_n(),xn(),vse=e=>{if(!e||e.length<3)throw new Error("layerNorm requires at least 3 inputs.");let t=e[0],r=e[1],n=e[2];if(t.dataType!==r.dataType||t.dataType!==n.dataType)throw new Error("All inputs must have the same data type");if(t.dims.length!==3&&t.dims.length!==2)throw new Error("Input must be 2D or 3D");if(r.dims.length!==3&&r.dims.length!==2)throw new Error("Skip must be 2D or 3D");let i=t.dims[t.dims.length-1],a=t.dims[t.dims.length-2];if(r.dims[r.dims.length-1]!==i)throw new Error("Skip must have the same hidden size as input");if(r.dims[r.dims.length-2]!==a)throw new Error("Skip must have the same sequence length as input");if(n.dims.length!==1)throw new Error("Gamma must be 1D");if(n.dims[n.dims.length-1]!==i)throw new Error("Gamma must have the same hidden size as input");if(e.length>3){let s=e[3];if(s.dims.length!==1)throw new Error("Beta must be 1D");if(s.dims[s.dims.length-1]!==i)throw new Error("Beta must have the same hidden size as input")}if(e.length>4){let s=e[4];if(s.dims.length!==1)throw new Error("Bias must be 1D");if(s.dims[s.dims.length-1]!==i)throw new Error("Bias must have the same hidden size as input")}},_se=(e,t,r,n)=>{let i=t.simplified,a=e[0].dims,s=yt.size(a),o=a,l=s,u=a.slice(-1)[0],c=n?a.slice(0,-1).concat(1):[],d=!i&&e.length>3,f=e.length>4,h=n&&r>1,p=n&&r>2,m=r>3,_=64,y=ss(u),v=[{type:12,data:l},{type:12,data:y},{type:12,data:u},{type:1,data:t.epsilon}],b=x=>{let E=[{name:"output_size",type:"u32"},{name:"components",type:"u32"},{name:"hidden_size",type:"u32"},{name:"epsilon",type:"f32"}],T=[Et("x",e[0].dataType,e[0].dims,y),Et("skip",e[1].dataType,e[1].dims,y),Et("gamma",e[2].dataType,e[2].dims,y)];d&&T.push(Et("beta",e[3].dataType,e[3].dims,y)),f&&T.push(Et("bias",e[4].dataType,e[4].dims,y)),T.push(Mr("output",e[0].dataType,o,y)),h&&T.push(Mr("mean_output",1,c)),p&&T.push(Mr("inv_std_output",1,c)),m&&T.push(Mr("input_skip_bias_sum",e[0].dataType,o,y));let S=zo(e[0].dataType),A=zo(1,y);return` 3438 3439 ${x.registerUniforms(E).declareVariables(...T)} 3440 var<workgroup> sum_shared : array<${A}, ${_}>; 3441 var<workgroup> sum_squared_shared : array<${A}, ${_}>; 3442 3443 ${x.mainStart([_,1,1])} 3444 let ix = local_id.x; 3445 let iy = global_id.x / ${_}; 3446 3447 let hidden_size_vectorized: u32 = uniforms.hidden_size / uniforms.components; 3448 var stride = hidden_size_vectorized / ${_}; 3449 let offset = ix * stride + iy * hidden_size_vectorized; 3450 let offset1d = stride * ix; 3451 if (ix == ${_-1}) { 3452 stride = hidden_size_vectorized - stride * ix; 3453 } 3454 for (var i: u32 = 0; i < stride; i++) { 3455 let skip_value = skip[offset + i]; 3456 let bias_value = ${f?"bias[offset1d + i]":S+"(0.0)"}; 3457 let input_value = x[offset + i]; 3458 let value = input_value + skip_value + bias_value; 3459 ${m?"input_skip_bias_sum[offset + i] = value;":""} 3460 output[offset + i] = value; 3461 let f32_value = ${W1(S,y,"value")}; 3462 sum_shared[ix] += f32_value; 3463 sum_squared_shared[ix] += f32_value * f32_value; 3464 } 3465 workgroupBarrier(); 3466 3467 var reduce_size : u32 = ${_}; 3468 for (var curr_size = reduce_size >> 1; curr_size > 0; curr_size = reduce_size >> 1) { 3469 reduce_size = curr_size + (reduce_size & 1); 3470 if (ix < curr_size) { 3471 sum_shared[ix] += sum_shared[ix + reduce_size]; 3472 sum_squared_shared[ix] += sum_squared_shared[ix + reduce_size]; 3473 } 3474 workgroupBarrier(); 3475 } 3476 3477 let sum = sum_shared[0]; 3478 let square_sum = sum_squared_shared[0]; 3479 let mean = ${s0("sum",y)} / f32(uniforms.hidden_size); 3480 let inv_std_dev = inverseSqrt(${s0("square_sum",y)} / f32(uniforms.hidden_size) ${i?"":"- mean * mean"} + uniforms.epsilon); 3481 ${h?"mean_output[global_idx] = mean;":""} 3482 ${p?"inv_std_output[global_idx] = inv_std_dev;":""} 3483 3484 for (var i: u32 = 0; i < stride; i++) { 3485 output[offset + i] = (output[offset + i] ${i?"":`- ${S}(mean)`}) * 3486 ${S}(inv_std_dev) * gamma[offset1d + i] 3487 ${d?"+ beta[offset1d + i]":""}; 3488 } 3489 }`},w=[{dims:o,dataType:e[0].dataType}];return r>1&&w.push({dims:c,dataType:1}),r>2&&w.push({dims:c,dataType:1}),r>3&&w.push({dims:a,dataType:e[0].dataType}),{name:"SkipLayerNormalization",shaderCache:{hint:`${y};${h};${p};${m}`,inputDependencies:e.map((x,E)=>"type")},getShaderSource:b,getRunData:()=>({outputs:w,dispatchGroup:{x:Math.ceil(l/u)},programUniforms:v})}},STe=(e,t)=>{vse(e.inputs);let r=[0];e.outputCount>1&&r.push(-3),e.outputCount>2&&r.push(-3),e.outputCount>3&&r.push(3),e.compute(_se(e.inputs,t,e.outputCount,!1),{outputs:r})}}),bse,X2,wse,Vj,xse,Ese,ATe,CTe,fwt=Wt(()=>{tn(),_n(),Cs(),xn(),bse=(e,t)=>{if(!e||e.length<1)throw new Error("too few inputs");if(t.axes.length!==0){if(t.axes.length!==t.starts.length||t.axes.length!==t.ends.length)throw new Error("axes, starts and ends must have the same length")}else if(t.starts.length!==t.ends.length)throw new Error("starts and ends must have the same length");e.slice(1).forEach((r,n)=>{if(e[n+1].dataType!==6&&e[n+1].dataType!==7)throw new Error(`Input ${n} must be an array of int32 or int64`)})},X2=(e,t)=>{let r=[];if(e.length>t)if(e[t].dataType===7)e[t].getBigInt64Array().forEach(n=>r.push(Number(n)));else if(e[t].dataType===6)e[t].getInt32Array().forEach(n=>r.push(Number(n)));else throw new Error(`Input ${t} must be an array of int32 or int64`);return r},wse=(e,t)=>{if(e.length>1){let r=X2(e,1),n=X2(e,2),i=X2(e,3);return i.length===0&&(i=[...Array(e[0].dims.length).keys()]),Mi({starts:r,ends:n,axes:i})}else return t},Vj=(e,t,r,n,i)=>{let a=e;return e<0&&(a+=r[n[t]]),i[t]<0?Math.max(0,Math.min(a,r[n[t]]-1)):Math.max(0,Math.min(a,r[n[t]]))},xse=(e,t,r)=>`fn calculateInputIndices(output_indices: ${t.type.indices}) -> ${e.type.indices} { 3490 var input_indices: ${e.type.indices}; 3491 var carry = 0u; 3492 for (var i = ${r.length}; i >= 0; i--) { 3493 let input_shape_i = ${Rr("uniforms.input_shape","i",r.length)}; 3494 let steps_i = ${Rr("uniforms.steps","i",r.length)}; 3495 let signs_i = ${Rr("uniforms.signs","i",r.length)}; 3496 let starts_i = ${Rr("uniforms.starts","i",r.length)}; 3497 var output_index = ${t.indicesGet("output_indices","i")}; 3498 var input_index = output_index * steps_i + starts_i + carry; 3499 carry = input_index / input_shape_i; 3500 input_index = input_index % input_shape_i; 3501 if (signs_i < 0) { 3502 input_index = input_shape_i - input_index - 1u + starts_i; 3503 } 3504 ${e.indicesSet("input_indices","i","input_index")}; 3505 } 3506 return input_indices; 3507 }`,Ese=(e,t)=>{let r=e[0].dims,n=yt.size(r),i=t.axes.length>0?yt.normalizeAxes(t.axes,r.length):[...Array(r.length).keys()],a=X2(e,4);a.forEach(y=>y!==0||(()=>{throw new Error("step cannot be 0")})),a.length===0&&(a=Array(i.length).fill(1));let s=t.starts.map((y,v)=>Vj(y,v,r,i,a)),o=t.ends.map((y,v)=>Vj(y,v,r,i,a));if(i.length!==s.length||i.length!==o.length)throw new Error("start, ends and axes should have the same number of elements");if(i.length!==r.length)for(let y=0;y<r.length;++y)i.includes(y)||(s.splice(y,0,0),o.splice(y,0,r[y]),a.splice(y,0,1));let l=a.map(y=>Math.sign(y));a.forEach((y,v,b)=>{if(y<0){let w=(o[v]-s[v])/y,x=s[v],E=x+w*a[v];s[v]=E,o[v]=x,b[v]=-y}});let u=r.slice(0);i.forEach((y,v)=>{u[y]=Math.ceil((o[y]-s[y])/a[y])});let c={dims:u,dataType:e[0].dataType},d=Mr("output",e[0].dataType,u.length),f=Et("input",e[0].dataType,e[0].dims.length),h=yt.size(u),p=[{name:"outputSize",type:"u32"},{name:"starts",type:"u32",length:s.length},{name:"signs",type:"i32",length:l.length},{name:"steps",type:"u32",length:a.length}],m=[{type:12,data:h},{type:12,data:s},{type:6,data:l},{type:12,data:a},...zr(e[0].dims,u)],_=y=>` 3508 ${y.registerUniforms(p).declareVariables(f,d)} 3509 ${xse(f,d,r)} 3510 ${y.mainStart()} 3511 ${y.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.outputSize")} 3512 let output_indices = ${d.offsetToIndices("global_idx")}; 3513 let input_indices = calculateInputIndices(output_indices); 3514 ${d.setByOffset("global_idx",f.getByIndices("input_indices"))} 3515 }`;return{name:"Slice",shaderCache:{hint:`${l.length}_${s.length}_${a.length}`,inputDependencies:["rank"]},getShaderSource:_,getRunData:()=>({outputs:[c],dispatchGroup:{x:Math.ceil(n/64)},programUniforms:m})}},ATe=(e,t)=>{bse(e.inputs,t);let r=wse(e.inputs,t);e.compute(Ese(e.inputs,r),{inputs:[0]})},CTe=e=>{let t=e.starts,r=e.ends,n=e.axes;return Mi({starts:t,ends:r,axes:n})}}),Tse,Sse,PTe,MTe,hwt=Wt(()=>{tn(),_n(),Cs(),E0(),xn(),Tse=e=>{if(!e||e.length!==1)throw new Error("Softmax op requires 1 input.")},Sse=(e,t)=>{let r=e.inputs[0],n=r.dims,i=yt.size(n),a=n.length,s=yt.normalizeAxis(t.axis,a),o=s<n.length-1,l,u=[];o?(u=Array.from({length:a},(T,S)=>S),u[s]=a-1,u[a-1]=s,l=e.compute(Jc(r,u),{inputs:[r],outputs:[-1]})[0]):l=r;let c=l.dims,d=c[a-1],f=i/d,h=ss(d),p=d/h,m=64;f===1&&(m=256);let _=(T,S)=>S===4?`max(max(${T}.x, ${T}.y), max(${T}.z, ${T}.w))`:S===2?`max(${T}.x, ${T}.y)`:S===3?`max(max(${T}.x, ${T}.y), ${T}.z)`:T,y=Et("x",l.dataType,l.dims,h),v=Mr("result",l.dataType,l.dims,h),b=y.type.value,w=zo(l.dataType)==="f32"?`var threadMax = ${b}(-3.402823e+38f);`:`var threadMax = ${b}(-65504.0h);`,x=T=>` 3516 var<workgroup> rowMaxShared : ${b}; 3517 var<workgroup> rowSumShared : ${b}; 3518 var<workgroup> threadShared : array<${b}, ${m}>; 3519 3520 fn getValue(row: i32, col: i32, row_stride: i32) -> ${b} { 3521 let index = row * row_stride + col; 3522 return x[index]; 3523 } 3524 3525 fn setValue(row: i32, col: i32, row_stride: i32, value: ${b}) { 3526 let index = row * row_stride + col; 3527 result[index] = value; 3528 } 3529 ${T.registerUniform("packedCols","i32").declareVariables(y,v)} 3530 ${T.mainStart(m)} 3531 let gindex = i32(global_idx); 3532 let lindex = i32(local_idx); 3533 const wg = ${m}; 3534 let row = gindex / wg; 3535 let cols = uniforms.packedCols; 3536 let row_stride : i32 = uniforms.packedCols; 3537 3538 // find the rows max 3539 ${w} 3540 for (var col = lindex; col < cols; col += wg) { 3541 let value = getValue(row, col, row_stride); 3542 threadMax = max(threadMax, value); 3543 } 3544 if (lindex < cols) { 3545 threadShared[lindex] = threadMax; 3546 } 3547 workgroupBarrier(); 3548 3549 var reduceSize = min(cols, wg); 3550 for (var currSize = reduceSize >> 1; currSize > 0; currSize = reduceSize >> 1) { 3551 reduceSize = currSize + (reduceSize & 1); 3552 if (lindex < currSize) { 3553 threadShared[lindex] = max(threadShared[lindex], threadShared[lindex + reduceSize]); 3554 } 3555 workgroupBarrier(); 3556 } 3557 if (lindex == 0) { 3558 rowMaxShared = ${b}(${_("threadShared[0]",h)}); 3559 } 3560 workgroupBarrier(); 3561 3562 // find the rows sum 3563 var threadSum = ${b}(0.0); 3564 for (var col = lindex; col < cols; col += wg) { 3565 let subExp = exp(getValue(row, col, row_stride) - rowMaxShared); 3566 threadSum += subExp; 3567 } 3568 threadShared[lindex] = threadSum; 3569 workgroupBarrier(); 3570 3571 for (var currSize = wg >> 1; currSize > 0; currSize = currSize >> 1) { 3572 if (lindex < currSize) { 3573 threadShared[lindex] = threadShared[lindex] + threadShared[lindex + currSize]; 3574 } 3575 workgroupBarrier(); 3576 } 3577 if (lindex == 0) { 3578 rowSumShared = ${b}(${s0("threadShared[0]",h)}); 3579 } 3580 workgroupBarrier(); 3581 3582 // calculate final value for each element in the row 3583 for (var col = lindex; col < cols; col += wg) { 3584 let value = exp(getValue(row, col, row_stride) - rowMaxShared) / rowSumShared; 3585 setValue(row, col, row_stride, value); 3586 } 3587 }`,E=e.compute({name:"Softmax",shaderCache:{hint:`${h};${m}`,inputDependencies:["type"]},getRunData:()=>({outputs:[{dims:c,dataType:l.dataType}],dispatchGroup:{x:f},programUniforms:[{type:6,data:p}]}),getShaderSource:x},{inputs:[l],outputs:[o?-1:0]})[0];o&&e.compute(Jc(E,u),{inputs:[E]})},PTe=(e,t)=>{Tse(e.inputs),Sse(e,t)},MTe=e=>Mi({axis:e.axis})}),Hj,Ase,Cse,Pse,kTe,pwt=Wt(()=>{tn(),_n(),xn(),Hj=e=>Array.from(e.getBigInt64Array(),Number),Ase=e=>{if(!e||e.length!==2)throw new Error("Tile requires 2 inputs.");if(e[0].dataType!==1&&e[0].dataType!==10&&e[0].dataType!==6&&e[0].dataType!==12)throw new Error("Tile only support float, float16, int32, and uint32 data types");if(e[1].dataType!==7)throw new Error("Tile `repeats` input should be of int64 data type");if(e[1].dims.length!==1)throw new Error("Tile `repeats` input should be 1-D");if(Hj(e[1]).length!==e[0].dims.length)throw new Error("Tile `repeats` input should have same number of elements as rank of input data tensor")},Cse=(e,t)=>{let r=[];for(let n=0;n<e.length;++n)r.push(e[n]*t[n]);return r},Pse=(e,t)=>{let r=e[0].dims,n=t??Hj(e[1]),i=Cse(r,n),a=yt.size(i),s=e[0].dataType,o=Et("input",s,r.length),l=Mr("output",s,i.length),u=c=>` 3588 const inputShape = ${o.indices(...r)}; 3589 ${c.registerUniform("output_size","u32").declareVariables(o,l)} 3590 ${c.mainStart()} 3591 ${c.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.output_size")} 3592 let output_indices = ${l.offsetToIndices("global_idx")}; 3593 var input_indices: ${o.type.indices}; 3594 for (var i = 0; i < ${r.length}; i++) { 3595 let input_dim_i = ${o.indicesGet("uniforms.input_shape","i")}; 3596 let input_dim_value = ${l.indicesGet("output_indices","i")} % input_dim_i; 3597 3598 ${o.indicesSet("input_indices","i","input_dim_value")} 3599 } 3600 ${l.setByOffset("global_idx",o.getByIndices("input_indices"))} 3601 }`;return{name:"Tile",shaderCache:{hint:`${n}`,inputDependencies:["rank"]},getRunData:()=>({outputs:[{dims:i,dataType:e[0].dataType}],dispatchGroup:{x:Math.ceil(a/64)},programUniforms:[{type:12,data:a},...zr(e[0].dims,i)]}),getShaderSource:u}},kTe=e=>{Ase(e.inputs),e.compute(Pse(e.inputs),{inputs:[0]})}}),Mse,kse,OTe,mwt=Wt(()=>{tn(),_n(),xn(),Mse=(e,t,r,n,i)=>{let a=Mr("output_data",i,r.length,4),s=Et("a_data",t[1].dataType,t[1].dims.length,4),o=Et("b_data",t[2].dataType,t[2].dims.length,4),l=Et("c_data",t[0].dataType,t[0].dims.length,4),u,c=(d,f,h)=>`select(${f}, ${d}, ${h})`;if(!n)u=a.setByOffset("global_idx",c(s.getByOffset("global_idx"),o.getByOffset("global_idx"),l.getByOffset("global_idx")));else{let d=(f,h,p="")=>{let m=`a_data[index_a${h}][component_a${h}]`,_=`b_data[index_b${h}][component_b${h}]`,y=`bool(c_data[index_c${h}] & (0xffu << (component_c${h} * 8)))`;return` 3602 let output_indices${h} = ${a.offsetToIndices(`global_idx * 4u + ${h}u`)}; 3603 let offset_a${h} = ${s.broadcastedIndicesToOffset(`output_indices${h}`,a)}; 3604 let offset_b${h} = ${o.broadcastedIndicesToOffset(`output_indices${h}`,a)}; 3605 let offset_c${h} = ${l.broadcastedIndicesToOffset(`output_indices${h}`,a)}; 3606 let index_a${h} = offset_a${h} / 4u; 3607 let index_b${h} = offset_b${h} / 4u; 3608 let index_c${h} = offset_c${h} / 4u; 3609 let component_a${h} = offset_a${h} % 4u; 3610 let component_b${h} = offset_b${h} % 4u; 3611 let component_c${h} = offset_c${h} % 4u; 3612 ${f}[${h}] = ${p}(${c(m,_,y)}); 3613 `};i===9?u=` 3614 var data = vec4<u32>(0); 3615 ${d("data",0,"u32")} 3616 ${d("data",1,"u32")} 3617 ${d("data",2,"u32")} 3618 ${d("data",3,"u32")} 3619 output_data[global_idx] = dot(vec4<u32>(0x1, 0x100, 0x10000, 0x1000000), vec4<u32>(data));`:u=` 3620 ${d("output_data[global_idx]",0)} 3621 ${d("output_data[global_idx]",1)} 3622 ${d("output_data[global_idx]",2)} 3623 ${d("output_data[global_idx]",3)} 3624 `}return` 3625 ${e.registerUniform("vec_size","u32").declareVariables(l,s,o,a)} 3626 ${e.mainStart()} 3627 ${e.guardAgainstOutOfBoundsWorkgroupSizes("uniforms.vec_size")} 3628 ${u} 3629 }`},kse=e=>{let t=e[1].dims,r=e[2].dims,n=e[0].dims,i=e[1].dataType,a=!(yt.areEqual(t,r)&&yt.areEqual(r,n)),s=t,o=yt.size(t);if(a){let u=Bw.calcShape(Bw.calcShape(t,r,!1),n,!1);if(!u)throw new Error("Can't perform where op on the given tensors");s=u,o=yt.size(s)}let l=Math.ceil(o/4);return{name:"Where",shaderCache:{inputDependencies:["rank","rank","rank"]},getShaderSource:u=>Mse(u,e,s,a,i),getRunData:()=>({outputs:[{dims:s,dataType:i}],dispatchGroup:{x:Math.ceil(o/64/4)},programUniforms:[{type:12,data:l},...zr(n,t,r,s)]})}},OTe=e=>{e.compute(kse(e.inputs))}}),NTe,gwt=Wt(()=>{kbt(),dW(),Obt(),Nbt(),Ibt(),Dbt(),Lbt(),Bbt(),Ubt(),Wbt(),Vbt(),Hbt(),Gbt(),qbt(),Kbt(),Ybt(),Xbt(),Qbt(),Zbt(),Jbt(),ewt(),twt(),rwt(),nwt(),iwt(),QEe(),awt(),swt(),owt(),lwt(),uwt(),cW(),cwt(),rTe(),dwt(),fwt(),hwt(),eTe(),pwt(),E0(),fW(),mwt(),NTe=new Map([["Abs",[S2e]],["Acos",[A2e]],["Acosh",[C2e]],["Add",[oEe]],["ArgMax",[w2e,J8]],["ArgMin",[b2e,J8]],["Asin",[P2e]],["Asinh",[M2e]],["Atan",[k2e]],["Atanh",[O2e]],["Attention",[x2e]],["AveragePool",[dTe,cTe]],["BatchNormalization",[E2e]],["BiasAdd",[T2e]],["BiasSplitGelu",[sEe]],["Cast",[I2e,N2e]],["Ceil",[L2e]],["Clip",[D2e]],["Concat",[yEe,vEe]],["Conv",[aB,iB]],["ConvTranspose",[PEe,CEe]],["Cos",[j2e]],["Cosh",[R2e]],["CumSum",[MEe,kEe]],["DepthToSpace",[OEe,NEe]],["DequantizeLinear",[vTe,_Te]],["Div",[lEe]],["Einsum",[IEe,DEe]],["Elu",[$2e,OE]],["Equal",[uEe]],["Erf",[F2e]],["Exp",[B2e]],["Expand",[LEe]],["FastGelu",[jEe]],["Floor",[z2e]],["FusedConv",[aB,iB]],["Gather",[$Ee,REe]],["GatherElements",[VEe,WEe]],["GatherBlockQuantized",[zEe,UEe]],["GatherND",[FEe,BEe]],["Gelu",[U2e]],["Gemm",[GEe,HEe]],["GlobalAveragePool",[hTe,fTe]],["GlobalMaxPool",[yTe,gTe]],["Greater",[hEe]],["GreaterOrEqual",[mEe]],["GridSample",[qEe,KEe]],["GroupQueryAttention",[nTe]],["HardSigmoid",[X2e,Y2e]],["InstanceNormalization",[iTe]],["LayerNormalization",[aTe]],["LeakyRelu",[W2e,OE]],["Less",[pEe]],["LessOrEqual",[gEe]],["Log",[iEe]],["MatMul",[sTe]],["MatMulNBits",[oTe,lTe]],["MaxPool",[pTe,mTe]],["Mul",[cEe]],["MultiHeadAttention",[XEe,YEe]],["Neg",[H2e]],["Not",[V2e]],["Pad",[uTe]],["Pow",[dEe]],["QuickGelu",[aEe,OE]],["Range",[bTe]],["Reciprocal",[G2e]],["ReduceMin",[m2e]],["ReduceMean",[c2e]],["ReduceMax",[p2e]],["ReduceSum",[y2e]],["ReduceProd",[g2e]],["ReduceL1",[d2e]],["ReduceL2",[f2e]],["ReduceLogSum",[_2e]],["ReduceLogSumExp",[h2e]],["ReduceSumSquare",[v2e]],["Relu",[q2e]],["Resize",[ETe,TTe]],["RotaryEmbedding",[tTe]],["ScatterND",[xTe,wTe]],["Sigmoid",[K2e]],["Sin",[Q2e]],["Sinh",[Z2e]],["Slice",[ATe,CTe]],["Ski
3629pLayerNormalization",[STe]],["Split",[ZEe,JEe]],["Sqrt",[J2e]],["Softmax",[PTe,MTe]],["Sub",[fEe]],["Tan",[eEe]],["Tanh",[tEe]],["ThresholdedRelu",[nEe,OE]],["Tile",[kTe]],["Transpose",[Zxe,Jxe]],["Where",[OTe]]])}),ITe,ywt=Wt(()=>{lh(),ym(),xn(),ITe=class{constructor(e){this.backend=e,this.repo=new Map,this.attributesBound=!1}getArtifact(e){return this.repo.get(e)}setArtifact(e,t){this.repo.set(e,t)}run(e,t,r,n,i){rh(e.programInfo.name);let a=this.backend.device,s=this.backend.getComputePassEncoder();this.backend.writeTimestamp(this.backend.pendingDispatchNumber*2);let o=[];for(let u of t)o.push({binding:o.length,resource:{buffer:u.buffer}});for(let u of r)o.push({binding:o.length,resource:{buffer:u.buffer}});i&&o.push({binding:o.length,resource:i});let l=a.createBindGroup({layout:e.computePipeline.getBindGroupLayout(0),entries:o,label:e.programInfo.name});if(this.backend.sessionStatus==="capturing"){let u={kernelId:this.backend.currentKernelId,computePipeline:e.computePipeline,bindGroup:l,dispatchGroup:n};this.backend.capturedCommandList.get(this.backend.currentSessionId).push(u)}s.setPipeline(e.computePipeline),s.setBindGroup(0,l),s.dispatchWorkgroups(...n),this.backend.writeTimestamp(this.backend.pendingDispatchNumber*2+1),this.backend.pendingDispatchNumber++,(this.backend.pendingDispatchNumber>=this.backend.maxDispatchNumber||this.backend.queryType==="at-passes")&&this.backend.endComputePass(),this.backend.pendingDispatchNumber>=this.backend.maxDispatchNumber&&this.backend.flush(),Xd(e.programInfo.name)}dispose(){}build(e,t){rh(e.name);let r=this.backend.device,n=[];[{feature:"shader-f16",extension:"f16"},{feature:"subgroups",extension:"subgroups"}].forEach(u=>{r.features.has(u.feature)&&n.push(`enable ${u.extension};`)});let i=Qxe(t,this.backend.device.limits),a=e.getShaderSource(i),s=`${n.join(` 3630`)} 3631${i.additionalImplementations} 3632${a}`,o=r.createShaderModule({code:s,label:e.name});ti("verbose",()=>`[WebGPU] ${e.name} shader code: ${s}`);let l=r.createComputePipeline({compute:{module:o,entryPoint:"main"},layout:"auto",label:e.name});return Xd(e.name),{programInfo:e,computePipeline:l,uniformVariablesInfo:i.variablesInfo}}normalizeDispatchGroupSize(e){let t=typeof e=="number"?e:e.x,r=typeof e=="number"?1:e.y||1,n=typeof e=="number"?1:e.z||1,i=this.backend.device.limits.maxComputeWorkgroupsPerDimension;if(t<=i&&r<=i&&n<=i)return[t,r,n];let a=t*r*n,s=Math.ceil(Math.sqrt(a));if(s>i){if(s=Math.ceil(Math.cbrt(a)),s>i)throw new Error("Total dispatch size exceeds WebGPU maximum.");return[s,s,s]}else return[s,s,1]}}}),DTe={};Sx(DTe,{WebGpuBackend:()=>LTe});var Ose,Nse,Ise,LTe,vwt=Wt(()=>{lh(),tn(),ym(),Gxe(),Pbt(),gwt(),ywt(),Ose=(e,t)=>{if(t.length!==e.length)throw new Error(`inputDependencies length ${t.length} is not equal to inputTensors length ${e.length}.`);let r=[];for(let n=0;n<e.length;++n){let i=e[n].dataType;switch(t[n]){case"none":{r.push("");break}case"type":{r.push(`${i}`);break}case"rank":{let a=e[n].dims.length;r.push(`${i};${a}`);break}case"dims":{let a=e[n].dims.join(",");r.push(`${i};${a}`);break}default:throw new Error(`unsupported input dependency: ${t[n]}`)}}return r.join("|")},Nse=(e,t,r)=>{var i,a;let n=e.name;return(i=e.shaderCache)!=null&&i.hint&&(n+="["+e.shaderCache.hint+"]"),n+=":"+r+`:${Ose(t,((a=e.shaderCache)==null?void 0:a.inputDependencies)??new Array(t.length).fill("dims"))}`,n},Ise=class{constructor(e){e&&(this.architecture=e.architecture,this.vendor=e.vendor)}isArchitecture(e){return this.architecture===e}isVendor(e){return this.vendor===e}},LTe=class{constructor(){this.currentSessionId=null,this.currentKernelId=null,this.commandEncoder=null,this.computePassEncoder=null,this.maxDispatchNumber=16,this.pendingDispatchNumber=0,this.pendingKernels=[],this.pendingQueries=new Map,this.sessionStatus="default",this.capturedCommandList=new Map,this.capturedPendingKernels=new Map,this.sessionExternalDataMapping=new Map}get currentKernelCustomData(){if(this.currentKernelId===null)throw new Error("currentKernelCustomData(): currentKernelId is null. (should not happen)");let e=this.kernelCustomData.get(this.currentKernelId);return e||(e={},this.kernelCustomData.set(this.currentKernelId,e)),e}async initialize(e,t){this.env=e;let r=[],n={requiredLimits:{maxComputeWorkgroupStorageSize:t.limits.maxComputeWorkgroupStorageSize,maxComputeWorkgroupsPerDimension:t.limits.maxComputeWorkgroupsPerDimension,maxStorageBufferBindingSize:t.limits.maxStorageBufferBindingSize,maxBufferSize:t.limits.maxBufferSize,maxComputeInvocationsPerWorkgroup:t.limits.maxComputeInvocationsPerWorkgroup,maxComputeWorkgroupSizeX:t.limits.maxComputeWorkgroupSizeX,maxComputeWorkgroupSizeY:t.limits.maxComputeWorkgroupSizeY,maxComputeWorkgroupSizeZ:t.limits.maxComputeWorkgroupSizeZ},requiredFeatures:r},i=a=>t.features.has(a)&&r.push(a)&&!0;i("chromium-experimental-timestamp-query-inside-passes")||i("timestamp-query"),i("shader-f16"),i("subgroups"),this.device=await t.requestDevice(n),this.adapterInfo=new Ise(t.info||await t.requestAdapterInfo()),this.gpuDataManager=Yxe(this),this.programManager=new ITe(this),this.kernels=new Map,this.kernelPersistentData=new Map,this.kernelCustomData=new Map,sW(e.logLevel,!!e.debug),this.device.onuncapturederror=a=>
vendor: 13,645 bytes, line 3632
3632{a.error instanceof GPUValidationError&&console.error(`An uncaught WebGPU validation error was raised: ${a.error.message}`)},Object.defineProperty(this.env.webgpu,"device",{value:this.device,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(this.env.webgpu,"adapter",{value:t,writable:!1,enumerable:!0,configurable:!1}),this.setQueryType()}dispose(){typeof this.querySet<"u"&&this.querySet.destroy(),this.gpuDataManager.dispose()}getCommandEncoder(){return this.commandEncoder||(this.commandEncoder=this.device.createCommandEncoder()),this.commandEncoder}getComputePassEncoder(){if(!this.computePassEncoder){let e=this.getCommandEncoder(),t={};this.queryType==="at-passes"&&(t.timestampWrites={querySet:this.querySet,beginningOfPassWriteIndex:this.pendingDispatchNumber*2,endOfPassWriteIndex:this.pendingDispatchNumber*2+1}),this.computePassEncoder=e.beginComputePass(t)}return this.computePassEncoder}endComputePass(){this.computePassEncoder&&(this.computePassEncoder.end(),this.computePassEncoder=null)}flush(){if(!this.commandEncoder)return;rh(),this.endComputePass();let e;this.queryType!=="none"&&(this.commandEncoder.resolveQuerySet(this.querySet,0,this.pendingDispatchNumber*2,this.queryResolveBuffer,0),e=this.device.createBuffer({size:this.pendingDispatchNumber*2*8,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST}),this.pendingQueries.set(e,this.pendingKernels),this.pendingKernels=[],this.commandEncoder.copyBufferToBuffer(this.queryResolveBuffer,0,e,0,this.pendingDispatchNumber*2*8)),this.device.queue.submit([this.commandEncoder.finish()]),this.gpuDataManager.refreshPendingBuffers(),this.commandEncoder=null,this.pendingDispatchNumber=0,this.queryType!=="none"&&e.mapAsync(GPUMapMode.READ).then(()=>{var n;let t=new BigUint64Array(e.getMappedRange()),r=this.pendingQueries.get(e);for(let i=0;i<t.length/2;i++){let a=r[i],s=a.kernelId,o=this.kernels.get(s),l=o.kernelType,u=o.kernelName,c=a.programName,d=a.inputTensorViews,f=a.outputTensorViews,h=t[i*2],p=t[i*2+1];typeof this.queryTimeBase>"u"&&(this.queryTimeBase=h);let m=Number(h-this.queryTimeBase),_=Number(p-this.queryTimeBase);if(!Number.isSafeInteger(m)||!Number.isSafeInteger(_))throw new RangeError("incorrect timestamp range");if((n=this.env.webgpu.profiling)!=null&&n.ondata)this.env.webgpu.profiling.ondata({version:1,inputsMetadata:d.map(y=>({dims:y.dims,dataType:Dp(y.dataType)})),outputsMetadata:f.map(y=>({dims:y.dims,dataType:Dp(y.dataType)})),kernelId:s,kernelType:l,kernelName:u,programName:c,startTime:m,endTime:_});else{let y="";d.forEach((b,w)=>{y+=`input[${w}]: [${b.dims}] | ${Dp(b.dataType)}, `});let v="";f.forEach((b,w)=>{v+=`output[${w}]: [${b.dims}] | ${Dp(b.dataType)}, `}),console.log(`[profiling] kernel "${s}|${l}|${u}|${c}" ${y}${v}execution time: ${_-m} ns`)}hA("GPU",`${c}::${h}::${p}`)}e.unmap(),this.pendingQueries.delete(e)}),Xd()}run(e,t,r,n,i,a){rh(e.name);let s=[];for(let v=0;v<t.length;++v){let b=t[v].data;if(b===0)continue;let w=this.gpuDataManager.get(b);if(!w)throw new Error(`no GPU data for input: ${b}`);s.push(w)}let{outputs:o,dispatchGroup:l,programUniforms:u}=e.getRunData(t),c=r.length===0?o.map((v,b)=>b):r;if(c.length!==o.length)throw new Error(`Output size ${c.length} must be equal to ${o.length}.`);let d=[],f=[];for(let v=0;v<o.length;++v){if(!Number.isInteger(c[v])||c[v]<-3||c[v]>=a)throw new Error(`Invalid output index: ${c[v]}`);if(c[v]===-3)continue;let b=c[v]===-1,w=c[v]===-2,x=b||w?i(o[v].dataType,o[v].dims):n(c[v],o[v].dataType,o[v].dims);if(d.push(x),x.data===0)continue;let E=this.gpuDataManager.get(x.data);if(!E)throw new Error(`no GPU data for output: ${x.data}`);if(b&&this.temporaryData.push(E),w){let T=this.kernelPersistentData.get(this.currentKernelId);T||(T=[],this.kernelPersistentData.set(this.currentKernelId,T)),T.push(E)}f.push(E)}if(s.length!==t.length||f.length!==d.length){if(f.length===0)return Xd(e.name),d;throw new Error(`Program ${e.name} has zero-sized tensor(s) in inputs or outputs. This is not supported now.`)}let h;if(u){let v=0,b=[];u.forEach(T=>{let S=typeof T.data=="number"?[T.data]:T.data;if(S.length===0)return;let A=T.type===10?2:4,C,k;T.type===10?(k=S.length>4?16:S.length>2?8:S.length*A,C=S.length>4?16:A*S.length):(k=S.length<=2?S.length*A:16,C=16),v=Math.ceil(v/k)*k,b.push(v);let M=T.type===10?8:4;v+=S.length>4?Math.ceil(S.length/M)*C:S.length*A});let w=16;v=Math.ceil(v/w)*w;let x=new ArrayBuffer(v);u.forEach((T,S)=>{let A=b[S],C=typeof T.data=="number"?[T.data]:T.data;if(T.type===6)new Int32Array(x,A,C.length).set(C);else if(T.type===12)new Uint32Array(x,A,C.length).set(C);else if(T.type===10)new Uint16Array(x,A,C.length).set(C);else if(T.type===1)new Float32Array(x,A,C.length).set(C);else throw new Error(`Unsupported uniform type: ${Dp(T.type)}`)});let E=this.gpuDataManager.create(v,GPUBufferUsage.COPY_DST|GPUBufferUsage.UNIFORM);this.device.queue.writeBuffer(E.buffer,0,x,0,v),this.gpuDataManager.release(E.id),h={offset:0,size:v,buffer:E.buffer}}let p=this.programManager.normalizeDispatchGroupSize(l),m=p[1]===1&&p[2]===1,_=Nse(e,t,m),y=this.programManager.getArtifact(_);if(y||(y=this.programManager.build(e,p),this.programManager.setArtifact(_,y),ti("info",()=>`[artifact] key: ${_}, programName: ${e.name}`)),u&&y.uniformVariablesInfo){if(u.length!==y.uniformVariablesInfo.length)throw new Error(`Uniform variables count mismatch: expect ${y.uniformVariablesInfo.length}, got ${u.length} in program "${y.programInfo.name}".`);for(let v=0;v<u.length;v++){let b=u[v],w=b.type,x=typeof b.data=="number"?1:b.data.length,[E,T]=y.uniformVariablesInfo[v];if(w!==E||x!==T)throw new Error(`Uniform variable ${v} mismatch: expect type ${E} with size ${T}, got type ${w} with size ${x} in program "${y.programInfo.name}".`)}}if(ti("info",()=>`[ProgramManager] run "${e.name}" (key=${_}) with ${p[0]}x${p[1]}x${p[2]}`),this.queryType!=="none"||this.sessionStatus==="capturing"){let v={kernelId:this.currentKernelId,programName:y.programInfo.name,inputTensorViews:t,outputTensorViews:d};this.pendingKernels.push(v),this.sessionStatus==="capturing"&&this.capturedPendingKernels.get(this.currentSessionId).push(v)}return this.programManager.run(y,s,f,p,h),Xd(e.name),d}upload(e,t){this.gpuDataManager.upload(e,t)}memcpy(e,t){this.gpuDataManager.memcpy(e,t)}async download(e,t){await this.gpuDataManager.download(e,t)}alloc(e){return this.gpuDataManager.create(e).id}free(e){return this.gpuDataManager.release(e)}createKernel(e,t,r,n){let i=NTe.get(e);if(!i)throw new Error(`kernel not implemented: ${e}`);let a={kernelType:e,kernelName:n,kernelEntry:i[0],attributes:[i[1],r]};this.kernels.set(t,a)}releaseKernel(e){let t=this.kernelPersistentData.get(e);if(t){for(let r of t)this.gpuDataManager.release(r.id);this.kernelPersistentData.delete(e)}this.kernelCustomData.delete(e),this.kernels.delete(e)}computeKernel(e,t,r){let n=this.kernels.get(e);if(!n)throw new Error(`kernel not created: ${e}`);let i=n.kernelType,a=n.kernelName,s=n.kernelEntry,o=n.attributes;if(this.currentKernelId!==null)throw new Error(`kernel "[${i}] ${a}" is not allowed to be called recursively`);this.currentKernelId=e,o[0]&&(o[1]=o[0](o[1]),o[0]=void 0),ti("info",()=>`[WebGPU] Start to run kernel "[${i}] ${a}"...`);let l=this.env.debug;this.temporaryData=[];try{return l&&this.device.pushErrorScope("validation"),s(t,o[1]),0}catch(u){return r.push(Promise.resolve(`[WebGPU] Kernel "[${i}] ${a}" failed. ${u}`)),1}finally{l&&r.push(this.device.popErrorScope().then(u=>u?`GPU validation error for kernel "[${i}] ${a}": ${u.message}`:null));for(let u of this.temporaryData)this.gpuDataManager.release(u.id);this.temporaryData=[],this.currentKernelId=null}}registerBuffer(e,t,r,n){let i=this.sessionExternalDataMapping.get(e);i||(i=new Map,this.sessionExternalDataMapping.set(e,i));let a=i.get(t),s=this.gpuDataManager.registerExternalBuffer(r,n,a);return i.set(t,[s,r]),s}unregisterBuffers(e){let t=this.sessionExternalDataMapping.get(e);t&&(t.forEach(r=>this.gpuDataManager.unregisterExternalBuffer(r[0])),this.sessionExternalDataMapping.delete(e))}getBuffer(e){let t=this.gpuDataManager.get(e);if(!t)throw new Error(`no GPU data for buffer: ${e}`);return t.buffer}createDownloader(e,t,r){return async()=>{let n=await X8(this,e,t);return oW(n.buffer,r)}}writeTimestamp(e){this.queryType==="inside-passes"&&this.computePassEncoder.writeTimestamp(this.querySet,e)}setQueryType(){var e;this.queryType="none",(((e=this.env.webgpu.profiling)==null?void 0:e.mode)==="default"||(typeof this.env.trace>"u"?this.env.wasm.trace:this.env.trace))&&(this.device.features.has("chromium-experimental-timestamp-query-inside-passes")?this.queryType="inside-passes":this.device.features.has("timestamp-query")&&(this.queryType="at-passes"),this.queryType!=="none"&&typeof this.querySet>"u"&&(this.querySet=this.device.createQuerySet({type:"timestamp",count:this.maxDispatchNumber*2}),this.queryResolveBuffer=this.device.createBuffer({size:this.maxDispatchNumber*2*8,usage:GPUBufferUsage.COPY_SRC|GPUBufferUsage.QUERY_RESOLVE})))}captureBegin(){ti("info","captureBegin"),this.capturedCommandList.get(this.currentSessionId)||this.capturedCommandList.set(this.currentSessionId,[]),this.capturedPendingKernels.get(this.currentSessionId)||this.capturedPendingKernels.set(this.currentSessionId,[]),this.flush(),this.sessionStatus="capturing"}captureEnd(){ti("info","captureEnd"),this.flush(),this.sessionStatus="default"}replay(){ti("info","replay"),this.sessionStatus="replaying";let e=this.capturedCommandList.get(this.currentSessionId),t=this.capturedPendingKernels.get(this.currentSessionId),r=e.length;this.pendingKernels=[];for(let n=0;n<r;n++){let i=this.getComputePassEncoder(),a=e[n];this.writeTimestamp(this.pendingDispatchNumber*2),i.setPipeline(a.computePipeline),i.setBindGroup(0,a.bindGroup),i.dispatchWorkgroups(...a.dispatchGroup),this.writeTimestamp(this.pendingDispatchNumber*2+1),this.pendingDispatchNumber++,this.queryType!=="none"&&this.pendingKernels.push(t[n]),(this.pendingDispatchNumber>=this.maxDispatchNumber||this.queryType==="at-passes")&&this.endComputePass(),this.pendingDispatchNumber>=this.maxDispatchNumber&&this.flush()}this.flush(),this.sessionStatus="default"}onCreateSession(){this.gpuDataManager.onCreateSession()}onReleaseSession(e){this.unregisterBuffers(e),this.capturedCommandList.has(e)&&this.capturedCommandList.delete(e),this.capturedPendingKernels.has(e)&&this.capturedPendingKernels.delete(e),this.gpuDataManager.onReleaseSession(e)}onRunStart(e){this.currentSessionId=e,this.setQueryType()}}}),jTe={};Sx(jTe,{init:()=>RTe});var $M,Dse,RTe,_wt=Wt(()=>{tn(),ym(),_n(),Cbt(),$M=class $Te{constructor(t,r,n,i){this.module=t,this.dataType=r,this.data=n,this.dims=i}getFloat32Array(){if(this.dataType!==1)throw new Error("Invalid data type");let t=yt.size(this.dims);return t===0?new Float32Array:new Float32Array(this.module.HEAP8.buffer,this.data,t)}getBigInt64Array(){if(this.dataType!==7)throw new Error("Invalid data type");let t=yt.size(this.dims);return t===0?new BigInt64Array:new BigInt64Array(this.module.HEAP8.buffer,this.data,t)}getInt32Array(){if(this.dataType!==6)throw new Error("Invalid data type");let t=yt.size(this.dims);return t===0?new Int32Array:new Int32Array(this.module.HEAP8.buffer,this.data,t)}getUint16Array(){if(this.dataType!==10&&this.dataType!==4)throw new Error("Invalid data type");let t=yt.size(this.dims);return t===0?new Uint16Array:new Uint16Array(this.module.HEAP8.buffer,this.data,t)}reshape(t){if(yt.size(t)!==yt.size(this.dims))throw new Error("Invalid new shape");return new $Te(this.module,this.dataType,this.data,t)}},Dse=class{constructor(e,t,r){this.module=e,this.backend=t,this.customDataOffset=0,this.customDataSize=0,this.adapterInfo=t.adapterInfo;let n=e.PTR_SIZE,i=r/e.PTR_SIZE,a=n===4?"i32":"i64";this.opKernelContext=Number(e.getValue(n*i++,a));let s=Number(e.getValue(n*i++,a));this.outputCount=Number(e.getValue(n*i++,a)),this.customDataOffset=Number(e.getValue(n*i++,"*")),this.customDataSize=Number(e.getValue(n*i++,a));let o=[];for(let l=0;l<s;l++){let u=Number(e.getValue(n*i++,a)),c=Number(e.getValue(n*i++,"*")),d=Number(e.getValue(n*i++,a)),f=[];for(let h=0;h<d;h++)f.push(Number(e.getValue(n*i++,a)));o.push(new $M(e,u,c,f))}this.inputs=o}get kernelCustomData(){return this.backend.currentKernelCustomData}get customDataBuffer(){return this.module.HEAPU8.subarray(this.customDataOffset,this.customDataOffset+this.customDataSize)}compute(e,t){var s;let r=((s=t==null?void 0:t.inputs)==null?void 0:s.map(o=>typeof o=="number"?this.inputs[o]:o))??this.inputs,n=(t==null?void 0:t.outputs)??[],i=(o,l,u)=>new $M(this.module,l,this.output(o,u),u),a=(o,l)=>{let u=Sy(o,l);if(!u)throw new Error(`Unsupported data type: ${o}`);let c=u>0?this.backend.gpuDataManager.create(u).id:0;return new $M(this.module,o,c,l)};return this.backend.run(e,r,n,i,a,this.outputCount)}output(e,t){let r=this.module.stackSave();try{let n=this.module.PTR_SIZE,i=n===4?"i32":"i64",a=this.module.stackAlloc((1+t.length)*n);this.module.setValue(a,t.length,i);for(let s=0;s<t.length;s++)this.module.setValue(a+n*(s+1),t[s],i);return this.module._JsepOutput(this.opKernelContext,e,a)}catch(n){throw new Error(`Failed to generate kernel's output[${e}] with dims [${t}]. If you are running with pre-allocated output, please make sure the output type/dims are correct. Error: ${n}`)}finally{this.module.stackRestore(r)}}},RTe=async(e,t,r,n)=>{let i=t.jsepInit;if(!i)throw new Error("Failed to initialize JSEP. The WebAssembly module is not built with JSEP support.");if(e==="webgpu"){let a=(vwt(),fA(DTe)).WebGpuBackend,s=new a;await s.initialize(r,n),i("webgpu",[s,o=>s.alloc(Number(o)),o=>s.free(o),(o,l,u,c=!1)=>
3632{if(c)ti("verbose",()=>`[WebGPU] jsepCopyGpuToGpu: src=${Number(o)}, dst=${Number(l)}, size=${Number(u)}`),s.memcpy(Number(o),Number(l));else{ti("verbose",()=>`[WebGPU] jsepCopyCpuToGpu: dataOffset=${Number(o)}, gpuDataId=${Number(l)}, size=${Number(u)}`);let d=t.HEAPU8.subarray(Number(o>>>0),Number(o>>>0)+Number(u));s.upload(Number(l),d)}},async(o,l,u)=>{ti("verbose",()=>`[WebGPU] jsepCopyGpuToCpu: gpuDataId=${o}, dataOffset=${l}, size=${u}`),await s.download(Number(o),()=>t.HEAPU8.subarray(Number(l)>>>0,Number(l+u)>>>0))},(o,l,u)=>s.createKernel(o,Number(l),u,t.UTF8ToString(t._JsepGetNodeName(Number(l)))),o=>s.releaseKernel(o),(o,l,u,c)=>{ti("verbose",()=>`[WebGPU] jsepRun: sessionHandle=${u}, kernel=${o}, contextDataOffset=${l}`);let d=new Dse(t,s,Number(l));return s.computeKernel(Number(o),d,c)},()=>s.captureBegin(),()=>s.captureEnd(),()=>s.replay()])}else{let a=new Kxe(r);i("webnn",[a,()=>a.reserveTensorId(),s=>a.releaseTensorId(s),async(s,o,l,u,c)=>a.ensureTensor(s,o,l,u,c),(s,o)=>{a.uploadTensor(s,o)},async(s,o)=>a.downloadTensor(s,o)])}}}),Lse,vW,_W,$m,jse,Gj,wO,bW,wW,qj,xW,EW,TW,FTe=Wt(()=>{Tbt(),Sbt(),tn(),p_(),tW(),Uxe(),Lse=(e,t)=>{ca()._OrtInit(e,t)!==0&&Bi("Can't initialize onnxruntime.")},vW=async e=>{Lse(e.wasm.numThreads,gO(e.logLevel))},_W=async(e,t)=>{var r,n;(n=(r=ca()).asyncInit)==null||n.call(r);{let i=(_wt(),fA(jTe)).init;if(t==="webgpu"){if(typeof navigator>"u"||!navigator.gpu)throw new Error("WebGPU is not supported in current environment");let a=e.webgpu.adapter;if(a){if(typeof a.limits!="object"||typeof a.features!="object"||typeof a.requestDevice!="function")throw new Error("Invalid GPU adapter set in `env.webgpu.adapter`. It must be a GPUAdapter object.")}else{let s=e.webgpu.powerPreference;if(s!==void 0&&s!=="low-power"&&s!=="high-performance")throw new Error(`Invalid powerPreference setting: "${s}"`);let o=e.webgpu.forceFallbackAdapter;if(o!==void 0&&typeof o!="boolean")throw new Error(`Invalid forceFallbackAdapter setting: "${o}"`);if(a=await navigator.gpu.requestAdapter({powerPreference:s,forceFallbackAdapter:o}),!a)throw new Error('Failed to get GPU adapter. You may need to enable flag "--enable-unsafe-webgpu" if you are using Chrome.')}await i("webgpu",ca(),e,a)}if(t==="webnn"){if(typeof navigator>"u"||!navigator.ml)throw new Error("WebNN is not supported in current environment");await i("webnn",ca(),e)}}},$m=new Map,jse=e=>{let t=ca(),r=t.stackSave();try{let n=t.PTR_SIZE,i=t.stackAlloc(2*n);t._OrtGetInputOutputCount(e,i,i+n)!==0&&Bi("Can't get session input/output count.");let a=n===4?"i32":"i64";return[Number(t.getValue(i,a)),Number(t.getValue(i+n,a))]}finally{t.stackRestore(r)}},Gj=(e,t)=>{let r=ca(),n=r.stackSave(),i=0;try{let a=r.PTR_SIZE,s=r.stackAlloc(2*a);r._OrtGetInputOutputMetadata(e,t,s,s+a)!==0&&Bi("Can't get session input/output metadata.");let o=Number(r.getValue(s,"*"));i=Number(r.getValue(s+a,"*"));let l=r.HEAP32[i/4];if(l===0)return[o,0];let u=r.HEAPU32[i/4+1],c=[];for(let d=0;d<u;d++){let f=Number(r.getValue(i+8+d*a,"*"));c.push(f!==0?r.UTF8ToString(f):Number(r.getValue(i+8+(d+u)*a,"*")))}return[o,l,c]}finally{r.stackRestore(n),i!==0&&r._OrtFree(i)}},wO=e=>{let t=ca(),r=t._malloc(e.byteLength);if(r===0)throw new Error(`Can't create a session. failed to allocate a buffer of size ${e.byteLength}.`);return t.HEAPU8.set(e,r),[r,e.byteLength]},bW=async(e,t)=>{var d,f,h,p;let r,n,i=ca();Array.isArray(e)?[r,n]=e:e.buffer===i.HEAPU8.buffer?[r,n]=[e.byteOffset,e.byteLength]:[r,n]=wO(e);let a=0,s=0,o=0,l=[],u=[],c=[];try{if([s,l]=await zxe(t),(t==null?void 0:t.externalData)&&i.mountExternalData){let S=[];for(let A of t.externalData){let C=typeof A=="string"?A:A.path;S.push(aW(typeof A=="string"?A:A.data).then(k=>{i.mountExternalData(C,k)}))}await Promise.all(S)}for(let S of(t==null?void 0:t.executionProviders)??[])if((typeof S=="string"?S:S.name)==="webnn"){if(i.shouldTransferToMLTensor=!1,typeof S!="string"){let A=S,C=A==null?void 0:A.context,k=A==null?void 0:A.gpuDevice,M=A==null?void 0:A.deviceType,D=A==null?void 0:A.powerPreference;C?i.currentContext=C:k?i.currentContext=await i.webnnCreateMLContext(k):i.
3632currentContext=await i.webnnCreateMLContext({deviceType:M,powerPreference:D})}else i.currentContext=await i.webnnCreateMLContext();break}a=await i._OrtCreateSession(r,n,s),(d=i.webgpuOnCreateSession)==null||d.call(i,a),a===0&&Bi("Can't create a session."),(f=i.jsepOnCreateSession)==null||f.call(i),i.currentContext&&(i.webnnRegisterMLContext(a,i.currentContext),i.currentContext=void 0,i.shouldTransferToMLTensor=!0);let[m,_]=jse(a),y=!!(t!=null&&t.enableGraphCapture),v=[],b=[],w=[],x=[],E=[];for(let S=0;S<m;S++){let[A,C,k]=Gj(a,S);A===0&&Bi("Can't get an input name."),u.push(A);let M=i.UTF8ToString(A);v.push(M),w.push(C===0?{name:M,isTensor:!1}:{name:M,isTensor:!0,type:Dp(C),shape:k})}for(let S=0;S<_;S++){let[A,C,k]=Gj(a,S+m);A===0&&Bi("Can't get an output name."),c.push(A);let M=i.UTF8ToString(A);b.push(M),x.push(C===0?{name:M,isTensor:!1}:{name:M,isTensor:!0,type:Dp(C),shape:k});{if(y&&(t==null?void 0:t.preferredOutputLocation)===void 0){E.push("gpu-buffer");continue}let D=typeof(t==null?void 0:t.preferredOutputLocation)=="string"?t.preferredOutputLocation:((h=t==null?void 0:t.preferredOutputLocation)==null?void 0:h[M])??"cpu";if(D!=="cpu"&&D!=="cpu-pinned"&&D!=="gpu-buffer"&&D!=="ml-tensor")throw new Error(`Not supported preferred output location: ${D}.`);if(y&&D!=="gpu-buffer")throw new Error(`Not supported preferred output location: ${D}. Only 'gpu-buffer' location is supported when enableGraphCapture is true.`);E.push(D)}}let T=null;return E.some(S=>S==="gpu-buffer"||S==="ml-tensor")&&(o=i._OrtCreateBinding(a),o===0&&Bi("Can't create IO binding."),T={handle:o,outputPreferredLocations:E,outputPreferredLocationsEncoded:E.map(S=>K8(S))}),$m.set(a,[a,u,c,T,y,!1]),[a,v,b,w,x]}catch(m){throw u.forEach(_=>i._OrtFree(_)),c.forEach(_=>i._OrtFree(_)),o!==0&&i._OrtReleaseBinding(o)!==0&&Bi("Can't release IO binding."),a!==0&&i._OrtReleaseSession(a)!==0&&Bi("Can't release session."),m}finally{i._free(r),s!==0&&i._OrtReleaseSessionOptions(s)!==0&&Bi("Can't release session options."),l.forEach(m=>i._free(m)),(p=i.unmountExternalData)==null||p.call(i)}},wW=e=>{var l,u,c;let t=ca(),r=$m.get(e);if(!r)throw new Error(`cannot release session. invalid session id: ${e}`);let[n,i,a,s,o]=r;s&&(o&&t._OrtClearBoundOutputs(s.handle)!==0&&Bi("Can't clear bound outputs."),t._OrtReleaseBinding(s.handle)!==0&&Bi("Can't release IO binding.")),(l=t.jsepOnReleaseSession)==null||l.call(t,e),(u=t.webnnOnReleaseSession)==null||u.call(t,e),(c=t.webgpuOnReleaseSession)==null||c.call(t,e),i.forEach(d=>t._OrtFree(d)),a.forEach(d=>t._OrtFree(d)),t._OrtReleaseSession(n)!==0&&Bi("Can't release session."),$m.delete(e)},qj=async(e,t,r,n,i,a,s=!1)=>{if(!e){t.push(0);return}let o=ca(),l=o.PTR_SIZE,u=e[0],c=e[1],d=e[3],f=d,h,p;if(u==="string"&&(d==="gpu-buffer"||d==="ml-tensor"))throw new Error("String tensor is not supported on GPU.");if(s&&d!=="gpu-buffer")throw new Error(`External buffer must be provided for input/output index ${a} when enableGraphCapture is true.`);if(d==="gpu-buffer"){let y=e[2].gpuBuffer;p=Sy(v1(u),c);{let v=o.jsepRegisterBuffer;if(!v)throw new Error('Tensor location "gpu-buffer" is not supported without using WebGPU.');h=v(n,a,y,p)}}else if(d==="ml-tensor"){let y=e[2].mlTensor;p=Sy(v1(u),c);let v=o.webnnRegisterMLTensor;if(!v)throw new Error('Tensor location "ml-tensor" is not supported without using WebNN.');h=v(n,y,v1(u),c)}else{let y=e[2];if(Array.isArray(y)){p=l*y.length,h=o._malloc(p),r.push(h);for(let v=0;v<y.length;v++){if(typeof y[v]!="string")throw new TypeError(`tensor data at index ${v} is not a string`);o.setValue(h+v*l,$f(y[v],r),"*")}}else{let v=o.webnnIsGraphInput;if(u!=="string"&&v){let b=o.UTF8ToString(i);if(v(n,b)){let w=v1(u);p=Sy(w,c),f="ml-tensor";let x=o.webnnCreateTemporaryTensor,E=o.webnnUploadTensor;if(!x||!E)throw new Error('Tensor location "ml-tensor" is not supported without using WebNN.');let T=await x(n,w,c);E(T,new Uint8Array(y.buffer,y.byteOffset,y.byteLength)),h=T}else p=y.byteLength,h=o._malloc(p),r.push(h),o.HEAPU8.set(new Uint8Array(y.buffer,y.byteOffset,p),h)}else p=y.byteLength,h=o._malloc(p),r.push(h),o.HEAPU8.set(new Uint8Array(y.buffer,y.byteOffset,p),h)}}let m=o.stackSave(),_=o.stackAlloc(4*c.length);
3632try{c.forEach((v,b)=>o.setValue(_+b*l,v,l===4?"i32":"i64"));let y=o._OrtCreateTensor(v1(u),h,p,_,c.length,K8(f));y===0&&Bi(`Can't create tensor for input/output. session=${n}, index=${a}.`),t.push(y)}finally{o.stackRestore(m)}},xW=async(e,t,r,n,i,a)=>{var k,M,D,$;let s=ca(),o=s.PTR_SIZE,l=$m.get(e);if(!l)throw new Error(`cannot run inference. invalid session id: ${e}`);let u=l[0],c=l[1],d=l[2],f=l[3],h=l[4],p=l[5],m=t.length,_=n.length,y=0,v=[],b=[],w=[],x=[],E=s.stackSave(),T=s.stackAlloc(m*o),S=s.stackAlloc(m*o),A=s.stackAlloc(_*o),C=s.stackAlloc(_*o);try{[y,v]=Bxe(a);for(let B=0;B<m;B++)await qj(r[B],b,x,e,c[t[B]],t[B],h);for(let B=0;B<_;B++)await qj(i[B],w,x,e,d[n[B]],m+n[B],h);for(let B=0;B<m;B++)s.setValue(T+B*o,b[B],"*"),s.setValue(S+B*o,c[t[B]],"*");for(let B=0;B<_;B++)s.setValue(A+B*o,w[B],"*"),s.setValue(C+B*o,d[n[B]],"*");if(f&&!p){let{handle:B,outputPreferredLocations:z,outputPreferredLocationsEncoded:q}=f;if(c.length!==m)throw new Error(`input count from feeds (${m}) is expected to be always equal to model's input count (${c.length}).`);for(let L=0;L<m;L++){let K=t[L];await s._OrtBindInput(B,c[K],b[L])!==0&&Bi(`Can't bind input[${L}] for session=${e}.`)}for(let L=0;L<_;L++){let K=n[L];(k=i[L])!=null&&k[3]?s._OrtBindOutput(B,d[K],w[L],0)!==0&&Bi(`Can't bind pre-allocated output[${L}] for session=${e}.`):s._OrtBindOutput(B,d[K],0,q[K])!==0&&Bi(`Can't bind output[${L}] to ${z[L]} for session=${e}.`)}$m.set(e,[u,c,d,f,h,!0])}(M=s.jsepOnRunStart)==null||M.call(s,u),(D=s.webnnOnRunStart)==null||D.call(s,u);let V;f?V=await s._OrtRunWithBinding(u,f.handle,_,A,y):V=await s._OrtRun(u,S,T,m,C,_,A,y),V!==0&&Bi("failed to call OrtRun().");let U=[];for(let B=0;B<_;B++){let z=Number(s.getValue(A+B*o,"*"));if(z===w[B]){U.push(i[B]);continue}let q=s.stackSave(),L=s.stackAlloc(4*o),K=!1,O,N=0;try{s._OrtGetTensorData(z,L,L+o,L+2*o,L+3*o)!==0&&Bi(`Can't access output tensor data on index ${B}.`);let X=o===4?"i32":"i64",ie=Number(s.getValue(L,X));N=s.getValue(L+o,"*");let ee=s.getValue(L+o*2,"*"),le=Number(s.getValue(L+o*3,X)),Te=[];for(let ae=0;ae<le;ae++)Te.push(Number(s.getValue(ee+ae*o,X)));s._OrtFree(ee)!==0&&Bi("Can't free memory for tensor dims.");let be=Te.reduce((ae,H)=>ae*H,1);O=Dp(ie);let we=f==null?void 0:f.outputPreferredLocations[n[B]];if(O==="string"){if(we==="gpu-buffer"||we==="ml-tensor")throw new Error("String tensor is not supported on GPU.");let ae=[];for(let H=0;H<be;H++){let fe=s.getValue(N+H*o,"*"),Se=s.getValue(N+(H+1)*o,"*"),ne=H===be-1?void 0:Se-fe;ae.push(s.UTF8ToString(fe,ne))}U.push([O,Te,ae,"cpu"])}else if(we==="gpu-buffer"&&be>0){let ae=s.jsepGetBuffer;if(!ae)throw new Error('preferredLocation "gpu-buffer" is not supported without using WebGPU.');let H=ae(N),fe=Sy(ie,be);if(fe===void 0||!nW(O))throw new Error(`Unsupported data type: ${O}`);K=!0,U.push([O,Te,{gpuBuffer:H,download:s.jsepCreateDownloader(H,fe,O),dispose:()=>{s._OrtReleaseTensor(z)!==0&&Bi("Can't release tensor.")}},"gpu-buffer"])}else if(we==="ml-tensor"&&be>0){let ae=s.webnnEnsureTensor,H=s.webnnIsInt64Supported;if(!ae||!H)throw new Error('preferredLocation "ml-tensor" is not supported without using WebNN.');if(Sy(ie,be)===void 0||!iW(O))throw new Error(`Unsupported data type: ${O}`);if(O==="int64"&&!H(e))throw new Error('preferredLocation "ml-tensor" for int64 output is not supported by current WebNN Context.');let fe=await ae(e,N,ie,Te,!1);K=!0,U.push([O,Te,{mlTensor:fe,download:s.webnnCreateMLTensorDownloader(N,O),dispose:()=>{s.webnnReleaseTensorId(N),s._OrtReleaseTensor(z)}},"ml-tensor"])}else{let ae=rW(O),H=new ae(be);new Uint8Array(H.buffer,H.byteOffset,H.byteLength).set(s.HEAPU8.subarray(N,N+H.byteLength)),U.push([O,Te,H,"cpu"])}}finally{s.stackRestore(q),O==="string"&&N&&s._free(N),K||s._OrtReleaseTensor(z),($=s.webnnOnRunEnd)==null||$.call(s,u)}}return f&&!h&&(s._OrtClearBoundOutputs(f.handle)!==0&&Bi("Can't clear bound outputs."),$m.set(e,[u,c,d,f,h,!1])),U}finally{s.stackRestore(E),b.forEach(V=>
vendor: 6,278 bytes, lines 3632-3635
3632s._OrtReleaseTensor(V)),w.forEach(V=>s._OrtReleaseTensor(V)),x.forEach(V=>s._free(V)),y!==0&&s._OrtReleaseRunOptions(y),v.forEach(V=>s._free(V))}},EW=e=>{let t=ca(),r=$m.get(e);if(!r)throw new Error("invalid session id");let n=r[0],i=t._OrtEndProfiling(n);i===0&&Bi("Can't get an profile file name."),t._OrtFree(i)},TW=e=>{let t=[];for(let r of e){let n=r[2];!Array.isArray(n)&&"buffer"in n&&t.push(n.buffer)}return t}}),Fm,$u,s1,Q2,Z2,FM,Kj,BM,sy,oy,Rse,BTe,zTe,UTe,WTe,VTe,HTe,GTe,qTe=Wt(()=>{lh(),FTe(),p_(),J9(),Fm=()=>!!_a.wasm.proxy&&typeof document<"u",s1=!1,Q2=!1,Z2=!1,BM=new Map,sy=(e,t)=>{let r=BM.get(e);r?r.push(t):BM.set(e,[t])},oy=()=>{if(s1||!Q2||Z2||!$u)throw new Error("worker not ready")},Rse=e=>{switch(e.data.type){case"init-wasm":s1=!1,e.data.err?(Z2=!0,Kj[1](e.data.err)):(Q2=!0,Kj[0]()),FM&&(URL.revokeObjectURL(FM),FM=void 0);break;case"init-ep":case"copy-from":case"create":case"release":case"run":case"end-profiling":{let t=BM.get(e.data.type);e.data.err?t.shift()[1](e.data.err):t.shift()[0](e.data.out);break}}},BTe=async()=>{if(!Q2){if(s1)throw new Error("multiple calls to 'initWasm()' detected.");if(Z2)throw new Error("previous call to 'initWasm()' failed.");if(s1=!0,Fm())return new Promise((e,t)=>{$u==null||$u.terminate(),$xe().then(([r,n])=>{try{$u=n,$u.onerror=a=>t(a),$u.onmessage=Rse,Kj=[e,t];let i={type:"init-wasm",in:_a};!i.in.wasm.wasmPaths&&(r||q8)&&(i.in.wasm.wasmPaths={wasm:new URL("/assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",import.meta.url).href}),$u.postMessage(i),FM=r}catch(i){t(i)}},t)});try{await eW(_a.wasm),await vW(_a),Q2=!0}catch(e){throw Z2=!0,e}finally{s1=!1}}},zTe=async e=>{if(Fm())return oy(),new Promise((t,r)=>{sy("init-ep",[t,r]);let n={type:"init-ep",in:{epName:e,env:_a}};$u.postMessage(n)});await _W(_a,e)},UTe=async e=>Fm()?(oy(),new Promise((t,r)=>{sy("copy-from",[t,r]);let n={type:"copy-from",in:{buffer:e}};$u.postMessage(n,[e.buffer])})):wO(e),WTe=async(e,t)=>{if(Fm()){if(t!=null&&t.preferredOutputLocation)throw new Error('session option "preferredOutputLocation" is not supported for proxy.');return oy(),new Promise((r,n)=>{sy("create",[r,n]);let i={type:"create",in:{model:e,options:{...t}}},a=[];e instanceof Uint8Array&&a.push(e.buffer),$u.postMessage(i,a)})}else return bW(e,t)},VTe=async e=>{if(Fm())return oy(),new Promise((t,r)=>{sy("release",[t,r]);let n={type:"release",in:e};$u.postMessage(n)});wW(e)},HTe=async(e,t,r,n,i,a)=>{if(Fm()){if(r.some(s=>s[3]!=="cpu"))throw new Error("input tensor on GPU is not supported for proxy.");if(i.some(s=>s))throw new Error("pre-allocated output tensor is not supported for proxy.");return oy(),new Promise((s,o)=>{sy("run",[s,o]);let l=r,u={type:"run",in:{sessionId:e,inputIndices:t,inputs:l,outputIndices:n,options:a}};$u.postMessage(u,TW(l))})}else return xW(e,t,r,n,i,a)},GTe=async e=>{if(Fm())return oy(),new Promise((t,r)=>{sy("end-profiling",[t,r]);let n={type:"end-profiling",in:e};$u.postMessage(n)});EW(e)}}),Yj,$se,KTe,bwt=Wt(()=>{lh(),qTe(),tn(),Z9(),Uxe(),Yj=(e,t)=>{switch(e.location){case"cpu":return[e.type,e.dims,e.data,"cpu"];case"gpu-buffer":return[e.type,e.dims,{gpuBuffer:e.gpuBuffer},"gpu-buffer"];case"ml-tensor":return[e.type,e.dims,{mlTensor:e.mlTensor},"ml-tensor"];default:throw new Error(`invalid data location: ${e.location} for ${t()}`)}},$se=e=>{switch(e[3]){case"cpu":return new Uf(e[0],e[2],e[1]);case"gpu-buffer":{let t=e[0];if(!nW(t))throw new Error(`not supported data type: ${t} for deserializing GPU tensor`);let{gpuBuffer:r,download:n,dispose:i}=e[2];return Uf.fromGpuBuffer(r,{dataType:t,dims:e[1],download:n,dispose:i})}case"ml-tensor":{let t=e[0];if(!iW(t))throw new Error(`not supported data type: ${t} for deserializing MLTensor tensor`);let{mlTensor:r,download:n,dispose:i}=e[2];return Uf.fromMLTensor(r,{dataType:t,dims:e[1],download:n,dispose:i})}default:throw new Error(`invalid data location: ${e[3]}`)}},KTe=class{async fetchModelAndCopyToWasmMemory(e){return UTe(await aW(e))}async loadModel(e,t){rh();let r;typeof e=="string"?r=await this.fetchModelAndCopyToWasmMemory(e):r=e,[this.sessionId,this.inputNames,this.outputNames,this.inputMetadata,this.outputMetadata]=await WTe(r,t),Xd()}async dispose(){return VTe(this.sessionId)}async run(e,t,r){rh();let n=[],i=[];Object.entries(e).forEach(d=>{let f=d[0],h=d[1],p=this.inputNames.indexOf(f);if(p===-1)throw new Error(`invalid input '${f}'`);n.push(h),i.push(p)});let a=[],s=[];Object.entries(t).forEach(d=>{let f=d[0],h=d[1],p=this.outputNames.indexOf(f);if(p===-1)throw new Error(`invalid output '${f}'`);a.push(h),s.push(p)});let o=n.map((d,f)=>Yj(d,()=>`input "${this.inputNames[i[f]]}"`)),l=a.map((d,f)=>d?Yj(d,()=>`output "${this.outputNames[s[f]]}"`):null),u=await HTe(this.sessionId,i,o,s,l,r),c={};for(let d=0;d<u.length;d++)c[this.outputNames[s[d]]]=a[d]??$se(u[d]);return Xd(),c}startProfiling(){}endProfiling(){GTe(this.sessionId)}}}),YTe={};Sx(YTe,{OnnxruntimeWebAssemblyBackend:()=>lB,initializeFlags:()=>oB,wasmBackend:()=>XTe});var oB,lB,XTe,wwt=Wt(()=>{lh(),qTe(),bwt(),oB=()=>{(typeof _a.wasm.initTimeout!="number"||_a.wasm.initTimeout<0)&&(_a.wasm.initTimeout=0);let e=_a.wasm.simd;if(typeof e!="boolean"&&e!==void 0&&e!=="fixed"&&e!=="relaxed"&&(console.warn(`Property "env.wasm.simd" is set to unknown value "${e}". Reset it to \`false\` and ignore SIMD feature checking.`),_a.wasm.simd=!1),typeof _a.wasm.proxy!="boolean"&&(_a.wasm.proxy=!1),typeof _a.wasm.trace!="boolean"&&(_a.wasm.trace=!1),typeof _a.wasm.numThreads!="number"||!Number.isInteger(_a.wasm.numThreads)||_a.wasm.numThreads<=0)if(typeof self<"u"&&!self.crossOriginIsolated)_a.wasm.numThreads=1;else{let t=typeof navigator>"u"?obt("node:os").cpus().length:navigator.hardwareConcurrency;_a.wasm.numThreads=Math.min(4,Math.ceil((t||1)/2))}},lB=class{async init(e){oB(),await BTe(),await zTe(e)}async createInferenceSessionHandler(e,t){let r=new KTe;return await r.loadModel(e,t),r}},XTe=new lB});lh();lh();lh();var xwt="1.22.0-dev.20250409-89f8206ba4",Ewt=Nxe;{let e=(wwt(),fA(YTe)).wasmBackend;Hy("webgpu",e,5),Hy("webnn",e,5),Hy("cpu",e,10),Hy("wasm",e,10)}Object.defineProperty(_a.versions,"web",{value:xwt,enumerable:!0});/** 3633* @license 3634* Copyright 2021 Google LLC. All Rights Reserved. 3635* Licensed under the Apache License, Version 2.0 (the "License");
3636* you may not use this file except in compliance with the License. 3637* You may obtain a copy of the License at 3638* 3639* http://www.apache.org/licenses/LICENSE-2.0 3640* 3641* Unless required by applicable law or agreed to in writing, software 3642* distributed under the License is distributed on an "AS IS" BASIS, 3643* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3644* See the License for the specific language governing permissions and 3645* limitations under the License. 3646* ============================================================================= 3647*//** 3648 * @license 3649 * Copyright 2020 Google LLC. All Rights Reserved. 3650 * Licensed under the Apache License, Version 2.0 (the "License"); 3651 * you may not use this file except in compliance with the License. 3652 * You may obtain a copy of the License at 3653 * 3654 * http://www.apache.org/licenses/LICENSE-2.0 3655 * 3656 * Unless required by applicable law or agreed to in writing, software 3657 * distributed under the License is distributed on an "AS IS" BASIS, 3658 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3659 * See the License for the specific language governing permissions and 3660 * limitations under the License. 3661 * ============================================================================= 3662 *//** 3663 * @license 3664 * Copyright 2019 Google LLC. All Rights Reserved. 3665 * Licensed under the Apache License, Version 2.0 (the "License"); 3666 * you may not use this file except in compliance with the License. 3667 * You may obtain a copy of the License at 3668 * 3669 * http://www.apache.org/licenses/LICENSE-2.0 3670 * 3671 * Unless required by applicable law or agreed to in writing, software 3672 * distributed under the License is distributed on an "AS IS" BASIS, 3673 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3674 * See the License for the specific language governing permissions and 3675 * limitations under the License. 3676 * ============================================================================= 3677 */const Twt=Object.freeze(Object.defineProperty({__proto__:null,get InferenceSession(){return Q9},get TRACE(){return hA},get TRACE_FUNC_BEGIN(){return rh},get TRACE_FUNC_END(){return Xd},get Tensor(){return Uf},default:Ewt,get env(){return _a},get registerBackend(){return Hy}},Symbol.toStringTag,{value:"Module"}));var bp={},Swt={"onnxruntime-common":e=>{e.exports=nbt},"onnxruntime-web":e=>{e.exports=Twt},"?2ce3":()=>{},"?7992":()=>{},"?5af5":()=>{},"?2b25":()=>{},"?db59":()=>{},"?383f":()=>{},"?fa4b":()=>{},
vendor: 46,644 bytes, lines 3677-3685
3677"./node_modules/@huggingface/jinja/dist/index.js":(e,t,r)=>{r.r(t),r.d(t,{Environment:()=>Ke,Interpreter:()=>mt,Template:()=>Ht,parse:()=>ee,tokenize:()=>c});var n=Object.freeze({Text:"Text",NumericLiteral:"NumericLiteral",StringLiteral:"StringLiteral",Identifier:"Identifier",Equals:"Equals",OpenParen:"OpenParen",CloseParen:"CloseParen",OpenStatement:"OpenStatement",CloseStatement:"CloseStatement",OpenExpression:"OpenExpression",CloseExpression:"CloseExpression",OpenSquareBracket:"OpenSquareBracket",CloseSquareBracket:"CloseSquareBracket",OpenCurlyBracket:"OpenCurlyBracket",CloseCurlyBracket:"CloseCurlyBracket",Comma:"Comma",Dot:"Dot",Colon:"Colon",Pipe:"Pipe",CallOperator:"CallOperator",AdditiveBinaryOperator:"AdditiveBinaryOperator",MultiplicativeBinaryOperator:"MultiplicativeBinaryOperator",ComparisonBinaryOperator:"ComparisonBinaryOperator",UnaryOperator:"UnaryOperator",Comment:"Comment"}),i=class{constructor(Z,Pe){this.value=Z,this.type=Pe}};function a(Z){return/\w/.test(Z)}function s(Z){return/[0-9]/.test(Z)}var o=[["{%",n.OpenStatement],["%}",n.CloseStatement],["{{",n.OpenExpression],["}}",n.CloseExpression],["(",n.OpenParen],[")",n.CloseParen],["{",n.OpenCurlyBracket],["}",n.CloseCurlyBracket],["[",n.OpenSquareBracket],["]",n.CloseSquareBracket],[",",n.Comma],[".",n.Dot],[":",n.Colon],["|",n.Pipe],["<=",n.ComparisonBinaryOperator],[">=",n.ComparisonBinaryOperator],["==",n.ComparisonBinaryOperator],["!=",n.ComparisonBinaryOperator],["<",n.ComparisonBinaryOperator],[">",n.ComparisonBinaryOperator],["+",n.AdditiveBinaryOperator],["-",n.AdditiveBinaryOperator],["~",n.AdditiveBinaryOperator],["*",n.MultiplicativeBinaryOperator],["/",n.MultiplicativeBinaryOperator],["%",n.MultiplicativeBinaryOperator],["=",n.Equals]],l=new Map([["n",` 3678`],["t"," "],["r","\r"],["b","\b"],["f","\f"],["v","\v"],["'","'"],['"','"'],["\\","\\"]]);function u(Z,Pe={}){return Z.endsWith(` 3679`)&&(Z=Z.slice(0,-1)),Pe.lstrip_blocks&&(Z=Z.replace(/^[ \t]*({[#%-])/gm,"$1")),Pe.trim_blocks&&(Z=Z.replace(/([#%-]})\n/g,"$1")),Z.replace(/-%}\s*/g,"%}").replace(/\s*{%-/g,"{%").replace(/-}}\s*/g,"}}").replace(/\s*{{-/g,"{{").replace(/-#}\s*/g,"#}").replace(/\s*{#-/g,"{#").replace(/{%\s*(end)?generation\s*%}/gs,"")}function c(Z,Pe={}){var Ct,sr;const ue=[],Ee=u(Z,Pe);let Oe=0,Ye=0;const ct=ir=>{let or="";for(;ir(Ee[Oe]);){if(Ee[Oe]==="\\"){if(++Oe,Oe>=Ee.length)throw new SyntaxError("Unexpected end of input");const It=Ee[Oe++],cr=l.get(It);if(cr===void 0)throw new SyntaxError(`Unexpected escaped character: ${It}`);or+=cr;continue}if(or+=Ee[Oe++],Oe>=Ee.length)throw new SyntaxError("Unexpected end of input")}return or};e:for(;Oe<Ee.length;){const ir=(Ct=ue.at(-1))==null?void 0:Ct.type;if(ir===void 0||ir===n.CloseStatement||ir===n.CloseExpression||ir===n.Comment){let It="";for(;Oe<Ee.length&&!(Ee[Oe]==="{"&&(Ee[Oe+1]==="%"||Ee[Oe+1]==="{"||Ee[Oe+1]==="#"));)It+=Ee[Oe++];if(It.length>0){ue.push(new i(It,n.Text));continue}}if(Ee[Oe]==="{"&&Ee[Oe+1]==="#"){Oe+=2;let It="";for(;Ee[Oe]!=="#"||Ee[Oe+1]!=="}";){if(Oe+2>=Ee.length)throw new SyntaxError("Missing end of comment tag");It+=Ee[Oe++]}ue.push(new i(It,n.Comment)),Oe+=2;continue}ct(It=>/\s/.test(It));const or=Ee[Oe];if(or==="-"||or==="+"){const It=(sr=ue.at(-1))==null?void 0:sr.type;if(It===n.Text||It===void 0)throw new SyntaxError(`Unexpected character: ${or}`);switch(It){case n.Identifier:case n.NumericLiteral:case n.StringLiteral:case n.CloseParen:case n.CloseSquareBracket:break;default:{++Oe;const cr=ct(s);ue.push(new i(`${or}${cr}`,cr.length>0?n.NumericLiteral:n.UnaryOperator));continue}}}for(const[It,cr]of o){if(It==="}}"&&Ye>0)continue;if(Ee.slice(Oe,Oe+It.length)===It){ue.push(new i(It,cr)),cr===n.OpenExpression?Ye=0:cr===n.OpenCurlyBracket?++Ye:cr===n.CloseCurlyBracket&&--Ye,Oe+=It.length;continue e}}if(or==="'"||or==='"'){++Oe;const It=ct(cr=>cr!==or);ue.push(new i(It,n.StringLiteral)),++Oe;continue}if(s(or)){let It=ct(s);if(Ee[Oe]==="."&&s(Ee[Oe+1])){++Oe;const cr=ct(s);It=`${It}.${cr}`}ue.push(new i(It,n.NumericLiteral));continue}if(a(or)){const It=ct(a);ue.push(new i(It,n.Identifier));continue}throw new SyntaxError(`Unexpected character: ${or}`)}return ue}var d=class{constructor(){Le(this,"type","Statement")}},f=class extends d{constructor(Pe){super();Le(this,"type","Program");this.body=Pe}},h=class extends d{constructor(Pe,ue,Ee){super();Le(this,"type","If");this.test=Pe,this.body=ue,this.alternate=Ee}},p=class extends d{constructor(Pe,ue,Ee,Oe){super();Le(this,"type","For");this.loopvar=Pe,this.iterable=ue,this.body=Ee,this.defaultBlock=Oe}},m=class extends d{constructor(){super(...arguments);Le(this,"type","Break")}},_=class extends d{constructor(){super(...arguments);Le(this,"type","Continue")}},y=class extends d{constructor(Pe,ue,Ee){super();Le(this,"type","Set");this.assignee=Pe,this.value=ue,this.body=Ee}},v=class extends d{constructor(Pe,ue,Ee){super();Le(this,"type","Macro");this.name=Pe,this.args=ue,this.body=Ee}},b=class extends d{constructor(Pe){super();Le(this,"type","Comment");this.value=Pe}},w=class extends d{constructor(){super(...arguments);Le(this,"type","Expression")}},x=class extends w{constructor(Pe,ue,Ee){super();Le(this,"type","MemberExpression");this.object=Pe,this.property=ue,this.computed=Ee}},E=class extends w{constructor(Pe,ue){super();Le(this,"type","CallExpression");this.callee=Pe,this.args=ue}},T=class extends w{constructor(Pe){super();Le(this,"type","Identifier");this.value=Pe}},S=class extends w{constructor(Pe){super();Le(this,"type","Literal");this.value=Pe}},A=class extends S{constructor(){super(...arguments);Le(this,"type","IntegerLiteral")}},C=class extends S{constructor(){super(...arguments);Le(this,"type","FloatLiteral")}},k=class extends S{constructor(){super(...arguments);Le(this,"type","StringLiteral")}},M=class extends S{constructor(){super(...arguments);Le(this,"type","ArrayLiteral")}},D=class extends S{constructor(){super(...arguments);Le(this,"type","TupleLiteral")}},$=class extends S{constructor(){super(...arguments);Le(this,"type","ObjectLiteral")}},V=class extends w{constructor(Pe,ue,Ee){super();Le(this,"type","BinaryExpression");this.operator=Pe,this.left=ue,this.right=Ee}},U=class extends w{constructor(Pe,ue){super();Le(this,"type","FilterExpression");this.operand=Pe,this.filter=ue}},B=class extends d{constructor(Pe,ue){super();Le(this,"type","FilterStatement");this.filter=Pe,this.body=ue}},z=class extends w{constructor(Pe,ue){super();Le(this,"type","SelectExpression");this.lhs=Pe,this.test=ue}},q=class extends w{constructor(Pe,ue,Ee){super();Le(this,"type","TestExpression");this.operand=Pe,this.negate=ue,this.test=Ee}},L=class extends w{constructor(Pe,ue){super();Le(this,"type","UnaryExpression");this.operator=Pe,this.argument=ue}},K=class extends w{constructor(Pe=void 0,ue=void 0,Ee=void 0){super();Le(this,"type","SliceExpression");this.start=Pe,this.stop=ue,this.step=Ee}},O=class extends w{constructor(Pe,ue){super();Le(this,"type","KeywordArgumentExpression");this.key=Pe,this.value=ue}},N=class extends w{constructor(Pe){super();Le(this,"type","SpreadExpression");this.argument=Pe}},X=class extends d{constructor(Pe,ue,Ee){super();Le(this,"type","CallStatement");this.call=Pe,this.callerArgs=ue,this.body=Ee}},ie=class extends w{constructor(Pe,ue,Ee){super();Le(this,"type","Ternary");this.condition=Pe,this.trueExpr=ue,this.falseExpr=Ee}};function ee(Z){const Pe=new f([]);let ue=0;function Ee(jt,Pt){const hr=Z[ue++];if(!hr||hr.type!==jt)throw new Error(`Parser Error: ${Pt}. ${hr.type} !== ${jt}.`);return hr}function Oe(jt){if(!sr(jt))throw new SyntaxError(`Expected ${jt}`);++ue}function Ye(){switch(Z[ue].type){case n.Comment:return new b(Z[ue++].value);case n.Text:return ir();case n.OpenStatement:return or();case n.OpenExpression:return It();default:throw new SyntaxError(`Unexpected token type: ${Z[ue].type}`)}}function ct(...jt){return ue+jt.length<=Z.length&&jt.every((Pt,hr)=>Pt===Z[ue+hr].type)}function Ct(...jt){var Pt,hr,$n;return((Pt=Z[ue])==null?void 0:Pt.type)===n.OpenStatement&&((hr=Z[ue+1])==null?void 0:hr.type)===n.Identifier&&jt.includes(($n=Z[ue+1])==null?void 0:$n.value)}function sr(...jt){return ue+jt.length<=Z.length&&jt.every((Pt,hr)=>Z[ue+hr].type==="Identifier"&&Pt===Z[ue+hr].value)}function ir(){return new k(Ee(n.Text,"Expected text token").value)}function or(){if(Ee(n.OpenStatement,"Expected opening statement token"),Z[ue].type!==n.Identifier)throw new SyntaxError(`Unknown statement, got ${Z[ue].type}`);const jt=Z[ue].value;let Pt;switch(jt){case"set":++ue,Pt=cr();break;case"if":++ue,Pt=Qr(),Ee(n.OpenStatement,"Expected {% token"),Oe("endif"),Ee(n.CloseStatement,"Expected %} token");break;case"macro":++ue,Pt=Zr(),Ee(n.OpenStatement,"Expected {% token"),Oe("endmacro"),Ee(n.CloseStatement,"Expected %} token");break;case"for":++ue,Pt=yn(),Ee(n.OpenStatement,"Expected {% token"),Oe("endfor"),Ee(n.CloseStatement,"Expected %} token");break;case"call":{++ue;let hr=null;ct(n.OpenParen)&&(hr=ls());const $n=us();if($n.type!=="Identifier")throw new SyntaxError("Expected identifier following call statement");const xl=ls();Ee(n.CloseStatement,"Expected closing statement token");const El=[];for(;!Ct("endcall");)El.push(Ye());Ee(n.OpenStatement,"Expected '{%'"),Oe("endcall"),Ee(n.CloseStatement,"Expected closing statement token");const Sa=new E($n,xl);Pt=new X(Sa,hr,El);break}case"break":++ue,Ee(n.CloseStatement,"Expected closing statement token"),Pt=new m;break;case"continue":++ue,Ee(n.CloseStatement,"Expected closing statement token"),Pt=new _;break;case"filter":{++ue;let hr=us();hr instanceof T&&ct(n.OpenParen)&&(hr=Ki(hr)),Ee(n.CloseStatement,"Expected closing statement token");const $n=[];for(;!Ct("endfilter");)$n.push(Ye());Ee(n.OpenStatement,"Expected '{%'"),Oe("endfilter"),Ee(n.CloseStatement,"Expected '%}'"),Pt=new B(hr,$n);break}default:throw new SyntaxError(`Unknown statement type: ${jt}`)}return Pt}function It(){Ee(n.OpenExpression,"Expected opening expression token");const jt=En();return Ee(n.CloseExpression,"Expected closing expression token"),jt}function cr(){const jt=Jn();let Pt=null;const hr=[];if(ct(n.Equals))++ue,Pt=Jn();else{for(Ee(n.CloseStatement,"Expected %} token");!Ct("endset");)hr.push(Ye());Ee(n.OpenStatement,"Expected {% token"),Oe("endset")}return Ee(n.CloseStatement,"Expected closing statement token"),new y(jt,Pt,hr)}function Qr(){const jt=En();Ee(n.CloseStatement,"Expected closing statement token");const Pt=[],hr=[];for(;!Ct("elif","else","endif");)Pt.push(Ye());if(Ct("elif")){++ue,++ue;const $n=Qr();hr.push($n)}else if(Ct("else"))for(++ue,++ue,Ee(n.CloseStatement,"Expected closing statement token");!Ct("endif");)hr.push(Ye());return new h(jt,Pt,hr)}function Zr(){const jt=us();if(jt.type!=="Identifier")throw new SyntaxError("Expected identifier following macro statement");const Pt=ls();Ee(n.CloseStatement,"Expected closing statement token");const hr=[];for(;!Ct("endmacro");)hr.push(Ye());return new v(jt,Pt,hr)}function Jn(jt=!1){const Pt=jt?us:En,hr=[Pt()],$n=ct(n.Comma);for(;$n&&(++ue,hr.push(Pt()),!!ct(n.Comma)););return $n?new D(hr):hr[0]}function yn(){const jt=Jn(!0);if(!(jt instanceof T||jt instanceof D))throw new SyntaxError(`Expected identifier/tuple for the loop variable, got ${jt.type} instead`);if(!sr("in"))throw new SyntaxError("Expected `in` keyword following loop variable");++ue;const Pt=En();Ee(n.CloseStatement,"Expected closing statement token");const hr=[];for(;!Ct("endfor","else");)hr.push(Ye());const $n=[];if(Ct("else"))for(++ue,++ue,Ee(n.CloseStatement,"Expected closing statement token");!Ct("endfor");)$n.push(Ye());return new p(jt,Pt,hr,$n)}function En(){return pn()}function pn(){const jt=si();if(sr("if")){++ue;const Pt=si();if(sr("else")){++ue;const hr=pn();return new ie(Pt,jt,hr)}else return new z(jt,Pt)}return jt}function si(){let jt=fa();for(;sr("or");){const Pt=Z[ue];++ue;const hr=fa();jt=new V(Pt,jt,hr)}return jt}function fa(){let jt=aa();for(;sr("and");){const Pt=Z[ue];++ue;const hr=aa();jt=new V(Pt,jt,hr)}return jt}function aa(){let jt;for(;sr("not");){const Pt=Z[ue];++ue;const hr=aa();jt=new L(Pt,hr)}return jt??xi()}function xi(){let jt=ci();for(;;){let Pt;if(sr("not","in"))Pt=new i("not in",n.Identifier),ue+=2;else if(sr("in"))Pt=Z[ue++];else if(ct(n.ComparisonBinaryOperator))Pt=Z[ue++];else break;const hr=ci();jt=new V(Pt,jt,hr)}return jt}function ci(){let jt=gi();for(;ct(n.AdditiveBinaryOperator);){const Pt=Z[ue];++ue;const hr=gi();jt=new V(Pt,jt,hr)}return jt}function oi(){const jt=Ei(us());return ct(n.OpenParen)?Ki(jt):jt}function Ki(jt){let Pt=new E(jt,ls());return Pt=Ei(Pt),ct(n.OpenParen)&&(Pt=Ki(Pt)),Pt}function ls(){Ee(n.OpenParen,"Expected opening parenthesis for arguments list");const jt=Yi();return Ee(n.CloseParen,"Expected closing parenthesis for arguments list"),jt}function Yi(){const jt=[];for(;!ct(n.CloseParen);){let Pt;if(Z[ue].type===n.MultiplicativeBinaryOperator&&Z[ue].value==="*"){++ue;const hr=En();Pt=new N(hr)}else if(Pt=En(),ct(n.Equals)){if(++ue,!(Pt instanceof T))throw new SyntaxError("Expected identifier for keyword argument");const hr=En();Pt=new O(Pt,hr)}jt.push(Pt),ct(n.Comma)&&++ue}return jt}function sa(){const jt=[];let Pt=!1;for(;!ct(n.CloseSquareBracket);)ct(n.Colon)?(jt.push(void 0),++ue,Pt=!0):(jt.push(En()),ct(n.Colon)&&(++ue,Pt=!0));if(jt.length===0)throw new SyntaxError("Expected at least one argument for member/slice expression");if(Pt){if(jt.length>3)throw new SyntaxError("Expected 0-3 arguments for slice expression");return new K(...jt)}return jt[0]}function Ei(jt){for(;ct(n.Dot)||ct(n.OpenSquareBracket);){const Pt=Z[ue];++ue;let hr;const $n=Pt.type===n.OpenSquareBracket;if($n)hr=sa(),Ee(n.CloseSquareBracket,"Expected closing square bracket");else if(hr=us(),hr.type!=="Identifier")throw new SyntaxError("Expected identifier following dot operator");jt=new x(jt,hr,$n)}return jt}function gi(){let jt=Ta();for(;ct(n.MultiplicativeBinaryOperator);){const Pt=Z[ue++],hr=Ta();jt=new V(Pt,jt,hr)}return jt}function Ta(){let jt=Qs();for(;sr("is");){++ue;const Pt=sr("not");Pt&&++ue;const hr=us();if(!(hr instanceof T))throw new SyntaxError("Expected identifier for the test");jt=new q(jt,Pt,hr)}return jt}function Qs(){let jt=oi();for(;ct(n.Pipe);){++ue;let Pt=us();if(!(Pt instanceof T))throw new SyntaxError("Expected identifier for the filter");ct(n.OpenParen)&&(Pt=Ki(Pt)),jt=new U(jt,Pt)}return jt}function us(){const jt=Z[ue++];switch(jt.type){case n.NumericLiteral:{const Pt=jt.value;return Pt.includes(".")?new C(Number(Pt)):new A(Number(Pt))}case n.StringLiteral:{let Pt=jt.value;for(;ct(n.StringLiteral);)Pt+=Z[ue++].value;return new k(Pt)}case n.Identifier:return new T(jt.value);case n.OpenParen:{const Pt=Jn();return Ee(n.CloseParen,"Expected closing parenthesis, got ${tokens[current].type} instead."),Pt}case n.OpenSquareBracket:{const Pt=[];for(;!ct(n.CloseSquareBracket);)Pt.push(En()),ct(n.Comma)&&++ue;return++ue,new M(Pt)}case n.OpenCurlyBracket:{const Pt=new Map;for(;!ct(n.CloseCurlyBracket);){const hr=En();Ee(n.Colon,"Expected colon between key and value in object literal");const $n=En();Pt.set(hr,$n),ct(n.Comma)&&++ue}return++ue,new $(Pt)}default:throw new SyntaxError(`Unexpected token: ${jt.type}`)}}for(;ue<Z.length;)Pe.body.push(Ye());return Pe}function le(Z,Pe,ue=1){Pe===void 0&&(Pe=Z,Z=0);const Ee=[];for(let Oe=Z;Oe<Pe;Oe+=ue)Ee.push(Oe);return Ee}function Te(Z,Pe,ue,Ee=1){const Oe=Math.sign(Ee);Oe>=0?(Pe=(Pe??(Pe=0))<0?Math.max(Z.length+Pe,0):Math.min(Pe,Z.length),ue=(ue??(ue=Z.length))<0?Math.max(Z.length+ue,0):Math.min(ue,Z.length)):(Pe=(Pe??(Pe=Z.length-1))<0?Math.max(Z.length+Pe,-1):Math.min(Pe,Z.length-1),ue=(ue??(ue=-1))<-1?Math.max(Z.length+ue,-1):Math.min(ue,Z.length-1));const Ye=[];for(let ct=Pe;Oe*ct<Oe*ue;ct+=Ee)Ye.push(Z[ct]);return Ye}function be(Z){return Z.replace(/\b\w/g,Pe=>Pe.toUpperCase())}function we(Z){return ae(new Date,Z)}function ae(Z,Pe){const ue=new Intl.DateTimeFormat(void 0,{month:"long"}),Ee=new Intl.DateTimeFormat(void 0,{month:"short"}),Oe=Ye=>Ye<10?"0"+Ye:Ye.toString();return Pe.replace(/%[YmdbBHM%]/g,Ye=>{switch(Ye){case"%Y":return Z.getFullYear().toString();case"%m":return Oe(Z.getMonth()+1);case"%d":return Oe(Z.getDate());case"%b":return Ee.format(Z);case"%B":return ue.format(Z);case"%H":return Oe(Z.getHours());case"%M":return Oe(Z.getMinutes());case"%%":return"%";default:return Ye}})}function H(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(Z,Pe,ue,Ee){if(Ee===0)return Z;let Oe=Ee==null||Ee<0?1/0:Ee;const Ye=Pe.length===0?new RegExp("(?=)","gu"):new RegExp(H(Pe),"gu");return Z.replaceAll(Ye,ct=>Oe>0?(--Oe,ue):ct)}var Se=class extends Error{},ne=class extends Error{},$e=class{constructor(Z=void 0){Le(this,"type","RuntimeValue");Le(this,"value");Le(this,"builtins",new Map);this.value=Z}__bool__(){return new ce(!!this.value)}toString(){return String(this.value)}},me=class extends $e{constructor(){super(...arguments);Le(this,"type","IntegerValue")}},Ue=class extends $e{constructor(){super(...arguments);Le(this,"type","FloatValue")}toString(){return this.value%1===0?this.value.toFixed(1):this.value.toString()}},ke=class extends $e{constructor(){super(...arguments);Le(this,"type","StringValue");Le(this,"builtins",new Map([["upper",new Ge(()=>new ke(this.value.toUpperCase()))],["lower",new Ge(()=>new ke(this.value.toLowerCase()))],["strip",new Ge(()=>new ke(this.value.trim()))],["title",new Ge(()=>new ke(be(this.value)))],["capitalize",new Ge(()=>new ke(this.value.charAt(0).toUpperCase()+this.value.slice(1)))],["length",new me(this.value.length)],["rstrip",new Ge(()=>new ke(this.value.trimEnd()))],["lstrip",new Ge(()=>new ke(this.value.trimStart()))],["startswith",new Ge(Pe=>{if(Pe.length===0)throw new Error("startswith() requires at least one argument");const ue=Pe[0];if(ue instanceof ke)return new ce(this.value.startsWith(ue.value));if(ue instanceof De){for(const Ee of ue.value){if(!(Ee instanceof ke))throw new Error("startswith() tuple elements must be strings");if(this.value.startsWith(Ee.value))return new ce(!0)}return new ce(!1)}throw new Error("startswith() argument must be a string or tuple of strings")})],["endswith",new Ge(Pe=>{if(Pe.length===0)throw new Error("endswith() requires at least one argument");const ue=Pe[0];if(ue instanceof ke)return new ce(this.value.endsWith(ue.value));if(ue instanceof De){for(const Ee of ue.value){if(!(Ee instanceof ke))throw new Error("endswith() tuple elements must be strings");if(this.value.endsWith(Ee.value))return new ce(!0)}return new ce(!1)}throw new Error("endswith() argument must be a string or tuple of strings")})],["split",new Ge(Pe=>{const ue=Pe[0]??new Ie;if(!(ue instanceof ke||ue instanceof Ie))throw new Error("sep argument must be a string or null");const Ee=Pe[1]??new me(-1);if(!(Ee instanceof me))throw new Error("maxsplit argument must be a number");let Oe=[];if(ue instanceof Ie){const Ye=this.value.trimStart();for(const{0:ct,index:Ct}of Ye.matchAll(/\S+/g)){if(Ee.value!==-1&&Oe.length>=Ee.value&&Ct!==void 0){Oe.push(ct+Ye.slice(Ct+ct.length));break}Oe.push(ct)}}else{if(ue.value==="")throw new Error("empty separator");Oe=this.value.split(ue.value),Ee.value!==-1&&Oe.length>Ee.value&&Oe.push(Oe.splice(Ee.value).join(ue.value))}return new De(Oe.map(Ye=>new ke(Ye)))})],["replace",new Ge(Pe=>{if(Pe.length<2)throw new Error("replace() requires at least two arguments");const ue=Pe[0],Ee=Pe[1];if(!(ue instanceof ke&&Ee instanceof ke))throw new Error("replace() arguments must be strings");let Oe;if(Pe.length>2?Pe[2].type==="KeywordArgumentsValue"?Oe=Pe[2].value.get("count")??new Ie:Oe=Pe[2]:Oe=new Ie,!(Oe instanceof me||Oe instanceof Ie))throw new Error("replace() count argument must be a number or null");return new ke(fe(this.value,ue.value,Ee.value,Oe.value))})]]))}},ce=class extends $e{constructor(){super(...arguments);Le(this,"type","BooleanValue")}},ve=class extends $e{constructor(){super(...arguments);Le(this,"type","ObjectValue");Le(this,"builtins",new Map([["get",new Ge(([Pe,ue])=>{if(!(Pe instanceof ke))throw new Error(`Object key must be a string: got ${Pe.type}`);return this.value.get(Pe.value)??ue??new Ie})],["items",new Ge(()=>this.items())],["keys",new Ge(()=>this.keys())],["values",new Ge(()=>this.values())]]))}__bool__(){return new ce(this.value.size>0)}items(){return new De(Array.from(this.value.entries()).map(([Pe,ue])=>new De([new ke(Pe),ue])))}keys(){return new De(Array.from(this.value.keys()).map(Pe=>new ke(Pe)))}values(){return new De(Array.from(this.value.values()))}},Re=class extends ve{constructor(){super(...arguments);Le(this,"type","KeywordArgumentsValue")}},De=class extends $e{constructor(){super(...arguments);Le(this,"type","ArrayValue");Le(this,"builtins",new Map([["length",new me(this.value.length)]]))}__bool__(){return new ce(this.value.length>0)}},tt=class extends De{constructor(){super(...arguments);Le(this,"type","TupleValue")}},Ge=class extends $e{constructor(){super(...arguments);Le(this,"type","FunctionValue")}},Ie=class extends $e{constructor(){super(...arguments);Le(this,"type","NullValue")}},He=class extends $e{constructor(){super(...arguments);Le(this,"type","UndefinedValue")}},Ke=class{constructor(Z){Le(this,"variables",new Map([["namespace",new Ge(Z=>{if(Z.length===0)return new ve(new Map);if(Z.length!==1||!(Z[0]instanceof ve))throw new Error("`namespace` expects either zero arguments or a single object argument");return Z[0]})]]));Le(this,"tests",new Map([["boolean",Z=>Z.type==="BooleanValue"],["callable",Z=>Z instanceof Ge],["odd",Z=>{if(!(Z instanceof me))throw new Error(`cannot odd on ${Z.type}`);return Z.value%2!==0}],["even",Z=>{if(!(Z instanceof me))throw new Error(`cannot even on ${Z.type}`);return Z.value%2===0}],["false",Z=>Z.type==="BooleanValue"&&!Z.value],["true",Z=>Z.type==="BooleanValue"&&Z.value],["none",Z=>Z.type==="NullValue"],["string",Z=>Z.type==="StringValue"],["number",Z=>Z instanceof me||Z instanceof Ue],["integer",Z=>Z instanceof me],["iterable",Z=>Z.type==="ArrayValue"||Z.type==="StringValue"],["mapping",Z=>Z.type==="ObjectValue"],["lower",Z=>{const Pe=Z.value;return Z.type==="StringValue"&&Pe===Pe.toLowerCase()}],["upper",Z=>{const Pe=Z.value;return Z.type==="StringValue"&&Pe===Pe.toUpperCase()}],["none",Z=>Z.type==="NullValue"],["defined",Z=>Z.type!=="UndefinedValue"],["undefined",Z=>Z.type==="UndefinedValue"],["equalto",(Z,Pe)=>Z.value===Pe.value],["eq",(Z,Pe)=>Z.value===Pe.value]]));this.parent=Z}set(Z,Pe){return this.declareVariable(Z,gt(Pe))}declareVariable(Z,Pe){if(this.variables.has(Z))throw new SyntaxError(`Variable already declared: ${Z}`);return this.variables.set(Z,Pe),Pe}setVariable(Z,Pe){return this.variables.set(Z,Pe),Pe}resolve(Z){if(this.variables.has(Z))return this;if(this.parent)return this.parent.resolve(Z);throw new Error(`Unknown variable: ${Z}`)}lookupVariable(Z){try{return this.resolve(Z).variables.get(Z)??new He}catch{return new He}}};function Xe(Z){Z.set("false",!1),Z.set("true",!0),Z.set("none",null),Z.set("raise_exception",Pe=>{throw new Error(Pe)}),Z.set("range",le),Z.set("strftime_now",we),Z.set("True",!0),Z.set("False",!1),Z.set("None",null)}var mt=class{constructor(Z){Le(this,"global");this.global=Z??new Ke}run(Z){return this.evaluate(Z,this.global)}evaluateBinaryExpression(Z,Pe){const ue=this.evaluate(Z.left,Pe);switch(Z.operator.value){case"and":return ue.__bool__().value?this.evaluate(Z.right,Pe):ue;case"or":return ue.__bool__().value?ue:this.evaluate(Z.right,Pe)}const Ee=this.evaluate(Z.right,Pe);switch(Z.operator.value){case"==":return new ce(ue.value==Ee.value);case"!=":return new ce(ue.value!=Ee.value)}if(ue instanceof He||Ee instanceof He){if(Ee instanceof He&&["in","not in"].includes(Z.operator.value))return new ce(Z.operator.value==="not in");throw new Error(`Cannot perform operation ${Z.operator.value} on undefined values`)}else{if(ue instanceof Ie||Ee instanceof Ie)throw new Error("Cannot perform operation on null values");if(Z.operator.value==="~")return new ke(ue.value.toString()+Ee.value.toString());if((ue instanceof me||ue instanceof Ue)&&(Ee instanceof me||Ee instanceof Ue)){const Oe=ue.value,Ye=Ee.value;switch(Z.operator.value){case"+":case"-":case"*":{const ct=Z.operator.value==="+"?Oe+Ye:Z.operator.value==="-"?Oe-Ye:Oe*Ye;return ue instanceof Ue||Ee instanceof Ue?new Ue(ct):new me(ct)}case"/":return new Ue(Oe/Ye);case"%":{const ct=Oe%Ye;return ue instanceof Ue||Ee instanceof Ue?new Ue(ct):new me(ct)}case"<":return new ce(Oe<Ye);case">":return new ce(Oe>Ye);case">=":return new ce(Oe>=Ye);case"<=":return new ce(Oe<=Ye)}}else if(ue instanceof De&&Ee instanceof De)switch(Z.operator.value){case"+":return new De(ue.value.concat(Ee.value))}else if(Ee instanceof De){const Oe=Ee.value.find(Ye=>Ye.value===ue.value)!==void 0;switch(Z.operator.value){case"in":return new ce(Oe);case"not in":return new ce(!Oe)}}}if(ue instanceof ke||Ee instanceof ke)switch(Z.operator.value){case"+":return new ke(ue.value.toString()+Ee.value.toString())}if(ue instanceof ke&&Ee instanceof ke)switch(Z.operator.value){case"in":return new ce(Ee.value.includes(ue.value));case"not in":return new ce(!Ee.value.includes(ue.value))}if(ue instanceof ke&&Ee instanceof ve)switch(Z.operator.value){case"in":return new ce(Ee.value.has(ue.value));case"not in":return new ce(!Ee.value.has(ue.value))}throw new SyntaxError(`Unknown operator "${Z.operator.value}" between ${ue.type} and ${Ee.type}`)}evaluateArguments(Z,Pe){const ue=[],Ee=new Map;for(const Oe of Z)if(Oe.type==="SpreadExpression"){const Ye=Oe,ct=this.evaluate(Ye.argument,Pe);if(!(ct instanceof De))throw new Error(`Cannot unpack non-iterable type: ${ct.type}`);for(const Ct of ct.value)ue.push(Ct)}else if(Oe.type==="KeywordArgumentExpression"){const Ye=Oe;Ee.set(Ye.key.value,this.evaluate(Ye.value,Pe))}else{if(Ee.size>0)throw new Error("Positional arguments must come before keyword arguments");ue.push(this.evaluate(Oe,Pe))}return[ue,Ee]}applyFilter(Z,Pe,ue){if(Pe.type==="Identifier"){const Ee=Pe;if(Ee.value==="tojson")return new ke($t(Z));if(Z instanceof De)switch(Ee.value){case"list":return Z;case"first":return Z.value[0];case"last":return Z.value[Z.value.length-1];case"length":return new me(Z.value.length);case"reverse":return new De(Z.value.reverse());case"sort":return new De(Z.value.sort((Oe,Ye)=>{if(Oe.type!==Ye.type)throw new Error(`Cannot compare different types: ${Oe.type} and ${Ye.type}`);switch(Oe.type){case"IntegerValue":case"FloatValue":return Oe.value-Ye.value;case"StringValue":return Oe.value.localeCompare(Ye.value);default:throw new Error(`Cannot compare type: ${Oe.type}`)}}));case"join":return new ke(Z.value.map(Oe=>Oe.value).join(""));case"string":return new ke($t(Z));case"unique":{const Oe=new Set,Ye=[];for(const ct of Z.value)Oe.has(ct.value)||(Oe.add(ct.value),Ye.push(ct));return new De(Ye)}default:throw new Error(`Unknown ArrayValue filter: ${Ee.value}`)}else if(Z instanceof ke)switch(Ee.value){case"length":case"upper":case"lower":case"title":case"capitalize":{const Oe=Z.builtins.get(Ee.value);if(Oe instanceof Ge)return Oe.value([],ue);if(Oe instanceof me)return Oe;throw new Error(`Unknown StringValue filter: ${Ee.value}`)}case"trim":return new ke(Z.value.trim());case"indent":return new ke(Z.value.split(` 3680`).map((Oe,Ye)=>Ye===0||Oe.length===0?Oe:" "+Oe).join(` 3681`));case"join":case"string":return Z;case"int":{const Oe=parseInt(Z.value,10);return new me(isNaN(Oe)?0:Oe)}case"float":{const Oe=parseFloat(Z.value);return new Ue(isNaN(Oe)?0:Oe)}default:throw new Error(`Unknown StringValue filter: ${Ee.value}`)}else if(Z instanceof me||Z instanceof Ue)switch(Ee.value){case"abs":return Z instanceof me?new me(Math.abs(Z.value)):new Ue(Math.abs(Z.value));case"int":return new me(Math.floor(Z.value));case"float":return new Ue(Z.value);default:throw new Error(`Unknown NumericValue filter: ${Ee.value}`)}else if(Z instanceof ve)switch(Ee.value){case"items":return new De(Array.from(Z.value.entries()).map(([Oe,Ye])=>new De([new ke(Oe),Ye])));case"length":return new me(Z.value.size);default:throw new Error(`Unknown ObjectValue filter: ${Ee.value}`)}else if(Z instanceof ce)switch(Ee.value){case"bool":return new ce(Z.value);case"int":return new me(Z.value?1:0);case"float":return new Ue(Z.value?1:0);case"string":return new ke(Z.value?"true":"false");default:throw new Error(`Unknown BooleanValue filter: ${Ee.value}`)}throw new Error(`Cannot apply filter "${Ee.value}" to type: ${Z.type}`)}else if(Pe.type==="CallExpression"){const Ee=Pe;if(Ee.callee.type!=="Identifier")throw new Error(`Unknown filter: ${Ee.callee.type}`);const Oe=Ee.callee.value;if(Oe==="tojson"){const[,Ye]=this.evaluateArguments(Ee.args,ue),ct=Ye.get("indent")??new Ie;if(!(ct instanceof me||ct instanceof Ie))throw new Error("If set, indent must be a number");return new ke($t(Z,ct.value))}else if(Oe==="join"){let Ye;if(Z instanceof ke)Ye=Array.from(Z.value);else if(Z instanceof De)Ye=Z.value.map(ir=>ir.value);else throw new Error(`Cannot apply filter "${Oe}" to type: ${Z.type}`);const[ct,Ct]=this.evaluateArguments(Ee.args,ue),sr=ct.at(0)??Ct.get("separator")??new ke("");if(!(sr instanceof ke))throw new Error("separator must be a string");return new ke(Ye.join(sr.value))}else if(Oe==="int"||Oe==="float"){const[Ye,ct]=this.evaluateArguments(Ee.args,ue),Ct=Ye.at(0)??ct.get("default")??(Oe==="int"?new me(0):new Ue(0));if(Z instanceof ke){const sr=Oe==="int"?parseInt(Z.value,10):parseFloat(Z.value);return isNaN(sr)?Ct:Oe==="int"?new me(sr):new Ue(sr)}else{if(Z instanceof me||Z instanceof Ue)return Z;if(Z instanceof ce)return Oe==="int"?new me(Z.value?1:0):new Ue(Z.value?1:0);throw new Error(`Cannot apply filter "${Oe}" to type: ${Z.type}`)}}else if(Oe==="default"){const[Ye,ct]=this.evaluateArguments(Ee.args,ue),Ct=Ye[0]??new ke(""),sr=Ye[1]??ct.get("boolean")??new ce(!1);if(!(sr instanceof ce))throw new Error("`default` filter flag must be a boolean");return Z instanceof He||sr.value&&!Z.__bool__().value?Ct:Z}if(Z instanceof De){switch(Oe){case"selectattr":case"rejectattr":{const Ye=Oe==="selectattr";if(Z.value.some(It=>!(It instanceof ve)))throw new Error(`\`${Oe}\` can only be applied to array of objects`);if(Ee.args.some(It=>It.type!=="StringLiteral"))throw new Error(`arguments of \`${Oe}\` must be strings`);const[ct,Ct,sr]=Ee.args.map(It=>this.evaluate(It,ue));let ir;if(Ct){const It=ue.tests.get(Ct.value);if(!It)throw new Error(`Unknown test: ${Ct.value}`);ir=It}else ir=(...It)=>It[0].__bool__().value;const or=Z.value.filter(It=>{const cr=It.value.get(ct.value),Qr=cr?ir(cr,sr):!1;return Ye?Qr:!Qr});return new De(or)}case"map":{const[,Ye]=this.evaluateArguments(Ee.args,ue);if(Ye.has("attribute")){const ct=Ye.get("attribute");if(!(ct instanceof ke))throw new Error("attribute must be a string");const Ct=Ye.get("default"),sr=Z.value.map(ir=>{if(!(ir instanceof ve))throw new Error("items in map must be an object");return ir.value.get(ct.value)??Ct??new He});return new De(sr)}else throw new Error("`map` expressions without `attribute` set are not currently supported.")}}throw new Error(`Unknown ArrayValue filter: ${Oe}`)}else if(Z instanceof ke){switch(Oe){case"indent":{const[Ye,ct]=this.evaluateArguments(Ee.args,ue),Ct=Ye.at(0)??ct.get("width")??new me(4);if(!(Ct instanceof me))throw new Error("width must be a number");const sr=Ye.at(1)??ct.get("first")??new ce(!1),ir=Ye.at(2)??ct.get("blank")??new ce(!1),or=Z.value.split(` 3682`),It=" ".repeat(Ct.value),cr=or.map((Qr,Zr)=>!sr.value&&Zr===0||!ir.value&&Qr.length===0?Qr:It+Qr);return new ke(cr.join(` 3683`))}case"replace":{const Ye=Z.builtins.get("replace");if(!(Ye instanceof Ge))throw new Error("replace filter not available");const[ct,Ct]=this.evaluateArguments(Ee.args,ue);return Ye.value([...ct,new Re(Ct)],ue)}}throw new Error(`Unknown StringValue filter: ${Oe}`)}else throw new Error(`Cannot apply filter "${Oe}" to type: ${Z.type}`)}throw new Error(`Unknown filter: ${Pe.type}`)}evaluateFilterExpression(Z,Pe){const ue=this.evaluate(Z.operand,Pe);return this.applyFilter(ue,Z.filter,Pe)}evaluateTestExpression(Z,Pe){const ue=this.evaluate(Z.operand,Pe),Ee=Pe.tests.get(Z.test.value);if(!Ee)throw new Error(`Unknown test: ${Z.test.value}`);const Oe=Ee(ue);return new ce(Z.negate?!Oe:Oe)}evaluateSelectExpression(Z,Pe){return this.evaluate(Z.test,Pe).__bool__().value?this.evaluate(Z.lhs,Pe):new He}evaluateUnaryExpression(Z,Pe){const ue=this.evaluate(Z.argument,Pe);switch(Z.operator.value){case"not":return new ce(!ue.value);default:throw new SyntaxError(`Unknown operator: ${Z.operator.value}`)}}evaluateTernaryExpression(Z,Pe){return this.evaluate(Z.condition,Pe).__bool__().value?this.evaluate(Z.trueExpr,Pe):this.evaluate(Z.falseExpr,Pe)}evalProgram(Z,Pe){return this.evaluateBlock(Z.body,Pe)}evaluateBlock(Z,Pe){let ue="";for(const Ee of Z){const Oe=this.evaluate(Ee,Pe);Oe.type!=="NullValue"&&Oe.type!=="UndefinedValue"&&(ue+=Oe.toString())}return new ke(ue)}evaluateIdentifier(Z,Pe){return Pe.lookupVariable(Z.value)}evaluateCallExpression(Z,Pe){const[ue,Ee]=this.evaluateArguments(Z.args,Pe);Ee.size>0&&ue.push(new Re(Ee));const Oe=this.evaluate(Z.callee,Pe);if(Oe.type!=="FunctionValue")throw new Error(`Cannot call something that is not a function: got ${Oe.type}`);return Oe.value(ue,Pe)}evaluateSliceExpression(Z,Pe,ue){if(!(Z instanceof De||Z instanceof ke))throw new Error("Slice object must be an array or string");const Ee=this.evaluate(Pe.start,ue),Oe=this.evaluate(Pe.stop,ue),Ye=this.evaluate(Pe.step,ue);if(!(Ee instanceof me||Ee instanceof He))throw new Error("Slice start must be numeric or undefined");if(!(Oe instanceof me||Oe instanceof He))throw new Error("Slice stop must be numeric or undefined");if(!(Ye instanceof me||Ye instanceof He))throw new Error("Slice step must be numeric or undefined");return Z instanceof De?new De(Te(Z.value,Ee.value,Oe.value,Ye.value)):new ke(Te(Array.from(Z.value),Ee.value,Oe.value,Ye.value).join(""))}evaluateMemberExpression(Z,Pe){const ue=this.evaluate(Z.object,Pe);let Ee;if(Z.computed){if(Z.property.type==="SliceExpression")return this.evaluateSliceExpression(ue,Z.property,Pe);Ee=this.evaluate(Z.property,Pe)}else Ee=new ke(Z.property.value);let Oe;if(ue instanceof ve){if(!(Ee instanceof ke))throw new Error(`Cannot access property with non-string: got ${Ee.type}`);Oe=ue.value.get(Ee.value)??ue.builtins.get(Ee.value)}else if(ue instanceof De||ue instanceof ke)if(Ee instanceof me)Oe=ue.value.at(Ee.value),ue instanceof ke&&(Oe=new ke(ue.value.at(Ee.value)));else if(Ee instanceof ke)Oe=ue.builtins.get(Ee.value);else throw new Error(`Cannot access property with non-string/non-number: got ${Ee.type}`);else{if(!(Ee instanceof ke))throw new Error(`Cannot access property with non-string: got ${Ee.type}`);Oe=ue.builtins.get(Ee.value)}return Oe instanceof $e?Oe:new He}evaluateSet(Z,Pe){const ue=Z.value?this.evaluate(Z.value,Pe):this.evaluateBlock(Z.body,Pe);if(Z.assignee.type==="Identifier"){const Ee=Z.assignee.value;Pe.setVariable(Ee,ue)}else if(Z.assignee.type==="TupleLiteral"){const Ee=Z.assignee;if(!(ue instanceof De))throw new Error(`Cannot unpack non-iterable type in set: ${ue.type}`);const Oe=ue.value;if(Oe.length!==Ee.value.length)throw new Error(`Too ${Ee.value.length>Oe.length?"few":"many"} items to unpack in set`);for(let Ye=0;Ye<Ee.value.length;++Ye){const ct=Ee.value[Ye];if(ct.type!=="Identifier")throw new Error(`Cannot unpack to non-identifier in set: ${ct.type}`);Pe.setVariable(ct.value,Oe[Ye])}}else if(Z.assignee.type==="MemberExpression"){const Ee=Z.assignee,Oe=this.evaluate(Ee.object,Pe);if(!(Oe instanceof ve))throw new Error("Cannot assign to member of non-object");if(Ee.property.type!=="Identifier")throw new Error("Cannot assign to member with non-identifier property");Oe.value.set(Ee.property.value,ue)}else throw new Error(`Invalid LHS inside assignment expression: ${JSON.stringify(Z.assignee)}`);return new Ie}evaluateIf(Z,Pe){const ue=this.evaluate(Z.test,Pe);return this.evaluateBlock(ue.__bool__().value?Z.body:Z.alternate,Pe)}evaluateFor(Z,Pe){const ue=new Ke(Pe);let Ee,Oe;if(Z.iterable.type==="SelectExpression"){const ir=Z.iterable;Oe=this.evaluate(ir.lhs,ue),Ee=ir.test}else Oe=this.evaluate(Z.iterable,ue);if(!(Oe instanceof De||Oe instanceof ve))throw new Error(`Expected iterable or object type in for loop: got ${Oe.type}`);Oe instanceof ve&&(Oe=Oe.keys());const Ye=[],ct=[];for(let ir=0;ir<Oe.value.length;++ir){const or=new Ke(ue),It=Oe.value[ir];let cr;if(Z.loopvar.type==="Identifier")cr=Qr=>Qr.setVariable(Z.loopvar.value,It);else if(Z.loopvar.type==="TupleLiteral"){const Qr=Z.loopvar;if(It.type!=="ArrayValue")throw new Error(`Cannot unpack non-iterable type: ${It.type}`);const Zr=It;if(Qr.value.length!==Zr.value.length)throw new Error(`Too ${Qr.value.length>Zr.value.length?"few":"many"} items to unpack`);cr=Jn=>{for(let yn=0;yn<Qr.value.length;++yn){if(Qr.value[yn].type!=="Identifier")throw new Error(`Cannot unpack non-identifier type: ${Qr.value[yn].type}`);Jn.setVariable(Qr.value[yn].value,Zr.value[yn])}}}else throw new Error(`Invalid loop variable(s): ${Z.loopvar.type}`);Ee&&(cr(or),!this.evaluate(Ee,or).__bool__().value)||(Ye.push(It),ct.push(cr))}let Ct="",sr=!0;for(let ir=0;ir<Ye.length;++ir){const or=new Map([["index",new me(ir+1)],["index0",new me(ir)],["revindex",new me(Ye.length-ir)],["revindex0",new me(Ye.length-ir-1)],["first",new ce(ir===0)],["last",new ce(ir===Ye.length-1)],["length",new me(Ye.length)],["previtem",ir>0?Ye[ir-1]:new He],["nextitem",ir<Ye.length-1?Ye[ir+1]:new He]]);ue.setVariable("loop",new ve(or)),ct[ir](ue);try{const It=this.evaluateBlock(Z.body,ue);Ct+=It.value}catch(It){if(It instanceof ne)continue;if(It instanceof Se)break;throw It}sr=!1}if(sr){const ir=this.evaluateBlock(Z.defaultBlock,ue);Ct+=ir.value}return new ke(Ct)}evaluateMacro(Z,Pe){return Pe.setVariable(Z.name.value,new Ge((ue,Ee)=>{var ct;const Oe=new Ke(Ee);ue=ue.slice();let Ye;((ct=ue.at(-1))==null?void 0:ct.type)==="KeywordArgumentsValue"&&(Ye=ue.pop());for(let Ct=0;Ct<Z.args.length;++Ct){const sr=Z.args[Ct],ir=ue[Ct];if(sr.type==="Identifier"){const or=sr;if(!ir)throw new Error(`Missing positional argument: ${or.value}`);Oe.setVariable(or.value,ir)}else if(sr.type==="KeywordArgumentExpression"){const or=sr,It=ir??(Ye==null?void 0:Ye.value.get(or.key.value))??this.evaluate(or.value,Oe);Oe.setVariable(or.key.value,It)}else throw new Error(`Unknown argument type: ${sr.type}`)}return this.evaluateBlock(Z.body,Oe)})),new Ie}evaluateCallStatement(Z,Pe){const ue=new Ge((Ct,sr)=>{const ir=new Ke(sr);if(Z.callerArgs)for(let or=0;or<Z.callerArgs.length;++or){const It=Z.callerArgs[or];if(It.type!=="Identifier")throw new Error(`Caller parameter must be an identifier, got ${It.type}`);ir.setVariable(It.value,Ct[or]??new He)}return this.evaluateBlock(Z.body,ir)}),[Ee,Oe]=this.evaluateArguments(Z.call.args,Pe);Ee.push(new Re(Oe));const Ye=this.evaluate(Z.call.callee,Pe);if(Ye.type!=="FunctionValue")throw new Error(`Cannot call something that is not a function: got ${Ye.type}`);const ct=new Ke(Pe);return ct.setVariable("caller",ue),Ye.value(Ee,ct)}evaluateFilterStatement(Z,Pe){const ue=this.evaluateBlock(Z.body,Pe);return this.applyFilter(ue,Z.filter,Pe)}evaluate(Z,Pe){if(!Z)return new He;switch(Z.type){case"Program":return this.evalProgram(Z,Pe);case"Set":return this.evaluateSet(Z,Pe);case"If":return this.evaluateIf(Z,Pe);case"For":return this.evaluateFor(Z,Pe);case"Macro":return this.evaluateMacro(Z,Pe);case"CallStatement":return this.evaluateCallStatement(Z,Pe);case"Break":throw new Se;case"Continue":throw new ne;case"IntegerLiteral":return new me(Z.value);case"FloatLiteral":return new Ue(Z.value);case"StringLiteral":return new ke(Z.value);case"ArrayLiteral":return new De(Z.value.map(ue=>this.evaluate(ue,Pe)));case"TupleLiteral":return new tt(Z.value.map(ue=>this.evaluate(ue,Pe)));case"ObjectLiteral":{const ue=new Map;for(const[Ee,Oe]of Z.value){const Ye=this.evaluate(Ee,Pe);if(!(Ye instanceof ke))throw new Error(`Object keys must be strings: got ${Ye.type}`);ue.set(Ye.value,this.evaluate(Oe,Pe))}return new ve(ue)}case"Identifier":return this.evaluateIdentifier(Z,Pe);case"CallExpression":return this.evaluateCallExpression(Z,Pe);case"MemberExpression":return this.evaluateMemberExpression(Z,Pe);case"UnaryExpression":return this.evaluateUnaryExpression(Z,Pe);case"BinaryExpression":return this.evaluateBinaryExpression(Z,Pe);case"FilterExpression":return this.evaluateFilterExpression(Z,Pe);case"FilterStatement":return this.evaluateFilterStatement(Z,Pe);case"TestExpression":return this.evaluateTestExpression(Z,Pe);case"SelectExpression":return this.evaluateSelectExpression(Z,Pe);case"Ternary":return this.evaluateTernaryExpression(Z,Pe);case"Comment":return new Ie;default:throw new SyntaxError(`Unknown node type: ${Z.type}`)}}};function gt(Z){switch(typeof Z){case"number":return Number.isInteger(Z)?new me(Z):new Ue(Z);case"string":return new ke(Z);case"boolean":return new ce(Z);case"undefined":return new He;case"object":return Z===null?new Ie:Array.isArray(Z)?new De(Z.map(gt)):new ve(new Map(Object.entries(Z).map(([Pe,ue])=>[Pe,gt(ue)])));case"function":return new Ge((Pe,ue)=>{const Ee=Z(...Pe.map(Oe=>Oe.value))??null;return gt(Ee)});default:throw new Error(`Cannot convert to runtime value: ${Z}`)}}function $t(Z,Pe,ue){const Ee=ue??0;switch(Z.type){case"NullValue":case"UndefinedValue":return"null";case"IntegerValue":case"FloatValue":case"StringValue":case"BooleanValue":return JSON.stringify(Z.value);case"ArrayValue":case"ObjectValue":{const Oe=Pe?" ".repeat(Pe):"",Ye=` 3684`+Oe.repeat(Ee),ct=Ye+Oe;if(Z.type==="ArrayValue"){const Ct=Z.value.map(sr=>$t(sr,Pe,Ee+1));return Pe?`[${ct}${Ct.join(`,${ct}`)}${Ye}]`:`[${Ct.join(", ")}]`}else{const Ct=Array.from(Z.value.entries()).map(([sr,ir])=>{const or=`"${sr}": ${$t(ir,Pe,Ee+1)}`;return Pe?`${ct}${or}`:or});return Pe?`{${Ct.join(",")}${Ye}}`:`{${Ct.join(", ")}}`}}default:throw new Error(`Cannot convert to JSON: ${Z.type}`)}}var kt=` 3685`,Zt="{%- ",fr=" -%}";function yr(Z){switch(Z.operator.type){case"MultiplicativeBinaryOperator":return 4;case"AdditiveBinaryOperator":return 3;case"ComparisonBinaryOperator":return 2;case"Identifier":return Z.operator.value==="and"?1:Z.operator.value==="in"||Z.operator.value==="not in"?2:0}return 0}function Kt(Z,Pe=" "){const ue=typeof Pe=="number"?" ".repeat(Pe):Pe;return Ot(Z.body,0,ue).replace(/\n$/,"")}function pr(...Z){return Zt+Z.join(" ")+fr}function Ot(Z,Pe,ue){return Z.map(Ee=>Ir(Ee,Pe,ue)).join(kt)}function Ir(Z,Pe,ue){const Ee=ue.repeat(Pe);switch(Z.type){case"Program":return Ot(Z.body,Pe,ue);case"If":return cn(Z,Pe,ue);case"For":return kr(Z,Pe,ue);case"Set":return rr(Z,Pe,ue);case"Macro":return Ut(Z,Pe,ue);case"Break":return Ee+pr("break");case"Continue":return Ee+pr("continue");case"CallStatement":return wr(Z,Pe,ue);case"FilterStatement":return Ar(Z,Pe,ue);case"Comment":return Ee+"{# "+Z.value+" #}";default:return Ee+"{{- "+Jt(Z)+" -}}"}}function cn(Z,Pe,ue){const Ee=ue.repeat(Pe),Oe=[];let Ye=Z;for(;Ye&&(Oe.push({test:Ye.test,body:Ye.body}),Ye.alternate.length===1&&Ye.alternate[0].type==="If");)Ye=Ye.alternate[0];let ct=Ee+pr("if",Jt(Oe[0].test))+kt+Ot(Oe[0].body,Pe+1,ue);for(let Ct=1;Ct<Oe.length;++Ct)ct+=kt+Ee+pr("elif",Jt(Oe[Ct].test))+kt+Ot(Oe[Ct].body,Pe+1,ue);return Ye&&Ye.alternate.length>0&&(ct+=kt+Ee+pr("else")+kt+Ot(Ye.alternate,Pe+1,ue)),ct+=kt+Ee+pr("endif"),ct}function kr(Z,Pe,ue){const Ee=ue.repeat(Pe);let Oe="";if(Z.iterable.type==="SelectExpression"){const ct=Z.iterable;Oe=`${Jt(ct.lhs)} if ${Jt(ct.test)}`}else Oe=Jt(Z.iterable);let Ye=Ee+pr("for",Jt(Z.loopvar),"in",Oe)+kt+Ot(Z.body,Pe+1,ue);return Z.defaultBlock.length>0&&(Ye+=kt+Ee+pr("else")+kt+Ot(Z.defaultBlock,Pe+1,ue)),Ye+=kt+Ee+pr("endfor"),Ye}function rr(Z,Pe,ue){const Ee=ue.repeat(Pe),Oe=Jt(Z.assignee),Ye=Z.value?Jt(Z.value):"",ct=Ee+pr("set",`${Oe}${Z.value?" = "+Ye:""}`);return Z.body.length===0?ct:ct+kt+Ot(Z.body,Pe+1,ue)+kt+Ee+pr("endset")}function Ut(Z,Pe,ue){const Ee=ue.repeat(Pe),Oe=Z.args.map(Jt).join(", ");return Ee+pr("macro",`${Z.name.value}(${Oe})`)+kt+Ot(Z.body,Pe+1,ue)+kt+Ee+pr("endmacro")}function wr(Z,Pe,ue){const Ee=ue.repeat(Pe),Oe=Z.callerArgs&&Z.callerArgs.length>0?`(${Z.callerArgs.map(Jt).join(", ")})`:"",Ye=Jt(Z.call);let ct=Ee+pr(`call${Oe}`,Ye)+kt;return ct+=Ot(Z.body,Pe+1,ue)+kt,ct+=Ee+pr("endcall"),ct}function Ar(Z,Pe,ue){const Ee=ue.repeat(Pe),Oe=Z.filter.type==="Identifier"?Z.filter.value:Jt(Z.filter);let Ye=Ee+pr("filter",Oe)+kt;return Ye+=Ot(Z.body,Pe+1,ue)+kt,Ye+=Ee+pr("endfilter"),Ye}function Jt(Z,Pe=-1){switch(Z.type){case"SpreadExpression":return`*${Jt(Z.argument)}`;case"Identifier":return Z.value;case"IntegerLiteral":return`${Z.value}`;case"FloatLiteral":return`${Z.value}`;case"StringLiteral":return JSON.stringify(Z.value);case"BinaryExpression":{const ue=Z,Ee=yr(ue),Oe=Jt(ue.left,Ee),Ye=Jt(ue.right,Ee+1),ct=`${Oe} ${ue.operator.value} ${Ye}`;return Ee<Pe?`(${ct})`:ct}case"UnaryExpression":{const ue=Z;return ue.operator.value+(ue.operator.value==="not"?" ":"")+Jt(ue.argument,1/0)}case"CallExpression":{const ue=Z,Ee=ue.args.map(Jt).join(", ");return`${Jt(ue.callee)}(${Ee})`}case"MemberExpression":{const ue=Z;let Ee=Jt(ue.object);["Identifier","MemberExpression","CallExpression","StringLiteral","IntegerLiteral","FloatLiteral","ArrayLiteral","TupleLiteral","ObjectLiteral"].includes(ue.object.type)||(Ee=`(${Ee})`);let Oe=Jt(ue.property);return!ue.computed&&ue.property.type!=="Identifier"&&(Oe=`(${Oe})`),ue.computed?`${Ee}[${Oe}]`:`${Ee}.${Oe}`}case"FilterExpression":{const ue=Z,Ee=Jt(ue.operand,1/0);return ue.filter.type==="CallExpression"?`${Ee} | ${Jt(ue.filter)}`:`${Ee} | ${ue.filter.value}`}case"SelectExpression":{const ue=Z;return`${Jt(ue.lhs)} if ${Jt(ue.test)}`}case"TestExpression":{const ue=Z;return`${Jt(ue.operand)} is${ue.negate?" not":""} ${ue.test.value}`}case"ArrayLiteral":case"TupleLiteral":{const ue=Z.value.map(Jt),Ee=Z.type==="ArrayLiteral"?"[]":"()";return`${Ee[0]}${ue.join(", ")}${Ee[1]}`}case"ObjectLiteral":return`{${Array.from(Z.value.entries()).map(([Ee,Oe])=>`${Jt(Ee)}: ${Jt(Oe)}`).join(", ")}}`;case"SliceExpression":{const ue=Z,Ee=ue.start?Jt(ue.start):"",Oe=ue.stop?Jt(ue.stop):"",Ye=ue.step?`:${Jt(ue.step)}`:"";return`${Ee}:${Oe}${Ye}`}case"KeywordArgumentExpression":{const ue=Z;return`${ue.key.value}=${Jt(ue.value)}`}case"Ternary":{const ue=Z,Ee=`${Jt(ue.trueExpr)} if ${Jt(ue.condition,0)} else ${Jt(ue.falseExpr)}`;return Pe>-1?`(${Ee})`:Ee}default:throw new Error(`Unknown expression type: ${Z.type}`)}}var Ht=class{constructor(Z){Le(this,"parsed");const Pe=c(Z,{lstrip_blocks:!0,trim_blocks:!0});this.parsed=ee(Pe)}render(Z){const Pe=new Ke;if(Xe(Pe),Z)for(const[Oe,Ye]of Object.entries(Z))Pe.set(Oe,Ye);return new mt(Pe).run(this.parsed).value}format(Z){return Kt(this.parsed,(Z==null?void 0:Z.indent)||" ")}}},
3685"./src/backends/onnx.js":(e,t,r)=>{var n;r.r(t),r.d(t,{Tensor:()=>o.Tensor,createInferenceSession:()=>_,deviceToExecutionProviders:()=>p,isONNXProxy:()=>E,isONNXTensor:()=>w,runInferenceSession:()=>b});var i=r("./src/env.js"),a=r("?2ce3"),s=r("onnxruntime-web"),o=r("onnxruntime-common");const l=Object.freeze({auto:null,gpu:null,cpu:"cpu",wasm:"wasm",webgpu:"webgpu",cuda:"cuda",dml:"dml",webnn:{name:"webnn",deviceType:"cpu"},"webnn-npu":{name:"webnn",deviceType:"npu"},"webnn-gpu":{name:"webnn",deviceType:"gpu"},"webnn-cpu":{name:"webnn",deviceType:"cpu"}}),u=[];let c,d;const f=Symbol.for("onnxruntime");if(f in globalThis)d=globalThis[f];else if(i.apis.IS_NODE_ENV){switch(d=a??(n||(n=r.t(a,2))),process.platform){case"win32":u.push("dml");break;case"linux":process.arch==="x64"&&u.push("cuda");break}u.push("cpu"),c=["cpu"]}else d=s,i.apis.IS_WEBNN_AVAILABLE&&u.push("webnn-npu","webnn-gpu","webnn-cpu","webnn"),i.apis.IS_WEBGPU_AVAILABLE&&u.push("webgpu"),u.push("wasm"),c=["wasm"];const h=d.InferenceSession;function p(T=null){if(!T)return c;switch(T){case"auto":return u;case"gpu":return u.filter(S=>["webgpu","cuda","dml","webnn-gpu"].includes(S))}if(u.includes(T))return[l[T]??T];throw new Error(`Unsupported device: "${T}". Should be one of: ${u.join(", ")}.`)}let m=null;async function _(T,S,A){m&&await m;const C=h.create(T,S);m??(m=C);const k=await C;return k.config=A,k}let y=Promise.resolve();const v=i.apis.IS_BROWSER_ENV||i.apis.IS_WEBWORKER_ENV;async function b(T,S){const A=()=>T.run(S);return await(v?y=y.then(A):A())}function w(T){return T instanceof d.Tensor}const x=d==null?void 0:d.env;x!=null&&x.wasm&&(!(typeof ServiceWorkerGlobalScope<"u"&&self instanceof ServiceWorkerGlobalScope)&&!x.wasm.wasmPaths&&(x.wasm.wasmPaths=`https://cdn.jsdelivr.net/npm/@huggingface/transformers@${i.env.version}/dist/`),x.wasm.proxy=!1),x!=null&&x.webgpu&&(x.webgpu.powerPreference="high-performance");function E(){var T;return(T=x==null?void 0:x.wasm)==null?void 0:T.proxy}i.env.backends.onnx=x},
3685"./src/base/feature_extraction_utils.js":(e,t,r)=>{r.r(t),r.d(t,{FeatureExtractor:()=>s,validate_audio_inputs:()=>o});var n=r("./src/utils/constants.js"),i=r("./src/utils/generic.js"),a=r("./src/utils/hub.js");class s extends i.Callable{constructor(u){super(),this.config=u}static async from_pretrained(u,c={}){const d=await(0,a.getModelJSON)(u,n.FEATURE_EXTRACTOR_NAME,!0,c);return new this(d)}}function o(l,u){var c;if(!(l instanceof Float32Array||l instanceof Float64Array))throw new Error(`${u} expects input to be a Float32Array or a Float64Array, but got ${((c=l==null?void 0:l.constructor)==null?void 0:c.name)??typeof l} instead. If using the feature extractor directly, remember to use \`read_audio(url, sampling_rate)\` to obtain the raw audio data of the file/url.`)}},
3685"./src/base/image_processors_utils.js":(e,t,r)=>{r.r(t),r.d(t,{ImageProcessor:()=>w,center_to_corners_format:()=>d,post_process_instance_segmentation:()=>b,post_process_object_detection:()=>f,post_process_panoptic_segmentation:()=>v,post_process_semantic_segmentation:()=>h});var n=r("./src/utils/generic.js"),i=r("./src/utils/tensor.js"),a=r("./src/utils/maths.js");r("./src/utils/image.js");var s=r("./src/utils/core.js"),o=r("./src/utils/hub.js"),l=r("./src/utils/constants.js");function u(x,E,T=0,S=null){const A=x/E;let C=(0,a.bankers_round)(A)*E;return S!==null&&C>S&&(C=Math.floor(A)*E),C<T&&(C=Math.ceil(A)*E),C}function c([x,E],T){return[Math.max(Math.floor(x/T),1)*T,Math.max(Math.floor(E/T),1)*T]}function d([x,E,T,S]){return[x-T/2,E-S/2,x+T/2,E+S/2]}function f(x,E=.5,T=null,S=!1){const A=x.logits,C=x.pred_boxes,[k,M,D]=A.dims;if(T!==null&&T.length!==k)throw Error("Make sure that you pass in as many target sizes as the batch dimension of the logits");let $=[];for(let V=0;V<k;++V){let U=T!==null?T[V]:null,B={boxes:[],classes:[],scores:[]},z=A[V],q=C[V];for(let L=0;L<M;++L){let K=z[L],O=[],N;if(S){N=K.sigmoid().data;for(let X=0;X<N.length;++X)N[X]>E&&O.push(X)}else{let X=(0,a.max)(K.data)[1];if(X===D-1||(N=(0,a.softmax)(K.data),N[X]<E))continue;O.push(X)}for(const X of O){let ie=q[L].data;ie=d(ie),U!==null&&(ie=ie.map((ee,le)=>ee*U[(le+1)%2])),B.boxes.push(ie),B.classes.push(X),B.scores.push(N[X])}}$.push(B)}return $}function h(x,E=null){const T=x.logits,S=T.dims[0];if(E!==null&&E.length!==S)throw Error("Make sure that you pass in as many target sizes as the batch dimension of the logits");const A=[];for(let C=0;C<S;++C){const k=E!==null?E[C]:null;let M=T[C];k!==null&&(M=(0,i.interpolate)(M,k,"bilinear",!1));const[D,$]=k??M.dims.slice(-2),V=new i.Tensor("int32",new Int32Array(D*$),[D,$]),U=M[0].data,B=V.data;for(let L=1;L<M.dims[0];++L){const K=M[L].data;for(let O=0;O<K.length;++O)K[O]>U[O]&&(U[O]=K[O],B[O]=L)}const z=new Array(M.dims[0]);for(let L=0;L<B.length;++L){const K=B[L];z[K]=K}const q=z.filter(L=>L!==void 0);A.push({segmentation:V,labels:q})}return A}function p(x,E,T,S){const A=[],C=[],k=[];for(let M=0;M<x.dims[0];++M){const D=x[M],$=E[M],V=(0,a.max)(D.data)[1];if(V===S)continue;const B=(0,a.softmax)(D.data)[V];B>T&&(A.push($),C.push(B),k.push(V))}return[A,C,k]}function m(x,E,T,S=.5,A=.8){const C=[];let k=0,M=0;const D=E[T].data;for(let V=0;V<x.length;++V)x[V]===T&&(C.push(V),++k),D[V]>=S&&++M;let $=k>0&&M>0;return $&&($=k/M>A),[$,C]}function _(x,E,T,S,A,C=null,k=null){const[M,D]=k??x[0].dims,$=new i.Tensor("int32",new Int32Array(M*D),[M,D]),V=[];if(k!==null)for(let L=0;L<x.length;++L)x[L]=(0,i.interpolate)(x[L],k,"bilinear",!1);const U=new Int32Array(x[0].data.length),B=new Float32Array(x[0].data.length);for(let L=0;L<x.length;++L){let K=E[L];const O=x[L].data;for(let N=0;N<O.length;++N)O[N]*=K,O[N]>B[N]&&(U[N]=L,B[N]=O[N])}let z=0;const q=$.data;for(let L=0;L<T.length;++L){const K=T[L],[O,N]=m(U,x,L,S,A);if(O){++z;for(const X of N)q[X]=z;V.push({id:z,label_id:K,score:E[L]})}}return[$,V]}function y(x,E,T=28,S=56*56,A=14*14*4*1280){if(x<T||E<T)throw new Error(`height:${x} or width:${E} must be larger than factor:${T}`);if(Math.max(x,E)/Math.min(x,E)>200)throw new Error(`absolute aspect ratio must be smaller than 200, got ${Math.max(x,E)/Math.min(x,E)}`);let C=Math.round(x/T)*T,k=Math.round(E/T)*T;if(C*k>A){const M=Math.sqrt(x*E/A);C=Math.floor(x/M/T)*T,k=Math.floor(E/M/T)*T}else if(C*k<S){const M=Math.sqrt(S/(x*E));C=Math.ceil(x*M/T)*T,k=Math.ceil(E*M/T)*T}return[C,k]}function v(x,E=.5,T=.5,S=.8,A=null,C=null){A===null&&(console.warn("`label_ids_to_fuse` unset. No instance will be fused."),A=new Set);const k=x.class_queries_logits??x.logits,D=(x.masks_queries_logits??x.pred_masks).sigmoid();let[$,V,U]=k.dims;if(U-=1,C!==null&&C.length!==$)throw Error("Make sure that you pass in as many target sizes as the batch dimension of the logits");let B=[];for(let z=0;z<$;++z){let q=C!==null?C[z]:null,L=k[z],K=D[z],[O,N,X]=p(L,K,E,U);if(X.length===0){let[le,Te]=q??K.dims.slice(-2),be=new i.Tensor("int32",new Int32Array(le*Te).fill(-1),[le,Te]);B.push({segmentation:be,segments_info:[]});continue}let[ie,ee]=_(O,N,X,T,S,A,q);B.push({segmentation:ie,segments_info:ee})}return B}function b(x,E=.5,T=null){throw new Error("`post_process_instance_segmentation` is not yet implemented.")}class w extends n.Callable{constructor(E){super(),this.image_mean=E.image_mean??E.mean,this.image_std=E.image_std??E.std,this.resample=E.resample??2,this.do_rescale=E.do_rescale??!0,this.rescale_factor=E.rescale_factor??1/255,this.do_normalize=E.do_normalize,this.do_thumbnail=E.do_thumbnail,this.size=E.size??E.image_size,this.do_resize=E.do_resize??this.size!==void 0,this.size_divisibility=E.size_divisibility??E.size_divisor,this.do_center_crop=E.do_center_crop,this.crop_size=E.crop_size,this.do_convert_rgb=E.do_convert_rgb??!0,this.do_crop_margin=E.do_crop_margin,this.pad_size=E.pad_size,this.do_pad=E.do_pad,this.min_pixels=E.min_pixels,this.max_pixels=E.max_pixels,this.do_pad&&!this.pad_size&&this.size&&this.size.width!==void 0&&this.size.height!==void 0&&(this.pad_size=this.size),this.do_flip_channel_order=E.do_flip_channel_order??!1,this.config=E}async thumbnail(E,T,S=2){const A=E.height,C=E.width,k=T.height,M=T.width;let D=Math.min(A,k),$=Math.min(C,M);return D===A&&$===C?E:(A>C?$=Math.floor(C*D/A):C>A&&(D=Math.floor(A*$/C)),await E.resize($,D,{resample:S}))}async crop_margin(E,T=200){const S=E.clone().grayscale(),A=(0,a.min)(S.data)[0],k=(0,a.max)(S.data)[0]-A;if(k===0)return E;const M=T/255;let D=S.width,$=S.height,V=0,U=0;const B=S.data;for(let z=0;z<S.height;++z){const q=z*S.width;for(let L=0;L<S.width;++L)(B[q+L]-A)/k<M&&(D=Math.min(D,L),$=Math.min($,z),V=Math.max(V,L),U=Math.max(U,z))}return E=await E.crop([D,$,V,U]),E}pad_image(E,T,S,{mode:A="constant",center:C=!1,constant_values:k=0}={}){const[M,D,$]=T;let V,U;if(typeof S=="number"?(V=S,U=S):S==="square"?V=U=Math.max(M,D):(V=S.width,U=S.height),V!==D||U!==M){const B=new Float32Array(V*U*$);if(Array.isArray(k))for(let L=0;L<B.length;++L)B[L]=k[L%$];else k!==0&&B.fill(k);const[z,q]=C?[Math.floor((V-D)/2),Math.floor((U-M)/2)]:[0,0];for(let L=0;L<M;++L){const K=(L+q)*V,O=L*D;for(let N=0;N<D;++N){const X=(K+N+z)*$,ie=(O+N)*$;for(let ee=0;ee<$;++ee)B[X+ee]=E[ie+ee]}}if(A==="symmetric"){if(C)throw new Error("`center` padding is not supported when `mode` is set to `symmetric`.");const L=M-1,K=D-1;for(let O=0;O<U;
3685++O){const N=O*V,X=(0,s.calculateReflectOffset)(O,L)*D;for(let ie=0;ie<V;++ie){if(O<M&&ie<D)continue;const ee=(N+ie)*$,le=(X+(0,s.calculateReflectOffset)(ie,K))*$;for(let Te=0;Te<$;++Te)B[ee+Te]=E[le+Te]}}}E=B,T=[U,V,$]}return[E,T]}rescale(E){for(let T=0;T<E.length;++T)E[T]=this.rescale_factor*E[T]}get_resize_output_image_size(E,T){const[S,A]=E.size;let C,k;if(this.do_thumbnail){const{height:M,width:D}=T;C=Math.min(M,D)}else Number.isInteger(T)?(C=T,k=this.config.max_size??C):T!==void 0&&(C=T.shortest_edge,k=T.longest_edge);if(C!==void 0||k!==void 0){const M=C===void 0?1:Math.max(C/S,C/A),D=S*M,$=A*M,V=k===void 0?1:Math.min(k/D,k/$);let U=Math.floor(Number((D*V).toFixed(2))),B=Math.floor(Number(($*V).toFixed(2)));return this.size_divisibility!==void 0&&([U,B]=c([U,B],this.size_divisibility)),[U,B]}else if(T!==void 0&&T.width!==void 0&&T.height!==void 0){let M=T.width,D=T.height;if(this.config.keep_aspect_ratio&&this.config.ensure_multiple_of){let $=D/A,V=M/S;Math.abs(1-V)<Math.abs(1-$)?$=V:V=$,D=u($*A,this.config.ensure_multiple_of),M=u(V*S,this.config.ensure_multiple_of)}return[M,D]}else{if(this.size_divisibility!==void 0)return c([S,A],this.size_divisibility);if(this.min_pixels!==void 0&&this.max_pixels!==void 0){const M=this.config.patch_size*this.config.merge_size;return y(A,S,M,this.min_pixels,this.max_pixels)}else throw new Error(`Could not resize image due to unsupported \`this.size\` option in config: ${JSON.stringify(T)}`)}}async resize(E){const[T,S]=this.get_resize_output_image_size(E,this.size);return await E.resize(T,S,{resample:this.resample})}async preprocess(E,{do_normalize:T=null,do_pad:S=null,do_convert_rgb:A=null,do_convert_grayscale:C=null,do_flip_channel_order:k=null}={}){this.do_crop_margin&&(E=await this.crop_margin(E));const[M,D]=E.size;if(A??this.do_convert_rgb?E=E.rgb():C&&(E=E.grayscale()),this.do_resize&&(E=await this.resize(E)),this.do_thumbnail&&(E=await this.thumbnail(E,this.size,this.resample)),this.do_center_crop){let z,q;Number.isInteger(this.crop_size)?(z=this.crop_size,q=this.crop_size):(z=this.crop_size.width,q=this.crop_size.height),E=await E.center_crop(z,q)}const $=[E.height,E.width];let V=Float32Array.from(E.data),U=[E.height,E.width,E.channels];if(this.do_rescale&&this.rescale(V),T??this.do_normalize){let z=this.image_mean;Array.isArray(this.image_mean)||(z=new Array(E.channels).fill(z));let q=this.image_std;if(Array.isArray(this.image_std)||(q=new Array(E.channels).fill(z)),z.length!==E.channels||q.length!==E.channels)throw new Error(`When set to arrays, the length of \`image_mean\` (${z.length}) and \`image_std\` (${q.length}) must match the number of channels in the image (${E.channels}).`);for(let L=0;L<V.length;L+=E.channels)for(let K=0;K<E.channels;++K)V[L+K]=(V[L+K]-z[K])/q[K]}if(S??this.do_pad){if(this.pad_size)[V,U]=this.pad_image(V,[E.height,E.width,E.channels],this.pad_size);else if(this.size_divisibility){const[z,q]=c([U[1],U[0]],this.size_divisibility);[V,U]=this.pad_image(V,U,{width:z,height:q})}}if(k??this.do_flip_channel_order){if(U[2]!==3)throw new Error("Flipping channel order is only supported for RGB images.");for(let z=0;z<V.length;z+=3){const q=V[z];V[z]=V[z+2],V[z+2]=q}}const B=new i.Tensor("float32",V,U).permute(2,0,1);return{original_size:[D,M],reshaped_input_size:$,pixel_values:B}}async _call(E,...T){Array.isArray(E)||(E=[E]);const S=await Promise.all(E.map(C=>this.preprocess(C)));return{pixel_values:(0,i.stack)(S.map(C=>C.pixel_values),0),original_sizes:S.map(C=>C.original_size),reshaped_input_sizes:S.map(C=>C.reshaped_input_size)}}static async from_pretrained(E,T={}){const S=await(0,o.getModelJSON)(E,l.IMAGE_PROCESSOR_NAME,!0,T);return new this(S)}}},
3685"./src/base/processing_utils.js":(e,t,r)=>{r.r(t),r.d(t,{Processor:()=>s});var n=r("./src/utils/constants.js"),i=r("./src/utils/generic.js"),a=r("./src/utils/hub.js");class s extends i.Callable{constructor(l,u,c){super(),this.config=l,this.components=u,this.chat_template=c}get image_processor(){return this.components.image_processor}get tokenizer(){return this.components.tokenizer}get feature_extractor(){return this.components.feature_extractor}apply_chat_template(l,u={}){if(!this.tokenizer)throw new Error("Unable to apply chat template without a tokenizer.");return this.tokenizer.apply_chat_template(l,{tokenize:!1,chat_template:this.chat_template??void 0,...u})}batch_decode(...l){if(!this.tokenizer)throw new Error("Unable to decode without a tokenizer.");return this.tokenizer.batch_decode(...l)}decode(...l){if(!this.tokenizer)throw new Error("Unable to decode without a tokenizer.");return this.tokenizer.decode(...l)}async _call(l,...u){for(const c of[this.image_processor,this.feature_extractor,this.tokenizer])if(c)return c(l,...u);throw new Error("No image processor, feature extractor, or tokenizer found.")}static async from_pretrained(l,u={}){const[c,d,f]=await Promise.all([this.uses_processor_config?(0,a.getModelJSON)(l,n.PROCESSOR_NAME,!0,u):{},Promise.all(this.classes.filter(h=>h in this).map(async h=>{const p=await this[h].from_pretrained(l,u);return[h.replace(/_class$/,""),p]})).then(Object.fromEntries),this.uses_chat_template_file?(0,a.getModelText)(l,n.CHAT_TEMPLATE_NAME,!0,u):null]);return new this(c,d,f)}}Le(s,"classes",["image_processor_class","tokenizer_class","feature_extractor_class"]),Le(s,"uses_processor_config",!1),Le(s,"uses_chat_template_file",!1)},
3685"./src/configs.js":(e,t,r)=>{r.r(t),r.d(t,{AutoConfig:()=>c,PretrainedConfig:()=>u,getCacheShapes:()=>o});var n=r("./src/utils/core.js"),i=r("./src/utils/hub.js");async function a(d,f){return await(0,i.getModelJSON)(d,"config.json",!0,f)}function s(d){const f={};let h={};switch(d.model_type){case"llava":case"paligemma":case"gemma3":case"florence2":case"llava_onevision":case"idefics3":case"ultravox":case"voxtral":case"smolvlm":case"gemma3n":h=s(d.text_config);break;case"moondream1":h=s(d.phi_config);break;case"musicgen":h=s(d.decoder);break;case"multi_modality":h=s(d.language_config);break;case"gpt2":case"gptj":case"jais":case"codegen":case"gpt_bigcode":f.num_heads="n_head",f.num_layers="n_layer",f.hidden_size="n_embd";break;case"gpt_neox":case"stablelm":case"opt":case"falcon":case"modernbert-decoder":f.num_heads="num_attention_heads",f.num_layers="num_hidden_layers",f.hidden_size="hidden_size";break;case"llama":case"llama4_text":case"nanochat":case"arcee":case"lfm2":case"smollm3":case"olmo":case"olmo2":case"mobilellm":case"granite":case"granitemoehybrid":case"cohere":case"mistral":case"starcoder2":case"qwen2":case"qwen2_vl":case"phi":case"phi3":case"phi3_v":case"llava_qwen2":f.num_heads="num_key_value_heads",f.num_layers="num_hidden_layers",f.hidden_size="hidden_size",f.num_attention_heads="num_attention_heads",f.dim_kv="head_dim";break;case"qwen3":case"gemma":case"gemma2":case"vaultgemma":case"gemma3_text":case"gemma3n_text":case"glm":case"helium":case"ernie4_5":f.num_heads="num_key_value_heads",f.num_layers="num_hidden_layers",f.dim_kv="head_dim";break;case"openelm":f.num_heads="num_kv_heads",f.num_layers="num_transformer_layers",f.dim_kv="head_dim";break;case"gpt_neo":case"donut-swin":f.num_heads="num_heads",f.num_layers="num_layers",f.hidden_size="hidden_size";break;case"bloom":f.num_heads="n_head",f.num_layers="n_layer",f.hidden_size="hidden_size";break;case"mpt":f.num_heads="n_heads",f.num_layers="n_layers",f.hidden_size="d_model";break;case"exaone":f.num_heads="num_key_value_heads",f.num_layers="num_layers",f.dim_kv="head_dim",f.num_attention_heads="num_attention_heads";break;case"t5":case"mt5":case"longt5":f.num_decoder_layers="num_decoder_layers",f.num_decoder_heads="num_heads",f.decoder_dim_kv="d_kv",f.num_encoder_layers="num_layers",f.num_encoder_heads="num_heads",f.encoder_dim_kv="d_kv";break;case"bart":case"mbart":case"marian":case"whisper":case"lite-whisper":case"m2m_100":case"blenderbot":case"blenderbot-small":case"florence2_language":f.num_decoder_layers="decoder_layers",f.num_decoder_heads="decoder_attention_heads",f.decoder_hidden_size="d_model",f.num_encoder_layers="encoder_layers",f.num_encoder_heads="encoder_attention_heads",f.encoder_hidden_size="d_model";break;case"speecht5":f.num_decoder_layers="decoder_layers",f.num_decoder_heads="decoder_attention_heads",f.decoder_hidden_size="hidden_size",f.num_encoder_layers="encoder_layers",f.num_encoder_heads="encoder_attention_heads",f.encoder_hidden_size="hidden_size";break;case"trocr":f.num_encoder_layers=f.num_decoder_layers="decoder_layers",f.num_encoder_heads=f.num_decoder_heads="decoder_attention_heads",f.encoder_hidden_size=f.decoder_hidden_size="d_model";break;case"musicgen_decoder":f.num_encoder_layers=f.num_decoder_layers="num_hidden_layers",f.num_encoder_heads=f.num_decoder_heads="num_attention_heads",f.encoder_hidden_size=f.decoder_hidden_size="hidden_size";break;case"moonshine":f.num_decoder_layers="decoder_num_hidden_layers",f.num_decoder_heads="decoder_num_key_value_heads",f.num_encoder_layers="encoder_num_hidden_layers",f.num_encoder_heads="encoder_num_key_value_heads",f.encoder_hidden_size=f.decoder_hidden_size="hidden_size";break;case"vision-encoder-decoder":const m=s(d.decoder),_="num_decoder_layers"in m,y=(0,n.pick)(d,["model_type","is_encoder_decoder"]);return _?(y.num_decoder_layers=m.num_decoder_layers,y.num_decoder_heads=m.num_decoder_heads,y.decoder_hidden_size=m.decoder_hidden_size,y.num_encoder_layers=m.num_encoder_layers,y.num_encoder_heads=m.num_encoder_heads,y.encoder_hidden_size=m.encoder_hidden_size):(y.num_layers=m.num_layers,y.num_heads=m.num_heads,y.hidden_size=m.hidden_size),y}const p={...h,...(0,n.pick)(d,["model_type","multi_query","is_encoder_decoder"])};for(const m in f)p[m]=d[f[m]];return p}function o(d,f){if(d.model_type==="lfm2"){const h=(f==null?void 0:f.prefix)??"past_key_values",p=h==="present"?"present":"past",m={},{layer_types:_,num_attention_heads:y,num_key_value_heads:v,hidden_size:b,conv_L_cache:w}=d,x=b/y,E=(f==null?void 0:f.batch_size)??1;for(let T=0;T<_.length;++T)if(_[T]==="full_attention")for(const S of["key","value"])m[`${h}.${T}.${S}`]=[E,v,0,x];else if(_[T]==="conv")m[`${p}_conv.${T}`]=[E,b,w];else throw new Error(`Unsupported layer type: ${_[T]}`);return m}return l(d,f)}function l(d,{prefix:f="past_key_values",batch_size:h=1}={}){const p={},m=d.normalized_config;if(m.is_encoder_decoder&&"num_encoder_heads"in m&&"num_decoder_heads"in m){const _=m.encoder_dim_kv??m.encoder_hidden_size/m.num_encoder_heads,y=m.decoder_dim_kv??m.decoder_hidden_size/m.num_decoder_heads,v=[h,m.num_encoder_heads,0,_],b=[h,m.num_decoder_heads,0,y];for(let w=0;w<m.num_decoder_layers;++w)p[`${f}.${w}.encoder.key`]=v,p[`${f}.${w}.encoder.value`]=v,p[`${f}.${w}.decoder.key`]=b,p[`${f}.${w}.decoder.value`]=b}else{const _=m.num_heads,y=m.num_layers,v=m.dim_kv??m.hidden_size/(m.num_attention_heads??_);if(m.model_type==="falcon"){const b=[h*_,0,v];for(let w=0;w<y;++w)p[`${f}.${w}.key`]=b,p[`${f}.${w}.value`]=b}else if(m.multi_query){const b=[h*_,0,2*v];for(let w=0;w<y;++w)p[`${f}.${w}.key_value`]=b}else if(m.model_type==="bloom"){const b=[h*_,v,0],w=[h*_,0,v];for(let x=0;x<y;++x)p[`${f}.${x}.key`]=b,p[`${f}.${x}.value`]=w}else if(m.model_type==="openelm")for(let b=0;b<y;++b){const w=[h,_[b],0,v];p[`${f}.${b}.key`]=w,p[`${f}.${b}.value`]=w}else{const b=[h,_,0,v];for(let w=0;w<y;++w)p[`${f}.${w}.key`]=b,p[`${f}.${w}.value`]=b}}return p}class u{constructor(f){Le(this,"model_type",null);Le(this,"is_encoder_decoder",!1);Le(this,"max_position_embeddings");Le(this,"transformers.js_config");Object.assign(this,f),this.normalized_config=s(this)}static async from_pretrained(f,{progress_callback:h=null,config:p=null,cache_dir:m=null,local_files_only:_=!1,revision:y="main"}={}){p&&!(p instanceof u)&&(p=new u(p));const v=p??await a(f,{progress_callback:h,config:p,cache_dir:m,local_files_only:_,revision:y});return new this(v)}}class c{static async from_pretrained(...f){return u.from_pretrained(...f)}}},
3685"./src/env.js":(e,t,r)=>{var A,C;r.r(t),r.d(t,{apis:()=>y,env:()=>T});var n=r("?db59"),i=r("?383f"),a=r("?fa4b");const s="3.7.6",o=typeof window<"u"&&typeof window.document<"u",l=typeof self<"u"&&["DedicatedWorkerGlobalScope","ServiceWorkerGlobalScope","SharedWorkerGlobalScope"].includes((A=self.constructor)==null?void 0:A.name),u=typeof self<"u"&&"caches"in self,c=typeof navigator<"u"&&"gpu"in navigator,d=typeof navigator<"u"&&"ml"in navigator,f=typeof process<"u",h=f&&((C=process==null?void 0:process.release)==null?void 0:C.name)==="node",p=!S(n),m=!S(i),_=typeof globalThis.Deno<"u",y=Object.freeze({IS_BROWSER_ENV:o,IS_WEBWORKER_ENV:l,IS_WEB_CACHE_AVAILABLE:u,IS_WEBGPU_AVAILABLE:c,IS_WEBNN_AVAILABLE:d,IS_PROCESS_AVAILABLE:f,IS_NODE_ENV:h,IS_FS_AVAILABLE:p,IS_PATH_AVAILABLE:m}),v=p&&m;let b="./";if(v){const k=Object(import.meta).url;k?b=i.dirname(i.dirname(a.fileURLToPath(k))):typeof __dirname<"u"&&(b=i.dirname(__dirname))}const w=v?i.join(b,"/.cache/"):null,x="/models/",E=v?i.join(b,x):x,T={version:s,backends:{onnx:{}},allowRemoteModels:!0,remoteHost:"https://huggingface.co/",remotePathTemplate:"{model}/resolve/{revision}/",allowLocalModels:!(o||l),localModelPath:E,useFS:p,useBrowserCache:u&&!_,useFSCache:p,cacheDir:w,useCustomCache:!1,customCache:null};function S(k){return Object.keys(k).length===0}},
3685"./src/generation/configuration_utils.js":(e,t,r)=>{r.r(t),r.d(t,{GenerationConfig:()=>i});var n=r("./src/utils/core.js");class i{constructor(s){Le(this,"max_length",20);Le(this,"max_new_tokens",null);Le(this,"min_length",0);Le(this,"min_new_tokens",null);Le(this,"early_stopping",!1);Le(this,"max_time",null);Le(this,"do_sample",!1);Le(this,"num_beams",1);Le(this,"num_beam_groups",1);Le(this,"penalty_alpha",null);Le(this,"use_cache",!0);Le(this,"temperature",1);Le(this,"top_k",50);Le(this,"top_p",1);Le(this,"typical_p",1);Le(this,"epsilon_cutoff",0);Le(this,"eta_cutoff",0);Le(this,"diversity_penalty",0);Le(this,"repetition_penalty",1);Le(this,"encoder_repetition_penalty",1);Le(this,"length_penalty",1);Le(this,"no_repeat_ngram_size",0);Le(this,"bad_words_ids",null);Le(this,"force_words_ids",null);Le(this,"renormalize_logits",!1);Le(this,"constraints",null);Le(this,"forced_bos_token_id",null);Le(this,"forced_eos_token_id",null);Le(this,"remove_invalid_values",!1);Le(this,"exponential_decay_length_penalty",null);Le(this,"suppress_tokens",null);Le(this,"streamer",null);Le(this,"begin_suppress_tokens",null);Le(this,"forced_decoder_ids",null);Le(this,"guidance_scale",null);Le(this,"num_return_sequences",1);Le(this,"output_attentions",!1);Le(this,"output_hidden_states",!1);Le(this,"output_scores",!1);Le(this,"return_dict_in_generate",!1);Le(this,"pad_token_id",null);Le(this,"bos_token_id",null);Le(this,"eos_token_id",null);Le(this,"encoder_no_repeat_ngram_size",0);Le(this,"decoder_start_token_id",null);Le(this,"generation_kwargs",{});Object.assign(this,(0,n.pick)(s,Object.getOwnPropertyNames(this)))}}},
vendor: 7,887 bytes, line 3685
3685"./src/generation/logits_process.js":(e,t,r)=>{r.r(t),r.d(t,{ClassifierFreeGuidanceLogitsProcessor:()=>y,ForcedBOSTokenLogitsProcessor:()=>l,ForcedEOSTokenLogitsProcessor:()=>u,LogitsProcessor:()=>a,LogitsProcessorList:()=>o,LogitsWarper:()=>s,MinLengthLogitsProcessor:()=>p,MinNewTokensLengthLogitsProcessor:()=>m,NoBadWordsLogitsProcessor:()=>_,NoRepeatNGramLogitsProcessor:()=>f,RepetitionPenaltyLogitsProcessor:()=>h,SuppressTokensAtBeginLogitsProcessor:()=>c,TemperatureLogitsWarper:()=>v,TopKLogitsWarper:()=>w,TopPLogitsWarper:()=>b,WhisperTimeStampLogitsProcessor:()=>d});var n=r("./src/utils/generic.js");r("./src/utils/tensor.js");var i=r("./src/utils/maths.js");class a extends n.Callable{_call(E,T){throw Error("`_call` should be implemented in a subclass")}}class s extends n.Callable{_call(E,T){throw Error("`_call` should be implemented in a subclass")}}class o extends n.Callable{constructor(){super(),this.processors=[]}push(E){this.processors.push(E)}extend(E){this.processors.push(...E)}_call(E,T){let S=T;for(const A of this.processors)S=A(E,S);return S}[Symbol.iterator](){return this.processors.values()}}class l extends a{constructor(E){super(),this.bos_token_id=E}_call(E,T){for(let S=0;S<E.length;++S)if(E[S].length===1){const A=T[S].data;A.fill(-1/0),A[this.bos_token_id]=0}return T}}class u extends a{constructor(E,T){super(),this.max_length=E,this.eos_token_id=Array.isArray(T)?T:[T]}_call(E,T){for(let S=0;S<E.length;++S)if(E[S].length===this.max_length-1){const A=T[S].data;A.fill(-1/0);for(const C of this.eos_token_id)A[C]=0}return T}}class c extends a{constructor(E,T){super(),this.begin_suppress_tokens=E,this.begin_index=T}_call(E,T){for(let S=0;S<E.length;++S)if(E[S].length===this.begin_index){const A=T[S].data;for(const C of this.begin_suppress_tokens)A[C]=-1/0}return T}}class d extends a{constructor(E,T){super(),this.eos_token_id=Array.isArray(E.eos_token_id)?E.eos_token_id[0]:E.eos_token_id,this.no_timestamps_token_id=E.no_timestamps_token_id,this.timestamp_begin=this.no_timestamps_token_id+1,this.begin_index=T.length,T.at(-1)===this.no_timestamps_token_id&&(this.begin_index-=1),this.max_initial_timestamp_index=E.max_initial_timestamp_index}_call(E,T){for(let S=0;S<E.length;++S){const A=T[S].data;if(A[this.no_timestamps_token_id]=-1/0,E[S].length===this.begin_index-1){A.fill(-1/0),A[this.timestamp_begin]=0;continue}const C=E[S].slice(this.begin_index),k=C.length>=1&&C[C.length-1]>=this.timestamp_begin,M=C.length<2||C[C.length-2]>=this.timestamp_begin;if(k&&(M?A.subarray(this.timestamp_begin).fill(-1/0):A.subarray(0,this.eos_token_id).fill(-1/0)),E[S].length===this.begin_index&&this.max_initial_timestamp_index!==null){const U=this.timestamp_begin+this.max_initial_timestamp_index;A.subarray(U+1).fill(-1/0)}const D=(0,i.log_softmax)(A),$=Math.log(D.subarray(this.timestamp_begin).map(Math.exp).reduce((U,B)=>U+B)),V=(0,i.max)(D.subarray(0,this.timestamp_begin))[0];$>V&&A.subarray(0,this.timestamp_begin).fill(-1/0)}return T}}class f extends a{constructor(E){super(),this.no_repeat_ngram_size=E}getNgrams(E){const T=E.length,S=[];for(let C=0;C<T+1-this.no_repeat_ngram_size;++C){const k=[];for(let M=0;M<this.no_repeat_ngram_size;++M)k.push(E[C+M]);S.push(k.map(Number))}const A=new Map;for(const C of S){const k=C.slice(0,C.length-1),M=JSON.stringify(k),D=A.get(M)??[];D.push(C[C.length-1]),A.set(M,D)}return A}getGeneratedNgrams(E,T){const S=T.slice(T.length+1-this.no_repeat_ngram_size,T.length);return E.get(JSON.stringify(S.map(Number)))??[]}calcBannedNgramTokens(E){const T=[];if(E.length+1<this.no_repeat_ngram_size)return T;{const S=this.getNgrams(E);return this.getGeneratedNgrams(S,E)}}_call(E,T){for(let S=0;S<E.length;++S){const A=T[S].data,C=this.calcBannedNgramTokens(E[S]);for(const k of C)A[k]=-1/0}return T}}class h extends a{constructor(E){super(),this.penalty=E}_call(E,T){for(let S=0;S<E.length;++S){const A=T[S].data;for(const C of new Set(E[S])){const k=Number(C);A[k]<0?A[k]*=this.penalty:A[k]/=this.penalty}}return T}}class p extends a{constructor(E,T){super(),this.min_length=E,this.eos_token_id=Array.isArray(T)?T:[T]}_call(E,T){for(let S=0;S<E.length;++S)if(E[S].length<this.min_length){const A=T[S].data;for(const C of this.eos_token_id)A[C]=-1/0}return T}}class m extends a{constructor(E,T,S){super(),this.prompt_length_to_skip=E,this.min_new_tokens=T,this.eos_token_id=Array.isArray(S)?S:[S]}_call(E,T){for(let S=0;S<E.length;++S)if(E[S].length-this.prompt_length_to_skip<this.min_new_tokens){const C=T[S].data;for(const k of this.eos_token_id)C[k]=-1/0}return T}}class _ extends a{constructor(E,T){super(),this.bad_words_ids=E,this.eos_token_id=Array.isArray(T)?T:[T]}_call(E,T){for(let S=0;S<E.length;++S){const A=T[S].data,C=E[S];for(const k of this.bad_words_ids){if(C.length<k.length-1)continue;let M=!0;for(let D=1;D<=k.length-1;++D)if(k.at(-D-1)!=C.at(-D)){M=!1;break}M&&(A[k.at(-1)]=-1/0)}}return T}}class y extends a{constructor(E){if(super(),E<=1)throw new Error(`Require guidance scale >1 to use the classifier free guidance processor, got guidance scale ${E}.`);this.guidance_scale=E}_call(E,T){if(T.dims[0]!==2*E.length)throw new Error(`Logits should have twice the batch size of the input ids, the first half of batches corresponding to the conditional inputs, and the second half of batches corresponding to the unconditional inputs. Got batch size ${T.dims[0]} for the logits and ${E.length} for the input ids.`);const S=E.length,A=T.slice([0,S],null),C=T.slice([S,T.dims[0]],null);for(let k=0;k<C.data.length;++k)C.data[k]+=(A.data[k]-C.data[k])*this.guidance_scale;return C}}class v extends s{constructor(E){super(),this.temperature=E}_call(E,T){const S=T.data;for(let A=0;A<S.length;++A)S[A]/=this.temperature;return T}}class b extends s{constructor(E,{filter_value:T=-1/0,min_tokens_to_keep:S=1}={}){if(super(),E<0||E>1)throw new Error(`\`top_p\` must be a float > 0 and < 1, but is ${E}`);if(!Number.isInteger(S)||S<1)throw new Error(`\`min_tokens_to_keep\` must be a positive integer, but is ${S}`);this.top_p=E,this.filter_value=T,this.min_tokens_to_keep=S}}class w extends s{constructor(E,{filter_value:T=-1/0,min_tokens_to_keep:S=1}={}){if(super(),!Number.isInteger(E)||E<0)throw new Error(`\`top_k\` must be a positive integer, but is ${E}`);this.top_k=Math.max(E,S),this.filter_value=T}}},"./src/generation/logits_sampler.js":(e,t,r)=>{r.r(t),r.d(t,{LogitsSampler:()=>s});var n=r("./src/utils/generic.js"),i=r("./src/utils/tensor.js"),a=r("./src/utils/maths.js");r("./src/generation/configuration_utils.js");class s extends n.Callable{constructor(d){super(),this.generation_config=d}async _call(d){return this.sample(d)}async sample(d){throw Error("sample should be implemented in subclasses.")}getLogits(d,f){let h=d.dims.at(-1),p=d.data;if(f===-1)p=p.slice(-h);else{let m=f*h;p=p.slice(m,m+h)}return p}randomSelect(d){let f=0;for(let p=0;p<d.length;++p)f+=d[p];let h=Math.random()*f;for(let p=0;p<d.length;++p)if(h-=d[p],h<=0)return p;return 0}static getSampler(d){if(d.do_sample)return new l(d);if(d.num_beams>1)return new u(d);if(d.num_return_sequences>1)throw Error(`num_return_sequences has to be 1 when doing greedy search, but is ${d.num_return_sequences}.`);return new o(d)}}class o extends s{async sample(d){const f=(0,a.max)(d.data)[1];return[[BigInt(f),0]]}}class l extends s{async sample(d){let f=d.dims.at(-1);this.generation_config.top_k>0&&(f=Math.min(this.generation_config.top_k,f));const[h,p]=await(0,i.topk)(d,f),m=(0,a.softmax)(h.data);return Array.from({length:this.generation_config.num_beams},()=>{const _=this.randomSelect(m);return[p.data[_],Math.log(m[_])]})}}class u extends s{async sample(d){let f=d.dims.at(-1);this.generation_config.top_k>0&&(f=Math.min(this.generation_config.top_k,f));const[h,p]=await(0,i.topk)(d,f),m=(0,a.softmax)(h.data);return Array.from({length:this.generation_config.num_beams},(_,y)=>[p.data[y],Math.log(m[y])])}}},
3685"./src/generation/stopping_criteria.js":(e,t,r)=>{r.r(t),r.d(t,{EosTokenCriteria:()=>o,InterruptableStoppingCriteria:()=>l,MaxLengthCriteria:()=>s,StoppingCriteria:()=>i,StoppingCriteriaList:()=>a});var n=r("./src/utils/generic.js");class i extends n.Callable{_call(c,d){throw Error("StoppingCriteria needs to be subclassed")}}class a extends n.Callable{constructor(){super(),this.criteria=[]}push(c){this.criteria.push(c)}extend(c){c instanceof a?c=c.criteria:c instanceof i&&(c=[c]),this.criteria.push(...c)}_call(c,d){const f=new Array(c.length).fill(!1);for(const h of this.criteria){const p=h(c,d);for(let m=0;m<f.length;++m)f[m]||(f[m]=p[m])}return f}[Symbol.iterator](){return this.criteria.values()}}class s extends i{constructor(c,d=null){super(),this.max_length=c,this.max_position_embeddings=d}_call(c){return c.map(d=>d.length>=this.max_length)}}class o extends i{constructor(c){super(),Array.isArray(c)||(c=[c]),this.eos_token_id=c}_call(c,d){return c.map(f=>{const h=f.at(-1);return this.eos_token_id.some(p=>h==p)})}}class l extends i{constructor(){super(),this.interrupted=!1}interrupt(){this.interrupted=!0}reset(){this.interrupted=!1}_call(c,d){return new Array(c.length).fill(this.interrupted)}}},
3685"./src/generation/streamers.js":(e,t,r)=>{r.r(t),r.d(t,{BaseStreamer:()=>s,TextStreamer:()=>l,WhisperTextStreamer:()=>u});var n=r("./src/utils/core.js"),i=r("./src/tokenizers.js"),a=r("./src/env.js");class s{put(d){throw Error("Not implemented")}end(){throw Error("Not implemented")}}const o=a.apis.IS_PROCESS_AVAILABLE?c=>process.stdout.write(c):c=>console.log(c);class l extends s{constructor(d,{skip_prompt:f=!1,callback_function:h=null,token_callback_function:p=null,skip_special_tokens:m=!0,decode_kwargs:_={},...y}={}){super(),this.tokenizer=d,this.skip_prompt=f,this.callback_function=h??o,this.token_callback_function=p,this.decode_kwargs={skip_special_tokens:m,..._,...y},this.token_cache=[],this.print_len=0,this.next_tokens_are_prompt=!0}put(d){var _;if(d.length>1)throw Error("TextStreamer only supports batch size of 1");const f=this.next_tokens_are_prompt;if(f&&(this.next_tokens_are_prompt=!1,this.skip_prompt))return;const h=d[0];(_=this.token_callback_function)==null||_.call(this,h),this.token_cache=(0,n.mergeArrays)(this.token_cache,h);const p=this.tokenizer.decode(this.token_cache,this.decode_kwargs);let m;f||p.endsWith(` 3686`)?(m=p.slice(this.print_len),this.token_cache=[],this.print_len=0):p.length>0&&(0,i.is_chinese_char)(p.charCodeAt(p.length-1))?(m=p.slice(this.print_len),this.print_len+=m.length):(m=p.slice(this.print_len,p.lastIndexOf(" ")+1),this.print_len+=m.length),this.on_finalized_text(m,!1)}end(){let d;this.token_cache.length>0?(d=this.tokenizer.decode(this.token_cache,this.decode_kwargs).slice(this.print_len),this.token_cache=[],this.print_len=0):d="",this.next_tokens_are_prompt=!0,this.on_finalized_text(d,!0)}on_finalized_text(d,f){var h,p;d.length>0&&((h=this.callback_function)==null||h.call(this,d)),f&&this.callback_function===o&&a.apis.IS_PROCESS_AVAILABLE&&((p=this.callback_function)==null||p.call(this,` 3687`))}}class u extends l{constructor(d,{skip_prompt:f=!1,callback_function:h=null,token_callback_function:p=null,on_chunk_start:m=null,on_chunk_end:_=null,on_finalize:y=null,time_precision:v=.02,skip_special_tokens:b=!0,decode_kwargs:w={}}={}){super(d,{skip_prompt:f,skip_special_tokens:b,callback_function:h,token_callback_function:p,decode_kwargs:w}),this.timestamp_begin=d.timestamp_begin,this.on_chunk_start=m,this.on_chunk_end=_,this.on_finalize=y,this.time_precision=v,this.waiting_for_timestamp=!1}put(d){var h,p,m;if(d.length>1)throw Error("WhisperTextStreamer only supports batch size of 1");const f=d[0];if(f.length===1){const _=Number(f[0])-this.timestamp_begin;if(_>=0){const y=_*this.time_precision;this.waiting_for_timestamp?(h=this.on_chunk_end)==null||h.call(this,y):(p=this.on_chunk_start)==null||p.call(this,y),this.waiting_for_timestamp=!this.waiting_for_timestamp,(m=this.token_callback_function)==null||m.call(this,f);return}}return super.put(d)}end(){var d;super.end(),(d=this.on_finalize)==null||d.call(this)}}},
3687"./src/models.js":(e,t,r)=>{r.r(t),r.d(t,{ASTForAudioClassification:()=>sn,ASTModel:()=>$r,ASTPreTrainedModel:()=>Er,AlbertForMaskedLM:()=>dr,AlbertForQuestionAnswering:()=>Gt,AlbertForSequenceClassification:()=>er,AlbertModel:()=>Bt,AlbertPreTrainedModel:()=>vt,ArceeForCausalLM:()=>yd,ArceeModel:()=>ps,ArceePreTrainedModel:()=>li,AutoModel:()=>u4,AutoModelForAudioClassification:()=>UG,AutoModelForAudioFrameClassification:()=>VG,AutoModelForAudioTextToText:()=>JG,AutoModelForCTC:()=>zG,AutoModelForCausalLM:()=>kG,AutoModelForDepthEstimation:()=>KG,AutoModelForDocumentQuestionAnswering:()=>HG,AutoModelForImageClassification:()=>DG,AutoModelForImageFeatureExtraction:()=>QG,AutoModelForImageMatting:()=>GG,AutoModelForImageSegmentation:()=>LG,AutoModelForImageTextToText:()=>ZG,AutoModelForImageToImage:()=>qG,AutoModelForMaskGeneration:()=>BG,AutoModelForMaskedLM:()=>OG,AutoModelForNormalEstimation:()=>YG,AutoModelForObjectDetection:()=>$G,AutoModelForPoseEstimation:()=>XG,AutoModelForQuestionAnswering:()=>NG,AutoModelForSemanticSegmentation:()=>jG,AutoModelForSeq2SeqLM:()=>AG,AutoModelForSequenceClassification:()=>TG,AutoModelForSpeechSeq2Seq:()=>CG,AutoModelForTextToSpectrogram:()=>PG,AutoModelForTextToWaveform:()=>MG,AutoModelForTokenClassification:()=>SG,AutoModelForUniversalSegmentation:()=>RG,AutoModelForVision2Seq:()=>IG,AutoModelForXVector:()=>WG,AutoModelForZeroShotObjectDetection:()=>FG,BartForConditionalGeneration:()=>ji,BartForSequenceClassification:()=>Fa,BartModel:()=>cs,BartPretrainedModel:()=>Wi,BaseModelOutput:()=>Se,BeitForImageClassification:()=>ui,BeitModel:()=>ks,BeitPreTrainedModel:()=>Eo,BertForMaskedLM:()=>me,BertForQuestionAnswering:()=>ce,BertForSequenceClassification:()=>Ue,BertForTokenClassification:()=>ke,BertModel:()=>$e,BertPreTrainedModel:()=>ne,BlenderbotForConditionalGeneration:()=>la,BlenderbotModel:()=>Xi,BlenderbotPreTrainedModel:()=>oa,BlenderbotSmallForConditionalGeneration:()=>Jl,BlenderbotSmallModel:()=>Ba,BlenderbotSmallPreTrainedModel:()=>Ri,BloomForCausalLM:()=>R0,BloomModel:()=>Kx,BloomPreTrainedModel:()=>qx,CLIPModel:()=>uf,CLIPPreTrainedModel:()=>Vo,CLIPSegForImageSegmentation:()=>Go,CLIPSegModel:()=>Za,CLIPSegPreTrainedModel:()=>_c,CLIPTextModel:()=>ul,CLIPTextModelWithProjection:()=>yc,CLIPVisionModel:()=>fh,CLIPVisionModelWithProjection:()=>cf,CamembertForMaskedLM:()=>sr,CamembertForQuestionAnswering:()=>It,CamembertForSequenceClassification:()=>ir,CamembertForTokenClassification:()=>or,CamembertModel:()=>Ct,CamembertPreTrainedModel:()=>ct,CausalLMOutput:()=>Pm,CausalLMOutputWithPast:()=>oCe,ChineseCLIPModel:()=>cl,ChineseCLIPPreTrainedModel:()=>Du,ClapAudioModelWithProjection:()=>sH,ClapModel:()=>iH,ClapPreTrainedModel:()=>zC,ClapTextModelWithProjection:()=>aH,CodeGenForCausalLM:()=>ge,CodeGenModel:()=>oe,CodeGenPreTrainedModel:()=>J,CohereForCausalLM:()=>vC,CohereModel:()=>Fx,CoherePreTrainedModel:()=>$x,ConvBertForMaskedLM:()=>wr,ConvBertForQuestionAnswering:()=>Ht,ConvBertForSequenceClassification:()=>Ar,ConvBertForTokenClassification:()=>Jt,ConvBertModel:()=>Ut,ConvBertPreTrainedModel:()=>rr,ConvNextForImageClassification:()=>N_,ConvNextModel:()=>O_,ConvNextPreTrainedModel:()=>l2,ConvNextV2ForImageClassification:()=>KW,ConvNextV2Model:()=>qW,ConvNextV2PreTrainedModel:()=>BI,DFineForObjectDetection:()=>to,DFineModel:()=>bd,DFinePreTrainedModel:()=>pf,DINOv3ConvNextModel:()=>rV,DINOv3ConvNextPreTrainedModel:()=>tV,DINOv3ViTModel:()=>eV,DINOv3ViTPreTrainedModel:()=>JW,DPTForDepthEstimation:()=>M_,DPTModel:()=>r2,DPTPreTrainedModel:()=>Sm,DacDecoderModel:()=>KH,DacDecoderOutput:()=>HH,DacEncoderModel:()=>qH,DacEncoderOutput:()=>VH,DacModel:()=>GH,DacPreTrainedModel:()=>KC,DebertaForMaskedLM:()=>Zr,DebertaForQuestionAnswering:()=>En,DebertaForSequenceClassification:()=>Jn,DebertaForTokenClassification:()=>yn,DebertaModel:()=>Qr,DebertaPreTrainedModel:()=>cr,DebertaV2ForMaskedLM:()=>fa,DebertaV2ForQuestionAnswering:()=>ci,DebertaV2ForSequenceClassification:()=>aa,DebertaV2ForTokenClassification:()=>xi,DebertaV2Model:()=>si,DebertaV2PreTrainedModel:()=>pn,DecisionTransformerModel:()=>CH,DecisionTransformerPreTrainedModel:()=>AH,DeiTForImageClassification:()=>C_,DeiTModel:()=>kC,DeiTPreTrainedModel:()=>Qx,DepthAnythingForDepthEstimation:()=>n2,DepthAnythingPreTrainedModel:()=>mf,DepthProForDepthEstimation:()=>a2,DepthProPreTrainedModel:()=>LC,DetrForObjectDetection:()=>Ni,DetrForSegmentation:()=>Fs,DetrModel:()=>Va,DetrObjectDetectionOutput:()=>ou,DetrPreTrainedModel:()=>yi,DetrSegmentationOutput:()=>es,Dinov2ForImageClassification:()=>XW,Dinov2Model:()=>YW,Dinov2PreTrainedModel:()=>zI,Dinov2WithRegistersForImageClassification:()=>ZW,Dinov2WithRegistersModel:()=>QW,Dinov2WithRegistersPreTrainedModel:()=>UI,DistilBertForMaskedLM:()=>Ei,DistilBertForQuestionAnswering:()=>sa,DistilBertForSequenceClassification:()=>ls,DistilBertForTokenClassification:()=>Yi,DistilBertModel:()=>Ki,DistilBertPreTrainedModel:()=>oi,DonutSwinModel:()=>o2,DonutSwinPreTrainedModel:()=>k_,EfficientNetForImageClassification:()=>hH,EfficientNetModel:()=>fH,EfficientNetPreTrainedModel:()=>
3687JI,ElectraForMaskedLM:()=>ue,ElectraForQuestionAnswering:()=>Ye,ElectraForSequenceClassification:()=>Ee,ElectraForTokenClassification:()=>Oe,ElectraModel:()=>Pe,ElectraPreTrainedModel:()=>Z,Ernie4_5_ForCausalLM:()=>JV,Ernie4_5_Model:()=>ZV,Ernie4_5_PretrainedModel:()=>KI,EsmForMaskedLM:()=>Qs,EsmForSequenceClassification:()=>us,EsmForTokenClassification:()=>jt,EsmModel:()=>Ta,EsmPreTrainedModel:()=>gi,ExaoneForCausalLM:()=>__,ExaoneModel:()=>Ix,ExaonePreTrainedModel:()=>N0,FalconForCausalLM:()=>nH,FalconModel:()=>rH,FalconPreTrainedModel:()=>XI,FastViTForImageClassification:()=>Sn,FastViTModel:()=>Cr,FastViTPreTrainedModel:()=>Ur,Florence2ForConditionalGeneration:()=>pc,Florence2PreTrainedModel:()=>lf,GLPNForDepthEstimation:()=>H0,GLPNModel:()=>gf,GLPNPreTrainedModel:()=>Ed,GPT2LMHeadModel:()=>ff,GPT2Model:()=>df,GPT2PreTrainedModel:()=>bc,GPTBigCodeForCausalLM:()=>j,GPTBigCodeModel:()=>su,GPTBigCodePreTrainedModel:()=>Ca,GPTJForCausalLM:()=>ga,GPTJModel:()=>Ai,GPTJPreTrainedModel:()=>ei,GPTNeoForCausalLM:()=>Sl,GPTNeoModel:()=>wc,GPTNeoPreTrainedModel:()=>iu,GPTNeoXForCausalLM:()=>Al,GPTNeoXModel:()=>bo,GPTNeoXPreTrainedModel:()=>au,Gemma2ForCausalLM:()=>_d,Gemma2Model:()=>ju,Gemma2PreTrainedModel:()=>vd,Gemma3ForCausalLM:()=>xC,Gemma3Model:()=>wC,Gemma3PreTrainedModel:()=>Ml,Gemma3nForConditionalGeneration:()=>gc,Gemma3nPreTrainedModel:()=>Ms,GemmaForCausalLM:()=>bC,GemmaModel:()=>_C,GemmaPreTrainedModel:()=>Bx,GlmForCausalLM:()=>O0,GlmModel:()=>k0,GlmPreTrainedModel:()=>v_,GraniteForCausalLM:()=>w_,GraniteModel:()=>gC,GraniteMoeHybridForCausalLM:()=>yC,GraniteMoeHybridModel:()=>bm,GraniteMoeHybridPreTrainedModel:()=>L0,GranitePreTrainedModel:()=>Rx,GroundingDinoForObjectDetection:()=>iV,GroundingDinoPreTrainedModel:()=>nV,GroupViTModel:()=>Dt,GroupViTPreTrainedModel:()=>zt,HeliumForCausalLM:()=>M0,HeliumModel:()=>P0,HeliumPreTrainedModel:()=>Pl,HieraForImageClassification:()=>NC,HieraModel:()=>OC,HieraPreTrainedModel:()=>wd,HubertForCTC:()=>jV,HubertForSequenceClassification:()=>RV,HubertModel:()=>LV,HubertPreTrainedModel:()=>qAe,IJepaForImageClassification:()=>Ne,IJepaModel:()=>Ae,IJepaPreTrainedModel:()=>xe,Idefics3ForConditionalGeneration:()=>Tl,Idefics3PreTrainedModel:()=>eu,ImageMattingOutput:()=>tq,JAISLMHeadModel:()=>Lu,JAISModel:()=>nu,JAISPreTrainedModel:()=>gd,JinaCLIPModel:()=>hh,JinaCLIPPreTrainedModel:()=>xr,JinaCLIPTextModel:()=>md,JinaCLIPVisionModel:()=>ma,Lfm2ForCausalLM:()=>Nx,Lfm2Model:()=>Ox,Lfm2PreTrainedModel:()=>_m,LiteWhisperForConditionalGeneration:()=>za,Llama4ForCausalLM:()=>nr,Llama4PreTrainedModel:()=>Lt,LlamaForCausalLM:()=>_t,LlamaModel:()=>nt,LlamaPreTrainedModel:()=>Me,LlavaForConditionalGeneration:()=>vo,LlavaOnevisionForConditionalGeneration:()=>Iu,LlavaPreTrainedModel:()=>ll,LlavaQwen2ForCausalLM:()=>mc,LongT5ForConditionalGeneration:()=>Pr,LongT5Model:()=>di,LongT5PreTrainedModel:()=>Oi,M2M100ForConditionalGeneration:()=>pV,M2M100Model:()=>hV,M2M100PreTrainedModel:()=>HI,MBartForCausalLM:()=>Ps,MBartForConditionalGeneration:()=>yo,MBartForSequenceClassification:()=>ds,MBartModel:()=>Zs,MBartPreTrainedModel:()=>Aa,MPNetForMaskedLM:()=>sl,MPNetForQuestionAnswering:()=>st,MPNetForSequenceClassification:()=>ud,MPNetForTokenClassification:()=>sf,MPNetModel:()=>ha,MPNetPreTrainedModel:()=>Sa,MT5ForConditionalGeneration:()=>$a,MT5Model:()=>pa,MT5PreTrainedModel:()=>Ra,MarianMTModel:()=>fV,MarianModel:()=>dV,MarianPreTrainedModel:()=>VI,MaskFormerForInstanceSegmentation:()=>xd,MaskFormerModel:()=>V0,MaskFormerPreTrainedModel:()=>W0,MaskedLMOutput:()=>Ao,Metric3DForDepthEstimation:()=>s2,Metric3DPreTrainedModel:()=>jC,Metric3Dv2ForDepthEstimation:()=>Am,Metric3Dv2PreTrainedModel:()=>RC,MgpstrForSceneTextRecognition:()=>NH,MgpstrModelOutput:()=>kH,MgpstrPreTrainedModel:()=>OH,MimiDecoderModel:()=>WH,MimiDecoderOutput:()=>BH,MimiEncoderModel:()=>UH,MimiEncoderOutput:()=>FH,MimiModel:()=>zH,MimiPreTrainedModel:()=>qC,MistralForCausalLM:()=>QV,MistralModel:()=>XV,MistralPreTrainedModel:()=>qI,MobileBertForMaskedLM:()=>$n,MobileBertForQuestionAnswering:()=>El,MobileBertForSequenceClassification:()=>xl,MobileBertModel:()=>hr,MobileBertPreTrainedModel:()=>Pt,MobileLLMForCausalLM:()=>b_,MobileLLMModel:()=>D0,MobileLLMPreTrainedModel:()=>I0,MobileNetV1ForImageClassification:()=>mH,MobileNetV1ForSemanticSegmentation:()=>gH,MobileNetV1Model:()=>pH,MobileNetV1PreTrainedModel:()=>WC,MobileNetV2ForImageClassification:()=>vH,MobileNetV2ForSemanticSegmentation:()=>_H,MobileNetV2Model:()=>yH,MobileNetV2PreTrainedModel:()=>VC,MobileNetV3ForImageClassification:()=>wH,MobileNetV3ForSemanticSegmentation:()=>xH,MobileNetV3Model:()=>bH,MobileNetV3PreTrainedModel:()=>HC,MobileNetV4ForImageClassification:()=>TH,MobileNetV4ForSemanticSegmentation:()=>SH,MobileNetV4Model:()=>EH,MobileNetV4PreTrainedModel:()=>GC,MobileViTForImageClassification:()=>Br,MobileViTModel:()=>An,MobileViTPreTrainedModel:()=>ms,MobileViTV2ForImageClassification:()=>bn,MobileViTV2Model:()=>Ja,MobileViTV2PreTrainedModel:()=>lr,ModelOutput:()=>fe,ModernBertDecoderForCausalLM:()=>Zt,ModernBertDecoderModel:()=>kt,ModernBertDecoderPreTrainedModel:()=>$t,ModernBertForMaskedLM:()=>Xe,ModernBertForSequenceClassification:()=>mt,ModernBertForTokenClassification:()=>gt,ModernBertModel:()=>Ke,ModernBertPreTrainedModel:()=>He,Moondream1ForConditionalGeneration:()=>dh,MoonshineForConditionalGeneration:()=>Ua,MoonshineModel:()=>fs,MoonshinePreTrainedModel:()=>Si,MptForCausalLM:()=>Xx,MptModel:()=>MC,MptPreTrainedModel:()=>Yx,MultiModalityCausalLM:()=>MH,MultiModalityPreTrainedModel:()=>PH,MusicgenForCausalLM:()=>QAe,MusicgenForConditionalGeneration:()=>t4,MusicgenModel:()=>XAe,MusicgenPreTrainedModel:()=>e4,NanoChatForCausalLM:()=>Fn,NanoChatModel:()=>on,NanoChatPreTrainedModel:()=>vr,NeoBertForMaskedLM:()=>De,NeoBertForQuestionAnswering:()=>Ie,NeoBertForSequenceClassification:()=>tt,NeoBertForTokenClassification:()=>Ge,NeoBertModel:()=>Re,NeoBertPreTrainedModel:()=>ve,NomicBertModel:()=>yr,NomicBertPreTrainedModel:()=>fr,OPTForCausalLM:()=>Q,OPTModel:()=>I,OPTPreTrainedModel:()=>P,Olmo2ForCausalLM:()=>mC,Olmo2Model:()=>pC,Olmo2PreTrainedModel:()=>jx,OlmoForCausalLM:()=>Lx,OlmoModel:()=>hC,OlmoPreTrainedModel:()=>Dx,OpenELMForCausalLM:()=>Vx,OpenELMModel:()=>Wx,OpenELMPreTrainedModel:()=>x_,OwlViTForObjectDetection:()=>eo,OwlViTModel:()=>ua,OwlViTPreTrainedModel:()=>Kn,Owlv2ForObjectDetection:()=>xo,Owlv2Model:()=>Wa,Owlv2PreTrainedModel:()=>wo,PaliGemmaForConditionalGeneration:()=>hd,PaliGemmaPreTrainedModel:()=>fd,ParakeetForCTC:()=>bV,ParakeetPreTrainedModel:()=>_V,PatchTSMixerForPrediction:()=>jH,PatchTSMixerModel:()=>LH,PatchTSMixerPreTrainedModel:()=>n4,PatchTSTForPrediction:()=>DH,PatchTSTModel:()=>IH,PatchTSTPreTrainedModel:()=>r4,Phi3ForCausalLM:()=>PC,Phi3Model:()=>CC,Phi3PreTrainedModel:()=>Gx,Phi3VForCausalLM:()=>tu,Phi3VPreTrainedModel:()=>Js,PhiForCausalLM:()=>AC,PhiModel:()=>SC,PhiPreTrainedModel:()=>S_,PreTrainedModel:()=>H,PretrainedMixin:()=>vi,PvtForImageClassification:()=>at,PvtModel:()=>ze,PvtPreTrainedModel:()=>pt,PyAnnoteForAudioFrameClassification:()=>xV,PyAnnoteModel:()=>wV,PyAnnotePreTrainedModel:()=>GI,QuestionAnsweringModelOutput:()=>hl,Qwen2ForCausalLM:()=>j0,Qwen2Model:()=>EC,Qwen2PreTrainedModel:()=>E_,Qwen2VLForConditionalGeneration:()=>TC,Qwen2VLPreTrainedModel:()=>Hx,Qwen3ForCausalLM:()=>T_,Qwen3Model:()=>xm,Qwen3PreTrainedModel:()=>wm,RFDetrForObjectDetection:()=>Nl,RFDetrModel:()=>Qi,RFDetrObjectDetectionOutput:()=>Ru,RFDetrPreTrainedModel:()=>fl,RTDetrForObjectDetection:()=>Os,RTDetrModel:()=>Vi,RTDetrObjectDetectionOutput:()=>To,RTDetrPreTrainedModel:()=>
3687qo,RTDetrV2ForObjectDetection:()=>Ol,RTDetrV2Model:()=>kl,RTDetrV2ObjectDetectionOutput:()=>dl,RTDetrV2PreTrainedModel:()=>So,ResNetForImageClassification:()=>F0,ResNetModel:()=>Jx,ResNetPreTrainedModel:()=>Zx,RoFormerForMaskedLM:()=>Ot,RoFormerForQuestionAnswering:()=>kr,RoFormerForSequenceClassification:()=>Ir,RoFormerForTokenClassification:()=>cn,RoFormerModel:()=>pr,RoFormerPreTrainedModel:()=>Kt,RobertaForMaskedLM:()=>cd,RobertaForQuestionAnswering:()=>lp,RobertaForSequenceClassification:()=>of,RobertaForTokenClassification:()=>op,RobertaModel:()=>ch,RobertaPreTrainedModel:()=>ol,SamImageSegmentationOutput:()=>cV,SamModel:()=>uV,SamPreTrainedModel:()=>lV,SapiensForDepthEstimation:()=>i2,SapiensForNormalEstimation:()=>fp,SapiensForSemanticSegmentation:()=>DC,SapiensPreTrainedModel:()=>U0,SegformerForImageClassification:()=>lH,SegformerForSemanticSegmentation:()=>uH,SegformerModel:()=>YAe,SegformerPreTrainedModel:()=>UC,Seq2SeqLMOutput:()=>sCe,SequenceClassifierOutput:()=>mn,SiglipModel:()=>vc,SiglipPreTrainedModel:()=>ru,SiglipTextModel:()=>Ho,SiglipVisionModel:()=>_o,SmolLM3ForCausalLM:()=>Cl,SmolLM3Model:()=>C0,SmolLM3PreTrainedModel:()=>A0,SmolVLMForConditionalGeneration:()=>pd,SnacDecoderModel:()=>QH,SnacEncoderModel:()=>XH,SnacModel:()=>YH,SnacPreTrainedModel:()=>YC,SpeechT5ForSpeechToText:()=>HV,SpeechT5ForTextToSpeech:()=>GV,SpeechT5HifiGan:()=>qV,SpeechT5Model:()=>KAe,SpeechT5PreTrainedModel:()=>BC,SqueezeBertForMaskedLM:()=>Ve,SqueezeBertForQuestionAnswering:()=>it,SqueezeBertForSequenceClassification:()=>Je,SqueezeBertModel:()=>Ce,SqueezeBertPreTrainedModel:()=>se,StableLmForCausalLM:()=>dH,StableLmModel:()=>cH,StableLmPreTrainedModel:()=>ZI,Starcoder2ForCausalLM:()=>tH,Starcoder2Model:()=>eH,Starcoder2PreTrainedModel:()=>YI,StyleTextToSpeech2Model:()=>VV,StyleTextToSpeech2PreTrainedModel:()=>WV,Swin2SRForImageSuperResolution:()=>IC,Swin2SRModel:()=>t2,Swin2SRPreTrainedModel:()=>dp,SwinForImageClassification:()=>z0,SwinForSemanticSegmentation:()=>P_,SwinModel:()=>e2,SwinPreTrainedModel:()=>B0,T5ForConditionalGeneration:()=>Tn,T5Model:()=>Un,T5PreTrainedModel:()=>Dr,TableTransformerForObjectDetection:()=>$0,TableTransformerModel:()=>A_,TableTransformerObjectDetectionOutput:()=>Tm,TableTransformerPreTrainedModel:()=>Em,TokenClassifierOutput:()=>ro,TrOCRForCausalLM:()=>YV,TrOCRPreTrainedModel:()=>KV,UltravoxModel:()=>i4,UltravoxPreTrainedModel:()=>RH,UniSpeechForCTC:()=>AV,UniSpeechForSequenceClassification:()=>CV,UniSpeechModel:()=>SV,UniSpeechPreTrainedModel:()=>$C,UniSpeechSatForAudioFrameClassification:()=>OV,UniSpeechSatForCTC:()=>MV,UniSpeechSatForSequenceClassification:()=>kV,UniSpeechSatModel:()=>PV,UniSpeechSatPreTrainedModel:()=>u2,VaultGemmaForCausalLM:()=>hf,VaultGemmaModel:()=>Ux,VaultGemmaPreTrainedModel:()=>zx,ViTForImageClassification:()=>ye,ViTMAEModel:()=>xt,ViTMAEPreTrainedModel:()=>ut,ViTMSNForImageClassification:()=>Mt,ViTMSNModel:()=>St,ViTMSNPreTrainedModel:()=>dt,ViTModel:()=>he,ViTPreTrainedModel:()=>re,VisionEncoderDecoderModel:()=>hs,VitMatteForImageMatting:()=>qn,VitMattePreTrainedModel:()=>Fr,VitPoseForPoseEstimation:()=>rt,VitPosePreTrainedModel:()=>Be,VitsModel:()=>QI,VitsModelOutput:()=>rq,VitsPreTrainedModel:()=>oH,VoxtralForConditionalGeneration:()=>$H,Wav2Vec2BertForCTC:()=>IV,Wav2Vec2BertForSequenceClassification:()=>DV,Wav2Vec2BertModel:()=>NV,Wav2Vec2BertPreTrainedModel:()=>FC,Wav2Vec2ForAudioFrameClassification:()=>vV,Wav2Vec2ForCTC:()=>gV,Wav2Vec2ForSequenceClassification:()=>yV,Wav2Vec2Model:()=>mV,Wav2Vec2PreTrainedModel:()=>Cm,WavLMForAudioFrameClassification:()=>UV,WavLMForCTC:()=>FV,WavLMForSequenceClassification:()=>BV,WavLMForXVector:()=>zV,WavLMModel:()=>$V,WavLMPreTrainedModel:()=>I_,WeSpeakerResNetModel:()=>TV,WeSpeakerResNetPreTrainedModel:()=>EV,WhisperForConditionalGeneration:()=>Ti,WhisperModel:()=>Wn,WhisperPreTrainedModel:()=>hn,XLMForQuestionAnswering:()=>G,XLMForSequenceClassification:()=>dd,XLMForTokenClassification:()=>cp,XLMModel:()=>Nu,XLMPreTrainedModel:()=>Wo,XLMRobertaForMaskedLM:()=>Qe,XLMRobertaForQuestionAnswering:()=>Nt,XLMRobertaForSequenceClassification:()=>ot,XLMRobertaForTokenClassification:()=>Tt,XLMRobertaModel:()=>Fe,XLMRobertaPreTrainedModel:()=>de,XLMWithLMHeadModel:()=>up,XVectorOutput:()=>eq,YolosForObjectDetection:()=>sV,YolosModel:()=>aV,YolosObjectDetectionOutput:()=>oV,YolosPreTrainedModel:()=>WI});var n=r("./src/configs.js"),i=r("./src/backends/onnx.js"),a=r("./src/utils/dtypes.js"),s=r("./src/utils/generic.js"),o=r("./src/utils/core.js"),l=r("./src/utils/hub.js"),u=r("./src/utils/constants.js"),
3687c=r("./src/generation/logits_process.js"),d=r("./src/generation/configuration_utils.js"),f=r("./src/utils/tensor.js"),h=r("./src/utils/image.js"),p=r("./src/utils/maths.js"),m=r("./src/generation/stopping_criteria.js"),_=r("./src/generation/logits_sampler.js"),y=r("./src/env.js"),v=r("./src/models/whisper/generation_whisper.js"),b=r("./src/models/whisper/common_whisper.js");const w={EncoderOnly:0,EncoderDecoder:1,Seq2Seq:2,Vision2Seq:3,DecoderOnly:4,MaskGeneration:5,ImageTextToText:6,Musicgen:7,MultiModality:8,Phi3V:9,AudioTextToText:10,AutoEncoder:11,ImageAudioTextToText:12},x=new Map,E=new Map,T=new Map;async function S(Y,te,pe){var Co;let Ze=((Co=pe.config)==null?void 0:Co["transformers.js_config"])??{},ft=pe.device??Ze.device;ft&&typeof ft!="string"&&(ft.hasOwnProperty(te)?ft=ft[te]:(console.warn(`device not specified for "${te}". Using the default device.`),ft=null));const lt=ft??(y.apis.IS_NODE_ENV?"cpu":"wasm"),bt=(0,i.deviceToExecutionProviders)(lt),Rt=Ze.device_config??{};Rt.hasOwnProperty(lt)&&(Ze={...Ze,...Rt[lt]});let Yt=pe.dtype??Ze.dtype;if(typeof Yt!="string"&&(Yt&&Yt.hasOwnProperty(te)?Yt=Yt[te]:(Yt=a.DEFAULT_DEVICE_DTYPE_MAPPING[lt]??a.DATA_TYPES.fp32,console.warn(`dtype not specified for "${te}". Using the default dtype (${Yt}) for this device (${lt}).`))),Yt===a.DATA_TYPES.auto){let In=Ze.dtype;typeof In!="string"&&(In=In==null?void 0:In[te]),In&&In!==a.DATA_TYPES.auto&&a.DATA_TYPES.hasOwnProperty(In)?Yt=In:Yt=a.DEFAULT_DEVICE_DTYPE_MAPPING[lt]??a.DATA_TYPES.fp32}const ur=Yt;if(a.DEFAULT_DTYPE_SUFFIX_MAPPING.hasOwnProperty(ur)){if(ur===a.DATA_TYPES.fp16&<==="webgpu"&&!await(0,a.isWebGpuFp16Supported)())throw new Error(`The device (${lt}) does not support fp16.`)}else throw new Error(`Invalid dtype: ${ur}. Should be one of: ${Object.keys(a.DATA_TYPES).join(", ")}`);const Yr=Ze.kv_cache_dtype,ln=Yr?typeof Yr=="string"?Yr:Yr[ur]??"float32":void 0;if(ln&&!["float32","float16"].includes(ln))throw new Error(`Invalid kv_cache_dtype: ${ln}. Should be one of: float32, float16`);const dn={dtype:ur,kv_cache_dtype:ln,device:lt},Vn=a.DEFAULT_DTYPE_SUFFIX_MAPPING[ur],Xr=`${te}${Vn}.onnx`,Cn=`${pe.subfolder??""}/${Xr}`,Wr={...pe.session_options};Wr.executionProviders??(Wr.executionProviders=bt);const Bn=Ze.free_dimension_overrides;Bn?Wr.freeDimensionOverrides??(Wr.freeDimensionOverrides=Bn):lt.startsWith("webnn")&&!Wr.freeDimensionOverrides&&console.warn(`WebNN does not currently support dynamic shapes and requires 'free_dimension_overrides' to be set in config.json, preferably as a field within config["transformers.js_config"]["device_config"]["${lt}"]. When 'free_dimension_overrides' is not set, you may experience significant performance degradation.`);const $i=y.apis.IS_NODE_ENV&&y.env.useFSCache,Pa=(0,l.getModelFile)(Y,Cn,!0,pe,$i),gs=pe.use_external_data_format??Ze.use_external_data_format;let ts=[];if(gs){let In;typeof gs=="object"?gs.hasOwnProperty(Xr)?In=gs[Xr]:gs.hasOwnProperty(te)?In=gs[te]:In=!1:In=gs;const no=+In;if(no>l.MAX_EXTERNAL_DATA_CHUNKS)throw new Error(`The number of external data chunks (${no}) exceeds the maximum allowed value (${l.MAX_EXTERNAL_DATA_CHUNKS}).`);for(let xc=0;xc<no;++xc){const G0=`${Xr}_data${xc===0?"":"_"+xc}`,lu=`${pe.subfolder??""}/${G0}`;ts.push(new Promise(async(Td,XC)=>{const q0=await(0,l.getModelFile)(Y,lu,!0,pe,$i);Td(q0 instanceof Uint8Array?{path:G0,data:q0}:G0)}))}}else Wr.externalData!==void 0&&(ts=Wr.externalData.map(async In=>{if(typeof In.data=="string"){const no=await(0,l.getModelFile)(Y,In.data,!0,pe);return{...In,data:no}}return In}));if(ts.length>0){const In=await Promise.all(ts);y.apis.IS_NODE_ENV||(Wr.externalData=In)}if(lt==="webgpu"){const In=(0,n.getCacheShapes)(pe.config,{prefix:"present"});if(Object.keys(In).length>0&&!(0,i.isONNXProxy)()){const no={};for(const xc in In)no[xc]="gpu-buffer";Wr.preferredOutputLocation=no}}return{buffer_or_path:await Pa,session_options:Wr,session_config:dn}}async function A(Y,te,pe){return Object.fromEntries(await Promise.all(Object.keys(te).map(async Ze=>{const{buffer_or_path:ft,session_options:lt,session_config:bt}=await S(Y,te[Ze],pe),Rt=await(0,i.createInferenceSession)(ft,lt,bt);return[Ze,Rt]})))}async function C(Y,te,pe){return Object.fromEntries(await Promise.all(Object.keys(te).map(async Ze=>
3687{const ft=await(0,l.getModelJSON)(Y,te[Ze],!1,pe);return[Ze,ft]})))}function k(Y,te){const pe=Object.create(null),Ze=[];for(const bt of Y.inputNames){const Rt=te[bt];if(!(Rt instanceof f.Tensor)){Ze.push(bt);continue}pe[bt]=(0,i.isONNXProxy)()?Rt.clone():Rt}if(Ze.length>0)throw new Error(`An error occurred during model execution: "Missing the following inputs: ${Ze.join(", ")}.`);const ft=Object.keys(te).length,lt=Y.inputNames.length;if(ft>lt){let bt=Object.keys(te).filter(Rt=>!Y.inputNames.includes(Rt));console.warn(`WARNING: Too many inputs were provided (${ft} > ${lt}). The following inputs will be ignored: "${bt.join(", ")}".`)}return pe}async function M(Y,te){const pe=k(Y,te);try{const Ze=Object.fromEntries(Object.entries(pe).map(([lt,bt])=>[lt,bt.ort_tensor])),ft=await(0,i.runInferenceSession)(Y,Ze);return D(ft)}catch(Ze){const ft=Object.fromEntries(Object.entries(pe).map(([lt,bt])=>{const Rt={type:bt.type,dims:bt.dims,location:bt.location};return Rt.location!=="gpu-buffer"&&(Rt.data=bt.data),[lt,Rt]}));throw console.error(`An error occurred during model execution: "${Ze}".`),console.error("Inputs given to model:",ft),Ze}}function D(Y){for(let te in Y)(0,i.isONNXTensor)(Y[te])?Y[te]=new f.Tensor(Y[te]):typeof Y[te]=="object"&&D(Y[te]);return Y}function $(Y){if(Y instanceof f.Tensor)return Y;if(Y.length===0)throw Error("items must be non-empty");if(Array.isArray(Y[0])){if(Y.some(te=>te.length!==Y[0].length))throw Error("Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' and/or 'truncation=True' to have batched tensors with the same length.");return new f.Tensor("int64",BigInt64Array.from(Y.flat().map(te=>BigInt(te))),[Y.length,Y[0].length])}else return new f.Tensor("int64",BigInt64Array.from(Y.map(te=>BigInt(te))),[1,Y.length])}function V(Y){return new f.Tensor("bool",[Y],[1])}async function U(Y,te){let{encoder_outputs:pe,input_ids:Ze,decoder_input_ids:ft,...lt}=te;if(!pe){const Rt=(0,o.pick)(te,Y.sessions.model.inputNames);pe=(await B(Y,Rt)).last_hidden_state}return lt.input_ids=ft,lt.encoder_hidden_states=pe,Y.sessions.decoder_model_merged.inputNames.includes("encoder_attention_mask")&&(lt.encoder_attention_mask=te.attention_mask),await q(Y,lt,!0)}async function B(Y,te){const pe=Y.sessions.model,Ze=(0,o.pick)(te,pe.inputNames);if(pe.inputNames.includes("inputs_embeds")&&!Ze.inputs_embeds){if(!te.input_ids)throw new Error("Both `input_ids` and `inputs_embeds` are missing in the model inputs.");Ze.inputs_embeds=await Y.encode_text({input_ids:te.input_ids})}if(pe.inputNames.includes("token_type_ids")&&!Ze.token_type_ids){if(!Ze.input_ids)throw new Error("Both `input_ids` and `token_type_ids` are missing in the model inputs.");Ze.token_type_ids=(0,f.zeros_like)(Ze.input_ids)}if(pe.inputNames.includes("pixel_mask")&&!Ze.pixel_mask){if(!Ze.pixel_values)throw new Error("Both `pixel_values` and `pixel_mask` are missing in the model inputs.");const ft=Ze.pixel_values.dims;Ze.pixel_mask=(0,f.ones)([ft[0],ft[2],ft[3]])}return await M(pe,Ze)}async function z(Y,te){const pe=await Y.encode(te);return await Y.decode(pe)}async function q(Y,te,pe=!1){const Ze=Y.sessions[pe?"decoder_model_merged":"model"],{past_key_values:ft,...lt}=te;if(Ze.inputNames.includes("use_cache_branch")&&(lt.use_cache_branch=V(!!ft)),Ze.inputNames.includes("position_ids")&<.attention_mask&&!lt.position_ids){const Rt=["paligemma","gemma3_text","gemma3"].includes(Y.config.model_type)?1:0;lt.position_ids=le(lt,ft,Rt)}Y.addPastKeyValues(lt,ft);const bt=(0,o.pick)(lt,Ze.inputNames);return await M(Ze,bt)}function L({modality_token_id:Y,inputs_embeds:te,modality_features:pe,input_ids:Ze,attention_mask:ft}){const lt=Ze.tolist().map(ur=>ur.reduce((Yr,ln,dn)=>(ln==Y&&Yr.push(dn),Yr),[])),bt=lt.reduce((ur,Yr)=>ur+Yr.length,0),Rt=pe.dims[0];if(bt!==Rt)throw new Error(`Number of tokens and features do not match: tokens: ${bt}, features ${Rt}`);let Yt=0;for(let ur=0;ur<lt.length;++ur){const Yr=lt[ur],ln=te[ur];for(let dn=0;dn<Yr.length;++dn)ln[Yr[dn]].data.set(pe[Yt++].data)}return{inputs_embeds:te,attention_mask:ft}}function K({image_token_id:Y,inputs_embeds:te,image_features:pe,input_ids:Ze,attention_mask:ft}){return L({modality_token_id:Y,inputs_embeds:te,modality_features:pe,input_ids:Ze,attention_mask:ft})}function O({audio_token_id:Y,inputs_embeds:te,audio_features:pe,input_ids:Ze,attention_mask:ft}){return L({modality_token_id:Y,inputs_embeds:te,modality_features:pe,input_ids:Ze,attention_mask:ft})}async function N(Y,{encode_function:te,merge_function:pe,modality_input_name:Ze,modality_output_name:ft,input_ids:lt=null,attention_mask:bt=null,position_ids:Rt=null,inputs_embeds:Yt=null,past_key_values:ur=null,generation_config:Yr=null,logits_processor:ln=null,...dn}){const Vn=dn[Ze];if(!Yt){if(Yt=await Y.encode_text({input_ids:lt,...dn}),Vn&<.dims[1]!==1){const Cn=await te({[Ze]:Vn,...dn});({inputs_embeds:Yt,attention_mask:bt}=pe({[ft]:Cn,inputs_embeds:Yt,input_ids:lt,attention_mask:bt}))}else if(ur&&Vn&<.dims[1]===1){const Cn=lt.dims[1],Wr=Object.values(ur)[0].dims.at(-2);bt=(0,f.cat)([(0,f.ones)([lt.dims[0],Wr]),bt.slice(null,[bt.dims[1]-Cn,bt.dims[1]])],1)}}if(!Rt&&Y.config.model_type==="qwen2_vl"){const{image_grid_thw:Cn,video_grid_thw:Wr}=dn;[Rt]=Y.get_rope_index(lt,Cn,Wr,bt)}return await q(Y,{inputs_embeds:Yt,past_key_values:ur,attention_mask:bt,position_ids:Rt,generation_config:Yr,logits_processor:ln},!0)}async function X(Y,te){return await N(Y,{...te,modality_input_name:"audio_values",modality_output_name:"audio_features",encode_function:Y.encode_audio.bind(Y),merge_function:Y._merge_input_ids_with_audio_features.bind(Y)})}async function ie(Y,te){return await N(Y,{...te,modality_input_name:"pixel_values",modality_output_name:"image_features",encode_function:Y.encode_image.bind(Y),merge_function:Y._merge_input_ids_with_image_features.bind(Y)})}function ee(Y,te=0){const[pe,Ze]=Y.dims,ft=Y.data,lt=new BigInt64Array(ft.length);for(let bt=0;bt<pe;++bt){const Rt=bt*Ze;let Yt=BigInt(te);for(let ur=0;ur<Ze;++ur){const Yr=Rt+ur;ft[Yr]===0n?lt[Yr]=BigInt(1):(lt[Yr]=Yt,Yt+=ft[Yr])}}return{data:lt,dims:Y.dims}}function le(Y,te=null,pe=0){const{input_ids:Ze,inputs_embeds:ft,attention_mask:lt}=Y,{data:bt,dims:Rt}=ee(lt,pe);let Yt=new f.Tensor("int64",bt,Rt);if(te){const ur=-(Ze??ft).dims.at(1);Yt=Yt.slice(null,[ur,null])}return Yt}
3687function Te(Y,te,pe,Ze){const ft=pe.past_key_values?Object.values(pe.past_key_values)[0].dims.at(-2):0;if(!pe.attention_mask){let lt;for(const bt of["input_ids","inputs_embeds","position_ids"])if(pe[bt]){lt=pe[bt].dims;break}if(!lt)throw new Error("attention_mask is not provided, and unable to infer its shape from model inputs.");pe.attention_mask=(0,f.ones)([lt[0],ft+lt[1]])}if(pe.past_key_values){const{input_ids:lt,attention_mask:bt}=pe;bt&&bt.dims[1]>lt.dims[1]||ft<lt.dims[1]&&(pe.input_ids=lt.slice(null,[ft,null]))}return pe}function be(Y,te,pe,Ze){return pe.past_key_values&&(te=te.map(ft=>[ft.at(-1)])),{...pe,decoder_input_ids:$(te)}}function we(Y,...te){return Y.config.is_encoder_decoder?be(Y,...te):Te(Y,...te)}function ae(Y,te,pe,Ze){const ft=!!pe.past_key_values;return Ze.guidance_scale!==null&&Ze.guidance_scale>1&&(ft?pe.input_ids=(0,f.cat)([pe.input_ids,pe.input_ids],0):(pe.input_ids=(0,f.cat)([pe.input_ids,(0,f.full_like)(pe.input_ids,BigInt(Ze.pad_token_id))],0),pe.attention_mask=(0,f.cat)([pe.attention_mask,(0,f.full_like)(pe.attention_mask,0n)],0))),(ft||!pe.pixel_values)&&(pe.pixel_values=(0,f.full)([0,0,3,384,384],1)),ft&&(pe.images_seq_mask=new f.Tensor("bool",new Array(1).fill(!0).fill(!1,0,1),[1,1]),pe.images_emb_mask=new f.Tensor("bool",new Array(0).fill(!1),[1,1,0])),pe}class H extends s.Callable{constructor(pe,Ze,ft){super();Le(this,"main_input_name","input_ids");Le(this,"forward_params",["input_ids","attention_mask"]);this.config=pe,this.sessions=Ze,this.configs=ft;const lt=T.get(this.constructor),bt=x.get(lt);switch(this.can_generate=!1,this._forward=null,this._prepare_inputs_for_generation=null,bt){case w.DecoderOnly:this.can_generate=!0,this._forward=q,this._prepare_inputs_for_generation=Te;break;case w.Seq2Seq:case w.Vision2Seq:case w.Musicgen:this.can_generate=!0,this._forward=U,this._prepare_inputs_for_generation=be;break;case w.EncoderDecoder:this._forward=U;break;case w.ImageTextToText:this.can_generate=!0,this._forward=ie,this._prepare_inputs_for_generation=we;break;case w.AudioTextToText:this.can_generate=!0,this._forward=X,this._prepare_inputs_for_generation=we;break;case w.Phi3V:case w.ImageAudioTextToText:this.can_generate=!0,this._prepare_inputs_for_generation=we;break;case w.MultiModality:this.can_generate=!0,this._prepare_inputs_for_generation=ae;break;case w.AutoEncoder:this._forward=z;break;default:this._forward=B;break}this.can_generate&&this.forward_params.push("past_key_values"),this.custom_config=this.config["transformers.js_config"]??{}}async dispose(){var Ze;const pe=[];for(const ft of Object.values(this.sessions))(Ze=ft==null?void 0:ft.handler)!=null&&Ze.dispose&&pe.push(ft.handler.dispose());return await Promise.all(pe)}static async from_pretrained(pe,{progress_callback:Ze=null,config:ft=null,cache_dir:lt=null,local_files_only:bt=!1,revision:Rt="main",model_file_name:Yt=null,subfolder:ur="onnx",device:Yr=null,dtype:ln=null,use_external_data_format:dn=null,session_options:Vn={}}={}){let Xr={progress_callback:Ze,config:ft,cache_dir:lt,local_files_only:bt,revision:Rt,model_file_name:Yt,subfolder:ur,device:Yr,dtype:ln,use_external_data_format:dn,session_options:Vn};const Cn=T.get(this),Wr=x.get(Cn);ft=Xr.config=await n.AutoConfig.from_pretrained(pe,Xr);let Bn;if(Wr===w.DecoderOnly)Bn=await Promise.all([A(pe,{model:Xr.model_file_name??"model"},Xr),C(pe,{generation_config:"generation_config.json"},Xr)]);else if(Wr===w.Seq2Seq||Wr===w.Vision2Seq)Bn=await Promise.all([A(pe,{model:"encoder_model",decoder_model_merged:"decoder_model_merged"},Xr),C(pe,{generation_config:"generation_config.json"},Xr)]);else if(Wr===w.MaskGeneration)Bn=await Promise.all([A(pe,{model:"vision_encoder",prompt_encoder_mask_decoder:"prompt_encoder_mask_decoder"},Xr)]);else if(Wr===w.EncoderDecoder)Bn=await Promise.all([A(pe,{model:"encoder_model",decoder_model_merged:"decoder_model_merged"},Xr)]);else if(Wr===w.ImageTextToText){const $i={embed_tokens:"embed_tokens",vision_encoder:"vision_encoder",decoder_model_merged:"decoder_model_merged"};ft.is_encoder_decoder&&($i.model="encoder_model"),Bn=await Promise.all([A(pe,$i,Xr),C(pe,{generation_config:"generation_config.json"},Xr)])}else if(Wr===w.AudioTextToText){const $i={embed_tokens:"embed_tokens",audio_encoder:"audio_encoder",decoder_model_merged:"decoder_model_merged"};Bn=await Promise.all([A(pe,$i,Xr),C(pe,{generation_config:"generation_config.json"},Xr)])}else if(Wr===w.ImageAudioTextToText){const $i={embed_tokens:"embed_tokens",audio_encoder:"audio_encoder",vision_encoder:"vision_encoder",decoder_model_merged:"decoder_model_merged"};Bn=await Promise.all([A(pe,$i,Xr),C(pe,{generation_config:"generation_config.json"},Xr)])}else if(Wr===w.Musicgen)Bn=await Promise.all([A(pe,{model:"text_encoder",decoder_model_merged:"decoder_model_merged",encodec_decode:"encodec_decode"},Xr),C(pe,{generation_config:"generation_config.json"},Xr)]);else if(Wr===w.MultiModality)Bn=await Promise.all([A(pe,{prepare_inputs_embeds:"prepare_inputs_embeds",model:"language_model",lm_head:"lm_head",gen_head:"gen_head",gen_img_embeds:"gen_img_embeds",image_decode:"image_decode"},Xr),C(pe,{generation_config:"generation_config.json"},Xr)]);else if(Wr===w.Phi3V)Bn=await Promise.all([A(pe,{prepare_inputs_embeds:"prepare_inputs_embeds",model:"model",vision_encoder:"vision_encoder"},Xr),C(pe,{generation_config:"generation_config.json"},Xr)]);else if(Wr===w.AutoEncoder)Bn=await Promise.all([A(pe,{encoder_model:"encoder_model",decoder_model:"decoder_model"},Xr)]);else{if(Wr!==w.EncoderOnly){const $i=Cn??(ft==null?void 0:ft.model_type);$i!=="custom"&&console.warn(`Model type for '${$i}' not found, assuming encoder-only architecture. Please report this at ${u.GITHUB_ISSUE_URL}.`)}Bn=await Promise.all([A(pe,{model:Xr.model_file_name??"model"},Xr)])}return new this(ft,...Bn)}async _call(pe){return await this.forward(pe)}async forward(pe){return await this._forward(this,pe)}get generation_config(){var pe;return((pe=this.configs)==null?void 0:pe.generation_config)??null}_get_logits_processor(pe,Ze,ft=null){const lt=new c.LogitsProcessorList;if(pe.repetition_penalty!==null&&pe.repetition_penalty!==1&<.push(new c.RepetitionPenaltyLogitsProcessor(pe.repetition_penalty)),pe.no_repeat_ngram_size!==null&&pe.no_repeat_ngram_size>0&<.push(new c.NoRepeatNGramLogitsProcessor(pe.no_repeat_ngram_size)),pe.bad_words_ids!==null&<.push(new c.NoBadWordsLogitsProcessor(pe.bad_words_ids,pe.eos_token_id)),pe.min_length!==null&&pe.eos_token_id!==null&&pe.min_length>0&<.push(new c.MinLengthLogitsProcessor(pe.min_length,pe.eos_token_id)),pe.min_new_tokens!==null&&pe.eos_token_id!==null&&pe.min_new_tokens>0&<.push(new c.MinNewTokensLengthLogitsProcessor(Ze,pe.min_new_tokens,pe.eos_token_id)),pe.forced_bos_token_id!==null&<.push(new c.ForcedBOSTokenLogitsProcessor(pe.forced_bos_token_id)),pe.forced_eos_token_id!==null&<.push(new c.ForcedEOSTokenLogitsProcessor(pe.max_length,pe.forced_eos_token_id)),pe.begin_suppress_tokens!==null){const bt=Ze>1||pe.forced_bos_token_id===null?Ze:Ze+1;
3687lt.push(new c.SuppressTokensAtBeginLogitsProcessor(pe.begin_suppress_tokens,bt))}return pe.guidance_scale!==null&&pe.guidance_scale>1&<.push(new c.ClassifierFreeGuidanceLogitsProcessor(pe.guidance_scale)),pe.temperature===0&&pe.do_sample&&(console.warn("`do_sample` changed to false because `temperature: 0` implies greedy sampling (always selecting the most likely token), which is incompatible with `do_sample: true`."),pe.do_sample=!1),pe.do_sample&&pe.temperature!==null&&pe.temperature!==1&<.push(new c.TemperatureLogitsWarper(pe.temperature)),ft!==null&<.extend(ft),lt}_prepare_generation_config(pe,Ze,ft=d.GenerationConfig){const lt={...this.config};for(const Rt of["decoder","generator","text_config"])Rt in lt&&Object.assign(lt,lt[Rt]);const bt=new ft(lt);return Object.assign(bt,this.generation_config??{}),pe&&Object.assign(bt,pe),Ze&&Object.assign(bt,(0,o.pick)(Ze,Object.getOwnPropertyNames(bt))),bt}_get_stopping_criteria(pe,Ze=null){const ft=new m.StoppingCriteriaList;return pe.max_length!==null&&ft.push(new m.MaxLengthCriteria(pe.max_length,this.config.max_position_embeddings??null)),pe.eos_token_id!==null&&ft.push(new m.EosTokenCriteria(pe.eos_token_id)),Ze&&ft.extend(Ze),ft}_validate_model_class(){if(!this.can_generate){const pe=[o4,l4,s4,a4],Ze=T.get(this.constructor),ft=new Set,lt=this.config.model_type;for(const Rt of pe){const Yt=Rt.get(lt);Yt&&ft.add(Yt[0])}let bt=`The current model class (${Ze}) is not compatible with \`.generate()\`, as it doesn't have a language model head.`;throw ft.size>0&&(bt+=` Please use the following class instead: ${[...ft].join(", ")}`),Error(bt)}}prepare_inputs_for_generation(...pe){return this._prepare_inputs_for_generation(this,...pe)}_update_model_kwargs_for_generation({generated_input_ids:pe,outputs:Ze,model_inputs:ft,is_encoder_decoder:lt}){return ft.past_key_values=this.getPastKeyValues(Ze,ft.past_key_values),ft.input_ids=new f.Tensor("int64",pe.flat(),[pe.length,1]),lt||(ft.attention_mask=(0,f.cat)([ft.attention_mask,(0,f.ones)([ft.attention_mask.dims[
36870],1])],1)),ft.position_ids=null,ft}_prepare_model_inputs({inputs:pe,bos_token_id:Ze,model_kwargs:ft}){const lt=(0,o.pick)(ft,this.forward_params),bt=this.main_input_name;if(bt in lt){if(pe)throw new Error("`inputs`: {inputs}` were passed alongside {input_name} which is not allowed. Make sure to either pass {inputs} or {input_name}=...")}else lt[bt]=pe;return{inputs_tensor:lt[bt],model_inputs:lt,model_input_name:bt}}async _prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:pe,model_inputs:Ze,model_input_name:ft,generation_config:lt}){if(this.sessions.model.inputNames.includes("inputs_embeds")&&!Ze.inputs_embeds&&"_prepare_inputs_embeds"in this){const{input_ids:Rt,pixel_values:Yt,attention_mask:ur,...Yr}=Ze,ln=await this._prepare_inputs_embeds(Ze);Ze={...Yr,...(0,o.pick)(ln,["inputs_embeds","attention_mask"])}}let{last_hidden_state:bt}=await B(this,Ze);if(lt.guidance_scale!==null&<.guidance_scale>1)bt=(0,f.cat)([bt,(0,f.full_like)(bt,0)],0),"attention_mask"in Ze&&(Ze.attention_mask=(0,f.cat)([Ze.attention_mask,(0,f.zeros_like)(Ze.attention_mask)],0));else if(Ze.decoder_input_ids){const Rt=$(Ze.decoder_input_ids).dims[0];if(Rt!==bt.dims[0]){if(bt.dims[0]!==1)throw new Error(`The encoder outputs have a different batch size (${bt.dims[0]}) than the decoder inputs (${Rt}).`);bt=(0,f.cat)(Array.from({length:Rt},()=>bt),0)}}return Ze.encoder_outputs=bt,Ze}_prepare_decoder_input_ids_for_generation({batch_size:pe,model_input_name:Ze,model_kwargs:ft,decoder_start_token_id:lt,bos_token_id:bt,generation_config:Rt}){let{decoder_input_ids:Yt,...ur}=ft;if(!(Yt instanceof f.Tensor)){if(Yt)Array.isArray(Yt[0])||(Yt=Array.from({length:pe},()=>Yt));else if(lt??(lt=bt),this.config.model_type==="musicgen")Yt=Array.from({length:pe*this.config.decoder.num_codebooks},()=>[lt]);else if(Array.isArray(lt)){if(lt.length!==pe)throw new Error(`\`decoder_start_token_id\` expcted to have length ${pe} but got ${lt.length}`);Yt=lt}else Yt=Array.from({length:pe},()=>[lt]);Yt=$(Yt)}return ft.decoder_attention_mask=(0,f.ones_like)(Yt),{input_ids:Yt,model_inputs:ur}}async generate({inputs:pe=null,generation_config:Ze=null,logits_processor:ft=null,stopping_criteria:lt=null,streamer:bt=null,...Rt}){this._validate_model_class(),Ze=this._prepare_generation_config(Ze,Rt);let{inputs_tensor:Yt,model_inputs:ur,model_input_name:Yr}=this._prepare_model_inputs({inputs:pe,model_kwargs:Rt});const ln=this.config.is_encoder_decoder;ln&&("encoder_outputs"in ur||(ur=await this._prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:Yt,model_inputs:ur,model_input_name:Yr,generation_config:Ze})));let dn;ln?{input_ids:dn,model_inputs:ur}=this._prepare_decoder_input_ids_for_generation({batch_size:ur[Yr].dims.at(0),model_input_name:Yr,model_kwargs:ur,decoder_start_token_id:Ze.decoder_start_token_id,bos_token_id:Ze.bos_token_id,generation_config:Ze}):dn=ur[Yr];let Vn=dn.dims.at(-1);Ze.max_new_tokens!==null&&(Ze.max_length=Vn+Ze.max_new_tokens);const Xr=this._get_logits_processor(Ze,Vn,ft),Cn=this._get_stopping_criteria(Ze,lt),Wr=ur[Yr].dims.at(0),Bn=_.LogitsSampler.getSampler(Ze),$i=new Array(Wr).fill(0),Pa=dn.tolist();bt&&bt.put(Pa);let gs,ts={};for(;;){if(ur=this.prepare_inputs_for_generation(Pa,ur,Ze),gs=await this.forward(ur),Ze.output_attentions&&Ze.return_dict_in_generate){const lu=this.getAttentions(gs);for(const Td in lu)Td in ts||(ts[Td]=[]),ts[Td].push(lu[Td])}const In=gs.logits.slice(null,-1,null),no=Xr(Pa,In),xc=[];for(let lu=0;lu<no.dims.at(0);++lu){const Td=no[lu],XC=await Bn(Td);for(const[q0,QC]of XC){const ZC=BigInt(q0);$i[lu]+=QC,Pa[lu].push(ZC),xc.push([ZC]);break}}if(bt&&bt.put(xc),Cn(Pa).every(lu=>lu))break;ur=this._update_model_kwargs_for_generation({generated_input_ids:xc,outputs:gs,model_inputs:ur,is_encoder_decoder:ln})}bt&&bt.end();const Bs=this.getPastKeyValues(gs,ur.past_key_values,!0),Co=new f.Tensor("int64",Pa.flat(),[Pa.length,Pa[0].length]);if(Ze.return_dict_in_generate)return{sequences:Co,past_key_values:Bs,...ts};
3687for(const In of Object.values(gs))In.location==="gpu-buffer"&&In.dispose();return Co}getPastKeyValues(pe,Ze,ft=!1){const lt=Object.create(null);for(const bt in pe)if(bt.startsWith("present")){const Rt=bt.replace("present_conv","past_conv").replace("present","past_key_values"),Yt=bt.includes("encoder");if(Yt&&Ze?lt[Rt]=Ze[Rt]:lt[Rt]=pe[bt],Ze&&(!Yt||ft)){const ur=Ze[Rt];ur.location==="gpu-buffer"&&ur.dispose()}}return lt}getAttentions(pe){const Ze={};for(const ft of["cross_attentions","encoder_attentions","decoder_attentions"])for(const lt in pe)lt.startsWith(ft)&&(ft in Ze||(Ze[ft]=[]),Ze[ft].push(pe[lt]));return Ze}addPastKeyValues(pe,Ze){var ft,lt,bt;if(Ze)Object.assign(pe,Ze);else{const Rt=this.sessions.decoder_model_merged??this.sessions.model,Yt=((lt=(ft=pe[this.main_input_name]??pe.attention_mask)==null?void 0:ft.dims)==null?void 0:lt[0])??1,ur=((bt=Rt==null?void 0:Rt.config)==null?void 0:bt.kv_cache_dtype)??"float32",Yr=ur==="float16"?f.DataTypeMap.float16:f.DataTypeMap.float32,ln=(0,n.getCacheShapes)(this.config,{batch_size:Yt});for(const dn in ln){const Vn=ln[dn].reduce((Xr,Cn)=>Xr*Cn,1);pe[dn]=new f.Tensor(ur,new Yr(Vn),ln[dn])}}}async encode_image({pixel_values:pe}){return(await M(this.sessions.vision_encoder,{pixel_values:pe})).image_features}async encode_text({input_ids:pe}){return(await M(this.sessions.embed_tokens,{input_ids:pe})).inputs_embeds}async encode_audio({audio_values:pe}){return(await M(this.sessions.audio_encoder,{audio_values:pe})).audio_features}}class fe{}class Se extends fe{constructor({last_hidden_state:te,hidden_states:pe=null,attentions:Ze=null}){super(),this.last_hidden_state=te,this.hidden_states=pe,this.attentions=Ze}}class ne extends H{}class $e extends ne{}class me extends ne{async _call(te){return new Ao(await super._call(te))}}class Ue extends ne{async _call(te){return new mn(await super._call(te))}}class ke extends ne{async _call(te){return new ro(await super._call(te))}}class ce extends ne{async _call(te){return new hl(await super._call(te))}}class ve extends H{}class Re extends ve{}class De extends ve{async _call(te){return new Ao(await super._call(te))}}class tt extends ve{async _call(te){return new mn(await super._call(te))}}class Ge extends ve{async _call(te){return new ro(await super._call(te))}}class Ie extends ve{async _call(te){return new hl(await super._call(te))}}class He extends H{}class Ke extends He{}class Xe extends He{async _call(te){return new Ao(await super._call(te))}}class mt extends He{async _call(te){return new mn(await super._call(te))}}class gt extends He{async _call(te){return new ro(await super._call(te))}}class $t extends H{}class kt extends $t{}class Zt extends $t{}class fr extends H{}class yr extends fr{}class Kt extends H{}class pr extends Kt{}class Ot extends Kt{async _call(te){return new Ao(await super._call(te))}}class Ir extends Kt{async _call(te){return new mn(await super._call(te))}}class cn extends Kt{async _call(te){return new ro(await super._call(te))}}class kr extends Kt{async _call(te){return new hl(await super._call(te))}}class rr extends H{}class Ut extends rr{}class wr extends rr{async _call(te){return new Ao(await super._call(te))}}class Ar extends rr{async _call(te){return new mn(await super._call(te))}}class Jt extends rr{async _call(te){return new ro(await super._call(te))}}class Ht extends rr{async _call(te){return new hl(await super._call(te))}}class Z extends H{}class Pe extends Z{}class ue extends Z{async _call(te){return new Ao(await super._call(te))}}class Ee extends Z{async _call(te){return new mn(await super._call(te))}}class Oe extends Z{async _call(te){return new ro(await super._call(te))}}class Ye extends Z{async _call(te){return new hl(await super._call(te))}}class ct extends H{}class Ct extends ct{}class sr extends ct{async _call(te){return new Ao(await super._call(te))}}class ir extends ct{async _call(te){return new mn(await super._call(te))}}class or extends ct{async _call(te){return new ro(await super._call(te))}}class It extends ct{async _call(te){return new hl(await super._call(te))}}class cr extends H{}class Qr extends cr{}class Zr extends cr{async _call(te){return new Ao(await super._call(te))}}class Jn extends cr{async _call(te){return new mn(await super._call(te))}}class yn extends cr{async _call(te){return new ro(await super._call(te))}}class En extends cr{async _call(te){return new hl(await super._call(te))}}class pn extends H{}class si extends pn{}class fa extends pn{async _call(te){return new Ao(await super._call(te))}}class aa extends pn{async _call(te){return new mn(await super._call(te))}}class xi extends pn{async _call(te){return new ro(await super._call(te))}}class ci extends pn{async _call(te){return new hl(await super._call(te))}}class oi extends H{}class Ki extends oi{}class ls extends oi{async _call(te){return new mn(await super._call(te))}}class Yi extends oi{async _call(te){return new ro(await super._call(te))}}class sa extends oi{async _call(te){return new hl(await super._call(te))}}class Ei extends oi{async _call(te){return new Ao(await super._call(te))}}class gi extends H{}class Ta extends gi{}class Qs extends gi{async _call(te){return new Ao(await super._call(te))}}class us extends gi{async _call(te){return new mn(await super._call(te))}}class jt extends gi{async _call(te){return new ro(await super._call(te))}}class Pt extends H{}class hr extends Pt{}class $n extends Pt{async _call(te){return new Ao(await super._call(te))}}class xl extends Pt{async _call(te){return new mn(await super._call(te))}}class El extends Pt{async _call(te){return new hl(await super._call(te))}}class Sa extends H{}class ha extends Sa{}class sl extends Sa{async _call(te){return new Ao(await super._call(te))}}class ud extends Sa{async _call(te){return new mn(await super._call(te))}}class sf extends Sa{async _call(te){return new ro(await super._call(te))}}class st extends Sa{async _call(te){return new hl(await super._call(te))}}class se extends H{}class Ce extends se{}class Ve extends se{async _call(te){return new Ao(await super._call(te))}}class Je extends se{async _call(te){return new mn(await super._call(te))}}class it extends se{async _call(te){return new hl(await super._call(te))}}class vt extends H{}class Bt extends vt{}class er extends vt{async _call(te){return new mn(await super._call(te))}}class Gt extends vt{async _call(te){return new hl(await super._call(te))}}class dr extends vt{async _call(te){return new Ao(await super._call(te))}}class Dr extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","encoder_outputs","decoder_input_ids","decoder_attention_mask","past_key_values"])}}class Un extends Dr{}class Tn extends Dr{}class Oi extends H{}class di extends Oi{}class Pr extends Oi{}class Ra extends H{}class pa extends Ra{}class $a extends Ra{}class Wi extends H{}class cs extends Wi{}class ji extends Wi{}class Fa extends Wi{async _call(te){return new mn(await super._call(te))}}class Aa extends H{}class Zs extends Aa{}class yo extends Aa{}class ds extends Aa{async _call(te){return new mn(await super._call(te))}}class Ps extends Aa{}class oa extends H{}class Xi extends oa{}class la extends oa{}class Ri extends H{}class Ba extends Ri{}class Jl extends Ri{}class ol extends H{}class ch extends ol{}class cd extends ol{async _call(te){return new Ao(await super._call(te))}}class of extends ol{async _call(te){return new mn(await super._call(te))}}class op extends ol{async _call(te){return new ro(await super._call(te))}}class lp extends ol{async _call(te){return new hl(await super._call(te))}}class Wo extends H{}class Nu extends Wo{}class up extends Wo{async _call(te){return new Ao(await super._call(te))}}class dd extends Wo{async _call(te){return new mn(await super._call(te))}}class cp extends Wo{async _call(te){return new ro(await super._call(te))}}class G extends Wo{async _call(te){return new hl(await super._call(te))}}class de extends H{}class Fe extends de{}class Qe extends de{async _call(te){return new Ao(await super._call(te))}}class ot extends de{async _call(te){return new mn(await super._call(te))}}class Tt extends de{async _call(te){return new ro(await super._call(te))}}class Nt extends de{async _call(te){return new hl(await super._call(te))}}class Er extends H{}
3687class $r extends Er{}class sn extends Er{}class hn extends H{constructor(){super(...arguments);Le(this,"requires_attention_mask",!1);Le(this,"main_input_name","input_features");Le(this,"forward_params",["input_features","attention_mask","decoder_input_ids","decoder_attention_mask","past_key_values"])}}class Wn extends hn{}class Ti extends hn{_prepare_generation_config(te,pe){return super._prepare_generation_config(te,pe,v.WhisperGenerationConfig)}_retrieve_init_tokens(te){const pe=[te.decoder_start_token_id];let Ze=te.language;const ft=te.task;if(te.is_multilingual){Ze||(console.warn("No language specified - defaulting to English (en)."),Ze="en");const bt=`<|${(0,b.whisper_language_to_code)(Ze)}|>`;pe.push(te.lang_to_id[bt]),pe.push(te.task_to_id[ft??"transcribe"])}else if(Ze||ft)throw new Error("Cannot specify `task` or `language` for an English-only model. If the model is intended to be multilingual, pass `is_multilingual=true` to generate, or update the generation config.");return!te.return_timestamps&&te.no_timestamps_token_id&&pe.at(-1)!==te.no_timestamps_token_id?pe.push(te.no_timestamps_token_id):te.return_timestamps&&pe.at(-1)===te.no_timestamps_token_id&&(console.warn("<|notimestamps|> prompt token is removed from generation_config since `return_timestamps` is set to `true`."),pe.pop()),pe.filter(lt=>lt!=null)}async generate({inputs:te=null,generation_config:pe=null,logits_processor:Ze=null,stopping_criteria:ft=null,...lt}){pe=this._prepare_generation_config(pe,lt);const bt=lt.decoder_input_ids??this._retrieve_init_tokens(pe);if(pe.return_timestamps&&(Ze??(Ze=new c.LogitsProcessorList),Ze.push(new c.WhisperTimeStampLogitsProcessor(pe,bt))),pe.begin_suppress_tokens&&(Ze??(Ze=new c.LogitsProcessorList),Ze.push(new c.SuppressTokensAtBeginLogitsProcessor(pe.begin_suppress_tokens,bt.length))),pe.return_token_timestamps){if(!pe.alignment_heads)throw new Error("Model generation config has no `alignment_heads`, token-level timestamps not available. See https://gist.github.com/hollance/42e32852f24243b748ae6bc1f985b13a on how to add this property to the generation config.");pe.task==="translate"&&console.warn("Token-level timestamps may not be reliable for task 'translate'."),pe.output_attentions=!0,pe.return_dict_in_generate=!0}const Rt=await super.generate({inputs:te,generation_config:pe,logits_processor:Ze,decoder_input_ids:bt,...lt});return pe.return_token_timestamps&&(Rt.token_timestamps=this._extract_token_timestamps(Rt,pe.alignment_heads,pe.num_frames)),Rt}_extract_token_timestamps(te,pe,Ze=null,ft=.02){if(!te.cross_attentions)throw new Error("Model outputs must contain cross attentions to extract timestamps. This is most likely because the model was not exported with `output_attentions=True`.");Ze==null&&console.warn("`num_frames` has not been set, meaning the entire audio will be analyzed. This may lead to inaccurate token-level timestamps for short audios (< 30 seconds).");let lt=this.config.median_filter_width;lt===void 0&&(console.warn("Model config has no `median_filter_width`, using default value of 7."),lt=7);const bt=te.cross_attentions,Rt=Array.from({length:this.config.decoder_layers},(Cn,Wr)=>(0,f.cat)(bt.map(Bn=>Bn[Wr]),2)),Yt=(0,f.stack)(pe.map(([Cn,Wr])=>{if(Cn>=Rt.length)throw new Error(`Layer index ${Cn} is out of bounds for cross attentions (length ${Rt.length}).`);return Ze?Rt[Cn].slice(null,Wr,null,[0,Ze]):Rt[Cn].slice(null,Wr)})).transpose(1,0,2,3),[ur,Yr]=(0,f.std_mean)(Yt,-2,0,!0),ln=Yt.clone();for(let Cn=0;Cn<ln.dims[0];++Cn){const Wr=ln[Cn];for(let Bn=0;Bn<Wr.dims[0];++Bn){const $i=Wr[Bn],Pa=ur[Cn][Bn][0].data,gs=Yr[Cn][Bn][0].data;for(let ts=0;ts<$i.dims[0];++ts){let Bs=$i[ts].data;for(let Co=0;Co<Bs.length;++Co)Bs[Co]=(Bs[Co]-gs[Co])/Pa[Co];Bs.set((0,p.medianFilter)(Bs,lt))}}}const dn=[(0,f.mean)(ln,1)],Vn=te.sequences.dims,Xr=new f.Tensor("float32",new Float32Array(Vn[0]*Vn[1]),Vn);for(let Cn=0;Cn<Vn[0];++Cn){const Wr=dn[Cn].neg().squeeze_(0),[Bn,$i]=(0,p.dynamic_time_warping)(Wr.tolist()),Pa=Array.from({length:Bn.length-1},(Bs,Co)=>Bn[Co+1]-Bn[Co]),gs=(0,o.mergeArrays)([1],Pa).map(Bs=>!!Bs),ts=[];for(let Bs=0;Bs<gs.length;++Bs)gs[Bs]&&ts.push($i[Bs]*ft);
3687Xr[Cn].data.set(ts,1)}return Xr}}class za extends Ti{}class Si extends H{constructor(){super(...arguments);Le(this,"requires_attention_mask",!1);Le(this,"main_input_name","input_values");Le(this,"forward_params",["input_values","decoder_input_ids","past_key_values"])}}class fs extends Si{}class Ua extends Si{}class hs extends H{constructor(){super(...arguments);Le(this,"main_input_name","pixel_values");Le(this,"forward_params",["pixel_values","decoder_input_ids","encoder_hidden_states","past_key_values"])}}class ll extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","pixel_values","position_ids","past_key_values"])}}class vo extends ll{_merge_input_ids_with_image_features(te){const pe=te.image_features.dims.at(-1),Ze=te.image_features.view(-1,pe);return K({image_token_id:this.config.image_token_index,...te,image_features:Ze})}}class Iu extends vo{}class dh extends vo{}class lf extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","inputs_embeds","attention_mask","pixel_values","encoder_outputs","decoder_input_ids","decoder_inputs_embeds","decoder_attention_mask","past_key_values"]);Le(this,"main_input_name","inputs_embeds")}}class pc extends lf{_merge_input_ids_with_image_features({inputs_embeds:te,image_features:pe,input_ids:Ze,attention_mask:ft}){return{inputs_embeds:(0,f.cat)([pe,te],1),attention_mask:(0,f.cat)([(0,f.ones)(pe.dims.slice(0,2)),ft],1)}}async _prepare_inputs_embeds({input_ids:te,pixel_values:pe,inputs_embeds:Ze,attention_mask:ft}){if(!te&&!pe)throw new Error("Either `input_ids` or `pixel_values` should be provided.");let lt,bt;return te&&(lt=await this.encode_text({input_ids:te})),pe&&(bt=await this.encode_image({pixel_values:pe})),lt&&bt?{inputs_embeds:Ze,attention_mask:ft}=this._merge_input_ids_with_image_features({inputs_embeds:lt,image_features:bt,input_ids:te,attention_mask:ft}):Ze=lt||bt,{inputs_embeds:Ze,attention_mask:ft}}async forward({input_ids:te,pixel_values:pe,attention_mask:Ze,decoder_input_ids:ft,decoder_attention_mask:lt,encoder_outputs:bt,past_key_values:Rt,inputs_embeds:Yt,decoder_inputs_embeds:ur}){if(Yt||({inputs_embeds:Yt,attention_mask:Ze}=await this._prepare_inputs_embeds({input_ids:te,pixel_values:pe,inputs_embeds:Yt,attention_mask:Ze})),!bt){let{last_hidden_state:dn}=await B(this,{inputs_embeds:Yt,attention_mask:Ze});bt=dn}if(!ur){if(!ft)throw new Error("Either `decoder_input_ids` or `decoder_inputs_embeds` should be provided.");ur=await this.encode_text({input_ids:ft})}return await q(this,{inputs_embeds:ur,attention_mask:lt,encoder_attention_mask:Ze,encoder_hidden_states:bt,past_key_values:Rt},!0)}}class fd extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","pixel_values","position_ids","past_key_values"])}}class hd extends fd{_merge_input_ids_with_image_features(te){const pe=te.image_features.dims.at(-1),Ze=te.image_features.view(-1,pe);return K({image_token_id:this.config.image_token_index,...te,image_features:Ze})}}class mc extends ll{_merge_input_ids_with_image_features(te){const pe=te.image_features.dims.at(-1),Ze=te.image_features.view(-1,pe);return K({image_token_id:this.config.image_token_index,...te,image_features:Ze})}}class Ms extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","inputs_embeds","per_layer_inputs","position_ids","pixel_values","input_features","input_features_mask","past_key_values"])}}class gc extends Ms{async forward({input_ids:te=null,attention_mask:pe=null,pixel_values:Ze=null,input_features:ft=null,input_features_mask:lt=null,position_ids:bt=null,inputs_embeds:Rt=null,per_layer_inputs:Yt=null,past_key_values:ur=null,generation_config:Yr=null,logits_processor:ln=null,...dn}){if((!Rt||!Yt)&&({inputs_embeds:Rt,per_layer_inputs:Yt}=await M(this.sessions.embed_tokens,{input_ids:te}),te.dims[1]!==1)){if(Ze){const{image_features:Xr}=await M(this.sessions.vision_encoder,{pixel_values:Ze});({inputs_embeds:Rt,attention_mask:pe}=this._merge_input_ids_with_image_features({image_features:Xr,inputs_embeds:Rt,input_ids:te,attention_mask:pe}))}if(ft){const{audio_features:Xr}=await M(this.sessions.audio_encoder,{input_features:ft,input_features_mask:lt});({inputs_embeds:Rt,attention_mask:pe}=this._merge_input_ids_with_audio_features({audio_features:Xr,inputs_embeds:Rt,input_ids:te,attention_mask:pe}))}}return await q(this,{inputs_embeds:Rt,per_layer_inputs:Yt,past_key_values:ur,attention_mask:pe,position_ids:bt,generation_config:Yr,logits_processor:ln},!0)}_merge_input_ids_with_image_features(te){const pe=te.image_features.dims.at(-1),Ze=te.image_features.view(-1,pe);return K({image_token_id:this.config.image_token_id,...te,image_features:Ze})}_merge_input_ids_with_audio_features(te){const pe=te.audio_features.dims.at(-1),Ze=te.audio_features.view(-1,pe);return O({audio_token_id:this.config.audio_token_id,...te,audio_features:Ze})}}class eu extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","pixel_values","pixel_attention_mask","position_ids","past_key_values"])}}class Tl extends eu{async encode_image({pixel_values:te,pixel_attention_mask:pe}){return(await M(this.sessions.vision_encoder,{pixel_values:te,pixel_attention_mask:pe})).image_features}_merge_input_ids_with_image_features(te){const pe=te.image_features.dims.at(-1),Ze=te.image_features.view(-1,pe);return K({image_token_id:this.config.image_token_id,...te,image_features:Ze})}}class pd extends Tl{}class Js extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","inputs_embeds","attention_mask","position_ids","pixel_values","image_sizes","past_key_values"])}}class tu extends Js{async forward({input_ids:te=null,attention_mask:pe=null,pixel_values:Ze=null,image_sizes:ft=null,position_ids:lt=null,inputs_embeds:bt=null,past_key_values:Rt=null,generation_config:Yt=null,logits_processor:ur=null,...Yr}){if(!bt){let dn;if(Ze&&te.dims[1]!==1){if(!ft)throw new Error("`image_sizes` must be provided when `pixel_values` is provided.");({image_features:dn}=await M(this.sessions.vision_encoder,{pixel_values:Ze,image_sizes:ft}))}else{const Vn=this.config.normalized_config.hidden_size;dn=new f.Tensor("float32",[],[0,Vn])}({inputs_embeds:bt}=await M(this.sessions.prepare_inputs_embeds,{input_ids:te,image_features:dn}))}return await q(this,{inputs_embeds:bt,past_key_values:Rt,attention_mask:pe,position_ids:lt,generation_config:Yt,logits_processor:ur},!1)}}class Vo extends H{}class uf extends Vo{}class ul extends Vo{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"text_model"})}}class yc extends Vo{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"text_model"})}}class fh extends Vo{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"vision_model"})}}class cf extends Vo{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"vision_model"})}}class ru extends H{}class vc extends ru{}class Ho extends ru{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"text_model"})}}class _o extends Vo{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"vision_model"})}}class Du extends H{}class cl extends Du{}class xr extends H{}
3687class hh extends xr{async forward(te){const pe=!te.input_ids,Ze=!te.pixel_values;if(pe&&Ze)throw new Error("Either `input_ids` or `pixel_values` should be provided.");if(pe&&(te.input_ids=(0,f.ones)([te.pixel_values.dims[0],1])),Ze){const{image_size:ur}=this.config.vision_config;te.pixel_values=(0,f.full)([0,3,ur,ur],0)}const{text_embeddings:ft,image_embeddings:lt,l2norm_text_embeddings:bt,l2norm_image_embeddings:Rt}=await super.forward(te),Yt={};return pe||(Yt.text_embeddings=ft,Yt.l2norm_text_embeddings=bt),Ze||(Yt.image_embeddings=lt,Yt.l2norm_image_embeddings=Rt),Yt}}class md extends xr{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"text_model"})}}class ma extends xr{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"vision_model"})}}class _c extends H{}class Za extends _c{}class Go extends _c{}class bc extends H{}class df extends bc{}class ff extends bc{}class gd extends H{}class nu extends gd{}class Lu extends gd{}class iu extends H{}class wc extends iu{}class Sl extends iu{}class au extends H{}class bo extends au{}class Al extends au{}class ei extends H{}class Ai extends ei{}class ga extends ei{}class Ca extends H{}class su extends Ca{}class j extends Ca{}class J extends H{}class oe extends J{}class ge extends J{}class Me extends H{}class nt extends Me{}class _t extends Me{}class Lt extends H{}class nr extends Lt{}class vr extends H{}class on extends vr{}class Fn extends vr{}class li extends H{}class ps extends li{}class yd extends li{}class _m extends H{}class Ox extends _m{}class Nx extends _m{}class A0 extends H{}class C0 extends A0{}class Cl extends A0{}class Pl extends H{}class P0 extends Pl{}class M0 extends Pl{}class v_ extends H{}class k0 extends v_{}class O0 extends v_{}class N0 extends H{}class Ix extends N0{}class __ extends N0{}class I0 extends H{}class D0 extends I0{}class b_ extends I0{}class Dx extends H{}class hC extends Dx{}class Lx extends Dx{}class jx extends H{}class pC extends jx{}class mC extends jx{}class Rx extends H{}class gC extends Rx{}class w_ extends Rx{}class L0 extends H{}class bm extends L0{}class yC extends L0{}class $x extends H{}class Fx extends $x{}class vC extends $x{}class Bx extends H{}class _C extends Bx{}class bC extends Bx{}class vd extends H{}class ju extends vd{}class _d extends vd{}class zx extends H{}class Ux extends zx{}class hf extends zx{}class Ml extends H{}class wC extends Ml{}class xC extends Ml{}class x_ extends H{}class Wx extends x_{}class Vx extends x_{}class E_ extends H{}class EC extends E_{}class j0 extends E_{}class wm extends H{}class xm extends wm{}class T_ extends wm{}class Hx extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","position_ids","past_key_values","pixel_values","image_grid_thw"])}}class TC extends Hx{get_rope_index(te,pe,Ze,ft){const{vision_config:lt,image_token_id:bt,video_token_id:Rt,vision_start_token_id:Yt}=this.config,ur=lt.spatial_merge_size??2,Yr=[];if(pe||Ze){let ln=te.tolist();ft||(ft=(0,f.ones_like)(te));const dn=ft.tolist(),Vn=Array.from({length:3},$i=>Array.from({length:te.dims[0]},Pa=>Array.from({length:te.dims[1]},gs=>1))),Xr=pe?pe.tolist():[],Cn=Ze?Ze.tolist():[];let Wr=0,Bn=0;for(let $i=0;$i<ln.length;++$i){const Pa=ln[$i].filter((Ma,io)=>dn[$i][io]==1),ts=Pa.reduce((Ma,io,Mm)=>(io==Yt&&Ma.push(Mm),Ma),[]).map(Ma=>Pa[Ma+1]),Bs=ts.filter(Ma=>Ma==bt).length,Co=ts.filter(Ma=>Ma==Rt).length;let In=[],no=0,xc=Bs,G0=Co;for(let Ma=0;Ma<ts.length;++Ma){const io=Pa.findIndex((Y0,yf)=>yf>no&&Y0==bt),Mm=Pa.findIndex((Y0,yf)=>yf>no&&Y0==Rt),K0=xc>0&&io!==-1?io:Pa.length+1,L_=G0>0&&Mm!==-1?Mm:Pa.length+1;let JC,c4,d4,f4;K0<L_?([c4,d4,f4]=Xr[Wr],++Wr,--xc,JC=K0):([c4,d4,f4]=Cn[Bn],++Bn,--G0,JC=L_);const[lCe,h4,eP]=[Number(c4),Math.floor(Number(d4)/ur),Math.floor(Number(f4)/ur)],p4=JC-no,nq=In.length>0?(0,p.max)(In.at(-1))[0]+1:0;In.push(Array.from({length:3*p4},(Y0,yf)=>nq+yf%p4));const m4=p4+nq,tP=lCe*h4*eP,uCe=Array.from({length:tP},(Y0,yf)=>m4+Math.floor(yf/(h4*eP))),cCe=Array.from({length:tP},(Y0,yf)=>m4+Math.floor(yf/eP)%h4),dCe=Array.from({length:tP},(Y0,yf)=>m4+yf%eP);In.push([uCe,cCe,dCe].flat()),no=JC+tP}if(no<Pa.length){const Ma=In.length>0?(0,p.max)(In.at(-1))[0]+1:0,io=Pa.length-no;In.push(Array.from({length:3*io},(Mm,K0)=>Ma+K0%io))}const lu=In.reduce((Ma,io)=>Ma+io.length,0),Td=new Array(lu);let XC=0;for(let Ma=0;Ma<3;++Ma)for(let io=0;io<In.length;++io){const Mm=In[io],K0=Mm.length/3;for(let L_=Ma*K0;L_<(Ma+1)*K0;++L_)Td[XC++]=Mm[L_]}let q0=0;const QC=dn[$i];for(let Ma=0;Ma<QC.length;++Ma)if(QC[Ma]==1){for(let io=0;io<3;++io)Vn[io][$i][Ma]=Td[io*lu/3+q0];++q0}const ZC=(0,p.max)(Td)[0];Yr.push(ZC+1-ln[$i].length)}return[new f.Tensor("int64",Vn.flat(1/0),[3,te.dims[0],te.dims[1]]),new f.Tensor("int64",Yr,[Yr.length,1])]}else if(ft){const{data:ln,dims:dn}=ee(ft),Vn=BigInt64Array.from({length:3*ln.length},(Cn,Wr)=>ln[Wr%ln.length]),Xr=Array.from({length:dn[0]},(Cn,Wr)=>(0,p.max)(ln.subarray(dn[1]*Wr,dn[1]*(Wr+1)))[0]+1n+BigInt(dn[1]));return[new f.Tensor("int64",Vn,[3,...dn]),new f.Tensor("int64",Xr,[Xr.length,1])]}else{const[ln,dn]=te.dims,Vn=BigInt64Array.from({length:3*ln*dn},(Xr,Cn)=>BigInt(Math.floor(Cn%dn/ln)));return[new f.Tensor("int64",Vn,[3,...te.dims]),(0,f.zeros)([ln,1])]}}async encode_image({pixel_values:te,image_grid_thw:pe}){return(await M(this.sessions.vision_encoder,{pixel_values:te,grid_thw:pe})).image_features}_merge_input_ids_with_image_features(te){return K({image_token_id:this.config.image_token_id,...te})}prepare_inputs_for_generation(te,pe,Ze){if(pe.attention_mask&&!pe.position_ids)if(!pe.past_key_values)[pe.position_ids,pe.rope_deltas]=this.get_rope_index(pe.input_ids,pe.image_grid_thw,pe.video_grid_thw,pe.attention_mask);else{pe.pixel_values=null;
3687const ft=BigInt(Object.values(pe.past_key_values)[0].dims.at(-2)),lt=pe.rope_deltas.map(bt=>ft+bt);pe.position_ids=(0,f.stack)([lt,lt,lt],0)}return pe}}class S_ extends H{}class SC extends S_{}class AC extends S_{}class Gx extends H{}class CC extends Gx{}class PC extends Gx{}class qx extends H{}class Kx extends qx{}class R0 extends qx{}class Yx extends H{}class MC extends Yx{}class Xx extends Yx{}class P extends H{}class I extends P{}class Q extends P{}class re extends H{}class he extends re{}class ye extends re{async _call(te){return new mn(await super._call(te))}}class xe extends H{}class Ae extends xe{}class Ne extends xe{async _call(te){return new mn(await super._call(te))}}class Be extends H{}class rt extends Be{}class pt extends H{}class ze extends pt{}class at extends pt{async _call(te){return new mn(await super._call(te))}}class ut extends H{}class xt extends ut{}class dt extends H{}class St extends dt{}class Mt extends dt{async _call(te){return new mn(await super._call(te))}}class zt extends H{}class Dt extends zt{}class Ur extends H{}class Cr extends Ur{}class Sn extends Ur{async _call(te){return new mn(await super._call(te))}}class Fr extends H{}class qn extends Fr{async _call(te){return new tq(await super._call(te))}}class ms extends H{}class An extends ms{}class Br extends ms{async _call(te){return new mn(await super._call(te))}}class lr extends H{}class Ja extends lr{}class bn extends lr{async _call(te){return new mn(await super._call(te))}}class Kn extends H{}class ua extends Kn{}class eo extends Kn{}class wo extends H{}class Wa extends wo{}class xo extends wo{}class Eo extends H{}class ks extends Eo{}class ui extends Eo{async _call(te){return new mn(await super._call(te))}}class yi extends H{}class Va extends yi{}class Ni extends yi{async _call(te){return new ou(await super._call(te))}}class Fs extends yi{async _call(te){return new es(await super._call(te))}}class ou extends fe{constructor({logits:te,pred_boxes:pe}){super(),this.logits=te,this.pred_boxes=pe}}class es extends fe{constructor({logits:te,pred_boxes:pe,pred_masks:Ze}){super(),this.logits=te,this.pred_boxes=pe,this.pred_masks=Ze}}class qo extends H{}class Vi extends qo{}class Os extends qo{async _call(te){return new To(await super._call(te))}}class To extends fe{constructor({logits:te,pred_boxes:pe}){super(),this.logits=te,this.pred_boxes=pe}}class So extends H{}class kl extends So{}class Ol extends So{async _call(te){return new dl(await super._call(te))}}class dl extends To{}class fl extends H{}class Qi extends fl{}class Nl extends fl{async _call(te){return new Ru(await super._call(te))}}class Ru extends To{}class pf extends H{}class bd extends pf{}class to extends pf{async _call(te){return new To(await super._call(te))}}class Em extends H{}class A_ extends Em{}class $0 extends Em{async _call(te){return new Tm(await super._call(te))}}class Tm extends ou{}class Qx extends H{}class kC extends Qx{}class C_ extends Qx{async _call(te){return new mn(await super._call(te))}}class wd extends H{}class OC extends wd{}class NC extends wd{async _call(te){return new mn(await super._call(te))}}class Zx extends H{}class Jx extends Zx{}class F0 extends Zx{async _call(te){return new mn(await super._call(te))}}class B0 extends H{}class e2 extends B0{}class z0 extends B0{async _call(te){return new mn(await super._call(te))}}class P_ extends B0{}class dp extends H{}class t2 extends dp{}class IC extends dp{}class Sm extends H{}class r2 extends Sm{}class M_ extends Sm{}class mf extends H{}class n2 extends mf{}class U0 extends H{}class DC extends U0{}class i2 extends U0{}class fp extends U0{}class LC extends H{}class a2 extends LC{}class jC extends H{}class s2 extends jC{}class RC extends H{}class Am extends RC{}class W0 extends H{}class V0 extends W0{}class xd extends W0{}class Ed extends H{}class gf extends Ed{}
vendor: 13,368 bytes, line 3687
3687class H0 extends Ed{}class k_ extends H{}class o2 extends k_{}class l2 extends H{}class O_ extends l2{}class N_ extends l2{async _call(te){return new mn(await super._call(te))}}class BI extends H{}class qW extends BI{}class KW extends BI{async _call(te){return new mn(await super._call(te))}}class zI extends H{}class YW extends zI{}class XW extends zI{async _call(te){return new mn(await super._call(te))}}class UI extends H{}class QW extends UI{}class ZW extends UI{async _call(te){return new mn(await super._call(te))}}class JW extends H{}class eV extends JW{}class tV extends H{}class rV extends tV{}class nV extends H{}class iV extends nV{}class WI extends H{}class aV extends WI{}class sV extends WI{async _call(te){return new oV(await super._call(te))}}class oV extends fe{constructor({logits:te,pred_boxes:pe}){super(),this.logits=te,this.pred_boxes=pe}}class lV extends H{}class uV extends lV{async get_image_embeddings({pixel_values:te}){return await B(this,{pixel_values:te})}async forward(te){if((!te.image_embeddings||!te.image_positional_embeddings)&&(te={...te,...await this.get_image_embeddings(te)}),!te.input_labels&&te.input_points){const Ze=te.input_points.dims.slice(0,-1),ft=Ze.reduce((lt,bt)=>lt*bt,1);te.input_labels=new f.Tensor("int64",new BigInt64Array(ft).fill(1n),Ze)}const pe={image_embeddings:te.image_embeddings,image_positional_embeddings:te.image_positional_embeddings};return te.input_points&&(pe.input_points=te.input_points),te.input_labels&&(pe.input_labels=te.input_labels),te.input_boxes&&(pe.input_boxes=te.input_boxes),await M(this.sessions.prompt_encoder_mask_decoder,pe)}async _call(te){return new cV(await super._call(te))}}class cV extends fe{constructor({iou_scores:te,pred_masks:pe}){super(),this.iou_scores=te,this.pred_masks=pe}}class VI extends H{}class dV extends VI{}class fV extends VI{}class HI extends H{}class hV extends HI{}class pV extends HI{}class Cm extends H{}class mV extends Cm{}class gV extends Cm{async _call(te){return new Pm(await super._call(te))}}class yV extends Cm{async _call(te){return new mn(await super._call(te))}}class vV extends Cm{async _call(te){return new ro(await super._call(te))}}class _V extends H{}class bV extends _V{async _call(te){return new Pm(await super._call(te))}}class GI extends H{}class wV extends GI{}class xV extends GI{async _call(te){return new ro(await super._call(te))}}class EV extends H{}class TV extends EV{}class $C extends H{}class SV extends $C{}class AV extends $C{async _call(te){return new Pm(await super._call(te))}}class CV extends $C{async _call(te){return new mn(await super._call(te))}}class u2 extends H{}class PV extends u2{}class MV extends u2{async _call(te){return new Pm(await super._call(te))}}class kV extends u2{async _call(te){return new mn(await super._call(te))}}class OV extends u2{async _call(te){return new ro(await super._call(te))}}class FC extends H{}class NV extends FC{}class IV extends FC{async _call(te){return new Pm(await super._call(te))}}class DV extends FC{async _call(te){return new mn(await super._call(te))}}class qAe extends H{}class LV extends Cm{}class jV extends Cm{async _call(te){return new Pm(await super._call(te))}}class RV extends Cm{async _call(te){return new mn(await super._call(te))}}class I_ extends H{}class $V extends I_{}class FV extends I_{async _call(te){return new Pm(await super._call(te))}}class BV extends I_{async _call(te){return new mn(await super._call(te))}}class zV extends I_{async _call(te){return new eq(await super._call(te))}}class UV extends I_{async _call(te){return new ro(await super._call(te))}}class WV extends H{}class VV extends WV{}class BC extends H{}class KAe extends BC{}class HV extends BC{}class GV extends BC{async generate_speech(te,pe,{threshold:Ze=.5,minlenratio:ft=0,maxlenratio:lt=20,vocoder:bt=null}={}){const Rt={input_ids:te},{encoder_outputs:Yt,encoder_attention_mask:ur}=await B(this,Rt),Yr=Yt.dims[1]/this.config.reduction_factor,ln=Math.floor(Yr*lt),dn=Math.floor(Yr*ft),Vn=this.config.num_mel_bins;let Xr=[],Cn=null,Wr=null,Bn=0;for(;;){++Bn;const gs=V(!!Wr);let ts;Wr?ts=Wr.output_sequence_out:ts=new f.Tensor("float32",new Float32Array(Vn),[1,1,Vn]);let Bs={use_cache_branch:gs,output_sequence:ts,encoder_attention_mask:ur,speaker_embeddings:pe,encoder_hidden_states:Yt};this.addPastKeyValues(Bs,Cn),Wr=await M(this.sessions.decoder_model_merged,Bs),Cn=this.getPastKeyValues(Wr,Cn);const{prob:Co,spectrum:In}=Wr;if(Xr.push(In),Bn>=dn&&(Array.from(Co.data).filter(no=>no>=Ze).length>0||Bn>=ln))break}const $i=(0,f.cat)(Xr),{waveform:Pa}=await M(bt.sessions.model,{spectrogram:$i});return{spectrogram:$i,waveform:Pa}}}class qV extends H{constructor(){super(...arguments);Le(this,"main_input_name","spectrogram")}}class KV extends H{}class YV extends KV{}class qI extends H{}class XV extends qI{}class QV extends qI{}class KI extends H{}class ZV extends KI{}class JV extends KI{}class YI extends H{}class eH extends YI{}class tH extends YI{}class XI extends H{}class rH extends XI{}class nH extends XI{}class zC extends H{}class iH extends zC{}class aH extends zC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"text_model"})}}class sH extends zC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"audio_model"})}}class oH extends H{}class QI extends oH{async _call(te){return new rq(await super._call(te))}}class UC extends H{}class YAe extends UC{}class lH extends UC{}class uH extends UC{}class ZI extends H{}class cH extends ZI{}class dH extends ZI{}class JI extends H{}class fH extends JI{}class hH extends JI{async _call(te){return new mn(await super._call(te))}}class e4 extends H{}class XAe extends e4{}class QAe extends e4{}class t4 extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","encoder_outputs","decoder_input_ids","decoder_attention_mask","past_key_values"])}_apply_and_filter_by_delay_pattern_mask(pe){const[Ze,ft]=pe.dims,lt=this.config.decoder.num_codebooks,bt=ft-lt;let Rt=0;for(let Yr=0;Yr<pe.size;++Yr){if(pe.data[Yr]===this.config.decoder.pad_token_id)continue;const ln=Yr%ft,dn=Math.floor(Yr/ft)%lt,Vn=ln-dn;Vn>0&&Vn<=bt&&(pe.data[Rt++]=pe.data[Yr])}const Yt=Math.floor(Ze/lt),ur=Rt/(Yt*lt);return new f.Tensor(pe.type,pe.data.slice(0,Rt),[Yt,lt,ur])}prepare_inputs_for_generation(pe,Ze,ft){let lt=structuredClone(pe);for(let Rt=0;Rt<lt.length;++Rt)for(let Yt=0;Yt<lt[Rt].length;++Yt)Rt%this.config.decoder.num_codebooks>=Yt&&(lt[Rt][Yt]=BigInt(this.config.decoder.pad_token_id));return ft.guidance_scale!==null&&ft.guidance_scale>1&&(lt=lt.concat(lt)),super.prepare_inputs_for_generation(lt,Ze,ft)}async generate(pe){const Ze=await super.generate(pe),ft=this._apply_and_filter_by_delay_pattern_mask(Ze).unsqueeze_(0),{audio_values:lt}=await M(this.sessions.encodec_decode,{audio_codes:ft});return lt}}class WC extends H{}class pH extends WC{}class mH extends WC{async _call(te){return new mn(await super._call(te))}}class gH extends WC{}class VC extends H{}class yH extends VC{}class vH extends VC{async _call(te){return new mn(await super._call(te))}}class _H extends VC{}class HC extends H{}class bH extends HC{}class wH extends HC{async _call(te){return new mn(await super._call(te))}}class xH extends HC{}class GC extends H{}class EH extends GC{}class TH extends GC{async _call(te){return new mn(await super._call(te))}}class SH extends GC{}class AH extends H{}class CH extends AH{}class PH extends H{}class MH extends PH{constructor(...pe){super(...pe);Le(this,"forward_params",["input_ids","pixel_values","images_seq_mask","images_emb_mask","attention_mask","position_ids","past_key_values"]);this._generation_mode="text"}async forward(pe){const Ze=this._generation_mode??"text";let ft;if(Ze==="text"||!pe.past_key_values){const ur=this.sessions.prepare_inputs_embeds,Yr=(0,o.pick)(pe,ur.inputNames);ft=await M(ur,Yr)}else{const ur=this.sessions.gen_img_embeds,Yr=(0,o.pick)({image_ids:pe.input_ids},ur.inputNames);ft=await M(ur,Yr)}const lt={...pe,...ft},bt=await q(this,lt),Rt=this.sessions[Ze==="text"?"lm_head":"gen_head"];if(!Rt)throw new Error(`Unable to find "${Rt}" generation head`);const Yt=await M(Rt,(0,o.pick)(bt,Rt.inputNames));return{...ft,...bt,...Yt}}async generate(pe){return this._generation_mode="text",super.generate(pe)}async generate_images(pe){this._generation_mode="image";const Ze=(pe.inputs??pe[this.main_input_name]).dims[1],lt=(await super.generate(pe)).slice(null,[Ze,null]),bt=this.sessions.image_decode,{decoded_image:Rt}=await M(bt,{generated_tokens:lt}),Yt=Rt.add_(1).mul_(255/2).clamp_(0,255).to("uint8"),ur=[];for(const Yr of Yt){const ln=h.RawImage.fromTensor(Yr);ur.push(ln)}return ur}}class kH extends fe{constructor({char_logits:te,bpe_logits:pe,wp_logits:Ze}){super(),this.char_logits=te,this.bpe_logits=pe,this.wp_logits=Ze}get logits(){return[this.char_logits,this.bpe_logits,this.wp_logits]}}class OH extends H{}class NH extends OH{async _call(te){return new kH(await super._call(te))}}class r4 extends H{}class IH extends r4{}class DH extends r4{}class n4 extends H{}class LH extends n4{}class jH extends n4{}class RH extends H{constructor(){super(...arguments);Le(this,"forward_params",["input_ids","attention_mask","position_ids","audio_values","past_key_values"])}}class i4 extends RH{_merge_input_ids_with_audio_features(te){const pe=te.audio_features.dims.at(-1),Ze=te.audio_features.view(-1,pe);return O({audio_token_id:this.config.ignore_index??this.config.audio_token_id,...te,audio_features:Ze})}}class $H extends i4{}class qC extends H{constructor(){super(...arguments);Le(this,"main_input_name","input_values");Le(this,"forward_params",["input_values"])}}class FH extends fe{constructor({audio_codes:te}){super(),this.audio_codes=te}}class BH extends fe{constructor({audio_values:te}){super(),this.audio_values=te}}class zH extends qC{async encode(te){return new FH(await M(this.sessions.encoder_model,te))}async decode(te){return new BH(await M(this.sessions.decoder_model,te))}}class UH extends qC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"encoder_model"})}}class WH extends qC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"decoder_model"})}}class KC extends H{constructor(){super(...arguments);Le(this,"main_input_name","input_values");Le(this,"forward_params",["input_values"])}}class VH extends fe{constructor({audio_codes:te}){super(),this.audio_codes=te}}class HH extends fe{constructor({audio_values:te}){super(),this.audio_values=te}}class GH extends KC{async encode(te){return new VH(await M(this.sessions.encoder_model,te))}async decode(te){return new HH(await M(this.sessions.decoder_model,te))}}class qH extends KC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"encoder_model"})}}class KH extends KC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"decoder_model"})}}class YC extends H{constructor(){super(...arguments);Le(this,"main_input_name","input_values");Le(this,"forward_params",["input_values"])}}class YH extends YC{async encode(te){return await M(this.sessions.encoder_model,te)}async decode(te){return await M(this.sessions.decoder_model,te)}}class XH extends YC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"encoder_model"})}}class QH extends YC{static async from_pretrained(te,pe={}){return super.from_pretrained(te,{...pe,model_file_name:pe.model_file_name??"decoder_model"})}}class vi{static async from_pretrained(te,{progress_callback:pe=null,config:Ze=null,cache_dir:ft=null,local_files_only:lt=!1,revision:bt="main",model_file_name:Rt=null,subfolder:Yt="onnx",device:ur=null,dtype:Yr=null,use_external_data_format:ln=null,session_options:dn={}}={}){const Vn={progress_callback:pe,config:Ze,cache_dir:ft,local_files_only:lt,revision:bt,model_file_name:Rt,subfolder:Yt,device:ur,dtype:Yr,use_external_data_format:ln,session_options:dn};if(Vn.config=await n.AutoConfig.from_pretrained(te,Vn),!this.MODEL_CLASS_MAPPINGS)throw new Error("`MODEL_CLASS_MAPPINGS` not implemented for this type of `AutoClass`: "+this.name);const Xr=Vn.config.model_type;for(const Cn of this.MODEL_CLASS_MAPPINGS){let Wr=Cn.get(Xr);if(!Wr){for(const Bn of Cn.values())if(Bn[0]===Xr){Wr=Bn;break}if(!Wr)continue}return await Wr[1].from_pretrained(te,Vn)}if(this.BASE_IF_FAIL)return EG.has(Xr)||console.warn(`Unknown model class "${Xr}", attempting to construct from base class.`),await H.from_pretrained(te,Vn);throw Error(`Unsupported model type: ${Xr}`)}}Le(vi,"MODEL_CLASS_MAPPINGS",null),Le(vi,"BASE_IF_FAIL",!1);const ZAe=new Map([["bert",["BertModel",$e]],["neobert",["NeoBertModel",Re]],["modernbert",["ModernBertModel",Ke]],["nomic_bert",["NomicBertModel",yr]],["roformer",["RoFormerModel",pr]],["electra",["ElectraModel",Pe]],["esm",["EsmModel",Ta]],["convbert",["ConvBertModel",Ut]],["camembert",["CamembertModel",Ct]],["deberta",["DebertaModel",Qr]],["deberta-v2",["DebertaV2Model",si]],["mpnet",["MPNetModel",ha]],["albert",["AlbertModel",Bt]],["distilbert",["DistilBertModel",Ki]],["roberta",["RobertaModel",ch]],["xlm",["XLMMo
3687del",Nu]],["xlm-roberta",["XLMRobertaModel",Fe]],["clap",["ClapModel",iH]],["clip",["CLIPModel",uf]],["clipseg",["CLIPSegModel",Za]],["chinese_clip",["ChineseCLIPModel",cl]],["siglip",["SiglipModel",vc]],["jina_clip",["JinaCLIPModel",hh]],["mobilebert",["MobileBertModel",hr]],["squeezebert",["SqueezeBertModel",Ce]],["wav2vec2",["Wav2Vec2Model",mV]],["wav2vec2-bert",["Wav2Vec2BertModel",NV]],["unispeech",["UniSpeechModel",SV]],["unispeech-sat",["UniSpeechSatModel",PV]],["hubert",["HubertModel",LV]],["wavlm",["WavLMModel",$V]],["audio-spectrogram-transformer",["ASTModel",$r]],["vits",["VitsModel",QI]],["pyannote",["PyAnnoteModel",wV]],["wespeaker-resnet",["WeSpeakerResNetModel",TV]],["detr",["DetrModel",Va]],["rt_detr",["RTDetrModel",Vi]],["rt_detr_v2",["RTDetrV2Model",kl]],["rf_detr",["RFDetrModel",Qi]],["d_fine",["DFineModel",bd]],["table-transformer",["TableTransformerModel",A_]],["vit",["ViTModel",he]],["ijepa",["IJepaModel",Ae]],["pvt",["PvtModel",ze]],["vit_msn",["ViTMSNModel",St]],["vit_mae",["ViTMAEModel",xt]],["groupvit",["GroupViTModel",Dt]],["fastvit",["FastViTModel",Cr]],["mobilevit",["MobileViTModel",An]],["mobilevitv2",["MobileViTV2Model",Ja]],["owlvit",["OwlViTModel",ua]],["owlv2",["Owlv2Model",Wa]],["beit",["BeitModel",ks]],["deit",["DeiTModel",kC]],["hiera",["HieraModel",OC]],["convnext",["ConvNextModel",O_]],["convnextv2",["ConvNextV2Model",qW]],["dinov2",["Dinov2Model",YW]],["dinov2_with_registers",["Dinov2WithRegistersModel",QW]],["dinov3_vit",["DINOv3ViTModel",eV]],["dinov3_convnext",["DINOv3ConvNextModel",rV]],["resnet",["ResNetModel",Jx]],["swin",["SwinModel",e2]],["swin2sr",["Swin2SRModel",t2]],["donut-swin",["DonutSwinModel",o2]],["yolos",["YolosModel",aV]],["dpt",["DPTModel",r2]],["glpn",["GLPNModel",gf]],["hifigan",["SpeechT5HifiGan",qV]],["efficientnet",["EfficientNetModel",fH]],["decision_transformer",["DecisionTransformerModel",CH]],["patchtst",["PatchTSTForPrediction",IH]],["patchtsmixer",["PatchTSMixerForPrediction",LH]],["mobilenet_v1",["MobileNetV1Model",pH]],["mobilenet_v2",["MobileNetV2Model",yH]],["mobilenet_v3",["MobileNetV3Model",bH]],["mobilenet_v4",["MobileNetV4Model",EH]],["maskformer",["MaskFormerModel",V0]],["mgp-str",["MgpstrForSceneTextRecognition",NH]],["style_text_to_speech_2",["StyleTextToSpeech2Model",VV]]]),JAe=new Map([["t5",["T5Model",Un]],["longt5",["LongT5Model",di]],["mt5",["MT5Model",pa]],["bart",["BartModel",cs]],["mbart",["MBartModel",Zs]],["marian",["MarianModel",dV]],["whisper",["WhisperModel",Wn]],["m2m_100",["M2M100Model",hV]],["blenderbot",["BlenderbotModel",Xi]],["blenderbot-small",["BlenderbotSmallModel",Ba]]]),eCe=new Map([["mimi",["MimiModel",zH]],["dac",["DacModel",GH]],["snac",["SnacModel",YH]]]),tCe=new Map([["bloom",["BloomModel",Kx]],["jais",["JAISModel",nu]],["gpt2",["GPT2Model",df]],["gptj",["GPTJModel",Ai]],["gpt_bigcode",["GPTBigCodeModel",su]],["gpt_neo",["GPTNeoModel",wc]],["gpt_neox",["GPTNeoXModel",bo]],["codegen",["CodeGenModel",oe]],["llama",["LlamaModel",nt]],["nanochat",["NanoChatModel",on]],["arcee",["ArceeModel",ps]],["lfm2",["Lfm2Model",Ox]],["smollm3",["SmolLM3Model",C0]],["exaone",["ExaoneModel",Ix]],["olmo",["OlmoModel",hC]],["olmo2",["Olmo2Model",pC]],["mobilellm",["MobileLLMModel",D0]],["granite",["GraniteModel",gC]],["granitemoehybrid",["GraniteMoeHybridModel",bm]],["cohere",["CohereModel",Fx]],["gemma",["GemmaModel",_C]],["gemma2",["Gemma2Model",ju]],["vaultgemma",["VaultGemmaModel",Ux]],["gemma3_text",["Gemma3Model",wC]],["helium",["HeliumModel",P0]],["glm",["GlmModel",k0]],["openelm",["OpenELMModel",Wx]],["qwen2",["Qwen2Model",EC]],["qwen3",["Qwen3Model",xm]],["phi",["PhiModel",SC]],["phi3",["Phi3Model",CC]],["mpt",["MptModel",MC]],["opt",["OPTModel",I]],["mistral",["MistralModel",XV]],["ernie4_5",["Ernie4_5_Model",ZV]],["starcoder2",["Starcoder2Model",eH]],["falcon",["FalconModel",rH]],["stablelm",["StableLmModel",cH]],["modernbert-decoder",["ModernBertDecoderModel",kt]]]),a4=new Map([["speecht5",["SpeechT5ForSpeechToText",HV]],["whisper",["WhisperForConditionalGeneration",Ti]],["lite-whisper",["LiteWhisperForConditionalGeneration",za]],["moonshine",["MoonshineForConditionalGeneration",Ua]]]),ZH=new Map([["speecht5",["SpeechT5ForTextToSpeech",GV]]]),JH=new Map([["vits",["VitsModel",QI]],["musicgen",["MusicgenForConditionalGeneration",t4]]]),eG=new Map([["bert",["BertForSequenceClassification",Ue]],["neobert",["NeoBertForSequenceClassification",tt]],["modernbert",["ModernBertForSequenceClassification",mt]],["roformer",["RoFormerForSequenceClassification",Ir]],["electra",["ElectraF
3687orSequenceClassification",Ee]],["esm",["EsmForSequenceClassification",us]],["convbert",["ConvBertForSequenceClassification",Ar]],["camembert",["CamembertForSequenceClassification",ir]],["deberta",["DebertaForSequenceClassification",Jn]],["deberta-v2",["DebertaV2ForSequenceClassification",aa]],["mpnet",["MPNetForSequenceClassification",ud]],["albert",["AlbertForSequenceClassification",er]],["distilbert",["DistilBertForSequenceClassification",ls]],["roberta",["RobertaForSequenceClassification",of]],["xlm",["XLMForSequenceClassification",dd]],["xlm-roberta",["XLMRobertaForSequenceClassification",ot]],["bart",["BartForSequenceClassification",Fa]],["mbart",["MBartForSequenceClassification",ds]],["mobilebert",["MobileBertForSequenceClassification",xl]],["squeezebert",["SqueezeBertForSequenceClassification",Je]]]),tG=new Map([["bert",["BertForTokenClassification",ke]],["neobert",["NeoBertForTokenClassification",Ge]],["modernbert",["ModernBertForTokenClassification",gt]],["roformer",["RoFormerForTokenClassification",cn]],["electra",["ElectraForTokenClassification",Oe]],["esm",["EsmForTokenClassification",jt]],["convbert",["ConvBertForTokenClassification",Jt]],["camembert",["CamembertForTokenClassification",or]],["deberta",["DebertaForTokenClassification",yn]],["deberta-v2",["DebertaV2ForTokenClassification",xi]],["mpnet",["MPNetForTokenClassification",sf]],["distilbert",["DistilBertForTokenClassification",Yi]],["roberta",["RobertaForTokenClassification",op]],["xlm",["XLMForTokenClassification",cp]],["xlm-roberta",["XLMRobertaForTokenClassification",Tt]]]),s4=new Map([["t5",["T5ForConditionalGeneration",Tn]],["longt5",["LongT5ForConditionalGeneration",Pr]],["mt5",["MT5ForConditionalGeneration",$a]],["bart",["BartForConditionalGeneration",ji]],["mbart",["MBartForConditionalGeneration",yo]],["marian",["MarianMTModel",fV]],["m2m_100",["M2M100ForConditionalGeneration",pV]],["blenderbot",["BlenderbotForConditionalGeneration",la]],["blenderbot-small",["BlenderbotSmallForConditionalGeneration",Jl]]]),o4=new Map([["bloom",["BloomForCausalLM",R0]],["gpt2",["GPT2LMHeadModel",ff]],["jais",["JAISLMHeadModel",Lu]],["gptj",["GPTJForCausalLM",ga]],["gpt_bigcode",["GPTBigCodeForCausalLM",j]],["gpt_neo",["GPTNeoForCausalLM",Sl]],["gpt_neox",["GPTNeoXForCausalLM",Al]],["codegen",["CodeGenForCausalLM",ge]],["llama",["LlamaForCausalLM",_t]],["nanochat",["NanoChatForCausalLM",Fn]],["llama4_text",["Llama4ForCausalLM",nr]],["arcee",["ArceeForCausalLM",yd]],["lfm2",["Lfm2ForCausalLM",Nx]],["smollm3",["SmolLM3ForCausalLM",Cl]],["exaone",["ExaoneForCausalLM",__]],["olmo",["OlmoForCausalLM",Lx]],["olmo2",["Olmo2ForCausalLM",mC]],["mobilellm",["MobileLLMForCausalLM",b_]],["granite",["GraniteForCausalLM",w_]],["granitemoehybrid",["GraniteMoeHybridForCausalLM",yC]],["cohere",["CohereForCausalLM",vC]],["gemma",["GemmaForCausalLM",bC]],["gemma2",["Gemma2ForCausalLM",_d]],["vaultgemma",["VaultGemmaForCausalLM",hf]],["gemma3_text",["Gemma3ForCausalLM",xC]],["helium",["HeliumForCausalLM",M0]],["glm",["GlmForCausalLM",O0]],["openelm",["OpenELMForCausalLM",Vx]],["qwen2",["Qwen2ForCausalLM",j0]],["qwen3",["Qwen3ForCausalLM",T_]],["phi",["PhiForCausalLM",AC]],["phi3",["Phi3ForCausalLM",PC]],["mpt",["MptForCausalLM",Xx]],["opt",["OPTForCausalLM",Q]],["mbart",["MBartForCausalLM",Ps]],["mistral",["MistralForCausalLM",QV]],["ernie4_5",["Ernie4_5_ForCausalLM",JV]],["starcoder2",["Starcoder2ForCausalLM",tH]],["falcon",["FalconForCausalLM",nH]],["trocr",["TrOCRForCausalLM",YV]],["stablelm",["StableLmForCausalLM",dH]],["modernbert-decoder",["ModernBertDecoderForCausalLM",Zt]],["phi3_v",["Phi3VForCausalLM",tu]]]),rCe=new Map([["multi_modality",["MultiModalityCausalLM",MH]]]),rG=new Map([["bert",["BertForMaskedLM",me]],["neobert",["NeoBertForMaskedLM",De]],["modernbert",["ModernBertForMaskedLM",Xe]],["roformer",["RoFormerForMaskedLM",Ot]],["electra",["ElectraForMaskedLM",ue]],["esm",["EsmForMaskedLM",Qs]],["convbert",["ConvBertForMaskedLM",wr]],["camembert",["CamembertForMaskedLM",sr]],["deberta",["DebertaForMaskedLM",Zr]],["deberta-v2",["DebertaV2ForMaskedLM",fa]],["mpnet",["MPNetForMaskedLM",sl]],["albert",["AlbertForMaskedLM",dr]
3687],["distilbert",["DistilBertForMaskedLM",Ei]],["roberta",["RobertaForMaskedLM",cd]],["xlm",["XLMWithLMHeadModel",up]],["xlm-roberta",["XLMRobertaForMaskedLM",Qe]],["mobilebert",["MobileBertForMaskedLM",$n]],["squeezebert",["SqueezeBertForMaskedLM",Ve]]]),nG=new Map([["bert",["BertForQuestionAnswering",ce]],["neobert",["NeoBertForQuestionAnswering",Ie]],["roformer",["RoFormerForQuestionAnswering",kr]],["electra",["ElectraForQuestionAnswering",Ye]],["convbert",["ConvBertForQuestionAnswering",Ht]],["camembert",["CamembertForQuestionAnswering",It]],["deberta",["DebertaForQuestionAnswering",En]],["deberta-v2",["DebertaV2ForQuestionAnswering",ci]],["mpnet",["MPNetForQuestionAnswering",st]],["albert",["AlbertForQuestionAnswering",Gt]],["distilbert",["DistilBertForQuestionAnswering",sa]],["roberta",["RobertaForQuestionAnswering",lp]],["xlm",["XLMForQuestionAnswering",G]],["xlm-roberta",["XLMRobertaForQuestionAnswering",Nt]],["mobilebert",["MobileBertForQuestionAnswering",El]],["squeezebert",["SqueezeBertForQuestionAnswering",it]]]),l4=new Map([["vision-encoder-decoder",["VisionEncoderDecoderModel",hs]],["idefics3",["Idefics3ForConditionalGeneration",Tl]],["smolvlm",["SmolVLMForConditionalGeneration",pd]]]),iG=new Map([["llava",["LlavaForConditionalGeneration",vo]],["llava_onevision",["LlavaOnevisionForConditionalGeneration",Iu]],["moondream1",["Moondream1ForConditionalGeneration",dh]],["florence2",["Florence2ForConditionalGeneration",pc]],["qwen2-vl",["Qwen2VLForConditionalGeneration",TC]],["idefics3",["Idefics3ForConditionalGeneration",Tl]],["smolvlm",["SmolVLMForConditionalGeneration",pd]],["paligemma",["PaliGemmaForConditionalGeneration",hd]],["llava_qwen2",["LlavaQwen2ForCausalLM",mc]],["gemma3n",["Gemma3nForConditionalGeneration",gc]]]),aG=new Map([["ultravox",["UltravoxModel",i4]],["voxtral",["VoxtralForConditionalGeneration",$H]]]),nCe=new Map([["vision-encoder-decoder",["VisionEncoderDecoderModel",hs]]]),sG=new Map([["vit",["ViTForImageClassification",ye]],["ijepa",["IJepaForImageClassification",Ne]],["pvt",["PvtForImageClassification",at]],["vit_msn",["ViTMSNForImageClassification",Mt]],["fastvit",["FastViTForImageClassification",Sn]],["mobilevit",["MobileViTForImageClassification",Br]],["mobilevitv2",["MobileViTV2ForImageClassification",bn]],["beit",["BeitForImageClassification",ui]],["deit",["DeiTForImageClassification",C_]],["hiera",["HieraForImageClassification",NC]],["convnext",["ConvNextForImageClassification",N_]],["convnextv2",["ConvNextV2ForImageClassification",KW]],["dinov2",["Dinov2ForImageClassification",XW]],["dinov2_with_registers",["Dinov2WithRegistersForImageClassification",ZW]],["resnet",["ResNetForImageClassification",F0]],["swin",["SwinForImageClassification",z0]],["segformer",["SegformerForImageClassification",lH]],["efficientnet",["EfficientNetForImageClassification",hH]],["mobilenet_v1",["MobileNetV1ForImageClassification",mH]],["mobilenet_v2",["MobileNetV2ForImageClassification",vH]],["mobilenet_v3",["MobileNetV3ForImageClassification",wH]],["mobilenet_v4",["MobileNetV4ForImageClassification",TH]]]),oG=new Map([["detr",["DetrForObjectDetection",Ni]],["rt_detr",["RTDetrForObjectDetection",Os]],["rt_detr_v2",["RTDetrV2ForObjectDetection",Ol]],["rf_detr",["RFDetrForObjectDetection",Nl]],["d_fine",["DFineForObjectDetection",to]],["table-transformer",["TableTransformerForObjectDetection",$0]],["yolos",["YolosForObjectDetection",sV]]]),lG=new Map([["owlvit",["OwlViTForObjectDetection",eo]],["owlv2",["Owlv2ForObjectDetection",xo]],["grounding-dino",["GroundingDinoForObjectDetection",iV]]]),D_=new Map([["detr",["DetrForSegmentation",Fs]],["clipseg",["CLIPSegForImageSegmentation",Go]]]),uG=new Map([["segformer",["SegformerForSemanticSegmentation",uH]],["sapiens",["SapiensForSemanticSegmentation",DC]],["swin",["SwinForSemanticSegmentation",P_]],["mobilenet_v1",["MobileNetV1ForSemanticSegmentation",gH]],["mobilenet_v2",["MobileNetV2ForSemanticSegmentation",_H]],["mobilenet_v3",["MobileNetV3ForSemanticSegmentation",xH]],["mobilenet_v4",["MobileNetV4ForSemanticSegmentation",SH]]]),cG=new Map([["detr",["DetrForSegmentation",Fs]],["maskformer",["MaskFormerForInstanceSegmentation",xd]]]),dG=new Map([["sam",["SamModel",uV]]]),fG=new Map([["wav2vec2",["Wav2Vec2ForCTC",gV]],["wav2vec2-bert",["Wav2Vec2BertForCTC",IV]],["unispeech",["UniSpeechForCTC",AV]],["unispeech-sat",["UniSpeechSatForCTC",MV]],["wavlm",["WavLMForCTC",FV]],["hubert",["HubertForCTC",jV]],["parakeet_ctc",["ParakeetForCTC",bV]]]),hG=new Map([["wav2vec2",["Wav2Vec2ForSequenceClassification",yV]],["wav2vec2-bert",["Wav2Vec2BertForSequenceClassification",DV]],["unispeech",["UniSpeechForSequenceClassification",CV]],["unispeech-sat",["UniSpeechSatForSequenceClassification",kV]],["wavlm",["WavLMForSequenceClassification",BV]],["hubert",["HubertForSequenceClassification",RV]],["audio-spectrogram-transformer",["ASTForAudioClassification",sn]]]),pG=new Map([["wavlm",["WavLMForXVector",zV]]]),mG=new Map([["unispeech-sat",["UniSpeechSatForAudioFrameClassification",OV]],["wavlm",["WavLMForAudioFrameClassification",UV]],["wav2vec2",["Wav2Vec2ForAudioFrameClassification",vV]],["pyannote",["PyAnnoteForAudioFrameClassification",xV]]]),gG=new Map([["vitmatte",["VitMatteForImageMatting",qn]]]),iCe=new Map([["patchtst",["PatchTSTForPrediction",DH]],["patchtsmixer",["PatchTSMixerForPrediction",jH]]]),yG=ne
3687w Map([["swin2sr",["Swin2SRForImageSuperResolution",IC]]]),vG=new Map([["dpt",["DPTForDepthEstimation",M_]],["depth_anything",["DepthAnythingForDepthEstimation",n2]],["glpn",["GLPNForDepthEstimation",H0]],["sapiens",["SapiensForDepthEstimation",i2]],["depth_pro",["DepthProForDepthEstimation",a2]],["metric3d",["Metric3DForDepthEstimation",s2]],["metric3dv2",["Metric3Dv2ForDepthEstimation",Am]]]),_G=new Map([["sapiens",["SapiensForNormalEstimation",fp]]]),bG=new Map([["vitpose",["VitPoseForPoseEstimation",rt]]]),wG=new Map([["clip",["CLIPVisionModelWithProjection",cf]],["siglip",["SiglipVisionModel",_o]],["jina_clip",["JinaCLIPVisionModel",ma]]]),xG=[[ZAe,w.EncoderOnly],[JAe,w.EncoderDecoder],[tCe,w.DecoderOnly],[eCe,w.AutoEncoder],[eG,w.EncoderOnly],[tG,w.EncoderOnly],[s4,w.Seq2Seq],[a4,w.Seq2Seq],[o4,w.DecoderOnly],[rCe,w.MultiModality],[rG,w.EncoderOnly],[nG,w.EncoderOnly],[l4,w.Vision2Seq],[iG,w.ImageTextToText],[aG,w.AudioTextToText],[sG,w.EncoderOnly],[D_,w.EncoderOnly],[cG,w.EncoderOnly],[uG,w.EncoderOnly],[gG,w.EncoderOnly],[iCe,w.EncoderOnly],[yG,w.EncoderOnly],[vG,w.EncoderOnly],[_G,w.EncoderOnly],[bG,w.EncoderOnly],[oG,w.EncoderOnly],[lG,w.EncoderOnly],[dG,w.MaskGeneration],[fG,w.EncoderOnly],[hG,w.EncoderOnly],[ZH,w.Seq2Seq],[JH,w.EncoderOnly],[pG,w.EncoderOnly],[mG,w.EncoderOnly],[wG,w.EncoderOnly]];for(const[Y,te]of xG)for(const[pe,Ze]of Y.values())x.set(pe,te),T.set(Ze,pe),E.set(pe,Ze);const aCe=[["MusicgenForConditionalGeneration",t4,w.Musicgen],["Phi3VForCausalLM",tu,w.Phi3V],["CLIPTextModelWithProjection",yc,w.EncoderOnly],["SiglipTextModel",Ho,w.EncoderOnly],["JinaCLIPTextModel",md,w.EncoderOnly],["ClapTextModelWithProjection",aH,w.EncoderOnly],["ClapAudioModelWithProjection",sH,w.EncoderOnly],["DacEncoderModel",qH,w.EncoderOnly],["DacDecoderModel",KH,w.EncoderOnly],["MimiEncoderModel",UH,w.EncoderOnly],["MimiDecoderModel",WH,w.EncoderOnly],["SnacEncoderModel",XH,w.EncoderOnly],["SnacDecoderModel",QH,w.EncoderOnly],["Gemma3nForConditionalGeneration",gc,w.ImageAudioTextToText]];for(const[Y,te,pe]of aCe)x.set(Y,pe),T.set(te,Y),E.set(Y,te);const EG=new Map([["modnet",D_],["birefnet",D_],["isnet",D_],["ben",D_]]);for(const[Y,te]of EG.entries())te.set(Y,["PreTrainedModel",H]),x.set(Y,w.EncoderOnly),T.set(H,Y),E.set(Y,H);class u4 extends vi{}Le(u4,"MODEL_CLASS_MAPPINGS",xG.map(te=>te[0])),Le(u4,"BASE_IF_FAIL",!0);class TG extends vi{}Le(TG,"MODEL_CLASS_MAPPINGS",[eG]);class SG extends vi{}Le(SG,"MODEL_CLASS_MAPPINGS",[tG]);class AG extends vi{}Le(AG,"MODEL_CLASS_MAPPINGS",[s4]);class CG extends vi{}Le(CG,"MODEL_CLASS_MAPPINGS",[a4]);class PG extends vi{}Le(PG,"MODEL_CLASS_MAPPINGS",[ZH]);class MG extends vi{}Le(MG,"MODEL_CLASS_MAPPINGS",[JH]);class kG extends vi{}Le(kG,"MODEL_CLASS_MAPPINGS",[o4]);class OG extends vi{}Le(OG,"MODEL_CLASS_MAPPINGS",[rG]);class NG extends vi{}Le(NG,"MODEL_CLASS_MAPPINGS",[nG]);class IG extends vi{}Le(IG,"MODEL_CLASS_MAPPINGS",[l4]);class DG extends vi{}Le(DG,"MODEL_CLASS_MAPPINGS",[sG]);class LG extends vi{}Le(LG,"MODEL_CLASS_MAPPINGS",[D_]);class jG extends vi{}Le(jG,"MODEL_CLASS_MAPPINGS",[uG]);class RG extends vi{}Le(RG,"MODEL_CLASS_MAPPINGS",[cG]);class $G extends vi{}Le($G,"MODEL_CLASS_MAPPINGS",[oG]);class FG extends vi{}Le(FG,"MODEL_CLASS_MAPPINGS",[lG]);class BG extends vi{}Le(BG,"MODEL_CLASS_MAPPINGS",[dG]);class zG extends vi{}Le(zG,"MODEL_CLASS_MAPPINGS",[fG]);class UG extends vi{}Le(UG,"MODEL_CLASS_MAPPINGS",[hG]);class WG extends vi{}Le(WG,"MODEL_CLASS_MAPPINGS",[pG]);class VG extends vi{}Le(VG,"MODEL_CLASS_MAPPINGS",[mG]);class HG extends vi{}Le(HG,"MODEL_CLASS_MAPPINGS",[nCe]);class GG extends vi{}Le(GG,"MODEL_CLASS_MAPPINGS",[gG]);class qG extends vi{}Le(qG,"MODEL_CLASS_MAPPINGS",[yG]);class KG extends vi{}Le(KG,"MODEL_CLASS_MAPPINGS",[vG]);class YG extends vi{}Le(YG,"MODEL_CLASS_MAPPINGS",[_G]);class XG extends vi{}Le(XG,"MODEL_CLASS_MAPPINGS",[bG]);class QG extends vi{}Le(QG,"MODEL_CLASS_MAPPINGS",[wG]);class ZG extends vi{}Le(ZG,"MODEL_CLASS_MAPPINGS",[iG]);class JG extends vi{}Le(JG,"MODEL_CLASS_MAPPINGS",[aG]);class sCe extends fe{constructor({logits:te,past_key_values:pe,encoder_outputs:Ze,decoder_attentions:ft=null,cross_attentions:lt=null}){super(),this.logits=te,this.past_key_values=pe,this.encoder_outputs=Ze,this.decoder_attentions=ft,this.cross_attentions=lt}}class mn extends fe{constructor({logits:te,...pe}){super(),this.logits=te;const Ze=Object.values(pe);Ze.length>0&&(this.attentions=Ze)}}class eq extends fe{constructor({logits:te,embeddings:pe}){super(),this.logits=te,this.embeddings=pe}}
3687class ro extends fe{constructor({logits:te}){super(),this.logits=te}}class Ao extends fe{constructor({logits:te}){super(),this.logits=te}}class hl extends fe{constructor({start_logits:te,end_logits:pe}){super(),this.start_logits=te,this.end_logits=pe}}class Pm extends fe{constructor({logits:te}){super(),this.logits=te}}class oCe extends fe{constructor({logits:te,past_key_values:pe}){super(),this.logits=te,this.past_key_values=pe}}class tq extends fe{constructor({alphas:te}){super(),this.alphas=te}}class rq extends fe{constructor({waveform:te,spectrogram:pe}){super(),this.waveform=te,this.spectrogram=pe}}},
vendor: 1,115 bytes, line 3687
3687"./src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js":(e,t,r)=>{r.r(t),r.d(t,{ASTFeatureExtractor:()=>a});var n=r("./src/base/feature_extraction_utils.js");r("./src/utils/tensor.js");var i=r("./src/utils/audio.js");class a extends n.FeatureExtractor{constructor(o){super(o);const l=this.config.sampling_rate,u=(0,i.mel_filter_bank)(257,this.config.num_mel_bins,20,Math.floor(l/2),l,null,"kaldi",!0);this.mel_filters=u,this.window=(0,i.window_function)(400,"hann",{periodic:!1}),this.mean=this.config.mean,this.std=this.config.std}async _extract_fbank_features(o,l){return(0,i.spectrogram)(o,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:"log",mel_floor:1192092955078125e-22,remove_dc_offset:!0,max_num_frames:l,transpose:!0})}async _call(o){(0,n.validate_audio_inputs)(o,"ASTFeatureExtractor");const l=await this._extract_fbank_features(o,this.config.max_length);if(this.config.do_normalize){const u=this.std*2,c=l.data;for(let d=0;d<c.length;++d)c[d]=(c[d]-this.mean)/u}return{input_values:l.unsqueeze_(0)}}}},
3687"./src/models/auto/feature_extraction_auto.js":(e,t,r)=>{r.r(t),r.d(t,{AutoFeatureExtractor:()=>s});var n=r("./src/utils/constants.js"),i=r("./src/utils/hub.js");r("./src/base/feature_extraction_utils.js");var a=r("./src/models/feature_extractors.js");class s{static async from_pretrained(l,u={}){const c=await(0,i.getModelJSON)(l,n.FEATURE_EXTRACTOR_NAME,!0,u),d=c.feature_extractor_type,f=a[d];if(!f)throw new Error(`Unknown feature_extractor_type: '${d}'. Please report this at ${n.GITHUB_ISSUE_URL}.`);return new f(c)}}},
3687"./src/models/auto/image_processing_auto.js":(e,t,r)=>{r.r(t),r.d(t,{AutoImageProcessor:()=>o});var n=r("./src/utils/constants.js"),i=r("./src/utils/hub.js"),a=r("./src/base/image_processors_utils.js"),s=r("./src/models/image_processors.js");class o{static async from_pretrained(u,c={}){const d=await(0,i.getModelJSON)(u,n.IMAGE_PROCESSOR_NAME,!0,c),f=d.image_processor_type??d.feature_extractor_type;let h=s[f==null?void 0:f.replace(/Fast$/,"")];return h||(f!==void 0&&console.warn(`Image processor type '${f}' not found, assuming base ImageProcessor. Please report this at ${n.GITHUB_ISSUE_URL}.`),h=a.ImageProcessor),new h(d)}}},
3687"./src/models/auto/processing_auto.js":(e,t,r)=>{r.r(t),r.d(t,{AutoProcessor:()=>u});var n=r("./src/utils/constants.js"),i=r("./src/utils/hub.js"),a=r("./src/base/processing_utils.js"),s=r("./src/models/processors.js"),o=r("./src/models/image_processors.js"),l=r("./src/models/feature_extractors.js");class u{static async from_pretrained(d,f={}){const h=await(0,i.getModelJSON)(d,n.IMAGE_PROCESSOR_NAME,!0,f),{image_processor_type:p,feature_extractor_type:m,processor_class:_}=h;if(_&&s[_])return s[_].from_pretrained(d,f);if(!p&&!m)throw new Error("No `image_processor_type` or `feature_extractor_type` found in the config.");const y={};if(p){const b=o[p.replace(/Fast$/,"")];if(!b)throw new Error(`Unknown image_processor_type: '${p}'.`);y.image_processor=new b(h)}if(m){const b=o[m];if(b)y.image_processor=new b(h);else{const w=l[m];if(!w)throw new Error(`Unknown feature_extractor_type: '${m}'.`);y.feature_extractor=new w(h)}}const v={};return new a.Processor(v,y,null)}}},
3687"./src/models/beit/image_processing_beit.js":(e,t,r)=>{r.r(t),r.d(t,{BeitFeatureExtractor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
3687"./src/models/bit/image_processing_bit.js":(e,t,r)=>{r.r(t),r.d(t,{BitImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
3687"./src/models/chinese_clip/image_processing_chinese_clip.js":(e,t,r)=>{r.r(t),r.d(t,{ChineseCLIPFeatureExtractor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
3687"./src/models/clap/feature_extraction_clap.js":(e,t,r)=>{r.r(t),r.d(t,{ClapFeatureExtractor:()=>a});var n=r("./src/base/feature_extraction_utils.js");r("./src/utils/tensor.js");var i=r("./src/utils/audio.js");class a extends n.FeatureExtractor{constructor(o){super(o),this.mel_filters=(0,i.mel_filter_bank)(this.config.nb_frequency_bins,this.config.feature_size,this.config.frequency_min,this.config.frequency_max,this.config.sampling_rate,null,"htk"),this.mel_filters_slaney=(0,i.mel_filter_bank)(this.config.nb_frequency_bins,this.config.feature_size,this.config.frequency_min,this.config.frequency_max,this.config.sampling_rate,"slaney","slaney"),this.window=(0,i.window_function)(this.config.fft_window_size,"hann")}async _get_input_mel(o,l,u,c){let d;const f=o.length-l;if(f>0)if(u==="rand_trunc"){const h=Math.floor(Math.random()*(f+1));o=o.subarray(h,h+l),d=await this._extract_fbank_features(o,this.mel_filters_slaney,this.config.nb_max_samples)}else throw new Error(`Truncation strategy "${u}" not implemented`);else{if(f<0){let h=new Float64Array(l);if(h.set(o),c==="repeat")for(let p=o.length;p<l;p+=o.length)h.set(o.subarray(0,Math.min(o.length,l-p)),p);else if(c==="repeatpad")for(let p=o.length;p<-f;p+=o.length)h.set(o,p);o=h}if(u==="fusion")throw new Error(`Truncation strategy "${u}" not implemented`);d=await this._extract_fbank_features(o,this.mel_filters_slaney,this.config.nb_max_samples)}return d.unsqueeze_(0)}async _extract_fbank_features(o,l,u=null){return(0,i.spectrogram)(o,this.window,this.config.fft_window_size,this.config.hop_length,{power:2,mel_filters:l,log_mel:"dB",max_num_frames:u,do_pad:!1,transpose:!0})}async _call(o,{max_length:l=null}={}){return(0,n.validate_audio_inputs)(o,"ClapFeatureExtractor"),{input_features:(await this._get_input_mel(o,l??this.config.nb_max_samples,this.config.truncation,this.config.padding)).unsqueeze_(0)}}}},
3687"./src/models/clip/image_processing_clip.js":(e,t,r)=>{r.r(t),r.d(t,{CLIPFeatureExtractor:()=>a,CLIPImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3687"./src/models/convnext/image_processing_convnext.js":(e,t,r)=>{r.r(t),r.d(t,{ConvNextFeatureExtractor:()=>a,ConvNextImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{constructor(o){super(o),this.crop_pct=this.config.crop_pct??224/256}async resize(o){var u;const l=(u=this.size)==null?void 0:u.shortest_edge;if(l===void 0)throw new Error("Size dictionary must contain 'shortest_edge' key.");if(l<384){const c=Math.floor(l/this.crop_pct),[d,f]=this.get_resize_output_image_size(o,{shortest_edge:c});o=await o.resize(d,f,{resample:this.resample}),o=await o.center_crop(l,l)}else o=await o.resize(l,l,{resample:this.resample});return o}}class a extends i{}},
3687"./src/models/dac/feature_extraction_dac.js":(e,t,r)=>{r.r(t),r.d(t,{DacFeatureExtractor:()=>i});var n=r("./src/models/encodec/feature_extraction_encodec.js");class i extends n.EncodecFeatureExtractor{}},
3687"./src/models/deit/image_processing_deit.js":(e,t,r)=>{r.r(t),r.d(t,{DeiTFeatureExtractor:()=>a,DeiTImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
vendor: 649 bytes, line 3687
3687"./src/models/detr/image_processing_detr.js":(e,t,r)=>{r.r(t),r.d(t,{DetrFeatureExtractor:()=>s,DetrImageProcessor:()=>a});var n=r("./src/base/image_processors_utils.js"),i=r("./src/utils/tensor.js");class a extends n.ImageProcessor{async _call(l){const u=await super._call(l),c=[u.pixel_values.dims[0],64,64],d=(0,i.full)(c,1n);return{...u,pixel_mask:d}}post_process_object_detection(...l){return(0,n.post_process_object_detection)(...l)}post_process_panoptic_segmentation(...l){return(0,n.post_process_panoptic_segmentation)(...l)}post_process_instance_segmentation(...l){return(0,n.post_process_instance_segmentation)(...l)}}class s extends a{}},
3687"./src/models/dinov3_vit/image_processing_dinov3_vit.js":(e,t,r)=>{r.r(t),r.d(t,{DINOv3ViTImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
vendor: 505 bytes, line 3687
3687"./src/models/donut/image_processing_donut.js":(e,t,r)=>{r.r(t),r.d(t,{DonutFeatureExtractor:()=>a,DonutImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{pad_image(o,l,u,c={}){const[d,f,h]=l;let p=this.image_mean;Array.isArray(this.image_mean)||(p=new Array(h).fill(p));let m=this.image_std;Array.isArray(m)||(m=new Array(h).fill(p));const _=p.map((y,v)=>-y/m[v]);return super.pad_image(o,l,u,{center:!0,constant_values:_,...c})}}class a extends i{}},
3687"./src/models/dpt/image_processing_dpt.js":(e,t,r)=>{r.r(t),r.d(t,{DPTFeatureExtractor:()=>a,DPTImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3687"./src/models/efficientnet/image_processing_efficientnet.js":(e,t,r)=>{r.r(t),r.d(t,{EfficientNetImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{constructor(s){super(s),this.include_top=this.config.include_top??!0,this.include_top&&(this.image_std=this.image_std.map(o=>o*o))}}},
3687"./src/models/encodec/feature_extraction_encodec.js":(e,t,r)=>{r.r(t),r.d(t,{EncodecFeatureExtractor:()=>a});var n=r("./src/base/feature_extraction_utils.js"),i=r("./src/utils/tensor.js");class a extends n.FeatureExtractor{async _call(o){(0,n.validate_audio_inputs)(o,"EncodecFeatureExtractor"),o instanceof Float64Array&&(o=new Float32Array(o));const l=this.config.feature_size;if(o.length%l!==0)throw new Error(`The length of the audio data must be a multiple of the number of channels (${l}).`);const u=[1,l,o.length/l];return{input_values:new i.Tensor("float32",o,u)}}}},
3687"./src/models/feature_extractors.js":(e,t,r)=>{r.r(t),r.d(t,{ASTFeatureExtractor:()=>n.ASTFeatureExtractor,ClapFeatureExtractor:()=>a.ClapFeatureExtractor,DacFeatureExtractor:()=>s.DacFeatureExtractor,EncodecFeatureExtractor:()=>i.EncodecFeatureExtractor,Gemma3nAudioFeatureExtractor:()=>o.Gemma3nAudioFeatureExtractor,ImageFeatureExtractor:()=>y.ImageProcessor,MoonshineFeatureExtractor:()=>l.MoonshineFeatureExtractor,ParakeetFeatureExtractor:()=>u.ParakeetFeatureExtractor,PyAnnoteFeatureExtractor:()=>c.PyAnnoteFeatureExtractor,SeamlessM4TFeatureExtractor:()=>d.SeamlessM4TFeatureExtractor,SnacFeatureExtractor:()=>f.SnacFeatureExtractor,SpeechT5FeatureExtractor:()=>h.SpeechT5FeatureExtractor,Wav2Vec2FeatureExtractor:()=>p.Wav2Vec2FeatureExtractor,WeSpeakerFeatureExtractor:()=>m.WeSpeakerFeatureExtractor,WhisperFeatureExtractor:()=>_.WhisperFeatureExtractor});var n=r("./src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js"),i=r("./src/models/encodec/feature_extraction_encodec.js"),a=r("./src/models/clap/feature_extraction_clap.js"),s=r("./src/models/dac/feature_extraction_dac.js"),o=r("./src/models/gemma3n/feature_extraction_gemma3n.js"),l=r("./src/models/moonshine/feature_extraction_moonshine.js"),u=r("./src/models/parakeet/feature_extraction_parakeet.js"),c=r("./src/models/pyannote/feature_extraction_pyannote.js"),d=r("./src/models/seamless_m4t/feature_extraction_seamless_m4t.js"),f=r("./src/models/snac/feature_extraction_snac.js"),h=r("./src/models/speecht5/feature_extraction_speecht5.js"),p=r("./src/models/wav2vec2/feature_extraction_wav2vec2.js"),m=r("./src/models/wespeaker/feature_extraction_wespeaker.js"),_=r("./src/models/whisper/feature_extraction_whisper.js"),y=r("./src/base/image_processors_utils.js")},
3687"./src/models/florence2/processing_florence2.js":(e,t,r)=>{r.r(t),r.d(t,{Florence2Processor:()=>s});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");class s extends n.Processor{constructor(l,u,c){super(l,u,c);const{tasks_answer_post_processing_type:d,task_prompts_without_inputs:f,task_prompts_with_input:h}=this.image_processor.config;this.tasks_answer_post_processing_type=new Map(Object.entries(d??{})),this.task_prompts_without_inputs=new Map(Object.entries(f??{})),this.task_prompts_with_input=new Map(Object.entries(h??{})),this.regexes={quad_boxes:/(.+?)<loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)>/gm,bboxes:/([^<]+)?<loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)>/gm},this.size_per_bin=1e3}construct_prompts(l){typeof l=="string"&&(l=[l]);const u=[];for(const c of l)if(this.task_prompts_without_inputs.has(c))u.push(this.task_prompts_without_inputs.get(c));else{for(const[d,f]of this.task_prompts_with_input)if(c.includes(d)){u.push(f.replaceAll("{input}",c).replaceAll(d,""));break}u.length!==l.length&&u.push(c)}return u}post_process_generation(l,u,c){const d=this.tasks_answer_post_processing_type.get(u)??"pure_text";l=l.replaceAll("<s>","").replaceAll("</s>","");let f;switch(d){case"pure_text":f=l;break;case"description_with_bboxes":case"bboxes":case"phrase_grounding":case"ocr":const h=d==="ocr"?"quad_boxes":"bboxes",p=l.matchAll(this.regexes[h]),m=[],_=[];for(const[y,v,...b]of p)m.push(v?v.trim():m.at(-1)??""),_.push(b.map((w,x)=>(Number(w)+.5)/this.size_per_bin*c[x%2]));f={labels:m,[h]:_};break;default:throw new Error(`Task "${u}" (of type "${d}") not yet implemented.`)}return{[u]:f}}
3687async _call(l,u=null,c={}){if(!l&&!u)throw new Error("Either text or images must be provided");const d=await this.image_processor(l,c),f=u?this.tokenizer(this.construct_prompts(u),c):{};return{...d,...f}}}Le(s,"tokenizer_class",a.AutoTokenizer),Le(s,"image_processor_class",i.AutoImageProcessor)},
3687"./src/models/gemma3n/feature_extraction_gemma3n.js":(e,t,r)=>{r.r(t),r.d(t,{Gemma3nAudioFeatureExtractor:()=>s});var n=r("./src/base/feature_extraction_utils.js"),i=r("./src/utils/tensor.js"),a=r("./src/utils/audio.js");class s extends n.FeatureExtractor{constructor(l){super(l);const{fft_length:u,feature_size:c,min_frequency:d,max_frequency:f,sampling_rate:h,frame_length:p}=this.config,m=(0,a.mel_filter_bank)(Math.floor(1+u/2),c,d,f,h,null,"htk",!1);this.mel_filters=m,this.window=(0,a.window_function)(p,"hann")}async _extract_fbank_features(l,u){return(0,a.spectrogram)(l,this.window,this.config.frame_length,this.config.hop_length,{fft_length:this.config.fft_length,center:!1,onesided:!0,preemphasis:this.config.preemphasis,preemphasis_htk_flavor:this.config.preemphasis_htk_flavor,mel_filters:this.mel_filters,log_mel:"log",mel_floor:this.config.mel_floor,remove_dc_offset:!1,transpose:!0})}async _call(l,{max_length:u=48e4,truncation:c=!0,padding:d=!0,pad_to_multiple_of:f=128}={}){if((0,n.validate_audio_inputs)(l,"Gemma3nAudioFeatureExtractor"),c&&l.length>u&&(l=l.slice(0,u)),d&&l.length%f!==0){const m=f-l.length%f,_=new Float64Array(l.length+m);_.set(l),this.config.padding_value!==0&&_.fill(this.config.padding_value,l.length),l=_}const h=await this._extract_fbank_features(l,this.config.max_length),p=(0,i.full)([1,h.dims[0]],!0);return{input_features:h.unsqueeze_(0),input_features_mask:p}}}},
3687"./src/models/gemma3n/processing_gemma3n.js":(e,t,r)=>{r.r(t),r.d(t,{Gemma3nProcessor:()=>o});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/models/auto/feature_extraction_auto.js"),s=r("./src/tokenizers.js");r("./src/utils/image.js"),r("./src/utils/audio.js");class o extends n.Processor{constructor(u,c,d){super(u,c,d),this.audio_seq_length=this.config.audio_seq_length,this.image_seq_length=this.config.image_seq_length;const{audio_token_id:f,boa_token:h,audio_token:p,eoa_token:m,image_token_id:_,boi_token:y,image_token:v,eoi_token:b}=this.tokenizer.config;this.audio_token_id=f,this.boa_token=h,this.audio_token=p;const w=p.repeat(this.audio_seq_length);this.full_audio_sequence=` 3688 3689${h}${w}${m} 3690 3691`,this.image_token_id=_,this.boi_token=y,this.image_token=v;const x=v.repeat(this.image_seq_length);this.full_image_sequence=` 3692 3693${y}${x}${b} 3694 3695`}async _call(u,c=null,d=null,f={}){typeof u=="string"&&(u=[u]);let h;d&&(h=await this.feature_extractor(d,f),u=u.map(_=>_.replaceAll(this.audio_token,this.full_audio_sequence)));let p;return c&&(p=await this.image_processor(c,f),u=u.map(_=>_.replaceAll(this.image_token,this.full_image_sequence))),{...this.tokenizer(u,f),...p,...h}}}Le(o,"image_processor_class",i.AutoImageProcessor),Le(o,"feature_extractor_class",a.AutoFeatureExtractor),Le(o,"tokenizer_class",s.AutoTokenizer),Le(o,"uses_processor_config",!0),Le(o,"uses_chat_template_file",!0)},
3695"./src/models/glpn/image_processing_glpn.js":(e,t,r)=>{r.r(t),r.d(t,{GLPNFeatureExtractor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
3695"./src/models/grounding_dino/image_processing_grounding_dino.js":(e,t,r)=>{r.r(t),r.d(t,{GroundingDinoImageProcessor:()=>a});var n=r("./src/base/image_processors_utils.js"),i=r("./src/utils/tensor.js");class a extends n.ImageProcessor{async _call(o){const l=await super._call(o),u=l.pixel_values.dims,c=(0,i.ones)([u[0],u[2],u[3]]);return{...l,pixel_mask:c}}}},
3695"./src/models/grounding_dino/processing_grounding_dino.js":(e,t,r)=>{r.r(t),r.d(t,{GroundingDinoProcessor:()=>l});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js"),s=r("./src/base/image_processors_utils.js");function o(u,c){const f=u.dims.at(-1)-1,h=u.tolist();h.fill(!1,0,1),h.fill(!1,f);const p=c.tolist();return h.map((m,_)=>m?_:null).filter(m=>m!==null).map(m=>p[m])}class l extends n.Processor{async _call(c,d,f={}){const h=c?await this.image_processor(c,f):{};return{...d?this.tokenizer(d,f):{},...h}}post_process_grounded_object_detection(c,d,{box_threshold:f=.25,text_threshold:h=.25,target_sizes:p=null}={}){const{logits:m,pred_boxes:_}=c,y=m.dims[0];if(p!==null&&p.length!==y)throw Error("Make sure that you pass in as many target sizes as the batch dimension of the logits");const v=m.dims.at(1),b=m.sigmoid(),w=b.max(-1).tolist(),x=_.tolist().map(T=>T.map(S=>(0,s.center_to_corners_format)(S))),E=[];for(let T=0;T<y;++T){const S=p!==null?p[T]:null;S!==null&&(x[T]=x[T].map(D=>D.map(($,V)=>$*S[(V+1)%2])));const A=w[T],C=[],k=[],M=[];for(let D=0;D<v;++D){const $=A[D];if($<=f)continue;const V=x[T][D],U=b[T][D];C.push($),M.push(V);const B=o(U.gt(h),d[T]);k.push(B)}E.push({scores:C,boxes:M,labels:this.batch_decode(k)})}return E}}Le(l,"tokenizer_class",a.AutoTokenizer),Le(l,"image_processor_class",i.AutoImageProcessor)},
3695"./src/models/idefics3/image_processing_idefics3.js":(e,t,r)=>{r.r(t),r.d(t,{Idefics3ImageProcessor:()=>a});var n=r("./src/base/image_processors_utils.js"),i=r("./src/utils/tensor.js");class a extends n.ImageProcessor{constructor(o){super(o),this.do_image_splitting=o.do_image_splitting??!0,this.max_image_size=o.max_image_size}get_resize_for_vision_encoder(o,l){let[u,c]=o.dims.slice(-2);const d=c/u;return c>=u?(c=Math.ceil(c/l)*l,u=Math.floor(c/d),u=Math.ceil(u/l)*l):(u=Math.ceil(u/l)*l,c=Math.floor(u*d),c=Math.ceil(c/l)*l),{height:u,width:c}}async _call(o,{do_image_splitting:l=null,return_row_col_info:u=!1}={}){let c;if(!Array.isArray(o))c=[[o]];else{if(o.length===0||!o[0])throw new Error("No images provided.");Array.isArray(o[0])?c=o:c=[o]}let d=[],f=[],h=[];const p=[],m=[];for(const T of c){let S=await Promise.all(T.map(k=>this.preprocess(k)));p.push(...S.map(k=>k.original_size)),m.push(...S.map(k=>k.reshaped_input_size)),S.forEach(k=>k.pixel_values.unsqueeze_(0));const{longest_edge:A}=this.max_image_size;let C;if(l??this.do_image_splitting){let k=new Array(S.length),M=new Array(S.length);C=await Promise.all(S.map(async(D,$)=>{const V=this.get_resize_for_vision_encoder(D.pixel_values,A),U=await(0,i.interpolate_4d)(D.pixel_values,{size:[V.height,V.width]}),{frames:B,num_splits_h:z,num_splits_w:q}=await this.split_image(U,this.max_image_size);return k[$]=z,M[$]=q,(0,i.cat)(B,0)})),f.push(k),h.push(M)}else{const k=[A,A];C=await Promise.all(S.map(M=>(0,i.interpolate_4d)(M.pixel_values,{size:k}))),f.push(new Array(S.length).fill(0)),h.push(new Array(S.length).fill(0))}d.push((0,i.cat)(C,0))}const _=d.length,[y,v,b,w]=d[0].dims;let x,E;if(_===1)x=d[0].unsqueeze_(0),E=(0,i.full)([_,y,b,w],!0);else{const T=Math.max(...d.map(C=>C.dims.at(0)));E=(0,i.full)([_,T,b,w],!0);const S=E.data,A=T*b*w;for(let C=0;C<_;++C){const k=d[C].dims[0];if(k<T){d[C]=(0,i.cat)([d[C],(0,i.full)([T-k,v,b,w],0)],0);const M=C*A+k*b*w,D=(C+1)*A;S.fill(!1,M,D)}}x=(0,i.stack)(d,0)}return{pixel_values:x,pixel_attention_mask:E,original_sizes:p,reshaped_input_sizes:m,...u?{rows:f,cols:h}:{}}}async split_image(o,{longest_edge:l}){const u=l,c=l,d=[],[f,h]=o.dims.slice(-2);let p=0,m=0;if(f>u||h>c){p=Math.ceil(f/u),m=Math.ceil(h/c);const _=Math.ceil(f/p),y=Math.ceil(h/m);for(let w=0;w<p;++w)for(let x=0;x<m;++x){let E,T,S,A;w===p-1?(T=f-_,A=f):(T=w*_,A=(w+1)*_),x===m-1?(E=h-y,S=h):(E=x*y,S=(x+1)*y);const C=[T,E],k=[A,S],M=await(0,i.slice)(o,C,k,[2,3]);d.push(M)}const v=u,b=c;(f!==v||h!==b)&&(o=await(0,i.interpolate_4d)(o,{size:[v,b]}))}return d.push(o),{frames:d,num_splits_h:p,num_splits_w:m}}}},
3695"./src/models/idefics3/processing_idefics3.js":(e,t,r)=>{r.r(t),r.d(t,{Idefics3Processor:()=>c});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");r("./src/utils/image.js");var s=r("./src/utils/core.js");function o(d,f,h,p,m,_){let y="";for(let v=0;v<f;++v){for(let b=0;b<h;++b)y+=p+`<row_${v+1}_col_${b+1}>`+m.repeat(d);y+=` 3696`}return y+=` 3697${p}${_}`+m.repeat(d)+`${p}`,y}function l(d,f,h,p){return`${f}${p}`+h.repeat(d)+`${f}`}function u(d,f,h,p,m,_){return d===0&&f===0?l(h,p,m,_):o(h,d,f,p,m,_)}class c extends n.Processor{constructor(){super(...arguments);Le(this,"fake_image_token","<fake_token_around_image>");Le(this,"image_token","<image>");Le(this,"global_img_token","<global-img>")}async _call(h,p=null,m={}){m.return_row_col_info??(m.return_row_col_info=!0);let _;p&&(_=await this.image_processor(p,m)),Array.isArray(h)||(h=[h]);const y=_.rows??[new Array(h.length).fill(0)],v=_.cols??[new Array(h.length).fill(0)],b=this.config.image_seq_len,w=[],x=[];for(let T=0;T<h.length;++T){const S=h[T],A=y[T],C=v[T];w.push((0,s.count)(S,this.image_token));const k=A.map(($,V)=>u($,C[V],b,this.fake_image_token,this.image_token,this.global_img_token)),M=S.split(this.image_token);if(M.length===0)throw new Error("The image token should be present in the text.");let D=M[0];for(let $=0;$<k.length;++$)D+=k[$]+M[$+1];x.push(D)}return{...this.tokenizer(x),..._}}}Le(c,"image_processor_class",i.AutoImageProcessor),Le(c,"tokenizer_class",a.AutoTokenizer),Le(c,"uses_processor_config",!0)},
3697"./src/models/image_processors.js":(e,t,r)=>{r.r(t),r.d(t,{BeitFeatureExtractor:()=>n.BeitFeatureExtractor,BitImageProcessor:()=>i.BitImageProcessor,CLIPFeatureExtractor:()=>s.CLIPFeatureExtractor,CLIPImageProcessor:()=>s.CLIPImageProcessor,ChineseCLIPFeatureExtractor:()=>a.ChineseCLIPFeatureExtractor,ConvNextFeatureExtractor:()=>o.ConvNextFeatureExtractor,ConvNextImageProcessor:()=>o.ConvNextImageProcessor,DINOv3ViTImageProcessor:()=>c.DINOv3ViTImageProcessor,DPTFeatureExtractor:()=>f.DPTFeatureExtractor,DPTImageProcessor:()=>f.DPTImageProcessor,DeiTFeatureExtractor:()=>l.DeiTFeatureExtractor,DeiTImageProcessor:()=>l.DeiTImageProcessor,DetrFeatureExtractor:()=>u.DetrFeatureExtractor,DetrImageProcessor:()=>u.DetrImageProcessor,DonutFeatureExtractor:()=>d.DonutFeatureExtractor,DonutImageProcessor:()=>d.DonutImageProcessor,EfficientNetImageProcessor:()=>h.EfficientNetImageProcessor,GLPNFeatureExtractor:()=>p.GLPNFeatureExtractor,GroundingDinoImageProcessor:()=>m.GroundingDinoImageProcessor,Idefics3ImageProcessor:()=>_.Idefics3ImageProcessor,JinaCLIPImageProcessor:()=>v.JinaCLIPImageProcessor,LlavaOnevisionImageProcessor:()=>b.LlavaOnevisionImageProcessor,Mask2FormerImageProcessor:()=>w.Mask2FormerImageProcessor,MaskFormerFeatureExtractor:()=>x.MaskFormerFeatureExtractor,MaskFormerImageProcessor:()=>x.MaskFormerImageProcessor,MobileNetV1FeatureExtractor:()=>E.MobileNetV1FeatureExtractor,MobileNetV1ImageProcessor:()=>E.MobileNetV1ImageProcessor,MobileNetV2FeatureExtractor:()=>T.MobileNetV2FeatureExtractor,MobileNetV2ImageProcessor:()=>T.MobileNetV2ImageProcessor,MobileNetV3FeatureExtractor:()=>S.MobileNetV3FeatureExtractor,MobileNetV3ImageProcessor:()=>S.MobileNetV3ImageProcessor,MobileNetV4FeatureExtractor:()=>A.MobileNetV4FeatureExtractor,MobileNetV4ImageProcessor:()=>A.MobileNetV4ImageProcessor,MobileViTFeatureExtractor:()=>C.MobileViTFeatureExtractor,MobileViTImageProcessor:()=>C.MobileViTImageProcessor,NougatImageProcessor:()=>k.NougatImageProcessor,OwlViTFeatureExtractor:()=>D.OwlViTFeatureExtractor,OwlViTImageProcessor:()=>D.OwlViTImageProcessor,Owlv2ImageProcessor:()=>M.Owlv2ImageProcessor,Phi3VImageProcessor:()=>$.Phi3VImageProcessor,PvtImageProcessor:()=>V.PvtImageProcessor,Qwen2VLImageProcessor:()=>U.Qwen2VLImageProcessor,RTDetrImageProcessor:()=>B.RTDetrImageProcessor,SamImageProcessor:()=>z.SamImageProcessor,SegformerFeatureExtractor:()=>q.SegformerFeatureExtractor,SegformerImageProcessor:()=>q.SegformerImageProcessor,SiglipImageProcessor:()=>L.SiglipImageProcessor,SmolVLMImageProcessor:()=>K.SmolVLMImageProcessor,Swin2SRImageProcessor:()=>O.Swin2SRImageProcessor,VLMImageProcessor:()=>y.VLMImageProcessor,ViTFeatureExtractor:()=>N.ViTFeatureExtractor,ViTImageProcessor:()=>N.ViTImageProcessor,VitMatteImageProcessor:()=>X.VitMatteImageProcessor,VitPoseImageProcessor:()=>ie.VitPoseImageProcessor,YolosFeatureExtractor:()=>ee.YolosFeatureExtractor,YolosImageProcessor:()=>ee.YolosImageProcessor});var n=r("./src/models/beit/image_processing_beit.js"),i=r("./src/models/bit/image_processing_bit.js"),a=r("./src/models/chinese_clip/image_processing_chinese_clip.js"),s=r("./src/models/clip/image_processing_clip.js"),o=r("./src/models/convnext/image_processing_convnext.js"),l=r("./src/models/deit/image_processing_deit.js"),u=r("./src/models/detr/image_processing_detr.js"),c=r("./src/models/dinov3_vit/image_processing_dinov3_vit.js"),d=r("./src/models/donut/image_processing_donut.js"),f=r("./src/models/dpt/image_processing_dpt.js"),h=r("./src/models/efficientnet/image_processing_efficientnet.js"),p=r("./src/models/glpn/image_processing_glpn.js"),m=r("./src/models/grounding_dino/image_processing_grounding_dino.js"),_=r("./src/models/idefics3/image_processing_idefics3.js"),y=r("./src/models/janus/image_processing_janus.js"),v=r("./src/models/jina_clip/image_processing_jina_clip.js"),b=r("./src/models/llava_onevision/image_processing_llava_onevision.js"),w=r("./src/models/mask2former/image_processing_mask2former.js"),x=r("./src/models/maskformer/image_processing_maskformer.js"),E=r("./src/models/mobilenet_v1/image_processing_mobilenet_v1.js"),T=r("./src/models/mobilenet_v2/image_processing_mobilenet_v2.js"),S=r("./src/models/mobilenet_v3/image_processing_mobilenet_v3.js"),A=r("./src/models/mobilenet_v4/image_processing_mobilenet_v4.js"),C=r("./src/models/mobilevit/image_processing_mobilevit.js"),k=r("./src/models/nougat/image_processing_nougat.js"),M=r("./src/models/owlv2/image_processing_owlv2.js"),D=r("./src/models/owlvit/image_processing_owlvit.js"),$=r("./src/models/phi3_v/image_processing_phi3_v.js"),V=r("./src/models/pvt/image_processing_pvt.js"),U=r("./src/models/qwen2_vl/image_processing_qwen2_vl.js"),B=r("./src/models/rt_detr/image_processing_rt_detr.js"),z=r("./src/models/sam/image_processing_sam.js"),q=r("./src/models/segformer/image_processing_segformer.js"),L=r("./src/models/siglip/image_processing_siglip.js"),K=r("./src/models/smolvlm/image_processing_smolvlm.js"),O=r("./src/models/swin2sr/image_processing_swin2sr.js"),N=r("./src/models/vit/image_processing_vit.js"),X=r("./src/models/vitmatte/image_processing_vitmatte.js"),ie=r("./src/models/vitpose/image_processing_vitpose.js"),ee=r("./src/models/yolos/image_processing_yolos.js")},
3697"./src/models/janus/image_processing_janus.js":(e,t,r)=>{r.r(t),r.d(t,{VLMImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{constructor(s){super({do_pad:!0,pad_size:{width:s.image_size,height:s.image_size},...s}),this.constant_values=this.config.background_color.map(o=>o*this.rescale_factor)}pad_image(s,o,l,u){return super.pad_image(s,o,l,{constant_values:this.constant_values,center:!0,...u})}}},
vendor: 1,935 bytes, line 3697
3697"./src/models/janus/processing_janus.js":(e,t,r)=>{r.r(t),r.d(t,{VLChatProcessor:()=>u});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js"),s=r("./src/utils/core.js"),o=r("./src/utils/tensor.js"),l=r("./src/utils/image.js");class u extends n.Processor{constructor(d,f,h){super(d,f,h),this.image_tag=this.config.image_tag,this.image_start_tag=this.config.image_start_tag,this.image_end_tag=this.config.image_end_tag,this.num_image_tokens=this.config.num_image_tokens}async _call(d,{images:f=null,chat_template:h="default"}={}){f?Array.isArray(f)||(f=[f]):f=await Promise.all(d.filter(C=>C.images).flatMap(C=>C.images).map(C=>l.RawImage.read(C)));const p=this.tokenizer,m=p.apply_chat_template(d,{tokenize:!1,add_generation_prompt:!0,chat_template:h}),_=C=>p.encode(C,{add_special_tokens:!1}),y=m.split(this.image_tag),v=y.length-1;if(f.length!==v)throw new Error(`Number of images provided (${f.length}) does not match number of "${this.image_tag}" image tags (${v})`);const[b,w,x]=p.model.convert_tokens_to_ids([this.image_tag,this.image_start_tag,this.image_end_tag]);let E=_(y[0]),T=new Array(E.length).fill(!1);for(let C=1;C<y.length;++C){const k=new Array(this.num_image_tokens).fill(b),M=_(y[C]);E=(0,s.mergeArrays)(E,[w],k,[x],M);const D=new Array(this.num_image_tokens).fill(!0);T=(0,s.mergeArrays)(T,[!1],D,[!1],new Array(M.length).fill(!1))}const S=[1,E.length],A={input_ids:new o.Tensor("int64",E,S),attention_mask:new o.Tensor("int64",new Array(E.length).fill(1),S),images_seq_mask:new o.Tensor("bool",T,S),images_emb_mask:new o.Tensor("bool",new Array(v*this.num_image_tokens).fill(!0),[1,v,this.num_image_tokens])};if(f&&f.length>0){const C=await this.image_processor(f);return C.pixel_values.unsqueeze_(0),{...A,...C}}return A}}Le(u,"image_processor_class",i.AutoImageProcessor),Le(u,"tokenizer_class",a.AutoTokenizer),Le(u,"uses_processor_config",!0)},
3697"./src/models/jina_clip/image_processing_jina_clip.js":(e,t,r)=>{r.r(t),r.d(t,{JinaCLIPImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{constructor(s){const{resize_mode:o,fill_color:l,interpolation:u,size:c,...d}=s,f=o==="squash"?{width:c,height:c}:o==="shortest"?{shortest_edge:c}:{longest_edge:c},h=u==="bicubic"?3:2;super({...d,size:f,resample:h,do_center_crop:!0,crop_size:c,do_normalize:!0})}}},
3697"./src/models/jina_clip/processing_jina_clip.js":(e,t,r)=>{r.r(t),r.d(t,{JinaCLIPProcessor:()=>s});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");class s extends n.Processor{async _call(l=null,u=null,c={}){if(!l&&!u)throw new Error("Either text or images must be provided");const d=l?this.tokenizer(l,c):{},f=u?await this.image_processor(u,c):{};return{...d,...f}}}Le(s,"tokenizer_class",a.AutoTokenizer),Le(s,"image_processor_class",i.AutoImageProcessor)},
3697"./src/models/llava/processing_llava.js":(e,t,r)=>{r.r(t),r.d(t,{LlavaProcessor:()=>s});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");class s extends n.Processor{async _call(l,u=null,c={}){const d=await this.image_processor(l,c);if(u){const[h,p]=d.pixel_values.dims.slice(-2),{image_token:m,patch_size:_,num_additional_image_tokens:y}=this.config,v=Math.floor(h/_)*Math.floor(p/_)+y;u=structuredClone(u),Array.isArray(u)||(u=[u]);for(let b=0;b<u.length;++b)u[b]=u[b].replace(m,m.repeat(v))}const f=u?this.tokenizer(u,c):{};return{...d,...f}}}Le(s,"tokenizer_class",a.AutoTokenizer),Le(s,"image_processor_class",i.AutoImageProcessor),Le(s,"uses_processor_config",!0)},
3697"./src/models/llava_onevision/image_processing_llava_onevision.js":(e,t,r)=>{r.r(t),r.d(t,{LlavaOnevisionImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
3697"./src/models/mask2former/image_processing_mask2former.js":(e,t,r)=>{r.r(t),r.d(t,{Mask2FormerImageProcessor:()=>i});var n=r("./src/models/maskformer/image_processing_maskformer.js");class i extends n.MaskFormerImageProcessor{}},
3697"./src/models/maskformer/image_processing_maskformer.js":(e,t,r)=>{r.r(t),r.d(t,{MaskFormerFeatureExtractor:()=>a,MaskFormerImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{post_process_panoptic_segmentation(...o){return(0,n.post_process_panoptic_segmentation)(...o)}post_process_instance_segmentation(...o){return(0,n.post_process_instance_segmentation)(...o)}}class a extends i{}},
vendor: 1,963 bytes, line 3697
3697"./src/models/mgp_str/processing_mgp_str.js":(e,t,r)=>{r.r(t),r.d(t,{MgpstrProcessor:()=>l});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js"),s=r("./src/utils/maths.js");const o={char:["char_decode",1],bpe:["bpe_decode",2],wp:["wp_decode",102]};class l extends n.Processor{get char_tokenizer(){return this.components.char_tokenizer}get bpe_tokenizer(){return this.components.bpe_tokenizer}get wp_tokenizer(){return this.components.wp_tokenizer}_decode_helper(c,d){if(!o.hasOwnProperty(d))throw new Error(`Format ${d} is not supported.`);const[f,h]=o[d],p=this[f].bind(this),[m,_]=c.dims,y=[],v=[],b=c.tolist();for(let x=0;x<m;++x){const E=b[x],T=[],S=[];for(let C=1;C<_;++C){const[k,M]=(0,s.max)((0,s.softmax)(E[C]));if(S.push(k),M==h)break;T.push(M)}const A=S.length>0?S.reduce((C,k)=>C*k,1):0;v.push(T),y.push(A)}return[p(v),y]}char_decode(c){return this.char_tokenizer.batch_decode(c).map(d=>d.replaceAll(" ",""))}bpe_decode(c){return this.bpe_tokenizer.batch_decode(c)}wp_decode(c){return this.wp_tokenizer.batch_decode(c).map(d=>d.replaceAll(" ",""))}batch_decode([c,d,f]){const[h,p]=this._decode_helper(c,"char"),[m,_]=this._decode_helper(d,"bpe"),[y,v]=this._decode_helper(f,"wp"),b=[],w=[];for(let x=0;x<h.length;++x){const[E,T]=(0,s.max)([p[x],_[x],v[x]]);b.push([h[x],m[x],y[x]][T]),w.push(E)}return{generated_text:b,scores:w,char_preds:h,bpe_preds:m,wp_preds:y}}static async from_pretrained(...c){const d=await super.from_pretrained(...c),f=await a.AutoTokenizer.from_pretrained("Xenova/gpt2"),h=await a.AutoTokenizer.from_pretrained("Xenova/bert-base-uncased");return d.components={image_processor:d.image_processor,char_tokenizer:d.tokenizer,bpe_tokenizer:f,wp_tokenizer:h},d}async _call(c,d=null){const f=await this.image_processor(c);return d&&(f.labels=this.tokenizer(d).input_ids),f}}Le(l,"tokenizer_class",a.AutoTokenizer),Le(l,"image_processor_class",i.AutoImageProcessor)},
3697"./src/models/mobilenet_v1/image_processing_mobilenet_v1.js":(e,t,r)=>{r.r(t),r.d(t,{MobileNetV1FeatureExtractor:()=>a,MobileNetV1ImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3697"./src/models/mobilenet_v2/image_processing_mobilenet_v2.js":(e,t,r)=>{r.r(t),r.d(t,{MobileNetV2FeatureExtractor:()=>a,MobileNetV2ImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3697"./src/models/mobilenet_v3/image_processing_mobilenet_v3.js":(e,t,r)=>{r.r(t),r.d(t,{MobileNetV3FeatureExtractor:()=>a,MobileNetV3ImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3697"./src/models/mobilenet_v4/image_processing_mobilenet_v4.js":(e,t,r)=>{r.r(t),r.d(t,{MobileNetV4FeatureExtractor:()=>a,MobileNetV4ImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3697"./src/models/mobilevit/image_processing_mobilevit.js":(e,t,r)=>{r.r(t),r.d(t,{MobileViTFeatureExtractor:()=>a,MobileViTImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3697"./src/models/moonshine/feature_extraction_moonshine.js":(e,t,r)=>{r.r(t),r.d(t,{MoonshineFeatureExtractor:()=>a});var n=r("./src/base/feature_extraction_utils.js"),i=r("./src/utils/tensor.js");class a extends n.FeatureExtractor{async _call(o){(0,n.validate_audio_inputs)(o,"MoonshineFeatureExtractor"),o instanceof Float64Array&&(o=new Float32Array(o));const l=[1,o.length];return{input_values:new i.Tensor("float32",o,l)}}}},
3697"./src/models/moonshine/processing_moonshine.js":(e,t,r)=>{r.r(t),r.d(t,{MoonshineProcessor:()=>s});var n=r("./src/models/auto/feature_extraction_auto.js"),i=r("./src/tokenizers.js"),a=r("./src/base/processing_utils.js");class s extends a.Processor{async _call(l){return await this.feature_extractor(l)}}Le(s,"tokenizer_class",i.AutoTokenizer),Le(s,"feature_extractor_class",n.AutoFeatureExtractor)},
3697"./src/models/nougat/image_processing_nougat.js":(e,t,r)=>{r.r(t),r.d(t,{NougatImageProcessor:()=>i});var n=r("./src/models/donut/image_processing_donut.js");class i extends n.DonutImageProcessor{}},
3697"./src/models/owlv2/image_processing_owlv2.js":(e,t,r)=>{r.r(t),r.d(t,{Owlv2ImageProcessor:()=>i});var n=r("./src/models/owlvit/image_processing_owlvit.js");class i extends n.OwlViTImageProcessor{}},
3697"./src/models/owlvit/image_processing_owlvit.js":(e,t,r)=>{r.r(t),r.d(t,{OwlViTFeatureExtractor:()=>a,OwlViTImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{post_process_object_detection(...o){return(0,n.post_process_object_detection)(...o)}}class a extends i{}},
3697"./src/models/owlvit/processing_owlvit.js":(e,t,r)=>{r.r(t),r.d(t,{OwlViTProcessor:()=>s});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");class s extends n.Processor{}Le(s,"tokenizer_class",a.AutoTokenizer),Le(s,"image_processor_class",i.AutoImageProcessor)},
3697"./src/models/paligemma/processing_paligemma.js":(e,t,r)=>{r.r(t),r.d(t,{PaliGemmaProcessor:()=>l});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");const s="<image>";function o(u,c,d,f,h){return`${f.repeat(d*h)}${c}${u} 3698`}class l extends n.Processor{async _call(c,d=null,f={}){d||(console.warn("You are using PaliGemma without a text prefix. It will perform as a picture-captioning model."),d=""),Array.isArray(c)||(c=[c]),Array.isArray(d)||(d=[d]);const h=this.tokenizer.bos_token,p=this.image_processor.config.image_seq_length;let m;d.some(v=>v.includes(s))?m=d.map(v=>{const b=v.replaceAll(s,s.repeat(p)),w=b.lastIndexOf(s),x=w===-1?0:w+s.length;return b.slice(0,x)+h+b.slice(x)+` 3699`}):(console.warn("You are passing both `text` and `images` to `PaliGemmaProcessor`. The processor expects special image tokens in the text, as many tokens as there are images per each text. It is recommended to add `<image>` tokens in the very beginning of your text. For this call, we will infer how many images each text has and add special tokens."),m=d.map(v=>o(v,h,p,s,c.length)));const _=this.tokenizer(m,f);return{...await this.image_processor(c,f),..._}}}Le(l,"tokenizer_class",a.AutoTokenizer),Le(l,"image_processor_class",i.AutoImageProcessor),Le(l,"uses_processor_config",!1)},
3699"./src/models/parakeet/feature_extraction_parakeet.js":(e,t,r)=>{r.r(t),r.d(t,{ParakeetFeatureExtractor:()=>o});var n=r("./src/base/feature_extraction_utils.js"),i=r("./src/utils/tensor.js"),a=r("./src/utils/audio.js");const s=1e-5;class o extends n.FeatureExtractor{constructor(u){var f;super(u),(f=this.config).mel_filters??(f.mel_filters=(0,a.mel_filter_bank)(Math.floor(1+this.config.n_fft/2),this.config.feature_size,0,this.config.sampling_rate/2,this.config.sampling_rate,"slaney","slaney"));const c=(0,a.window_function)(this.config.win_length,"hann",{periodic:!1});this.window=new Float64Array(this.config.n_fft);const d=Math.floor((this.config.n_fft-this.config.win_length)/2);this.window.set(c,d)}async _extract_fbank_features(u){const c=this.config.preemphasis;u=new Float64Array(u);for(let f=u.length-1;f>=1;--f)u[f]-=c*u[f-1];return await(0,a.spectrogram)(u,this.window,this.window.length,this.config.hop_length,{fft_length:this.config.n_fft,power:2,mel_filters:this.config.mel_filters,log_mel:"log",mel_floor:-1/0,pad_mode:"constant",center:!0,transpose:!0,mel_offset:2**-24})}async _call(u){(0,n.validate_audio_inputs)(u,"ParakeetFeatureExtractor");const c=await this._extract_fbank_features(u),d=Math.floor((u.length+Math.floor(this.config.n_fft/2)*2-this.config.n_fft)/this.config.hop_length),f=c.data;f.fill(0,d*c.dims[1]);const[h,p]=c.dims,m=new Float64Array(p),_=new Float64Array(p);for(let b=0;b<d;++b){const w=b*p;for(let x=0;x<p;++x){const E=f[w+x];m[x]+=E,_[x]+=E*E}}const y=d>1?d-1:1;for(let b=0;b<p;++b){const w=m[b]/d,x=(_[b]-d*w*w)/y,T=1/(Math.sqrt(x)+s);for(let S=0;S<d;++S){const A=S*p+b;f[A]=(f[A]-w)*T}}const v=new BigInt64Array(h);return v.fill(1n,0,d),{input_features:c.unsqueeze_(0),attention_mask:new i.Tensor("int64",v,[1,h])}}}},
3699"./src/models/phi3_v/image_processing_phi3_v.js":(e,t,r)=>{r.r(t),r.d(t,{Phi3VImageProcessor:()=>c});var n=r("./src/base/image_processors_utils.js"),i=r("./src/utils/tensor.js");const a=336,s=[2,3],{ceil:o,floor:l,sqrt:u}=Math;class c extends n.ImageProcessor{constructor(f){super({...f,do_normalize:!0,do_pad:!0,pad_size:"custom",do_convert_rgb:!0,do_resize:!0}),this._num_crops=f.num_crops}calc_num_image_tokens_from_image_size(f,h){const{num_img_tokens:p}=this.config;return l((l(h/a)*l(f/a)+1)*p+1+(l(h/a)+1)*u(p))}get_resize_output_image_size(f,h){const p=this._num_crops,[m,_]=f.size;let y=m/_,v=1;for(;v*Math.ceil(v/y)<=p;)v+=1;v-=1;const b=Math.floor(v*336),w=Math.floor(b/y);return[b,w]}pad_image(f,h,p,m={}){const[_,y]=h,v=a*o(_/a),b=a*o(y/a),w=[1,1,1].map((x,E)=>(x-this.image_mean[E])/this.image_std[E]);return super.pad_image(f,h,{width:b,height:v},{center:!0,constant_values:w,...m})}async _call(f,{num_crops:h=null}={}){if(this._num_crops=h??(h=this.config.num_crops),h<4||u(h)%1!==0)throw new Error("num_crops must be a square number >= 4");Array.isArray(f)||(f=[f]);const p=f.length,m=await Promise.all(f.map(T=>this.preprocess(T))),_=m.map(T=>T.original_size),y=m.map(T=>T.reshaped_input_size),v=[];for(const{pixel_values:T}of m){T.unsqueeze_(0);const[S,A]=T.dims.slice(-2),C=await(0,i.interpolate_4d)(T,{size:[a,a],mode:"bicubic"});if(h>0){const k=[],M=u(h),D=l(A/M),$=l(S/M);for(let U=0;U<M;++U)for(let B=0;B<M;++B){let z,q,L,K;U===M-1?(q=S-$,K=S):(q=U*$,K=(U+1)*$),B===M-1?(z=A-D,L=A):(z=B*D,L=(B+1)*D);const O=[q,z],N=[K,L],X=await(0,i.slice)(T,O,N,s);k.push(X)}const V=await(0,i.interpolate_4d)((0,i.cat)(k,0),{size:[a,a],mode:"bicubic"});v.push((0,i.cat)([C,V],0))}else v.push(C)}const b=(0,i.stack)(v,0),w=y.map(T=>T.map(S=>a*o(S/a))),x=new i.Tensor("int64",w.flat(),[p,2]),E=w.map(([T,S])=>this.calc_num_image_tokens_from_image_size(S,T));return{pixel_values:b,original_sizes:_,reshaped_input_sizes:y,image_sizes:x,num_img_tokens:E}}}},
3699"./src/models/phi3_v/processing_phi3_v.js":(e,t,r)=>{r.r(t),r.d(t,{Phi3VProcessor:()=>l});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");r("./src/utils/image.js");const s="<|image|>",o=/<\|image_\d+\|>/g;class l extends n.Processor{async _call(c,d=null,{padding:f=!0,truncation:h=!0,num_crops:p=null}={}){Array.isArray(c)||(c=[c]);let m,_;if(d){_=await this.image_processor(d,{num_crops:p});const{num_img_tokens:y}=_,v=c.map((w,x)=>w.split(o).join(s.repeat(y[x])));m=this.tokenizer(v,{padding:f,truncation:h});const b=this.tokenizer.model.convert_tokens_to_ids([s])[0];m.input_ids.map_(w=>w==b?-w:w)}else m=this.tokenizer(c);return{...m,..._}}}Le(l,"image_processor_class",i.AutoImageProcessor),Le(l,"tokenizer_class",a.AutoTokenizer)},
3699"./src/models/processors.js":(e,t,r)=>{r.r(t),r.d(t,{Florence2Processor:()=>n.Florence2Processor,Gemma3nProcessor:()=>i.Gemma3nProcessor,GroundingDinoProcessor:()=>a.GroundingDinoProcessor,Idefics3Processor:()=>s.Idefics3Processor,JinaCLIPProcessor:()=>l.JinaCLIPProcessor,LlavaProcessor:()=>u.LlavaProcessor,MgpstrProcessor:()=>c.MgpstrProcessor,MoonshineProcessor:()=>d.MoonshineProcessor,OwlViTProcessor:()=>f.OwlViTProcessor,PaliGemmaProcessor:()=>p.PaliGemmaProcessor,Phi3VProcessor:()=>h.Phi3VProcessor,PyAnnoteProcessor:()=>m.PyAnnoteProcessor,Qwen2VLProcessor:()=>_.Qwen2VLProcessor,SamProcessor:()=>y.SamProcessor,SmolVLMProcessor:()=>v.SmolVLMProcessor,SpeechT5Processor:()=>b.SpeechT5Processor,UltravoxProcessor:()=>w.UltravoxProcessor,VLChatProcessor:()=>o.VLChatProcessor,VoxtralProcessor:()=>x.VoxtralProcessor,Wav2Vec2Processor:()=>E.Wav2Vec2Processor,Wav2Vec2ProcessorWithLM:()=>T.Wav2Vec2ProcessorWithLM,WhisperProcessor:()=>S.WhisperProcessor});var n=r("./src/models/florence2/processing_florence2.js"),i=r("./src/models/gemma3n/processing_gemma3n.js"),a=r("./src/models/grounding_dino/processing_grounding_dino.js"),s=r("./src/models/idefics3/processing_idefics3.js"),o=r("./src/models/janus/processing_janus.js"),l=r("./src/models/jina_clip/processing_jina_clip.js"),u=r("./src/models/llava/processing_llava.js"),c=r("./src/models/mgp_str/processing_mgp_str.js"),d=r("./src/models/moonshine/processing_moonshine.js"),f=r("./src/models/owlvit/processing_owlvit.js"),h=r("./src/models/phi3_v/processing_phi3_v.js"),p=r("./src/models/paligemma/processing_paligemma.js"),m=r("./src/models/pyannote/processing_pyannote.js"),_=r("./src/models/qwen2_vl/processing_qwen2_vl.js"),y=r("./src/models/sam/processing_sam.js"),v=r("./src/models/smolvlm/processing_smolvlm.js"),b=r("./src/models/speecht5/processing_speecht5.js"),w=r("./src/models/ultravox/processing_ultravox.js"),x=r("./src/models/voxtral/processing_voxtral.js"),E=r("./src/models/wav2vec2/processing_wav2vec2.js"),T=r("./src/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.js"),S=r("./src/models/whisper/processing_whisper.js")},
3699"./src/models/pvt/image_processing_pvt.js":(e,t,r)=>{r.r(t),r.d(t,{PvtImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
vendor: 947 bytes, line 3699
3699"./src/models/pyannote/feature_extraction_pyannote.js":(e,t,r)=>{r.r(t),r.d(t,{PyAnnoteFeatureExtractor:()=>s});var n=r("./src/base/feature_extraction_utils.js"),i=r("./src/utils/tensor.js"),a=r("./src/utils/maths.js");class s extends n.FeatureExtractor{async _call(l){(0,n.validate_audio_inputs)(l,"PyAnnoteFeatureExtractor"),l instanceof Float64Array&&(l=new Float32Array(l));const u=[1,1,l.length];return{input_values:new i.Tensor("float32",l,u)}}samples_to_frames(l){return(l-this.config.offset)/this.config.step}post_process_speaker_diarization(l,u){const c=u/this.samples_to_frames(u)/this.config.sampling_rate,d=[];for(const f of l.tolist()){const h=[];let p=-1;for(let m=0;m<f.length;++m){const _=(0,a.softmax)(f[m]),[y,v]=(0,a.max)(_),[b,w]=[m,m+1];v!==p?(p=v,h.push({id:v,start:b,end:w,score:y})):(h.at(-1).end=w,h.at(-1).score+=y)}d.push(h.map(({id:m,start:_,end:y,score:v})=>({id:m,start:_*c,end:y*c,confidence:v/(y-_)})))}return d}}},
3699"./src/models/pyannote/processing_pyannote.js":(e,t,r)=>{r.r(t),r.d(t,{PyAnnoteProcessor:()=>a});var n=r("./src/base/processing_utils.js"),i=r("./src/models/pyannote/feature_extraction_pyannote.js");class a extends n.Processor{async _call(o){return await this.feature_extractor(o)}post_process_speaker_diarization(...o){return this.feature_extractor.post_process_speaker_diarization(...o)}get sampling_rate(){return this.feature_extractor.config.sampling_rate}}Le(a,"feature_extractor_class",i.PyAnnoteFeatureExtractor)},
3699"./src/models/qwen2_vl/image_processing_qwen2_vl.js":(e,t,r)=>{r.r(t),r.d(t,{Qwen2VLImageProcessor:()=>a});var n=r("./src/base/image_processors_utils.js"),i=r("./src/utils/tensor.js");class a extends n.ImageProcessor{async _call(o,...l){const{pixel_values:u,original_sizes:c,reshaped_input_sizes:d}=await super._call(o,...l);let f=u;const{temporal_patch_size:h,merge_size:p,patch_size:m}=this.config;f.dims[0]===1&&(f=(0,i.cat)(Array.from({length:h},()=>f),0));const _=f.dims[0]/h,y=f.dims[1],v=Math.floor(f.dims[2]/m),b=Math.floor(f.dims[3]/m),w=f.view(_,h,y,Math.floor(v/p),p,m,Math.floor(b/p),p,m).permute(0,3,6,4,7,2,1,5,8).view(_*v*b,y*h*m*m),x=new i.Tensor("int64",[_,v,b],[1,3]);return{pixel_values:w,image_grid_thw:x,original_sizes:c,reshaped_input_sizes:d}}}},
3699"./src/models/qwen2_vl/processing_qwen2_vl.js":(e,t,r)=>{r.r(t),r.d(t,{Qwen2VLProcessor:()=>s});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js"),a=r("./src/tokenizers.js");r("./src/utils/image.js");class s extends n.Processor{async _call(l,u=null,...c){Array.isArray(l)||(l=[l]);let d,f;if(u&&(d=await this.image_processor(u),f=d.image_grid_thw),f){let p=this.image_processor.config.merge_size**2,m=0;const _=f.tolist();l=l.map(y=>{for(;y.includes("<|image_pad|>");){const v=Number(_[m++].reduce((b,w)=>b*w,1n));y=y.replace("<|image_pad|>","<|placeholder|>".repeat(Math.floor(v/p)))}return y.replaceAll("<|placeholder|>","<|image_pad|>")})}return{...this.tokenizer(l),...d}}}Le(s,"image_processor_class",i.AutoImageProcessor),Le(s,"tokenizer_class",a.AutoTokenizer)},
3699"./src/models/rt_detr/image_processing_rt_detr.js":(e,t,r)=>{r.r(t),r.d(t,{RTDetrImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{post_process_object_detection(...s){return(0,n.post_process_object_detection)(...s)}}},
vendor: 2,261 bytes, line 3699
3699"./src/models/sam/image_processing_sam.js":(e,t,r)=>{r.r(t),r.d(t,{SamImageProcessor:()=>s});var n=r("./src/base/image_processors_utils.js"),i=r("./src/utils/core.js"),a=r("./src/utils/tensor.js");class s extends n.ImageProcessor{reshape_input_points(l,u,c,d=!1){l=structuredClone(l);let f=(0,i.calculateDimensions)(l);if(f.length===3)d||(f=[1,...f]),l=[l];else if(f.length!==4)throw Error("The input_points must be a 4D tensor of shape `batch_size`, `point_batch_size`, `nb_points_per_image`, `2`.");for(let h=0;h<l.length;++h){let p=u[h],m=c[h],_=[m[0]/p[0],m[1]/p[1]];for(let y=0;y<l[h].length;++y)for(let v=0;v<l[h][y].length;++v)for(let b=0;b<l[h][y][v].length;++b)l[h][y][v][b]*=_[b%2]}return new a.Tensor("float32",Float32Array.from(l.flat(1/0)),f)}add_input_labels(l,u){let c=(0,i.calculateDimensions)(l);if(c.length===2)c=[1,...c],l=[l];else if(c.length!==3)throw Error("The input_points must be a 4D tensor of shape `batch_size`, `point_batch_size`, `nb_points_per_image`, `2`.");if(c.some((d,f)=>d!==u.dims[f]))throw Error(`The first ${c.length} dimensions of 'input_points' and 'input_labels' must be the same.`);return new a.Tensor("int64",l.flat(1/0).map(BigInt),c)}async _call(l,{input_points:u=null,input_labels:c=null,input_boxes:d=null}={}){const f=await super._call(l);if(u&&(f.input_points=this.reshape_input_points(u,f.original_sizes,f.reshaped_input_sizes)),c){if(!f.input_points)throw Error("`input_points` must be provided if `input_labels` are provided.");f.input_labels=this.add_input_labels(c,f.input_points)}return d&&(f.input_boxes=this.reshape_input_points(d,f.original_sizes,f.reshaped_input_sizes,!0)),f}async post_process_masks(l,u,c,{mask_threshold:d=0,binarize:f=!0,pad_size:h=null}={}){const p=[];h=h??this.pad_size;const m=[h.height,h.width];for(let _=0;_<u.length;++_){const y=u[_],v=c[_];let b=await(0,a.interpolate_4d)(l[_],{mode:"bilinear",size:m});if(b=b.slice(null,null,[0,v[0]],[0,v[1]]),b=await(0,a.interpolate_4d)(b,{mode:"bilinear",size:y}),f){const w=b.data,x=new Uint8Array(w.length);for(let E=0;E<w.length;++E)w[E]>d&&(x[E]=1);b=new a.Tensor("bool",x,b.dims)}p.push(b)}return p}generate_crop_boxes(l,u,{crop_n_layers:c=0,overlap_ratio:d=512/1500,points_per_crop:f=32,crop_n_points_downscale_factor:h=1}={}){}}},
3699"./src/models/sam/processing_sam.js":(e,t,r)=>{r.r(t),r.d(t,{SamProcessor:()=>a});var n=r("./src/base/processing_utils.js"),i=r("./src/models/auto/image_processing_auto.js");class a extends n.Processor{async _call(...o){return await this.image_processor(...o)}post_process_masks(...o){return this.image_processor.post_process_masks(...o)}reshape_input_points(...o){return this.image_processor.reshape_input_points(...o)}}Le(a,"image_processor_class",i.AutoImageProcessor)},
vendor: 1,891 bytes, line 3699
3699"./src/models/seamless_m4t/feature_extraction_seamless_m4t.js":(e,t,r)=>{r.r(t),r.d(t,{SeamlessM4TFeatureExtractor:()=>s});var n=r("./src/base/feature_extraction_utils.js"),i=r("./src/utils/tensor.js"),a=r("./src/utils/audio.js");class s extends n.FeatureExtractor{constructor(l){super(l);const u=this.config.sampling_rate,c=(0,a.mel_filter_bank)(257,this.config.num_mel_bins,20,Math.floor(u/2),u,null,"kaldi",!0);this.mel_filters=c,this.window=(0,a.window_function)(400,"povey",{periodic:!1})}async _extract_fbank_features(l,u){return l=l.map(c=>c*32768),(0,a.spectrogram)(l,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:"log",mel_floor:1192092955078125e-22,remove_dc_offset:!0,max_num_frames:u,transpose:!0})}async _call(l,{padding:u=!0,pad_to_multiple_of:c=2,do_normalize_per_mel_bins:d=!0,return_attention_mask:f=!0}={}){(0,n.validate_audio_inputs)(l,"SeamlessM4TFeatureExtractor");let h=await this._extract_fbank_features(l,this.config.max_length);if(d){const[x,E]=h.dims,T=h.data;for(let S=0;S<E;++S){let A=0;for(let D=0;D<x;++D)A+=T[D*E+S];const C=A/x;let k=0;for(let D=0;D<x;++D)k+=(T[D*E+S]-C)**2;k/=x-1;const M=Math.sqrt(k+1e-7);for(let D=0;D<x;++D){const $=D*E+S;T[$]=(T[$]-C)/M}}}let p;if(u){const[x,E]=h.dims,T=h.data,S=x%c;if(S>0){const A=new Float32Array(E*(x+S));A.set(T),A.fill(this.config.padding_value,T.length);const C=x+S;h=new i.Tensor(h.type,A,[C,E]),f&&(p=new i.Tensor("int64",new BigInt64Array(C),[1,C]),p.data.fill(1n,0,x))}}const[m,_]=h.dims,y=this.config.stride;if(m%y!==0)throw new Error(`The number of frames (${m}) must be a multiple of the stride (${y}).`);const b=h.view(1,Math.floor(m/y),_*y),w={input_features:b};if(f){const x=b.dims[1],E=new BigInt64Array(x);if(p){const T=p.data;for(let S=1,A=0;S<m;S+=y,++A)E[A]=T[S]}else E.fill(1n);w.attention_mask=new i.Tensor("int64",E,[1,x])}return w}}},
3699"./src/models/segformer/image_processing_segformer.js":(e,t,r)=>{r.r(t),r.d(t,{SegformerFeatureExtractor:()=>a,SegformerImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{post_process_semantic_segmentation(...o){return(0,n.post_process_semantic_segmentation)(...o)}}class a extends i{}},
3699"./src/models/siglip/image_processing_siglip.js":(e,t,r)=>{r.r(t),r.d(t,{SiglipImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}},
3699"./src/models/smolvlm/image_processing_smolvlm.js":(e,t,r)=>{r.r(t),r.d(t,{SmolVLMImageProcessor:()=>n.Idefics3ImageProcessor});var n=r("./src/models/idefics3/image_processing_idefics3.js")},
3699"./src/models/smolvlm/processing_smolvlm.js":(e,t,r)=>{r.r(t),r.d(t,{SmolVLMProcessor:()=>n.Idefics3Processor});var n=r("./src/models/idefics3/processing_idefics3.js")},
3699"./src/models/snac/feature_extraction_snac.js":(e,t,r)=>{r.r(t),r.d(t,{SnacFeatureExtractor:()=>i});var n=r("./src/models/dac/feature_extraction_dac.js");class i extends n.DacFeatureExtractor{}},
3699"./src/models/speecht5/feature_extraction_speecht5.js":(e,t,r)=>{r.r(t),r.d(t,{SpeechT5FeatureExtractor:()=>i});var n=r("./src/base/feature_extraction_utils.js");class i extends n.FeatureExtractor{}},
3699"./src/models/speecht5/processing_speecht5.js":(e,t,r)=>{r.r(t),r.d(t,{SpeechT5Processor:()=>s});var n=r("./src/base/processing_utils.js"),i=r("./src/tokenizers.js"),a=r("./src/models/auto/feature_extraction_auto.js");class s extends n.Processor{async _call(l){return await this.feature_extractor(l)}}Le(s,"tokenizer_class",i.AutoTokenizer),Le(s,"feature_extractor_class",a.AutoFeatureExtractor)},
vendor: 1,283 bytes, line 3699
3699"./src/models/swin2sr/image_processing_swin2sr.js":(e,t,r)=>{r.r(t),r.d(t,{Swin2SRImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{pad_image(s,o,l,u={}){const[c,d,f]=o;return super.pad_image(s,o,{width:d+(l-d%l)%l,height:c+(l-c%l)%l},{mode:"symmetric",center:!1,constant_values:-1,...u})}}},"./src/models/ultravox/processing_ultravox.js":(e,t,r)=>{r.r(t),r.d(t,{UltravoxProcessor:()=>s});var n=r("./src/models/auto/feature_extraction_auto.js"),i=r("./src/tokenizers.js"),a=r("./src/base/processing_utils.js");class s extends a.Processor{async _call(l,u=null,c={}){if(Array.isArray(l))throw new Error("Batched inputs are not supported yet.");let d={};if(u){const h=u.length,{input_features:p}=await this.feature_extractor(u,{...c,max_length:h}),m=Math.round(h/this.config.encoder_ds_factor+1e-4),_=1+Math.ceil(m/this.config.stack_factor);d.audio_token_len=[_],d.audio_values=p;const y=this.config.audio_placeholder;if(!l.includes(y))throw new Error(`The input text does not contain the image token ${y}.`);l=l.replaceAll(y,y.repeat(_))}return{...this.tokenizer(l,{add_special_tokens:!1,...c}),...d}}}Le(s,"tokenizer_class",i.AutoTokenizer),Le(s,"feature_extractor_class",n.AutoFeatureExtractor),Le(s,"uses_processor_config",!0)},
3699"./src/models/vit/image_processing_vit.js":(e,t,r)=>{r.r(t),r.d(t,{ViTFeatureExtractor:()=>a,ViTImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{}class a extends i{}},
3699"./src/models/vitmatte/image_processing_vitmatte.js":(e,t,r)=>{r.r(t),r.d(t,{VitMatteImageProcessor:()=>a});var n=r("./src/base/image_processors_utils.js"),i=r("./src/utils/tensor.js");class a extends n.ImageProcessor{async _call(o,l){Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const u=await Promise.all(o.map(f=>this.preprocess(f))),c=await Promise.all(l.map(f=>this.preprocess(f,{do_normalize:!1,do_convert_rgb:!1,do_convert_grayscale:!0})));return{pixel_values:(0,i.stack)(u.map((f,h)=>(0,i.cat)([f.pixel_values,c[h].pixel_values],0)),0),original_sizes:u.map(f=>f.original_size),reshaped_input_sizes:u.map(f=>f.reshaped_input_size)}}}},
vendor: 747 bytes, line 3699
3699"./src/models/vitpose/image_processing_vitpose.js":(e,t,r)=>{r.r(t),r.d(t,{VitPoseImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{post_process_pose_estimation(s,o,{threshold:l=null}={}){const u=s.tolist(),[c,d,f,h]=s.dims,p=[];for(let m=0;m<c;++m){const _=u[m],y=o[m],v=[];for(let b=0;b<y.length;++b){const w=y[b],x=[],E=[],T=[],S=w.at(-2)/h,A=w.at(-1)/f;for(let C=0;C<_.length;++C){let[k,M]=[0,0],D=0,$=-1/0;const V=_[C];for(let B=0;B<V.length;++B){const z=V[B];for(let q=0;q<z.length;++q){const L=z[q];D+=L,$=Math.max($,L),k+=(q+.5)*L,M+=B*L}}if(l!=null&&$<l)continue;const U=[S*k/D,A*M/D];x.push(U),T.push(C),E.push($)}v.push({bbox:w,scores:E,labels:T,keypoints:x})}p.push(v)}return p}}},
3699"./src/models/voxtral/processing_voxtral.js":(e,t,r)=>{r.r(t),r.d(t,{VoxtralProcessor:()=>d});var n=r("./src/models/auto/feature_extraction_auto.js"),i=r("./src/tokenizers.js"),a=r("./src/base/processing_utils.js"),s=r("./src/utils/tensor.js");const o="[AUDIO]",l="[BEGIN_AUDIO]",u=375;function c(f,h){const p=[];for(let m=0;m<f.length;m+=h)p.push(f.subarray(m,Math.min(m+h,f.length)));return p}class d extends a.Processor{async _call(h,p=null,m={}){if(Array.isArray(h))throw new Error("Batched inputs are not supported yet.");const _={};if(p){if(!h.includes(o))throw new Error(`The input text does not contain the audio token ${o}.`);Array.isArray(p)||(p=[p]);const v=h.split(o),b=v.length-1;if(b!==p.length)throw new Error(`The number of audio inputs (${p.length}) does not match the number of audio tokens in the text (${b}).`);const w=this.feature_extractor.config.n_samples,x=p.map(C=>c(C,w)),E=x.map(C=>C.length),T=x.flat(),S=(await Promise.all(T.map(C=>this.feature_extractor(C,m)))).map(C=>C.input_features);_.audio_values=S.length>1?(0,s.cat)(S,0):S[0];let A=v[0];for(let C=0;C<E.length;++C){A+=l;for(let k=0;k<E[C];++k)A+=o.repeat(u);A+=v[C+1]}h=A}return{...this.tokenizer(h,{add_special_tokens:!1,...m}),..._}}}Le(d,"tokenizer_class",i.AutoTokenizer),Le(d,"feature_extractor_class",n.AutoFeatureExtractor),Le(d,"uses_processor_config",!1)},
3699"./src/models/wav2vec2/feature_extraction_wav2vec2.js":(e,t,r)=>{r.r(t),r.d(t,{Wav2Vec2FeatureExtractor:()=>a});var n=r("./src/base/feature_extraction_utils.js"),i=r("./src/utils/tensor.js");class a extends n.FeatureExtractor{_zero_mean_unit_var_norm(o){const u=o.reduce((d,f)=>d+f,0)/o.length,c=o.reduce((d,f)=>d+(f-u)**2,0)/o.length;return o.map(d=>(d-u)/Math.sqrt(c+1e-7))}async _call(o){(0,n.validate_audio_inputs)(o,"Wav2Vec2FeatureExtractor"),o instanceof Float64Array&&(o=new Float32Array(o));let l=o;this.config.do_normalize&&(l=this._zero_mean_unit_var_norm(l));const u=[1,l.length];return{input_values:new i.Tensor("float32",l,u),attention_mask:new i.Tensor("int64",new BigInt64Array(l.length).fill(1n),u)}}}},
3699"./src/models/wav2vec2/processing_wav2vec2.js":(e,t,r)=>{r.r(t),r.d(t,{Wav2Vec2Processor:()=>s});var n=r("./src/tokenizers.js"),i=r("./src/models/auto/feature_extraction_auto.js"),a=r("./src/base/processing_utils.js");class s extends a.Processor{async _call(l){return await this.feature_extractor(l)}}Le(s,"tokenizer_class",n.AutoTokenizer),Le(s,"feature_extractor_class",i.AutoFeatureExtractor)},
3699"./src/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.js":(e,t,r)=>{r.r(t),r.d(t,{Wav2Vec2ProcessorWithLM:()=>s});var n=r("./src/tokenizers.js"),i=r("./src/models/auto/feature_extraction_auto.js"),a=r("./src/base/processing_utils.js");class s extends a.Processor{async _call(l){return await this.feature_extractor(l)}}Le(s,"tokenizer_class",n.AutoTokenizer),Le(s,"feature_extractor_class",i.AutoFeatureExtractor)},
vendor: 1,199 bytes, line 3699
3699"./src/models/wespeaker/feature_extraction_wespeaker.js":(e,t,r)=>{r.r(t),r.d(t,{WeSpeakerFeatureExtractor:()=>a});var n=r("./src/base/feature_extraction_utils.js");r("./src/utils/tensor.js");var i=r("./src/utils/audio.js");class a extends n.FeatureExtractor{constructor(o){super(o);const l=this.config.sampling_rate,u=(0,i.mel_filter_bank)(257,this.config.num_mel_bins,20,Math.floor(l/2),l,null,"kaldi",!0);this.mel_filters=u,this.window=(0,i.window_function)(400,"hamming",{periodic:!1}),this.min_num_frames=this.config.min_num_frames}async _extract_fbank_features(o){return o=o.map(l=>l*32768),(0,i.spectrogram)(o,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:"log",mel_floor:1192092955078125e-22,remove_dc_offset:!0,transpose:!0,min_num_frames:this.min_num_frames})}async _call(o){(0,n.validate_audio_inputs)(o,"WeSpeakerFeatureExtractor");const l=(await this._extract_fbank_features(o)).unsqueeze_(0);if(this.config.fbank_centering_span===null){const u=l.mean(1).data,c=l.data,[d,f,h]=l.dims;for(let p=0;p<d;++p){const m=p*f*h,_=p*h;for(let y=0;y<f;++y){const v=m+y*h;for(let b=0;b<h;++b)c[v+b]-=u[_+b]}}}return{input_features:l}}}},
3699"./src/models/whisper/common_whisper.js":(e,t,r)=>{r.r(t),r.d(t,{WHISPER_LANGUAGE_MAPPING:()=>i,WHISPER_TO_LANGUAGE_CODE_MAPPING:()=>a,whisper_language_to_code:()=>s});const n=[["en","english"],["zh","chinese"],["de","german"],["es","spanish"],["ru","russian"],["ko","korean"],["fr","french"],["ja","japanese"],["pt","portuguese"],["tr","turkish"],["pl","polish"],["ca","catalan"],["nl","dutch"],["ar","arabic"],["sv","swedish"],["it","italian"],["id","indonesian"],["hi","hindi"],["fi","finnish"],["vi","vietnamese"],["he","hebrew"],["uk","ukrainian"],["el","greek"],["ms","malay"],["cs","czech"],["ro","romanian"],["da","danish"],["hu","hungarian"],["ta","tamil"],["no","norwegian"],["th","thai"],["ur","urdu"],["hr","croatian"],["bg","bulgarian"],["lt","lithuanian"],["la","latin"],["mi","maori"],["ml","malayalam"],["cy","welsh"],["sk","slovak"],["te","telugu"],["fa","persian"],["lv","latvian"],["bn","bengali"],["sr","serbian"],["az","azerbaijani"],["sl","slovenian"],["kn","kannada"],["et","estonian"],["mk","macedonian"],["br","breton"],["eu","basque"],["is","icelandic"],["hy","armenian"],["ne","nepali"],["mn","mongolian"],["bs","bosnian"],["kk","kazakh"],["sq","albanian"],["sw","swahili"],["gl","galician"],["mr","marathi"],["pa","punjabi"],["si","sinhala"],["km","khmer"],["sn","shona"],["yo","yoruba"],["so","somali"],["af","afrikaans"],["oc","occitan"],["ka","georgian"],["be","belarusian"],["tg","tajik"],["sd","sindhi"],["gu","gujarati"],["am","amharic"],["yi","yiddish"],["lo","lao"],["uz","uzbek"],["fo","faroese"],["ht","haitian creole"],["ps","pashto"],["tk","turkmen"],["nn","nynorsk"],["mt","maltese"],["sa","sanskrit"],["lb","luxembourgish"],["my","myanmar"],["bo","tibetan"],["tl","tagalog"],["mg","malagasy"],["as","assamese"],["tt","tatar"],["haw","hawaiian"],["ln","lingala"],["ha","hausa"],["ba","bashkir"],["jw","javanese"],["su","sundanese"]],i=new Map(n),a=new Map([...n.map(([o,l])=>[l,o]),["burmese","my"],["valencian","ca"],["flemish","nl"],["haitian","ht"],["letzeburgesch","lb"],["pushto","ps"],["panjabi","pa"],["moldavian","ro"],["moldovan","ro"],["sinhalese","si"],["castilian","es"]]);function s(o){o=o.toLowerCase();let l=a.get(o);if(l===void 0){const u=o.match(/^<\|([a-z]{2})\|>$/);if(u&&(o=u[1]),i.has(o))l=o;else{const d=o.length===2?i.keys():i.values();throw new Error(`Language "${o}" is not supported. Must be one of: ${JSON.stringify(Array.from(d))}`)}}return l}},
3699"./src/models/whisper/feature_extraction_whisper.js":(e,t,r)=>{r.r(t),r.d(t,{WhisperFeatureExtractor:()=>s});var n=r("./src/base/feature_extraction_utils.js");r("./src/utils/tensor.js");var i=r("./src/utils/audio.js"),a=r("./src/utils/maths.js");class s extends n.FeatureExtractor{constructor(l){var u;super(l),(u=this.config).mel_filters??(u.mel_filters=(0,i.mel_filter_bank)(Math.floor(1+this.config.n_fft/2),this.config.feature_size,0,8e3,this.config.sampling_rate,"slaney","slaney")),this.window=(0,i.window_function)(this.config.n_fft,"hann")}async _extract_fbank_features(l){const u=await(0,i.spectrogram)(l,this.window,this.config.n_fft,this.config.hop_length,{power:2,mel_filters:this.config.mel_filters,log_mel:"log10",max_num_frames:Math.min(Math.floor(l.length/this.config.hop_length),this.config.nb_max_frames)}),c=u.data,d=(0,a.max)(c)[0];for(let f=0;f<c.length;++f)c[f]=(Math.max(c[f],d-8)+4)/4;return u}async _call(l,{max_length:u=null}={}){(0,n.validate_audio_inputs)(l,"WhisperFeatureExtractor");let c;const d=u??this.config.n_samples;return l.length>d?(l.length>this.config.n_samples&&console.warn("Attempting to extract features for audio longer than 30 seconds. If using a pipeline to extract transcript from a long audio clip, remember to specify `chunk_length_s` and/or `stride_length_s`."),c=l.slice(0,d)):(c=new Float32Array(d),c.set(l)),{input_features:(await this._extract_fbank_features(c)).unsqueeze_(0)}}}},
3699"./src/models/whisper/generation_whisper.js":(e,t,r)=>{r.r(t),r.d(t,{WhisperGenerationConfig:()=>i});var n=r("./src/generation/configuration_utils.js");class i extends n.GenerationConfig{constructor(){super(...arguments);Le(this,"return_timestamps",null);Le(this,"return_token_timestamps",null);Le(this,"num_frames",null);Le(this,"alignment_heads",null);Le(this,"task",null);Le(this,"language",null);Le(this,"no_timestamps_token_id",null);Le(this,"prompt_ids",null);Le(this,"is_multilingual",null);Le(this,"lang_to_id",null);Le(this,"task_to_id",null);Le(this,"max_initial_timestamp_index",1)}}},
3699"./src/models/whisper/processing_whisper.js":(e,t,r)=>{r.r(t),r.d(t,{WhisperProcessor:()=>s});var n=r("./src/models/auto/feature_extraction_auto.js"),i=r("./src/tokenizers.js"),a=r("./src/base/processing_utils.js");class s extends a.Processor{async _call(l){return await this.feature_extractor(l)}}Le(s,"tokenizer_class",i.AutoTokenizer),Le(s,"feature_extractor_class",n.AutoFeatureExtractor)},
3699"./src/models/yolos/image_processing_yolos.js":(e,t,r)=>{r.r(t),r.d(t,{YolosFeatureExtractor:()=>a,YolosImageProcessor:()=>i});var n=r("./src/base/image_processors_utils.js");class i extends n.ImageProcessor{post_process_object_detection(...o){return(0,n.post_process_object_detection)(...o)}}class a extends i{}},
3699"./src/ops/registry.js":(e,t,r)=>{r.r(t),r.d(t,{TensorOpRegistry:()=>s});var n=r("./src/backends/onnx.js"),i=r("./src/utils/tensor.js");const a=async(o,l,u)=>{const c=await(0,n.createInferenceSession)(new Uint8Array(o),l);return async d=>{const f=(0,n.isONNXProxy)(),h=Object.fromEntries(Object.entries(d).map(([m,_])=>[m,(f?_.clone():_).ort_tensor])),p=await(0,n.runInferenceSession)(c,h);return Array.isArray(u)?u.map(m=>new i.Tensor(p[m])):new i.Tensor(p[u])}};class s{static get nearest_interpolate_4d(){return this._nearest_interpolate_4d||(this._nearest_interpolate_4d=a([8,10,18,0,58,129,1,10,41,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,18,10,4,109,111,100,101,34,7,110,101,97,114,101,115,116,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,21],this.session_options,"y")),this._nearest_interpolate_4d}static get bilinear_interpolate_4d(){return this._bilinear_interpolate_4d||(this._bilinear_interpolate_4d=a([8,9,18,0,58,128,1,10,40,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,17,10,4,109,111,100,101,34,6,108,105,110,101,97,114,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,20],this.session_options,"y")),this._bilinear_interpolate_4d}static get bicubic_interpolate_4d(){return this._bicubic_interpolate_4d||(this._bicubic_interpolate_4d=a([8,9,18,0,58,127,10,39,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,16,10,4,109,111,100,101,34,5,99,117,98,105,99,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,20],this.session_options,"y")),this._bicubic_interpolate_4d}static get matmul(){return this._matmul||(this._matmul=a([8,9,18,0,58,55,10,17,10,1,97,10,1,98,18,1,99,34,6,77,97,116,77,117,108,18,1,114,90,9,10,1,97,18,4,10,2,8,1,90,9,10,1,98,18,4,10,2,8,1,98,9,10,1,99,18,4,10,2,8,1,66,2,16,20],this.session_options,"c")),this._matmul}static get stft(){return this._stft||(this._stft=a([8,7,18,0,58,148,1,10,38,10,1,115,10,1,106,10,1,119,10,1,108,18,1,111,34,4,83,84,70,84,42,15,10,8,111,110,101,115,105,100,101,100,24,1,160,1,2,18,1,115,90,26,10,1,115,18,21,10,19,8,1,18,15,10,3,18,1,98,10,3,18,1,115,10,3,18,1,99,90,11,10,1,106,18,6,10,4,8,7,18,0,90,16,10,1,119,18,11,10,9,8,1,18,5,10,3,18,1,119,90,11,10,1,108,18,6,10,4,8,7,18,0,98,31,10,1,111,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,102,10,3,18,1,100,10,3,18,1,99,66,2,16,17],this.session_options,"o")),this._stft}static get rfft(){return this._rfft||(this._rfft=a([8,9,18,0,58,97,10,33,10,1,120,10,0,10,1,97,18,1,121,34,3,68,70,84,42,15,10,8,111,110,101,115,105,100,101,100,24,1,160,1,2,18,1,100,90,21,10,1,120,18,16,10,14,8,1,18,10,10,3,18,1,115,10,3,18,1,99,90,11,10,1,97,18,6,10,4,8,7,18,0,98,21,10,1,121,18,16,10,14,8,1,18,10,10,3,18,1,115,10,3,18,1,99,66,2,16,20],this.session_options,"y")),this._rfft}static get top_k(){return this._top_k||(this._top_k=a([8,10,18,0,58,73,10,18,10,1,120,10,1,107,18,1,118,18,1,105,34,4,84,111,112,75,18,1,116,90,9,10,1,120,18,4,10,2,8,1,90,15,10,1,107,18,10,10,8,8,7,18,4,10,2,8,1,98,9,10,1,118,18,4,10,2,8,1,98,9,10,1,105,18,4,10,2,8,7,66,2,16,21],this.session_options,["v","i"])),this._top_k}static get slice(){return this._slice||(this._slice=a([8,7,18,0,58,96,10,25,10,1,120,10,1,115,10,1,101,10,1,97,10,1,116,18,1,121,34,5,83,108,105,99,101,18,1,114,90,9,10,1,120,18,4,10,2,8,1,90,9,10,1,115,18,4,10,2,8,7,90,9,10,1,101,18,4,10,2,8,7,90,9,10,1,97,18,4,10,2,8,7,90,9,10,1,116,18,4,10,2,8,7,98,9,10,1,121,18,4,10,2,8,1,66,2,16,13],this.session_options,"y")),this._slice}}Le(s,"session_options",{})},
3699"./src/pipelines.js":(e,t,r)=>{r.r(t),r.d(t,{AudioClassificationPipeline:()=>M,AutomaticSpeechRecognitionPipeline:()=>$,BackgroundRemovalPipeline:()=>z,DepthEstimationPipeline:()=>ie,DocumentQuestionAnsweringPipeline:()=>O,FeatureExtractionPipeline:()=>C,FillMaskPipeline:()=>b,ImageClassificationPipeline:()=>U,ImageFeatureExtractionPipeline:()=>k,ImageSegmentationPipeline:()=>B,ImageToImagePipeline:()=>X,ImageToTextPipeline:()=>V,ObjectDetectionPipeline:()=>L,Pipeline:()=>m,QuestionAnsweringPipeline:()=>v,SummarizationPipeline:()=>x,Text2TextGenerationPipeline:()=>w,TextClassificationPipeline:()=>_,TextGenerationPipeline:()=>S,TextToAudioPipeline:()=>N,TokenClassificationPipeline:()=>y,TranslationPipeline:()=>E,ZeroShotAudioClassificationPipeline:()=>D,ZeroShotClassificationPipeline:()=>A,ZeroShotImageClassificationPipeline:()=>q,ZeroShotObjectDetectionPipeline:()=>K,pipeline:()=>Te});var n=r("./src/tokenizers.js"),i=r("./src/models.js"),a=r("./src/models/auto/processing_auto.js");r("./src/base/processing_utils.js");var s=r("./src/utils/generic.js"),o=r("./src/utils/core.js"),l=r("./src/utils/maths.js"),u=r("./src/utils/audio.js"),c=r("./src/utils/tensor.js"),d=r("./src/utils/image.js");async function f(we){return Array.isArray(we)||(we=[we]),await Promise.all(we.map(ae=>d.RawImage.read(ae)))}async function h(we,ae){return Array.isArray(we)||(we=[we]),await Promise.all(we.map(H=>typeof H=="string"||H instanceof URL?(0,u.read_audio)(H,ae):H instanceof Float64Array?new Float32Array(H):H))}function p(we,ae){ae&&(we=we.map($e=>$e|0));const[H,fe,Se,ne]=we;return{xmin:H,ymin:fe,xmax:Se,ymax:ne}}class m extends s.Callable{constructor({task:ae,model:H,tokenizer:fe=null,processor:Se=null}){super(),this.task=ae,this.model=H,this.tokenizer=fe,this.processor=Se}async dispose(){await this.model.dispose()}}class _ extends m{constructor(ae){super(ae)}async _call(ae,{top_k:H=1}={}){const fe=this.tokenizer(ae,{padding:!0,truncation:!0}),Se=await this.model(fe),ne=this.model.config.problem_type==="multi_label_classification"?Ue=>Ue.sigmoid():Ue=>new c.Tensor("float32",(0,l.softmax)(Ue.data),Ue.dims),$e=this.model.config.id2label,me=[];for(const Ue of Se.logits){const ke=ne(Ue),ce=await(0,c.topk)(ke,H),ve=ce[0].tolist(),De=ce[1].tolist().map((tt,Ge)=>({label:$e?$e[tt]:`LABEL_${tt}`,score:ve[Ge]}));H===1?me.push(...De):me.push(De)}return Array.isArray(ae)||H===1?me:me[0]}}class y extends m{constructor(ae){super(ae)}async _call(ae,{ignore_labels:H=["O"]}={}){const fe=Array.isArray(ae),Se=this.tokenizer(fe?ae:[ae],{padding:!0,truncation:!0}),$e=(await this.model(Se)).logits,me=this.model.config.id2label,Ue=[];for(let ke=0;ke<$e.dims[0];++ke){const ce=Se.input_ids[ke],ve=$e[ke],Re=[];for(let De=0;De<ve.dims[0];++De){const tt=ve[De],Ge=(0,l.max)(tt.data)[1],Ie=me?me[Ge]:`LABEL_${Ge}`;if(H.includes(Ie))continue;const He=this.tokenizer.decode([ce[De].item()],{skip_special_tokens:!0});if(He==="")continue;const Ke=(0,l.softmax)(tt.data);Re.push({entity:Ie,score:Ke[Ge],index:De,word:He})}Ue.push(Re)}return fe?Ue:Ue[0]}}class v extends m{constructor(ae){super(ae)}async _call(ae,H,{top_k:fe=1}={}){const Se=this.tokenizer(ae,{text_pair:H,padding:!0,truncation:!0}),{start_logits:ne,end_logits:$e}=await this.model(Se),me=Se.input_ids.tolist(),Ue=Se.attention_mask.tolist(),ke=this.tokenizer.all_special_ids,ce=[];for(let ve=0;ve<ne.dims[0];++ve){const Re=me[ve],De=Re.findIndex(Xe=>Xe==this.tokenizer.sep_token_id);Ue[ve].map((Xe,mt)=>Xe==1&&(mt===0||mt>De&&ke.findIndex(gt=>gt==Re[mt])===-1));const tt=ne[ve].tolist(),Ge=$e[ve].tolist();for(let Xe=1;Xe<tt.length;++Xe)(Ue[ve]==0||Xe<=De||ke.findIndex(mt=>mt==Re[Xe])!==-1)&&(tt[Xe]=-1/0,Ge[Xe]=-1/0);const Ie=(0,l.softmax)(tt).map((Xe,mt)=>[Xe,mt]),He=(0,l.softmax)(Ge).map((Xe,mt)=>[Xe,mt]);Ie[0][0]=0,He[0][0]=0;const Ke=(0,o.product)(Ie,He).filter(Xe=>Xe[0][1]<=Xe[1][1]).map(Xe=>[Xe[0][1],Xe[1][1],Xe[0][0]*Xe[1][0]]).sort((Xe,mt)=>mt[2]-Xe[2]);for(let Xe=0;Xe<Math.min(Ke.length,fe);++Xe){const[mt,gt,$t]=Ke[Xe],kt=Re.slice(mt,gt+1),Zt=this.tokenizer.decode(kt,{skip_special_tokens:!0});ce.push({answer:Zt,score:$t})}}return fe===1?ce[0]:ce}}class b extends m{constructor(ae){super(ae)}async _call(ae,{top_k:H=5}={}){const fe=this.tokenizer(ae,{padding:!0,truncation:!0}
3699),{logits:Se}=await this.model(fe),ne=[],$e=fe.input_ids.tolist();for(let me=0;me<$e.length;++me){const Ue=$e[me],ke=Ue.findIndex(tt=>tt==this.tokenizer.mask_token_id);if(ke===-1)throw Error(`Mask token (${this.tokenizer.mask_token}) not found in text.`);const ce=Se[me][ke],ve=await(0,c.topk)(new c.Tensor("float32",(0,l.softmax)(ce.data),ce.dims),H),Re=ve[0].tolist(),De=ve[1].tolist();ne.push(De.map((tt,Ge)=>{const Ie=Ue.slice();return Ie[ke]=tt,{score:Re[Ge],token:Number(tt),token_str:this.tokenizer.decode([tt]),sequence:this.tokenizer.decode(Ie,{skip_special_tokens:!0})}}))}return Array.isArray(ae)?ne:ne[0]}}class w extends m{constructor(H){super(H);Le(this,"_key","generated_text")}async _call(H,fe={}){Array.isArray(H)||(H=[H]),this.model.config.prefix&&(H=H.map(ke=>this.model.config.prefix+ke));const Se=this.model.config.task_specific_params;Se&&Se[this.task]&&Se[this.task].prefix&&(H=H.map(ke=>Se[this.task].prefix+ke));const ne=this.tokenizer,$e={padding:!0,truncation:!0};let me;this instanceof E&&"_build_translation_inputs"in ne?me=ne._build_translation_inputs(H,$e,fe):me=ne(H,$e);const Ue=await this.model.generate({...me,...fe});return ne.batch_decode(Ue,{skip_special_tokens:!0}).map(ke=>({[this._key]:ke}))}}class x extends w{constructor(H){super(H);Le(this,"_key","summary_text")}}class E extends w{constructor(H){super(H);Le(this,"_key","translation_text")}}function T(we){return Array.isArray(we)&&we.every(ae=>"role"in ae&&"content"in ae)}class S extends m{constructor(ae){super(ae)}async _call(ae,H={}){let fe=!1,Se=!1,ne=H.add_special_tokens??(this.tokenizer.add_bos_token||this.tokenizer.add_eos_token)??!1,$e;if(typeof ae=="string")$e=ae=[ae];else if(Array.isArray(ae)&&ae.every(De=>typeof De=="string"))fe=!0,$e=ae;else{if(T(ae))ae=[ae];else if(Array.isArray(ae)&&ae.every(T))fe=!0;else throw new Error("Input must be a string, an array of strings, a Chat, or an array of Chats");Se=!0,$e=ae.map(De=>this.tokenizer.apply_chat_template(De,{tokenize:!1,add_generation_prompt:!0})),ne=!1}const me=Se?!1:H.return_full_text??!0;this.tokenizer.padding_side="left";const Ue=this.tokenizer($e,{add_special_tokens:ne,padding:!0,truncation:!0}),ke=await this.model.generate({...Ue,...H}),ce=this.tokenizer.batch_decode(ke,{skip_special_tokens:!0});let ve;!me&&Ue.input_ids.dims.at(-1)>0&&(ve=this.tokenizer.batch_decode(Ue.input_ids,{skip_special_tokens:!0}).map(De=>De.length));const Re=Array.from({length:ae.length},De=>[]);for(let De=0;De<ce.length;++De){const tt=Math.floor(De/ke.dims[0]*ae.length);ve&&(ce[De]=ce[De].slice(ve[tt])),Re[tt].push({generated_text:Se?[...ae[tt],{role:"assistant",content:ce[De]}]:ce[De]})}return!fe&&Re.length===1?Re[0]:Re}}class A extends m{constructor(ae){super(ae),this.label2id=Object.fromEntries(Object.entries(this.model.config.label2id).map(([H,fe])=>[H.toLowerCase(),fe])),this.entailment_id=this.label2id.entailment,this.entailment_id===void 0&&(console.warn("Could not find 'entailment' in label2id mapping. Using 2 as entailment_id."),this.entailment_id=2),this.contradiction_id=this.label2id.contradiction??this.label2id.not_entailment,this.contradiction_id===void 0&&(console.warn("Could not find 'contradiction' in label2id mapping. Using 0 as contradiction_id."),this.contradiction_id=0)}async _call(ae,H,{hypothesis_template:fe="This example is {}.",multi_label:Se=!1}={}){const ne=Array.isArray(ae);ne||(ae=[ae]),Array.isArray(H)||(H=[H]);const $e=H.map(ke=>fe.replace("{}",ke)),me=Se||H.length===1,Ue=[];for(const ke of ae){const ce=[];for(const De of $e){const tt=this.tokenizer(ke,{text_pair:De,padding:!0,truncation:!0}),Ge=await this.model(tt);me?ce.push([Ge.logits.data[this.contradiction_id],Ge.logits.data[this.entailment_id]]):ce.push(Ge.logits.data[this.entailment_id])}const Re=(me?ce.map(De=>(0,l.softmax)(De)[1]):(0,l.softmax)(ce)).map((De,tt)=>[De,tt]).sort((De,tt)=>tt[0]-De[0]);Ue.push({sequence:ke,labels:Re.map(De=>H[De[1]]),scores:Re.map(De=>De[0])})}return ne?Ue:Ue[0]}}class C extends m{constructor(ae){super(ae)}async _call(ae,{pooling:H="none",normalize:fe=!1,quantize:Se=!1,precision:ne="binary"}={}){const $e=this.tokenizer(ae,{padding:!0,truncation:!0}
3699),me=await this.model($e);let Ue=me.last_hidden_state??me.logits??me.token_embeddings;switch(H){case"none":break;case"mean":Ue=(0,c.mean_pooling)(Ue,$e.attention_mask);break;case"first_token":case"cls":Ue=Ue.slice(null,0);break;case"last_token":case"eos":Ue=Ue.slice(null,-1);break;default:throw Error(`Pooling method '${H}' not supported.`)}return fe&&(Ue=Ue.normalize(2,-1)),Se&&(Ue=(0,c.quantize_embeddings)(Ue,ne)),Ue}}class k extends m{constructor(ae){super(ae)}async _call(ae,{pool:H=null}={}){const fe=await f(ae),{pixel_values:Se}=await this.processor(fe),ne=await this.model({pixel_values:Se});let $e;if(H){if(!("pooler_output"in ne))throw Error("No pooled output was returned. Make sure the model has a 'pooler' layer when using the 'pool' option.");$e=ne.pooler_output}else $e=ne.last_hidden_state??ne.logits??ne.image_embeds;return $e}}class M extends m{constructor(ae){super(ae)}async _call(ae,{top_k:H=5}={}){const fe=this.processor.feature_extractor.config.sampling_rate,Se=await h(ae,fe),ne=this.model.config.id2label,$e=[];for(const me of Se){const Ue=await this.processor(me),ce=(await this.model(Ue)).logits[0],ve=await(0,c.topk)(new c.Tensor("float32",(0,l.softmax)(ce.data),ce.dims),H),Re=ve[0].tolist(),tt=ve[1].tolist().map((Ge,Ie)=>({label:ne?ne[Ge]:`LABEL_${Ge}`,score:Re[Ie]}));$e.push(tt)}return Array.isArray(ae)?$e:$e[0]}}class D extends m{constructor(ae){super(ae)}async _call(ae,H,{hypothesis_template:fe="This is a sound of {}."}={}){const Se=!Array.isArray(ae);Se&&(ae=[ae]);const ne=H.map(ce=>fe.replace("{}",ce)),$e=this.tokenizer(ne,{padding:!0,truncation:!0}),me=this.processor.feature_extractor.config.sampling_rate,Ue=await h(ae,me),ke=[];for(const ce of Ue){const ve=await this.processor(ce),Re=await this.model({...$e,...ve}),De=(0,l.softmax)(Re.logits_per_audio.data);ke.push([...De].map((tt,Ge)=>({score:tt,label:H[Ge]})))}return Se?ke[0]:ke}}class $ extends m{constructor(ae){super(ae)}async _call(ae,H={}){switch(this.model.config.model_type){case"whisper":case"lite-whisper":return this._call_whisper(ae,H);case"wav2vec2":case"wav2vec2-bert":case"unispeech":case"unispeech-sat":case"hubert":case"parakeet_ctc":return this._call_wav2vec2(ae,H);case"moonshine":return this._call_moonshine(ae,H);default:throw new Error(`AutomaticSpeechRecognitionPipeline does not support model type '${this.model.config.model_type}'.`)}}async _call_wav2vec2(ae,H){H.language&&console.warn('`language` parameter is not yet supported for `wav2vec2` models, defaulting to "English".'),H.task&&console.warn('`task` parameter is not yet supported for `wav2vec2` models, defaulting to "transcribe".');const fe=!Array.isArray(ae);fe&&(ae=[ae]);const Se=this.processor.feature_extractor.config.sampling_rate,ne=await h(ae,Se),$e=[];for(const me of ne){const Ue=await this.processor(me),ce=(await this.model(Ue)).logits[0],ve=[];for(const De of ce)ve.push((0,l.max)(De.data)[1]);const Re=this.tokenizer.decode(ve,{skip_special_tokens:!0}).trim();$e.push({text:Re})}return fe?$e[0]:$e}async _call_whisper(ae,H){const fe=H.return_timestamps??!1,Se=H.chunk_length_s??0,ne=H.force_full_sequences??!1;let $e=H.stride_length_s??null;const me={...H};fe==="word"&&(me.return_token_timestamps=!0,me.return_timestamps=!1);const Ue=!Array.isArray(ae);Ue&&(ae=[ae]);const ke=this.processor.feature_extractor.config.chunk_length/this.model.config.max_source_positions,ce=this.processor.feature_extractor.config.hop_length,ve=this.processor.feature_extractor.config.sampling_rate,Re=await h(ae,ve),De=[];for(const tt of Re){let Ge=[];if(Se>0){if($e===null)$e=Se/6;else if(Se<=$e)throw Error("`chunk_length_s` must be larger than `stride_length_s`.");const Ke=ve*Se,Xe=ve*$e,mt=Ke-2*Xe;let gt=0;for(;;){const $t=gt+Ke,kt=tt.subarray(gt,$t),Zt=await this.processor(kt),fr=gt===0,yr=$t>=tt.length;if(Ge.push({stride:[kt.length,fr?0:Xe,yr?0:Xe],input_features:Zt.input_features,is_last:yr}),yr)break;gt+=mt}}else Ge=[{stride:[tt.length,0,0],input_features:(await this.processor(tt)).input_features,is_last:!0}];for(const Ke of Ge){me.num_frames=Math.floor(Ke.stride[0]/ce);const Xe=await this.model.generate({inputs:Ke.input_features,...me});fe==="word"?(Ke.tokens=Xe.sequences.tolist()[0],Ke.token_timestamps=Xe.token_timestamps.tolist()[0].map(mt=>(0,l.round)(mt,2))):Ke.tokens=Xe[0].tolist(),Ke.stride=Ke.stride.map(mt=>mt/ve)}const[Ie,He]=this.tokenizer._decode_asr(Ge,{time_precision:ke,return_timestamps:fe,force_full_sequences:ne});De.push({text:Ie,...He})}return Ue?De[0]:De}async _call_moonshine(ae,H){const fe=!Array.isArray(ae);fe&&(ae=[ae]);const Se=this.processor.feature_extractor.config.sampling_rate,ne=await h(ae,Se),$e=[];for(const me of ne){const Ue=await this.processor(me),ke=Math.floor(me.length/Se)*6,ce=await this.model.generate({max_new_tokens:ke,...H,...Ue}),ve=this.processor.batch_decode(ce,{skip_special_tokens:!0})[0];$e.push({text:ve})}return fe?$e[0]:$e}}class V extends m{constructor(ae){super(ae)}async _call(ae,H={}){const fe=Array.isArray(ae),Se=await f(ae),{pixel_values:ne}=await this.processor(Se),$e=[];for(const me of ne){me.dims=[1,...me.dims];const Ue=await this.model.generate({inputs:me,...H}),ke=this.tokenizer.batch_decode(Ue,{skip_special_tokens:!0}).map(ce=>({generated_text:ce.trim()}));$e.push(ke)}return fe?$e:$e[0]}}class U extends m{constructor(ae){super(ae)}async _call(ae,{top_k:H=5}={}){const fe=await f(ae),{pixel_values:Se}=await this.processor(fe),ne=await this.model({pixel_values:Se}),$e=this.model.config.id2label,me=[];for(const Ue of ne.logits){const ke=await(0,c.topk)(new c.Tensor("float32",(0,l.softmax)(Ue.data),Ue.dims),H),ce=ke[0].tolist(),Re=ke[1].tolist().map((De,tt)=>({label:$e?$e[De]:`LABEL_${De}`,score:ce[tt]}));me.push(Re)}return Array.isArray(ae)?me:me[0]}}class B extends m{constructor(ae){super(ae),this.subtasks_mapping={panoptic:"post_process_panoptic_segmentation",instance:"post_process_instance_segmentation",semantic:"post_process_semantic_segmentation"}}async _call(ae,{threshold:H=.5,mask_threshold:fe=.5,overlap_mask_area_threshold:Se=.8,label_ids_to_fuse:ne=null,target_sizes:$e=null,subtask:me=null}={}){if(Array.isArray(ae)&&ae.length!==1)throw Error("Image segmentation pipeline currently only supports a batch size of 1.");const ke=await f(ae),ce=ke.map(Ke=>[Ke.height,Ke.width]),ve=await this.processor(ke),{inputNames:Re,outputN
3699ames:De}=this.model.sessions.model;if(!Re.includes("pixel_values")){if(Re.length!==1)throw Error(`Expected a single input name, but got ${Re.length} inputs: ${Re}.`);const Ke=Re[0];if(Ke in ve)throw Error(`Input name ${Ke} already exists in the inputs.`);ve[Ke]=ve.pixel_values}const tt=await this.model(ve);let Ge=null;if(me!==null)Ge=this.subtasks_mapping[me];else if(this.processor.image_processor){for(const[Ke,Xe]of Object.entries(this.subtasks_mapping))if(Xe in this.processor.image_processor){Ge=this.processor.image_processor[Xe].bind(this.processor.image_processor),me=Ke;break}}const Ie=this.model.config.id2label,He=[];if(me)if(me==="panoptic"||me==="instance"){const Ke=Ge(tt,H,fe,Se,ne,$e??ce)[0],Xe=Ke.segmentation;for(const mt of Ke.segments_info){const gt=new Uint8ClampedArray(Xe.data.length);for(let kt=0;kt<Xe.data.length;++kt)Xe.data[kt]===mt.id&&(gt[kt]=255);const $t=new d.RawImage(gt,Xe.dims[1],Xe.dims[0],1);He.push({score:mt.score,label:Ie[mt.label_id],mask:$t})}}else if(me==="semantic"){const{segmentation:Ke,labels:Xe}=Ge(tt,$e??ce)[0];for(const mt of Xe){const gt=new Uint8ClampedArray(Ke.data.length);for(let kt=0;kt<Ke.data.length;++kt)Ke.data[kt]===mt&&(gt[kt]=255);const $t=new d.RawImage(gt,Ke.dims[1],Ke.dims[0],1);He.push({score:null,label:Ie[mt],mask:$t})}}else throw Error(`Subtask ${me} not supported.`);else{const Xe=tt[De[0]];for(let mt=0;mt<ce.length;++mt){const gt=ce[mt],$t=Xe[mt];$t.data.some(Zt=>Zt<-1e-5||Zt>1+1e-5)&&$t.sigmoid_();const kt=await d.RawImage.fromTensor($t.mul_(255).to("uint8")).resize(gt[1],gt[0]);He.push({label:null,score:null,mask:kt})}}return He}}class z extends B{constructor(ae){super(ae)}async _call(ae,H={}){if(Array.isArray(ae)&&ae.length!==1)throw Error("Background removal pipeline currently only supports a batch size of 1.");const Se=await f(ae),ne=await super._call(ae,H);return Se.map((me,Ue)=>{const ke=me.clone();return ke.putAlpha(ne[Ue].mask),ke})}}class q extends m{constructor(ae){super(ae)}async _call(ae,H,{hypothesis_template:fe="This is a photo of {}"}={}){const Se=Array.isArray(ae),ne=await f(ae),$e=H.map(Re=>fe.replace("{}",Re)),me=this.tokenizer($e,{padding:this.model.config.model_type==="siglip"?"max_length":!0,truncation:!0}),{pixel_values:Ue}=await this.processor(ne),ke=await this.model({...me,pixel_values:Ue}),ce=this.model.config.model_type==="siglip"?Re=>Re.sigmoid().data:Re=>(0,l.softmax)(Re.data),ve=[];for(const Re of ke.logits_per_image){const tt=[...ce(Re)].map((Ge,Ie)=>({score:Ge,label:H[Ie]}));tt.sort((Ge,Ie)=>Ie.score-Ge.score),ve.push(tt)}return Se?ve:ve[0]}}class L extends m{constructor(ae){super(ae)}async _call(ae,{threshold:H=.9,percentage:fe=!1}={}){const Se=Array.isArray(ae);if(Se&&ae.length!==1)throw Error("Object detection pipeline currently only supports a batch size of 1.");const ne=await f(ae),$e=fe?null:ne.map(De=>[De.height,De.width]),{pixel_values:me,pixel_mask:Ue}=await this.processor(ne),ke=await this.model({pixel_values:me,pixel_mask:Ue}),ce=this.processor.image_processor.post_process_object_detection(ke,H,$e),ve=this.model.config.id2label,Re=ce.map(De=>De.boxes.map((tt,Ge)=>({score:De.scores[Ge],label:ve[De.classes[Ge]],box:p(tt,!fe)})));return Se?Re:Re[0]}}class K extends m{constructor(ae){super(ae)}async _call(ae,H,{threshold:fe=.1,top_k:Se=null,percentage:ne=!1}={}){const $e=Array.isArray(ae),me=await f(ae),Ue=this.tokenizer(H,{padding:!0,truncation:!0}),ke=await this.processor(me),ce=[];for(let ve=0;ve<me.length;++ve){const Re=me[ve],De=ne?null:[[Re.height,Re.width]],tt=ke.pixel_values[ve].unsqueeze_(0),Ge=await this.model({...Ue,pixel_values:tt});let Ie;if("post_process_grounded_object_detection"in this.processor){const He=this.processor.post_process_grounded_object_detection(Ge,Ue.input_ids,{box_threshold:fe,text_threshold:fe,target_sizes:De})[0];Ie=He.boxes.map((Ke,Xe)=>({score:He.scores[Xe],label:He.labels[Xe],box:p(Ke,!ne)}))}else{const He=this.processor.image_processor.post_process_object_detection(Ge,fe,De,!0)[0];Ie=He.boxes.map((Ke,Xe)=>({score:He.scores[Xe],label:H[He.classes[Xe]],box:p(Ke,!ne)}))}Ie.sort((He,Ke)=>Ke.score-He.score),Se!==null&&(Ie=Ie.slice(0,Se)),ce.push(Ie)}return $e?ce:ce[0]}}class O extends m{constructor(ae){super(ae)}async _call(ae,H,fe={}){const Se=(await f(ae))[0],{pixel_values:ne}=await this.processor(Se),$e=`<s_docvqa><s_question>${H}</s_question><s_answer>`,me=this.tokenizer($e,{add_special_tokens:!1,padding:!0,truncation:!0}
vendor: 6,035 bytes, line 3699
3699).input_ids,Ue=await this.model.generate({inputs:ne,max_length:this.model.config.decoder.max_position_embeddings,decoder_input_ids:me,...fe}),ce=this.tokenizer.batch_decode(Ue)[0].match(/<s_answer>(.*?)<\/s_answer>/);let ve=null;return ce&&ce.length>=2&&(ve=ce[1].trim()),[{answer:ve}]}}class N extends m{constructor(H){super(H);Le(this,"DEFAULT_VOCODER_ID","Xenova/speecht5_hifigan");this.vocoder=H.vocoder??null}async _call(H,{speaker_embeddings:fe=null}={}){return this.processor?this._call_text_to_spectrogram(H,{speaker_embeddings:fe}):this._call_text_to_waveform(H)}async _call_text_to_waveform(H){const fe=this.tokenizer(H,{padding:!0,truncation:!0}),{waveform:Se}=await this.model(fe),ne=this.model.config.sampling_rate;return new u.RawAudio(Se.data,ne)}async _call_text_to_spectrogram(H,{speaker_embeddings:fe}){if(this.vocoder||(console.log("No vocoder specified, using default HifiGan vocoder."),this.vocoder=await i.AutoModel.from_pretrained(this.DEFAULT_VOCODER_ID,{dtype:"fp32"})),(typeof fe=="string"||fe instanceof URL)&&(fe=new Float32Array(await(await fetch(fe)).arrayBuffer())),fe instanceof Float32Array)fe=new c.Tensor("float32",fe,[1,fe.length]);else if(!(fe instanceof c.Tensor))throw new Error("Speaker embeddings must be a `Tensor`, `Float32Array`, `string`, or `URL`.");const{input_ids:Se}=this.tokenizer(H,{padding:!0,truncation:!0}),{waveform:ne}=await this.model.generate_speech(Se,fe,{vocoder:this.vocoder}),$e=this.processor.feature_extractor.config.sampling_rate;return new u.RawAudio(ne.data,$e)}}class X extends m{constructor(ae){super(ae)}async _call(ae){const H=await f(ae),fe=await this.processor(H),Se=await this.model(fe),ne=[];for(const $e of Se.reconstruction){const me=$e.squeeze().clamp_(0,1).mul_(255).round_().to("uint8");ne.push(d.RawImage.fromTensor(me))}return ne.length>1?ne:ne[0]}}class ie extends m{constructor(ae){super(ae)}async _call(ae){const H=await f(ae),fe=await this.processor(H),{predicted_depth:Se}=await this.model(fe),ne=[];for(let $e=0;$e<H.length;++$e){const me=Se[$e],[Ue,ke]=me.dims.slice(-2),[ce,ve]=H[$e].size,Re=(await(0,c.interpolate_4d)(me.view(1,1,Ue,ke),{size:[ve,ce],mode:"bilinear"})).view(ve,ce),De=Re.min().item(),tt=Re.max().item(),Ge=Re.sub(De).div_(tt-De).mul_(255).to("uint8").unsqueeze(0),Ie=d.RawImage.fromTensor(Ge);ne.push({predicted_depth:Re,depth:Ie})}return ne.length>1?ne:ne[0]}}const ee=Object.freeze({"text-classification":{tokenizer:n.AutoTokenizer,pipeline:_,model:i.AutoModelForSequenceClassification,default:{model:"Xenova/distilbert-base-uncased-finetuned-sst-2-english"},type:"text"},"token-classification":{tokenizer:n.AutoTokenizer,pipeline:y,model:i.AutoModelForTokenClassification,default:{model:"Xenova/bert-base-multilingual-cased-ner-hrl"},type:"text"},"question-answering":{tokenizer:n.AutoTokenizer,pipeline:v,model:i.AutoModelForQuestionAnswering,default:{model:"Xenova/distilbert-base-cased-distilled-squad"},type:"text"},"fill-mask":{tokenizer:n.AutoTokenizer,pipeline:b,model:i.AutoModelForMaskedLM,default:{model:"Xenova/bert-base-uncased"},type:"text"},summarization:{tokenizer:n.AutoTokenizer,pipeline:x,model:i.AutoModelForSeq2SeqLM,default:{model:"Xenova/distilbart-cnn-6-6"},type:"text"},translation:{tokenizer:n.AutoTokenizer,pipeline:E,model:i.AutoModelForSeq2SeqLM,default:{model:"Xenova/t5-small"},type:"text"},"text2text-generation":{tokenizer:n.AutoTokenizer,pipeline:w,model:i.AutoModelForSeq2SeqLM,default:{model:"Xenova/flan-t5-small"},type:"text"},"text-generation":{tokenizer:n.AutoTokenizer,pipeline:S,model:i.AutoModelForCausalLM,default:{model:"Xenova/gpt2"},type:"text"},"zero-shot-classification":{tokenizer:n.AutoTokenizer,pipeline:A,model:i.AutoModelForSequenceClassification,default:{model:"Xenova/distilbert-base-uncased-mnli"},type:"text"},"audio-classification":{pipeline:M,model:i.AutoModelForAudioClassification,processor:a.AutoProcessor,default:{model:"Xenova/wav2vec2-base-superb-ks"},type:"audio"},"zero-shot-audio-classification":{tokenizer:n.AutoTokenizer,pipeline:D,model:i.AutoModel,processor:a.AutoProcessor,default:{model:"Xenova/clap-htsat-unfused"},type:"multimodal"},"automatic-speech-recognition":{tokenizer:n.AutoTokenizer,pipeline:$,model:[i.AutoModelForSpeechSeq2Seq,i.AutoModelForCTC],processor:a.AutoProcessor,default:{model:"Xenova/whisper-tiny.en"},type:"multimodal"},"text-to-audio":{tokenizer:n.AutoTokenizer,pipeline:N,model:[i.AutoModelForTextToWaveform,i.AutoModelForTextToSpectrogram],processor:[a.AutoProcessor,null],default:{model:"Xenova/speecht5_tts"},type:"text"},"image-to-text":{tokenizer:n.AutoTokenizer,pipeline:V,model:i.AutoModelForVision2Seq,processor:a.AutoProcessor,default:{model:"Xenova/vit-gpt2-image-captioning"},type:"multimodal"},"image-classification":{pipeline:U,model:i.AutoModelForImageClassification,processor:a.AutoProcessor,default:{model:"Xenova/vit-base-patch16-224"},type:"multimodal"},"image-segmentation":{pipeline:B,model:[i.AutoModelForImageSegmentation,i.AutoModelForSemanticSegmentation,i.AutoModelForUniversalSegmentation],processor:a.AutoProcessor,default:{model:"Xenova/detr-resnet-50-panoptic"},type:"multimodal"},"background-removal":{pipeline:z,model:[i.AutoModelForImageSegmentation,i.AutoModelForSemanticSegmentation,i.AutoModelForUniversalSegmentation],processor:a.AutoProcessor,default:{model:"Xenova/modnet"},type:"image"},"zero-shot-image-classification":{tokenizer:n.AutoTokenizer,pipeline:q,model:i.AutoModel,processor:a.AutoProcessor,default:{model:"Xenova/clip-vit-base-patch32"},type:"multimodal"},"object-detection":{pipeline:L,model:i.AutoModelForObjectDetection,processor:a.AutoProcessor,default:{model:"Xenova/detr-resnet-50"},type:"multimodal"},"zero-shot-object-detection":{tokenizer:n.AutoTokenizer,pipeline:K,model:i.AutoModelForZeroShotObjectDetection,processor:a.AutoProcessor,default:{model:"Xenova/owlvit-base-patch32"},type:"multimodal"},"document-question-answering":{tokenizer:n.AutoTokenizer,pipeline:O,model:i.AutoModelForDocumentQuestionAnswering,processor:a.AutoProcessor,default:{model:"Xenova/d
3699onut-base-finetuned-docvqa"},type:"multimodal"},"image-to-image":{pipeline:X,model:i.AutoModelForImageToImage,processor:a.AutoProcessor,default:{model:"Xenova/swin2SR-classical-sr-x2-64"},type:"image"},"depth-estimation":{pipeline:ie,model:i.AutoModelForDepthEstimation,processor:a.AutoProcessor,default:{model:"Xenova/dpt-large"},type:"image"},"feature-extraction":{tokenizer:n.AutoTokenizer,pipeline:C,model:i.AutoModel,default:{model:"Xenova/all-MiniLM-L6-v2"},type:"text"},"image-feature-extraction":{processor:a.AutoProcessor,pipeline:k,model:[i.AutoModelForImageFeatureExtraction,i.AutoModel],default:{model:"Xenova/vit-base-patch16-224-in21k"},type:"image"}}),le=Object.freeze({"sentiment-analysis":"text-classification",ner:"token-classification",asr:"automatic-speech-recognition","text-to-speech":"text-to-audio",embeddings:"feature-extraction"});async function Te(we,ae=null,{progress_callback:H=null,config:fe=null,cache_dir:Se=null,local_files_only:ne=!1,revision:$e="main",device:me=null,dtype:Ue=null,subfolder:ke="onnx",use_external_data_format:ce=null,model_file_name:ve=null,session_options:Re={}}={}){we=le[we]??we;const De=ee[we.split("_",1)[0]];if(!De)throw Error(`Unsupported pipeline: ${we}. Must be one of [${Object.keys(ee)}]`);ae||(ae=De.default.model,console.log(`No model specified. Using default model: "${ae}".`));const tt={progress_callback:H,config:fe,cache_dir:Se,local_files_only:ne,revision:$e,device:me,dtype:Ue,subfolder:ke,use_external_data_format:ce,model_file_name:ve,session_options:Re},Ge=new Map([["tokenizer",De.tokenizer],["model",De.model],["processor",De.processor]]),Ie=await be(Ge,ae,tt);Ie.task=we,(0,o.dispatchCallback)(H,{status:"ready",task:we,model:ae});const He=De.pipeline;return new He(Ie)}async function be(we,ae,H){const fe=Object.create(null),Se=[];for(const[ne,$e]of we.entries()){if(!$e)continue;let me;Array.isArray($e)?me=new Promise(async(Ue,ke)=>{var ve,Re;let ce;for(const De of $e){if(De===null){Ue(null);return}try{Ue(await De.from_pretrained(ae,H));return}catch(tt){if((ve=tt.message)!=null&&ve.includes("Unsupported model type"))ce=tt;else if((Re=tt.message)!=null&&Re.includes("Could not locate file"))ce=tt;else{ke(tt);return}}}ke(ce)}):me=$e.from_pretrained(ae,H),fe[ne]=me,Se.push(me)}await Promise.all(Se);for(const[ne,$e]of Object.entries(fe))fe[ne]=await $e;return fe}},
3699"./src/tokenizers.js":(e,t,r)=>{r.r(t),r.d(t,{AlbertTokenizer:()=>Ar,AutoTokenizer:()=>sf,BartTokenizer:()=>It,BertTokenizer:()=>wr,BlenderbotSmallTokenizer:()=>$n,BlenderbotTokenizer:()=>hr,BloomTokenizer:()=>Jn,CLIPTokenizer:()=>Qs,CamembertTokenizer:()=>ct,CodeGenTokenizer:()=>Ta,CodeLlamaTokenizer:()=>pn,CohereTokenizer:()=>ha,ConvBertTokenizer:()=>Ee,DebertaTokenizer:()=>Z,DebertaV2Tokenizer:()=>Pe,DistilBertTokenizer:()=>Ye,ElectraTokenizer:()=>sr,Ernie4_5_Tokenizer:()=>ud,EsmTokenizer:()=>ci,FalconTokenizer:()=>aa,GPT2Tokenizer:()=>or,GPTNeoXTokenizer:()=>xi,GemmaTokenizer:()=>Ki,Grok1Tokenizer:()=>ls,HerbertTokenizer:()=>ue,LlamaTokenizer:()=>En,M2M100Tokenizer:()=>Ei,MBart50Tokenizer:()=>Qr,MBartTokenizer:()=>cr,MPNetTokenizer:()=>fa,MarianTokenizer:()=>jt,MgpstrTokenizer:()=>sl,MobileBertTokenizer:()=>Jt,NllbTokenizer:()=>sa,NougatTokenizer:()=>El,PreTrainedTokenizer:()=>Ut,Qwen2Tokenizer:()=>oi,RoFormerTokenizer:()=>Oe,RobertaTokenizer:()=>Zr,SiglipTokenizer:()=>us,SpeechT5Tokenizer:()=>xl,SqueezeBertTokenizer:()=>Ht,T5Tokenizer:()=>ir,TokenizerModel:()=>k,VitsTokenizer:()=>Sa,Wav2Vec2CTCTokenizer:()=>Pt,WhisperTokenizer:()=>gi,XLMRobertaTokenizer:()=>si,XLMTokenizer:()=>Ct,is_chinese_char:()=>b});var n=r("./src/utils/generic.js"),i=r("./src/utils/core.js"),a=r("./src/utils/hub.js"),s=r("./src/utils/maths.js"),o=r("./src/utils/tensor.js"),l=r("./src/utils/data-structures.js"),u=r("./node_modules/@huggingface/jinja/dist/index.js"),c=r("./src/models/whisper/common_whisper.js");async function d(st,se){const Ce=await Promise.all([(0,a.getModelJSON)(st,"tokenizer.json",!0,se),(0,a.getModelJSON)(st,"tokenizer_config.json",!0,se)]);return se.legacy!==null&&(Ce[1].legacy=se.legacy),Ce}function f(st,se){const Ce=[];let Ve=0;for(const Je of st.matchAll(se)){const it=Je[0];Ve<Je.index&&Ce.push(st.slice(Ve,Je.index)),it.length>0&&Ce.push(it),Ve=Je.index+it.length}return Ve<st.length&&Ce.push(st.slice(Ve)),Ce}function h(st,se=!0){if(st.Regex!==void 0){let Ce=st.Regex.replace(/\\([#&~])/g,"$1");for(const[Ve,Je]of A)Ce=Ce.replaceAll(Ve,Je);return new RegExp(Ce,"gu")}else if(st.String!==void 0){const Ce=(0,i.escapeRegExp)(st.String);return new RegExp(se?Ce:`(${Ce})`,"gu")}else return console.warn("Unknown pattern type:",st),null}function p(st){return new Map(Object.entries(st))}function m(st){const se=st.dims;switch(se.length){case 1:return st.tolist();case 2:if(se[0]!==1)throw new Error("Unable to decode tensor with `batch size !== 1`. Use `tokenizer.batch_decode(...)` for batched inputs.");return st.tolist()[0];default:throw new Error(`Expected tensor to have 1-2 dimensions, got ${se.length}.`)}}function _(st){return st.replace(/ \./g,".").replace(/ \?/g,"?").replace(/ \!/g,"!").replace(/ ,/g,",").replace(/ \' /g,"'").replace(/ n\'t/g,"n't").replace(/ \'m/g,"'m").replace(/ \'s/g,"'s").replace(/ \'ve/g,"'ve").replace(/ \'re/g,"'re")}function y(st){return st.replace(new RegExp("\\p{M}","gu"),"")}function v(st){return y(st.toLowerCase())}function b(st){return st>=19968&&st<=40959||st>=13312&&st<=19903||st>=131072&&st<=173791||st>=173824&&st<=177983||st>=177984&&st<=178207||st>=178208&&st<=183983||st>=63744&&st<=64255||st>=194560&&st<=195103}function w(st,se,Ce){const Ve=[];let Je=0;for(;Je<st.length;){if(Ve.push(st[Je]),(se.get(st[Je])??Ce)!==Ce){++Je;continue}for(;++Je<st.length&&(se.get(st[Je])??Ce)===Ce;)se.get(Ve.at(-1))!==Ce&&(Ve[Ve.length-1]+=st[Je])}return Ve}function x(st){return st.match(/\S+/g)||[]}const E="\\p{P}\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E",T=new RegExp(`^[${E}]+$`,"gu"),S=".,!?â¦ãï¼ãà¥¤ÛØ",A=new Map([["(?i:'s|'t|'re|'ve|'m|'ll|'d)","(?:'([sS]|[tT]|[rR][eE]|[vV][eE]|[mM]|[lL][lL]|[dD]))"],["(?i:[sdmt]|ll|ve|re)","(?:[sS]|[dD]|[mM]|[tT]|[lL][lL]|[vV][eE]|[rR][eE])"],["[^\\r\\n\\p{L}\\p{N}]?+","[^\\r\\n\\p{L}\\p{N}]?"],["[^\\s\\p{L}\\p{N}]++","[^\\s\\p{L}\\p{N}]+"],[` ?[^(\\s|[${S}])]+`,` ?[^\\s${S}]+`]]);class C{constructor(se){this.content=se.content,this.id=se.id,this.single_word=se.single_word??!1,this.lstrip=se.lstrip??!1,this.rstrip=se.rstrip??!1,this.special=se.special??!1,this.normalized=se.normalized??null}}class k extends n.Callable{constructor(se){super(),this.config=se,this.vocab=[],this.tokens_to_ids=new Map,this.unk_token_id=void 0,this.unk_token=void 0,this.end_of_word_suffix=void 0,this.fuse_unk=this.config.fuse_unk??!1}static fromConfig(se,...Ce){switch(se.type){case"WordPiece":return new M(se);case"Unigram":return new D(se,...Ce);case"BPE":return new U(se);default:if(se.vocab)return Array.isArray(se.vocab)?new D(se,...Ce):Object.hasOwn(se,"continuing_subword_prefix")&&Object.hasOwn(se,"unk_token")?Object.hasOwn(se,"merges")?new U(se):new M(se):new B(se,...Ce);throw new Error(`Unknown TokenizerModel type: ${se.type}`)}}_call(se){return se=this.encode(se),this.fuse_unk&&(se=w(se,this.tokens_to_ids,this.unk_token_id)),se}encode(se){throw Error("encode should be implemented in subclass.")}convert_tokens_to_ids(se){return se.map(Ce=>this.tokens_to_ids.get(Ce)??this.unk_token_id)}convert_ids_to_tokens(se){return se.map(Ce=>this.vocab[Ce]??this.unk_token)}}class M extends k{constructor(se){super(se),this.tokens_to_ids=p(se.vocab),this.unk_token_id=this.tokens_to_ids.get(se.unk_token),this.unk_token=se.unk_token,this.max_input_chars_per_word=se.max_input_chars_per_word??100,this.vocab=new Array(this.tokens_to_ids.size);for(const[Ce,Ve]of this.tokens_to_ids)this.vocab[Ve]=Ce}encode(se){const Ce=[];for(const Ve of se){const Je=[...Ve];if(Je.length>
3699this.max_input_chars_per_word){Ce.push(this.unk_token);continue}let it=!1,vt=0;const Bt=[];for(;vt<Je.length;){let er=Je.length,Gt=null;for(;vt<er;){let dr=Je.slice(vt,er).join("");if(vt>0&&(dr=this.config.continuing_subword_prefix+dr),this.tokens_to_ids.has(dr)){Gt=dr;break}--er}if(Gt===null){it=!0;break}Bt.push(Gt),vt=er}it?Ce.push(this.unk_token):Ce.push(...Bt)}return Ce}}class D extends k{constructor(se,Ce){super(se);const Ve=se.vocab.length;this.vocab=new Array(Ve),this.scores=new Array(Ve);for(let Je=0;Je<Ve;++Je)[this.vocab[Je],this.scores[Je]]=se.vocab[Je];this.unk_token_id=se.unk_id,this.unk_token=this.vocab[se.unk_id],this.tokens_to_ids=new Map(this.vocab.map((Je,it)=>[Je,it])),this.bos_token=" ",this.bos_token_id=this.tokens_to_ids.get(this.bos_token),this.eos_token=Ce.eos_token,this.eos_token_id=this.tokens_to_ids.get(this.eos_token),this.unk_token=this.vocab[this.unk_token_id],this.minScore=(0,s.min)(this.scores)[0],this.unk_score=this.minScore-10,this.scores[this.unk_token_id]=this.unk_score,this.trie=new l.CharTrie,this.trie.extend(this.vocab),this.fuse_unk=!0}populateNodes(se){const Ce=se.chars,Ve=1;let Je=0;for(;Je<Ce.length;){let it=!1;const vt=Ce.slice(Je).join(""),Bt=this.trie.commonPrefixSearch(vt);for(const er of Bt){const Gt=this.tokens_to_ids.get(er),dr=this.scores[Gt],Dr=(0,i.len)(er);se.insert(Je,Dr,dr,Gt),!it&&Dr===Ve&&(it=!0)}it||se.insert(Je,Ve,this.unk_score,this.unk_token_id),Je+=Ve}}tokenize(se){const Ce=new l.TokenLattice(se,this.bos_token_id,this.eos_token_id);return this.populateNodes(Ce),Ce.tokens()}encode(se){const Ce=[];for(const Ve of se){const Je=this.tokenize(Ve);Ce.push(...Je)}return Ce}}const $=(()=>{const st=[...Array.from({length:94},(Je,it)=>it+33),...Array.from({length:12},(Je,it)=>it+161),...Array.from({length:82},(Je,it)=>it+174)],se=st.slice();let Ce=0;for(let Je=0;Je<256;++Je)st.includes(Je)||(st.push(Je),se.push(256+Ce),Ce+=1);const Ve=se.map(Je=>String.fromCharCode(Je));return Object.fromEntries(st.map((Je,it)=>[Je,Ve[it]]))})(),V=(0,i.reverseDictionary)($);class U extends k{constructor(se){super(se),this.tokens_to_ids=p(se.vocab),this.unk_token_id=this.tokens_to_ids.get(se.unk_token),this.unk_token=se.unk_token,this.vocab=new Array(this.tokens_to_ids.size);for(const[Ve,Je]of this.tokens_to_ids)this.vocab[Je]=Ve;const Ce=Array.isArray(se.merges[0]);this.merges=Ce?se.merges:se.merges.map(Ve=>Ve.split(" ",2)),this.bpe_ranks=new Map(this.merges.map((Ve,Je)=>[JSON.stringify(Ve),Je])),this.end_of_word_suffix=se.end_of_word_suffix,this.continuing_subword_suffix=se.continuing_subword_suffix??null,this.byte_fallback=this.config.byte_fallback??!1,this.byte_fallback&&(this.text_encoder=new TextEncoder),this.ignore_merges=this.config.ignore_merges??!1,this.max_length_to_cache=256,this.cache_capacity=1e4,this.cache=new l.LRUCache(this.cache_capacity)}clear_cache(){this.cache.clear()}bpe(se){if(se.length===0)return[];const Ce=this.cache.get(se);if(Ce!==void 0)return Ce;const Ve=Array.from(se);this.end_of_word_suffix&&(Ve[Ve.length-1]+=this.end_of_word_suffix);let Je=[];if(Ve.length>1){const it=new l.PriorityQueue((er,Gt)=>er.score<Gt.score);let vt={token:Ve[0],bias:0,prev:null,next:null},Bt=vt;for(let er=1;er<Ve.length;++er){const Gt={bias:er/Ve.length,token:Ve[er],prev:Bt,next:null};Bt.next=Gt,this._add_node(it,Bt),Bt=Gt}for(;!it.isEmpty();){const er=it.pop();if(er.deleted||!er.next||er.next.deleted)continue;if(er.deleted=!0,er.next.deleted=!0,er.prev){const dr={...er.prev};er.prev.deleted=!0,er.prev=dr,dr.prev?dr.prev.next=dr:vt=dr}const Gt={token:er.token+er.next.token,bias:er.bias,prev:er.prev,next:er.next.next};Gt.prev?(Gt.prev.next=Gt,this._add_node(it,Gt.prev)):vt=Gt,Gt.next&&(Gt.next.prev=Gt,this._add_node(it,Gt))}for(let er=vt;er!==null;er=er.next)Je.push(er.token)}else Je=Ve;if(this.continuing_subword_suffix)for(let it=0;it<Je.length-1;++it)Je[it]+=this.continuing_subword_suffix;return se.length<this.max_length_to_cache&&this.cache.put(se,Je),Je}_add_node(se,Ce){const Ve=this.bpe_ranks.get(JSON.stringify([Ce.token,Ce.next.token]));Ve!==void 0&&(Ce.score=Ve+Ce.bias,se.push(Ce))}encode(se){const Ce=[];for(const Ve of se){if(this.ignore_merges&&this.tokens_to_ids.has(Ve)){Ce.pu
3699sh(Ve);continue}const Je=this.bpe(Ve);for(const it of Je)if(this.tokens_to_ids.has(it))Ce.push(it);else if(this.byte_fallback){const vt=Array.from(this.text_encoder.encode(it)).map(Bt=>`<0x${Bt.toString(16).toUpperCase().padStart(2,"0")}>`);vt.every(Bt=>this.tokens_to_ids.has(Bt))?Ce.push(...vt):Ce.push(this.unk_token)}else Ce.push(this.unk_token)}return Ce}}class B extends k{constructor(se,Ce){super(se),this.tokens_to_ids=p(Ce.target_lang?se.vocab[Ce.target_lang]:se.vocab),this.bos_token=Ce.bos_token,this.bos_token_id=this.tokens_to_ids.get(this.bos_token),this.eos_token=Ce.eos_token,this.eos_token_id=this.tokens_to_ids.get(this.eos_token),this.pad_token=Ce.pad_token,this.pad_token_id=this.tokens_to_ids.get(this.pad_token),this.unk_token=Ce.unk_token,this.unk_token_id=this.tokens_to_ids.get(this.unk_token),this.vocab=new Array(this.tokens_to_ids.size);for(const[Ve,Je]of this.tokens_to_ids)this.vocab[Je]=Ve}encode(se){return se}}class z extends n.Callable{constructor(se){super(),this.config=se}static fromConfig(se){if(se===null)return null;switch(se.type){case"BertNormalizer":return new we(se);case"Precompiled":return new yr(se);case"Sequence":return new be(se);case"Replace":return new q(se);case"NFC":return new K(se);case"NFD":return new O(se);case"NFKC":return new N(se);case"NFKD":return new X(se);case"Strip":return new ie(se);case"StripAccents":return new ee(se);case"Lowercase":return new le(se);case"Prepend":return new Te(se);default:throw new Error(`Unknown Normalizer type: ${se.type}`)}}normalize(se){throw Error("normalize should be implemented in subclass.")}_call(se){return this.normalize(se)}}class q extends z{normalize(se){const Ce=h(this.config.pattern);return Ce===null?se:se.replaceAll(Ce,this.config.content)}}class L extends z{constructor(){super(...arguments);Le(this,"form")}normalize(Ce){return Ce=Ce.normalize(this.form),Ce}}class K extends L{constructor(){super(...arguments);Le(this,"form","NFC")}}class O extends L{constructor(){super(...arguments);Le(this,"form","NFD")}}class N extends L{constructor(){super(...arguments);Le(this,"form","NFKC")}}class X extends L{constructor(){super(...arguments);Le(this,"form","NFKD")}}class ie extends z{normalize(se){return this.config.strip_left&&this.config.strip_right?se=se.trim():(this.config.strip_left&&(se=se.trimStart()),this.config.strip_right&&(se=se.trimEnd())),se}}class ee extends z{normalize(se){return se=y(se),se}}class le extends z{normalize(se){return se=se.toLowerCase(),se}}class Te extends z{normalize(se){return se=this.config.prepend+se,se}}class be extends z{constructor(se){super(se),this.normalizers=se.normalizers.map(Ce=>z.fromConfig(Ce))}normalize(se){return this.normalizers.reduce((Ce,Ve)=>Ve.normalize(Ce),se)}}class we extends z{_tokenize_chinese_chars(se){const Ce=[];for(let Ve=0;Ve<se.length;++Ve){const Je=se[Ve],it=Je.charCodeAt(0);b(it)?(Ce.push(" "),Ce.push(Je),Ce.push(" ")):Ce.push(Je)}return Ce.join("")}stripAccents(se){return se.normalize("NFD").replace(new RegExp("\\p{Mn}","gu"),"")}_is_control(se){switch(se){case" ":case` 3700`:case"\r":return!1;default:return new RegExp("^\\p{Cc}|\\p{Cf}|\\p{Co}|\\p{Cs}$","u").test(se)}}_clean_text(se){const Ce=[];for(const Ve of se){const Je=Ve.charCodeAt(0);Je===0||Je===65533||this._is_control(Ve)||(/^\s$/.test(Ve)?Ce.push(" "):Ce.push(Ve))}return Ce.join("")}normalize(se){return this.config.clean_text&&(se=this._clean_text(se)),this.config.handle_chinese_chars&&(se=this._tokenize_chinese_chars(se)),this.config.lowercase?(se=se.toLowerCase(),this.config.strip_accents!==!1&&(se=this.stripAccents(se))):this.config.strip_accents&&(se=this.stripAccents(se)),se}}class ae extends n.Callable{static fromConfig(se){if(se===null)return null;switch(se.type){case"BertPreTokenizer":return new H(se);case"Sequence":return new Kt(se);case"Whitespace":return new pr(se);case"WhitespaceSplit":return new Ot(se);case"Metaspace":return new Zt(se);case"ByteLevel":return new fe(se);case"Split":return new Se(se);case"Punctuation":return new ne(se);case"Digits":return new $e(se);case"Replace":return new Ir(se);default:throw new Error(`Unknown PreTokenizer type: ${se.type}`)}}pre_tokenize_text(se,Ce){throw Error("pre_tokenize_text should be implemented in subclass.")}pre_tokenize(se,Ce){return(Array.isArray(se)?se.map(Ve=>this.pre_tokenize_text(Ve,Ce)):this.pre_tokenize_text(se,Ce)).flat()}_call(se,Ce){return this.pre_tokenize(se,Ce)}}class H extends ae{constructor(se){super(),this.pattern=new RegExp(`[^\\s${E}]+|[${E}]`,"gu")}pre_tokenize_text(se,Ce){return se.trim().match(this.pattern)||[]}}class fe extends ae{constructor(se){super(),this.config=se,this.add_prefix_space=this.config.add_prefix_space,this.trim_offsets=this.config.trim_offsets,this.use_regex=this.config.use_regex??!0,this.pattern=new RegExp("'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)|\\s+","gu"),this.byte_encoder=$,this.text_encoder=new TextEncoder}pre_tokenize_text(se,Ce){return this.add_prefix_space&&!se.startsWith(" ")&&(se=" "+se),(this.use_regex?se.match(this.pattern)||[]:[se]).map(Je=>Array.from(this.text_encoder.encode(Je),it=>this.byte_encoder[it]).join(""))}}class Se extends ae{constructor(se){super(),this.config=se,this.pattern=h(this.config.pattern,this.config.invert)}pre_tokenize_text(se,Ce){var Ve;return this.pattern===null?[]:this.config.invert?se.match(this.pattern)||[]:((Ve=this.config.behavior)==null?void 0:Ve.toLowerCase())==="removed"?se.split(this.pattern).filter(Je=>Je):f(se,this.pattern)}}class ne extends ae{constructor(se){super(),this.config=se,this.pattern=new RegExp(`[^${E}]+|[${E}]+`,"gu")}pre_tokenize_text(se,Ce){return se.match(this.pattern)||[]}}class $e extends ae{constructor(se){super(),this.config=se;const Ce=`[^\\d]+|\\d${this.config.individual_digits?"":"+"}`;this.pattern=new RegExp(Ce,"gu")}pre_tokenize_text(se,Ce){return se.match(this.pattern)||[]}}class me extends n.Callable{constructor(se){super(),this.config=se}static fromConfig(se){if(se===null)return null;switch(se.type){case"TemplateProcessing":return new ce(se);case"ByteLevel":return new ve(se);case"RobertaProcessing":return new ke(se);case"BertProcessing":return new Ue(se);case"Sequence":return new Re(se);default:throw new Error(`Unknown PostProcessor type: ${se.type}`)}}post_process(se,...Ce){throw Error("post_process should be implemented in subclass.")}_call(se,...Ce){return this.post_process(se,...Ce)}}class Ue extends me{constructor(se){super(se),this.cls=se.cls[0],this.sep=se.sep[0]}post_process(se,Ce=null,{add_special_tokens:Ve=!0}={}){Ve&&(se=(0,i.mergeArrays)([this.cls],se,[this.sep]));let Je=new Array(se.length).fill(0);if(Ce!==null){const it=Ve&&this instanceof ke?[this.sep]:[],vt=Ve?[this.sep]:[];se=(0,i.mergeArrays)(se,it,Ce,vt),Je=(0,i.mergeArrays)(Je,new Array(Ce.length+it.length+vt.length).fill(1))}return{tokens:se,token_type_ids:Je}}}class ke extends Ue{}class ce extends me{constructor(se){super(se),this.single=se.single,this.pair=se.pair}post_process(se,Ce=null,{add_special_tokens:Ve=!0}={}){const Je=Ce===null?this.single:this.pair;let it=[],vt=[];for(const Bt of Je)"SpecialToken"in Bt?Ve&&(it.push(Bt.SpecialToken.id),vt.push(Bt.SpecialToken.type_id)):"Sequence"in Bt&&(Bt.Sequence.id==="A"?(it=(0,i.mergeArrays)(it,se),vt=(0,i.mergeArrays)(vt,new Array(se.length).fill(Bt.Sequence.type_id
3700))):Bt.Sequence.id==="B"&&(it=(0,i.mergeArrays)(it,Ce),vt=(0,i.mergeArrays)(vt,new Array(Ce.length).fill(Bt.Sequence.type_id))));return{tokens:it,token_type_ids:vt}}}class ve extends me{post_process(se,Ce=null){return Ce&&(se=(0,i.mergeArrays)(se,Ce)),{tokens:se}}}class Re extends me{constructor(se){super(se),this.processors=se.processors.map(Ce=>me.fromConfig(Ce))}post_process(se,Ce=null,Ve={}){let Je;for(const it of this.processors)if(it instanceof ve)se=it.post_process(se).tokens,Ce&&(Ce=it.post_process(Ce).tokens);else{const vt=it.post_process(se,Ce,Ve);se=vt.tokens,Je=vt.token_type_ids}return{tokens:se,token_type_ids:Je}}}class De extends n.Callable{constructor(se){super(),this.config=se,this.added_tokens=[],this.end_of_word_suffix=null,this.trim_offsets=se.trim_offsets}static fromConfig(se){if(se===null)return null;switch(se.type){case"WordPiece":return new Ke(se);case"Metaspace":return new fr(se);case"ByteLevel":return new Xe(se);case"Replace":return new tt(se);case"ByteFallback":return new Ge(se);case"Fuse":return new Ie(se);case"Strip":return new He(se);case"Sequence":return new gt(se);case"CTC":return new mt(se);case"BPEDecoder":return new $t(se);default:throw new Error(`Unknown Decoder type: ${se.type}`)}}_call(se){return this.decode(se)}decode(se){return this.decode_chain(se).join("")}decode_chain(se){throw Error("`decode_chain` should be implemented in subclass.")}}class tt extends De{decode_chain(se){const Ce=h(this.config.pattern);return Ce===null?se:se.map(Ve=>Ve.replaceAll(Ce,this.config.content))}}class Ge extends De{constructor(se){super(se),this.text_decoder=new TextDecoder}decode_chain(se){const Ce=[];let Ve=[];for(const Je of se){let it=null;if(Je.length===6&&Je.startsWith("<0x")&&Je.endsWith(">")){const vt=parseInt(Je.slice(3,5),16);isNaN(vt)||(it=vt)}if(it!==null)Ve.push(it);else{if(Ve.length>0){const vt=this.text_decoder.decode(Uint8Array.from(Ve));Ce.push(vt),Ve=[]}Ce.push(Je)}}if(Ve.length>0){const Je=this.text_decoder.decode(Uint8Array.from(Ve));Ce.push(Je),Ve=[]}return Ce}}class Ie extends De{decode_chain(se){return[se.join("")]}}class He extends De{constructor(se){super(se),this.content=this.config.content,this.start=this.config.start,this.stop=this.config.stop}decode_chain(se){return se.map(Ce=>{let Ve=0;for(let it=0;it<this.start&&Ce[it]===this.content;++it){Ve=it+1;continue}let Je=Ce.length;for(let it=0;it<this.stop;++it){const vt=Ce.length-it-1;if(Ce[vt]===this.content){Je=vt;continue}else break}return Ce.slice(Ve,Je)})}}class Ke extends De{constructor(se){super(se),this.cleanup=se.cleanup}decode_chain(se){return se.map((Ce,Ve)=>(Ve!==0&&(Ce.startsWith(this.config.prefix)?Ce=Ce.replace(this.config.prefix,""):Ce=" "+Ce),this.cleanup&&(Ce=_(Ce)),Ce))}}class Xe extends De{constructor(se){super(se),this.byte_decoder=V,this.text_decoder=new TextDecoder("utf-8",{fatal:!1,ignoreBOM:!0}),this.end_of_word_suffix=null}convert_tokens_to_string(se){const Ce=se.join(""),Ve=new Uint8Array([...Ce].map(it=>this.byte_decoder[it]));return this.text_decoder.decode(Ve)}decode_chain(se){const Ce=[];let Ve=[];for(const Je of se)this.added_tokens.find(it=>it.content===Je)!==void 0?(Ve.length>0&&(Ce.push(this.convert_tokens_to_string(Ve)),Ve=[]),Ce.push(Je)):Ve.push(Je);return Ve.length>0&&Ce.push(this.convert_tokens_to_string(Ve)),Ce}}class mt extends De{constructor(se){super(se),this.pad_token=this.config.pad_token,this.word_delimiter_token=this.config.word_delimiter_token,this.cleanup=this.config.cleanup}convert_tokens_to_string(se){if(se.length===0)return"";const Ce=[se[0]];for(let it=1;it<se.length;++it)se[it]!==Ce.at(-1)&&Ce.push(se[it]);let Je=Ce.filter(it=>it!==this.pad_token).join("");return this.cleanup&&(Je=_(Je).replaceAll(this.word_delimiter_token," ").trim()),Je}decode_chain(se){return[this.convert_tokens_to_string(se)]}}class gt extends De{constructor(se){super(se),this.decoders=se.decoders.map(Ce=>De.fromConfig(Ce))}decode_chain(se){return this.decoders.reduce((Ce,Ve)=>Ve.decode_chain(Ce),se)}}class $t extends De{constructor(se){super(se),this.suffix=this.config.suffix}decode_chain(se){return se.map((Ce,Ve)=>Ce.replaceAll(this.suffix,Ve===se.length-1?"":" "))}}class kt extends De{decode_chain(se){let Ce="";for(let Ve=1;Ve<se.length;Ve+=2)Ce+=se[Ve];return[Ce]}}class Zt extends ae{constructor(se){super(),this.addPrefixSpace=se.add_prefix_space,this.replacement=se.replacement,this.strRep=se.str_rep||this.replacement,this.prepend_scheme=se.prepend_scheme??"always"}pre_tokenize_text(se,{section_index:Ce=void 0}={}){let Ve=se.replaceAll(" ",this.strRep);return this.addPrefixSpace&&!Ve.startsWith(this.replacement)&&(this.prepend_scheme==="always"||this.prepend_scheme==="first"&&Ce===0)&&(Ve=this.strRep+Ve),[Ve]}}class fr extends De{constructor(se){super(se),this.addPrefixSpace=se.add_prefix_space,this.replacement=se.replacement}decode_chain(se){const Ce=[];for(let Ve=0;Ve<se.length;++Ve){let Je=se[Ve].replaceAll(this.replacement," ");this.addPrefixSpace&&Ve==0&&Je.startsWith(" ")&&(Je=Je.substring(1)),Ce.push(Je)}return Ce}}class yr extends z{constructor(se){super(se),this.charsmap=se.precompiled_charsmap}normalize(se){return se=se.replace(/[\u0001-\u0008\u000B\u000E-\u001F\u007F\u008F\u009F]/gm,""),se=se.replace(/[\u0009\u000A\u000C\u000D\u00A0\u1680\u2000-\u200F\u2028\u2029\u202F\u205F\u2581\u3000\uFEFF\uFFFD]/gm," "),se.includes("ï½")?se=se.split("ï½").map(Ve=>Ve.normalize("NFKC")).join("ï½"):se=se.normalize("NFKC"),se}}class Kt extends ae{constructor(se){super(),this.tokenizers=se.pretokenizers.map(Ce=>ae.fromConfig(Ce))}pre_tokenize_text(se,Ce){return this.tokenizers.reduce((Ve,Je)=>Je.pre_tokenize(Ve,Ce),[se])}}class pr extends ae{constructor(se){super()}pre_tokenize_text(se,Ce){return se.match(/\w+|[^\w\s]+/g)||[]}}class Ot extends ae{constructor(se){super()}pre_tokenize_text(se,Ce){return x(se)}}class Ir extends ae{constructor(se){super(),this.config=se,this.pattern=h(this.config.pattern),this.content=this.config.content}
3700pre_tokenize_text(se,Ce){return this.pattern===null?[se]:[se.replaceAll(this.pattern,this.config.content)]}}const cn=["bos_token","eos_token","unk_token","sep_token","pad_token","cls_token","mask_token"];function kr(st,se,Ce,Ve){for(const Je of Object.keys(st)){const it=se-st[Je].length,vt=Ce(Je),Bt=new Array(it).fill(vt);st[Je]=Ve==="right"?(0,i.mergeArrays)(st[Je],Bt):(0,i.mergeArrays)(Bt,st[Je])}}function rr(st,se){for(const Ce of Object.keys(st))st[Ce].length=se}class Ut extends n.Callable{constructor(Ce,Ve){super();Le(this,"return_token_type_ids",!1);Le(this,"padding_side","right");this.config=Ve,this.normalizer=z.fromConfig(Ce.normalizer),this.pre_tokenizer=ae.fromConfig(Ce.pre_tokenizer),this.model=k.fromConfig(Ce.model,Ve),this.post_processor=me.fromConfig(Ce.post_processor),this.decoder=De.fromConfig(Ce.decoder),this.special_tokens=[],this.all_special_ids=[],this.added_tokens=[];for(const Je of Ce.added_tokens){const it=new C(Je);this.added_tokens.push(it),this.model.tokens_to_ids.set(it.content,it.id),this.model.vocab[it.id]=it.content,it.special&&(this.special_tokens.push(it.content),this.all_special_ids.push(it.id))}if(this.additional_special_tokens=Ve.additional_special_tokens??[],this.special_tokens.push(...this.additional_special_tokens),this.special_tokens=[...new Set(this.special_tokens)],this.decoder&&(this.decoder.added_tokens=this.added_tokens,this.decoder.end_of_word_suffix=this.model.end_of_word_suffix),this.added_tokens_splitter=new l.DictionarySplitter(this.added_tokens.map(Je=>Je.content)),this.added_tokens_map=new Map(this.added_tokens.map(Je=>[Je.content,Je])),this.mask_token=this.getToken("mask_token"),this.mask_token_id=this.model.tokens_to_ids.get(this.mask_token),this.pad_token=this.getToken("pad_token","eos_token"),this.pad_token_id=this.model.tokens_to_ids.get(this.pad_token),this.sep_token=this.getToken("sep_token"),this.sep_token_id=this.model.tokens_to_ids.get(this.sep_token),this.unk_token=this.getToken("unk_token"),this.unk_token_id=this.model.tokens_to_ids.get(this.unk_token),this.bos_token=this.getToken("bos_token"),this.bos_token_id=this.model.tokens_to_ids.get(this.bos_token),this.eos_token=this.getToken("eos_token"),this.eos_token_id=this.model.tokens_to_ids.get(this.eos_token),this.model_max_length=Ve.model_max_length,this.remove_space=Ve.remove_space,this.clean_up_tokenization_spaces=Ve.clean_up_tokenization_spaces??!0,this.do_lowercase_and_remove_accent=Ve.do_lowercase_and_remove_accent??!1,Ve.padding_side&&(this.padding_side=Ve.padding_side),this.add_bos_token=Ve.add_bos_token,this.add_eos_token=Ve.add_eos_token,this.legacy=!1,this.chat_template=Ve.chat_template??null,Array.isArray(this.chat_template)){const Je=Object.create(null);for(const{name:it,template:vt}of this.chat_template){if(typeof it!="string"||typeof vt!="string")throw new Error('Chat template must be a list of objects with "name" and "template" properties');Je[it]=vt}this.chat_template=Je}this._compiled_template_cache=new Map}getToken(...Ce){for(const Ve of Ce){const Je=this.config[Ve];if(Je)if(typeof Je=="object"){if(Je.__type==="AddedToken")return Je.content;throw Error(`Unknown token: ${Je}`)}else return Je}return null}static async from_pretrained(Ce,{progress_callback:Ve=null,config:Je=null,cache_dir:it=null,local_files_only:vt=!1,revision:Bt="main",legacy:er=null}={}){const Gt=await d(Ce,{progress_callback:Ve,config:Je,cache_dir:it,local_files_only:vt,revision:Bt,legacy:er});return new this(...Gt)}_call(Ce,{text_pair:Ve=null,add_special_tokens:Je=!0,padding:it=!1,truncation:vt=null,max_length:Bt=null,return_tensor:er=!0,return_token_type_ids:Gt=null}={}){const dr=Array.isArray(Ce);let Dr;if(dr){if(Ce.length===0)throw Error("text array must be non-empty");if(Ve!==null){if(Array.isArray(Ve)){if(Ce.length!==Ve.length)throw Error("text and text_pair must have the same length")}else throw Error("text_pair must also be an array");Dr=Ce.map((Tn,Oi)=>this._encode_plus(Tn,{text_pair:Ve[Oi],add_special_tokens:Je,return_token_type_ids:Gt}))}else Dr=Ce.map(Tn=>this._encode_plus(Tn,{add_special_tokens:Je,return_token_type_ids:Gt}))}else{if(Ce==null)throw Error("text may not be null or undefined");if(Array.isArray(Ve))throw Error("When specifying `text_pair`, since `text` is a string, `text_pair` must also be a string (i.e., not an array).");Dr=[this._encode_plus(Ce,{text_pair:Ve,add_special_tokens:Je,return_token_type_ids:Gt})]}if(Bt===null?Bt=this.model_max_length:vt===null&&(it===!0?(console.warn("`max_length` is ignored when `padding: true` and there is no truncation strategy. To pad to max length, use `padding: 'max_length'`."),Bt=this.model_max_length):it===!1&&(console.warn("Truncation was not explicitly activated but `max_length` is provided a specific value, please use `truncation: true` to explicitly truncate examples to max length."),vt=!0)),it===!0&&(Bt=Math.min((0,s.max)(Dr.map(Tn=>Tn.input_ids.length))[0],Bt??1/0)),Bt=Math.min(Bt,this.model_max_length??1/0),it||vt)for(let Tn=0;Tn<Dr.length;++Tn)Dr[Tn].input_ids.length!==Bt&&(Dr[Tn].input_ids.length>Bt?vt&&rr(Dr[Tn],Bt):it&&kr(Dr[Tn],Bt,Oi=>Oi==="input_ids"?this.pad_token_id:0,this.padding_side));const Un={};if(er){if(!(it&&vt)&&Dr.some(Oi=>{var di;for(const Pr of Object.keys(Oi))if(Oi[Pr].length!==((di=Dr[0][Pr])==null?void 0:di.length))return!0;return!1}))throw Error("Unable to create tensor, you should probably activate truncation and/or padding with 'padding=true' and 'truncation=true' to have batched tensors with the same length.");const Tn=[Dr.length,Dr[0].input_ids.length];for(const Oi of Object.keys(Dr[0]))Un[Oi]=new o.Tensor("int64",BigInt64Array.from(Dr.flatMap(di=>di[Oi]).map(BigInt)),Tn)}else{for(const Tn of Object.keys(Dr[0]))Un[Tn]=Dr.map(Oi=>Oi[Tn]);if(!dr)for(const Tn of Object.keys(Un))Un[Tn]=Un[Tn][0]}return Un}_encode_text(Ce){if(Ce===null)return null;const Ve=this.added_tokens_splitter.split(Ce);for(let it=0;
3700it<Ve.length;++it){const vt=this.added_tokens_map.get(Ve[it]);vt&&(vt.lstrip&&it>0&&(Ve[it-1]=Ve[it-1].trimEnd()),vt.rstrip&&it<Ve.length-1&&(Ve[it+1]=Ve[it+1].trimStart()))}return Ve.flatMap((it,vt)=>{if(it.length===0)return[];if(this.added_tokens_map.has(it))return[it];if(this.remove_space===!0&&(it=it.trim().split(/\s+/).join(" ")),this.do_lowercase_and_remove_accent&&(it=v(it)),this.normalizer!==null&&(it=this.normalizer(it)),it.length===0)return[];const Bt=this.pre_tokenizer!==null?this.pre_tokenizer(it,{section_index:vt}):[it];return this.model(Bt)})}_encode_plus(Ce,{text_pair:Ve=null,add_special_tokens:Je=!0,return_token_type_ids:it=null}={}){const{tokens:vt,token_type_ids:Bt}=this._tokenize_helper(Ce,{pair:Ve,add_special_tokens:Je}),er=this.model.convert_tokens_to_ids(vt),Gt={input_ids:er,attention_mask:new Array(er.length).fill(1)};return(it??this.return_token_type_ids)&&Bt&&(Gt.token_type_ids=Bt),Gt}_tokenize_helper(Ce,{pair:Ve=null,add_special_tokens:Je=!1}={}){const it=this._encode_text(Ce),vt=this._encode_text(Ve);return this.post_processor?this.post_processor(it,vt,{add_special_tokens:Je}):{tokens:(0,i.mergeArrays)(it??[],vt??[])}}tokenize(Ce,{pair:Ve=null,add_special_tokens:Je=!1}={}){return this._tokenize_helper(Ce,{pair:Ve,add_special_tokens:Je}).tokens}encode(Ce,{text_pair:Ve=null,add_special_tokens:Je=!0,return_token_type_ids:it=null}={}){return this._encode_plus(Ce,{text_pair:Ve,add_special_tokens:Je,return_token_type_ids:it}).input_ids}batch_decode(Ce,Ve={}){return Ce instanceof o.Tensor&&(Ce=Ce.tolist()),Ce.map(Je=>this.decode(Je,Ve))}decode(Ce,Ve={}){if(Ce instanceof o.Tensor&&(Ce=m(Ce)),!Array.isArray(Ce)||Ce.length===0||!(0,i.isIntegralNumber)(Ce[0]))throw Error("token_ids must be a non-empty array of integers.");return this.decode_single(Ce,Ve)}decode_single(Ce,{skip_special_tokens:Ve=!1,clean_up_tokenization_spaces:Je=null}){let it=this.model.convert_ids_to_tokens(Ce);Ve&&(it=it.filter(Bt=>!this.special_tokens.includes(Bt)));let vt=this.decoder?this.decoder(it):it.join(" ");return this.decoder&&this.decoder.end_of_word_suffix&&(vt=vt.replaceAll(this.decoder.end_of_word_suffix," "),Ve&&(vt=vt.trim())),(Je??this.clean_up_tokenization_spaces)&&(vt=_(vt)),vt}get_chat_template({chat_template:Ce=null,tools:Ve=null}={}){if(this.chat_template&&typeof this.chat_template=="object"){const Je=this.chat_template;if(Ce!==null&&Object.hasOwn(Je,Ce))Ce=Je[Ce];else if(Ce===null)if(Ve!==null&&"tool_use"in Je)Ce=Je.tool_use;else if("default"in Je)Ce=Je.default;else throw Error(`This model has multiple chat templates with no default specified! Please either pass a chat template or the name of the template you wish to use to the 'chat_template' argument. Available template names are ${Object.keys(Je).sort()}.`)}else if(Ce===null)if(this.chat_template)Ce=this.chat_template;else throw Error("Cannot use apply_chat_template() because tokenizer.chat_template is not set and no template argument was passed! For information about writing templates and setting the tokenizer.chat_template attribute, please see the documentation at https://huggingface.co/docs/transformers/main/en/chat_templating");return Ce}apply_chat_template(Ce,{tools:Ve=null,documents:Je=null,chat_template:it=null,add_generation_prompt:vt=!1,tokenize:Bt=!0,padding:er=!1,truncation:Gt=!1,max_length:dr=null,return_tensor:Dr=!0,return_dict:Un=!1,tokenizer_kwargs:Tn={},...Oi}={}){if(it=this.get_chat_template({chat_template:it,tools:Ve}),typeof it!="string")throw Error(`chat_template must be a string, but got ${typeof it}`);let di=this._compiled_template_cache.get(it);di===void 0&&(di=new u.Template(it),this._compiled_template_cache.set(it,di));const Pr=Object.create(null);for(const pa of cn){const $a=this.getToken(pa);$a&&(Pr[pa]=$a)}const Ra=di.render({messages:Ce,add_generation_prompt:vt,tools:Ve,documents:Je,...Pr,...Oi});if(Bt){const pa=this._call(Ra,{add_special_tokens:!1,padding:er,truncation:Gt,max_length:dr,return_tensor:Dr,...Tn});return Un?pa:pa.input_ids}return Ra}}class wr extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Ar extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Jt extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Ht extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Z extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Pe extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class ue extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Ee extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Oe extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class Ye extends Ut{}class ct extends Ut{}class Ct extends Ut{constructor(Ce,Ve){super(Ce,Ve);Le(this,"return_token_type_ids",!0);console.warn('WARNING: `XLMTokenizer` is not yet supported by Hugging Face\'s "fast" tokenizers library. Therefore, you may experience slightly inaccurate results.')}}class sr extends Ut{constructor(){super(...arguments);Le(this,"return_token_type_ids",!0)}}class ir extends Ut{}class or extends Ut{}class It extends Ut{}class cr extends Ut{constructor(se,Ce){super(se,Ce),this.languageRegex=/^[a-z]{2}_[A-Z]{2}$/,this.language_codes=this.special_tokens.filter(Ve=>this.languageRegex.test(Ve)),this.lang_to_token=Ve=>Ve}_build_translation_inputs(se,Ce,Ve){return Yi(this,se,Ce,Ve)}}class Qr extends cr{}class Zr extends Ut{}class Jn extends Ut{}const yn="â";class En extends Ut{constructor(Ce,Ve){super(Ce,Ve);Le(this,"padding_side","left");this.legacy=Ve.legacy??!0,this.legacy||(this.normalizer=null,this.pre_tokenizer=new Zt({replacement:yn,add_prefix_space:!0,prepend_scheme:"first"}))}_encode_text(Ce){if(Ce===null)return null;if(this.legacy||Ce.length===0)return super._encode_text(Ce);let Ve=super._encode_text(yn+Ce.replaceAll(yn," "));return Ve.length>1&&Ve[0]===yn&&this.special_tokens.includes(Ve[1])&&(Ve=Ve.slice(1)),Ve}}class pn extends Ut{}class si extends Ut{}class fa extends Ut{}class aa extends Ut{}class xi extends Ut{}class ci extends Ut{}class oi extends Ut{}class Ki extends Ut{}class ls extends Ut{}function Yi(st,se,Ce,Ve){if(!("language_codes"in st)||!Array.isArray(st.language_codes))throw new Error("Tokenizer must have `language_codes` attribute set and it should be an array of language ids.");
3700if(!("languageRegex"in st)||!(st.languageRegex instanceof RegExp))throw new Error("Tokenizer must have `languageRegex` attribute set and it should be a regular expression.");if(!("lang_to_token"in st)||typeof st.lang_to_token!="function")throw new Error("Tokenizer must have `lang_to_token` attribute set and it should be a function.");const Je=Ve.src_lang,it=Ve.tgt_lang;if(!st.language_codes.includes(it))throw new Error(`Target language code "${it}" is not valid. Must be one of: {${st.language_codes.join(", ")}}`);if(Je!==void 0){if(!st.language_codes.includes(Je))throw new Error(`Source language code "${Je}" is not valid. Must be one of: {${st.language_codes.join(", ")}}`);for(const vt of st.post_processor.config.single)if("SpecialToken"in vt&&st.languageRegex.test(vt.SpecialToken.id)){vt.SpecialToken.id=st.lang_to_token(Je);break}}return Ve.forced_bos_token_id=st.model.convert_tokens_to_ids([st.lang_to_token(it)])[0],st._call(se,Ce)}class sa extends Ut{constructor(se,Ce){super(se,Ce),this.languageRegex=/^[a-z]{3}_[A-Z][a-z]{3}$/,this.language_codes=this.special_tokens.filter(Ve=>this.languageRegex.test(Ve)),this.lang_to_token=Ve=>Ve}_build_translation_inputs(se,Ce,Ve){return Yi(this,se,Ce,Ve)}}class Ei extends Ut{constructor(se,Ce){super(se,Ce),this.languageRegex=/^__[a-z]{2,3}__$/,this.language_codes=this.special_tokens.filter(Ve=>this.languageRegex.test(Ve)).map(Ve=>Ve.slice(2,-2)),this.lang_to_token=Ve=>`__${Ve}__`}_build_translation_inputs(se,Ce,Ve){return Yi(this,se,Ce,Ve)}}class gi extends Ut{get timestamp_begin(){return this.model.convert_tokens_to_ids(["<|notimestamps|>"])[0]+1}_decode_asr(se,{return_timestamps:Ce=!1,return_language:Ve=!1,time_precision:Je=null,force_full_sequences:it=!0}={}){if(Je===null)throw Error("Must specify time_precision");let vt=null;const Bt=Ce==="word";function er(){return{language:vt,timestamp:[null,null],text:""}}const Gt=[];let dr=er(),Dr=0;const Un=this.timestamp_begin,Oi=Un+1500;let di=[],Pr=[],Ra=!1,pa=null;const $a=new Set(this.all_special_ids);for(const ji of se){const Fa=ji.tokens,Aa=Bt?ji.token_timestamps:null;let Zs=null,yo=Un;if("stride"in ji){const[oa,Xi,la]=ji.stride;if(Dr-=Xi,pa=oa-la,Xi&&(yo=Xi/Je+Un),la)for(let Ri=Fa.length-1;Ri>=0;--Ri){const Ba=Number(Fa[Ri]);if(Ba>=Un){if(Zs!==null&&(Ba-Un)*Je<pa)break;Zs=Ba}}}let ds=[],Ps=[];for(let oa=0;oa<Fa.length;++oa){const Xi=Number(Fa[oa]);if($a.has(Xi)){const la=this.decode([Xi]),Ri=c.WHISPER_LANGUAGE_MAPPING.get(la.slice(2,-2));if(Ri!==void 0){if(vt!==null&&Ri!==vt&&!Ce){di.push(ds);const Ba=this.findLongestCommonSequence(di)[0],Jl=this.decode(Ba);dr.text=Jl,Gt.push(dr),di=[],ds=[],dr=er()}vt=dr.language=Ri}}else if(Xi>=Un&&Xi<=Oi){const la=(Xi-Un)*Je+Dr,Ri=(0,s.round)(la,2);if(Zs!==null&&Xi>=Zs)Ra=!0;else if(Ra||di.length>0&&Xi<yo)Ra=!1;else if(dr.timestamp[0]===null)dr.timestamp[0]=Ri;else if(Ri!==dr.timestamp[0]){dr.timestamp[1]=Ri,di.push(ds),Bt&&Pr.push(Ps);const[Ba,Jl]=this.findLongestCommonSequence(di,Pr),ol=this.decode(Ba);dr.text=ol,Bt&&(dr.words=this.collateWordTimestamps(Ba,Jl,vt)),Gt.push(dr),di=[],ds=[],Pr=[],Ps=[],dr=er()}}else if(ds.push(Xi),Bt){let la=(0,s.round)(Aa[oa]+Dr,2),Ri;if(oa+1<Aa.length){Ri=(0,s.round)(Aa[oa+1]+Dr,2);const Ba=this.decode([Xi]);T.test(Ba)&&(Ri=(0,s.round)(Math.min(la+Je,Ri),2))}else Ri=null;Ps.push([la,Ri])}}if("stride"in ji){const[oa,Xi,la]=ji.stride;Dr+=oa-la}ds.length>0?(di.push(ds),Bt&&Pr.push(Ps)):di.every(oa=>oa.length===0)&&(dr=er(),di=[],ds=[],Pr=[],Ps=[])}if(di.length>0){if(it&&Ce)throw new Error("Whisper did not predict an ending timestamp, which can happen if audio is cut off in the middle of a word. Also make sure WhisperTimeStampLogitsProcessor was used during generation.");const[ji,Fa]=this.findLongestCommonSequence(di,Pr),Aa=this.decode(ji);dr.text=Aa,Bt&&(dr.words=this.collateWordTimestamps(ji,Fa,vt)),Gt.push(dr)}let Wi=Object.create(null);const cs=Gt.map(ji=>ji.text).join("");if(Ce||Ve){for(let ji=0;ji<Gt.length;++ji){const Fa=Gt[ji];Ce||delete Fa.timestamp,Ve||delete Fa.language}if(Bt){const ji=[];for(const Fa of Gt)for(const Aa of Fa.words)ji.push(Aa);Wi={chunks:ji}}else Wi={chunks:Gt}}return[cs,Wi]}findLongestCommonSequence(se,Ce=null){let Ve=se[0],Je=Ve.length,it=[];const vt=Array.isArray(Ce)&&Ce.length>0;let Bt=vt?[]:null,er=vt?Ce[0]:null;for(let Gt=1;Gt<se.length;++Gt){const dr=se[Gt];let Dr=0,Un=[Je,Je,0,0];const Tn=dr.length;for(let Wi=1;Wi<Je+Tn;++Wi){const cs=Math.max(0,Je-Wi),ji=Math.min(Je,Je+Tn-Wi),Fa=Ve.slice(cs,ji),Aa=Math.max(0,Wi-Je),Zs=Math.min(Tn,Wi),yo=dr.slice(Aa,Zs);if(Fa.length!==yo.length)throw new Error("There is a bug within whisper `decode_asr` function, please report it. Dropping to prevent bad inference.");let ds;vt?ds=Fa.filter((Xi,la)=>Xi===yo[la]&&er[cs+la]<=Ce[Gt][Aa+la]).length:ds=Fa.filter((Xi,la)=>Xi===yo[la]).length;const Ps=Wi/1e4,oa=ds/Wi+Ps;ds>1&&oa>Dr&&(Dr=oa,Un=[cs,ji,Aa,Zs])}const[Oi,di,Pr,Ra]=Un,pa=Math.floor((di+Oi)/2),$a=Math.floor((Ra+Pr)/2);it.push(...Ve.slice(0,pa)),Ve=dr.slice($a),Je=Ve.length,vt&&(Bt.push(...er.slice(0,pa)),er=Ce[Gt].slice($a))}return it.push(...Ve),vt?(Bt.push(...er),[it,Bt]):[it,[]]}collateWordTimestamps(se,Ce,Ve){const[Je,it,vt]=this.combineTokensIntoWords(se,Ve),Bt=[];for(let er=0;er<Je.length;++er){const Gt=vt[er];Bt.push({text:Je[er],timestamp:[Ce[Gt.at(0)][0],Ce[Gt.at(-1)][1]]})}return Bt}combineTokensIntoWords(se,Ce,Ve=`"'â¡¿([{-`,Je=`"'.ã,ï¼!ï¼?ï¼:ï¼â)]}ã`){Ce=Ce??"english";let it,vt,Bt;return["chinese","japanese","thai","lao","myanmar"].includes(Ce)?[it,vt,Bt]=this.splitTokensOnUnicode(se):[it,vt,Bt]=this.splitTokensOnSpaces(se),this.mergePunctuations(it,vt,Bt,Ve,Je)}decode(se,Ce){let Ve;
3700return Ce!=null&&Ce.decode_with_timestamps?(se instanceof o.Tensor&&(se=m(se)),Ve=this.decodeWithTimestamps(se,Ce)):Ve=super.decode(se,Ce),Ve}decodeWithTimestamps(se,Ce){const Ve=(Ce==null?void 0:Ce.time_precision)??.02,Je=Array.from(this.all_special_ids).at(-1)+1;let it=[[]];for(let vt of se)if(vt=Number(vt),vt>=Je){const Bt=((vt-Je)*Ve).toFixed(2);it.push(`<|${Bt}|>`),it.push([])}else it[it.length-1].push(vt);return it=it.map(vt=>typeof vt=="string"?vt:super.decode(vt,Ce)),it.join("")}splitTokensOnUnicode(se){const Ce=this.decode(se,{decode_with_timestamps:!0}),Ve="�",Je=[],it=[],vt=[];let Bt=[],er=[],Gt=0;for(let dr=0;dr<se.length;++dr){const Dr=se[dr];Bt.push(Dr),er.push(dr);const Un=this.decode(Bt,{decode_with_timestamps:!0});(!Un.includes(Ve)||Ce[Gt+Un.indexOf(Ve)]===Ve)&&(Je.push(Un),it.push(Bt),vt.push(er),Bt=[],er=[],Gt+=Un.length)}return[Je,it,vt]}splitTokensOnSpaces(se){const[Ce,Ve,Je]=this.splitTokensOnUnicode(se),it=[],vt=[],Bt=[],er=new RegExp(`^[${E}]$`,"gu");for(let Gt=0;Gt<Ce.length;++Gt){const dr=Ce[Gt],Dr=Ve[Gt],Un=Je[Gt],Tn=Dr[0]>=this.model.tokens_to_ids.get("<|endoftext|>"),Oi=dr.startsWith(" "),di=dr.trim(),Pr=er.test(di);if(Tn||Oi||Pr||it.length===0)it.push(dr),vt.push(Dr),Bt.push(Un);else{const Ra=it.length-1;it[Ra]+=dr,vt[Ra].push(...Dr),Bt[Ra].push(...Un)}}return[it,vt,Bt]}mergePunctuations(se,Ce,Ve,Je,it){const vt=structuredClone(se),Bt=structuredClone(Ce),er=structuredClone(Ve);let Gt=vt.length-2,dr=vt.length-1;for(;Gt>=0;)vt[Gt].startsWith(" ")&&Je.includes(vt[Gt].trim())?(vt[dr]=vt[Gt]+vt[dr],Bt[dr]=(0,i.mergeArrays)(Bt[Gt],Bt[dr]),er[dr]=(0,i.mergeArrays)(er[Gt],er[dr]),vt[Gt]="",Bt[Gt]=[],er[Gt]=[]):dr=Gt,--Gt;for(Gt=0,dr=1;dr<vt.length;)!vt[Gt].endsWith(" ")&&it.includes(vt[dr])?(vt[Gt]+=vt[dr],Bt[Gt]=(0,i.mergeArrays)(Bt[Gt],Bt[dr]),er[Gt]=(0,i.mergeArrays)(er[Gt],er[dr]),vt[dr]="",Bt[dr]=[],er[dr]=[]):Gt=dr,++dr;return[vt.filter(Dr=>Dr),Bt.filter(Dr=>Dr.length>0),er.filter(Dr=>Dr.length>0)]}}class Ta extends Ut{}class Qs extends Ut{}class us extends Ut{}class jt extends Ut{constructor(se,Ce){super(se,Ce),this.languageRegex=/^(>>\w+<<)\s*/g,this.supported_language_codes=this.model.vocab.filter(Ve=>this.languageRegex.test(Ve)),console.warn('WARNING: `MarianTokenizer` is not yet supported by Hugging Face\'s "fast" tokenizers library. Therefore, you may experience slightly inaccurate results.')}_encode_text(se){if(se===null)return null;const[Ce,...Ve]=se.trim().split(this.languageRegex);if(Ve.length===0)return super._encode_text(Ce);if(Ve.length===2){const[Je,it]=Ve;return this.supported_language_codes.includes(Je)||console.warn(`Unsupported language code "${Je}" detected, which may lead to unexpected behavior. Should be one of: ${JSON.stringify(this.supported_language_codes)}`),(0,i.mergeArrays)([Je],super._encode_text(it))}}}class Pt extends Ut{}class hr extends Ut{}class $n extends Ut{}class xl extends Ut{}class El extends Ut{}class Sa extends Ut{constructor(se,Ce){super(se,Ce),this.decoder=new kt({})}}class ha extends Ut{}class sl extends Ut{}class ud extends Ut{}class sf{static async from_pretrained(se,{progress_callback:Ce=null,config:Ve=null,cache_dir:Je=null,local_files_only:it=!1,revision:vt="main",legacy:Bt=null}={}){var Un;const[er,Gt]=await d(se,{progress_callback:Ce,config:Ve,cache_dir:Je,local_files_only:it,revision:vt,legacy:Bt}),dr=((Un=Gt.tokenizer_class)==null?void 0:Un.replace(/Fast$/,""))??"PreTrainedTokenizer";let Dr=this.TOKENIZER_CLASS_MAPPING[dr];return Dr||(console.warn(`Unknown tokenizer class "${dr}", attempting to construct from base class.`),Dr=Ut),new Dr(er,Gt)}}Le(sf,"TOKENIZER_CLASS_MAPPING",{T5Tokenizer:ir,DistilBertTokenizer:Ye,CamembertTokenizer:ct,DebertaTokenizer:Z,DebertaV2Tokenizer:Pe,BertTokenizer:wr,HerbertTokenizer:ue,ConvBertTokenizer:Ee,RoFormerTokenizer:Oe,XLMTokenizer:Ct,ElectraTokenizer:sr,MobileBertTokenizer:Jt,SqueezeBertTokenizer:Ht,AlbertTokenizer:Ar,GPT2Tokenizer:or,BartTokenizer:It,MBartTokenizer:cr,MBart50Tokenizer:Qr,RobertaTokenizer:Zr,WhisperTokenizer:gi,CodeGenTokenizer:Ta,CLIPTokenizer:Qs,SiglipTokenizer:us,MarianTokenizer:jt,BloomTokenizer:Jn,NllbTokenizer:sa,M2M100Tokenizer:Ei,LlamaTokenizer:En,CodeLlamaTokenizer:pn,XLMRobertaTokenizer:si,MPNetTokenizer:fa,FalconTokenizer:aa,GPTNeoXTokenizer:xi,EsmTokenizer:ci,Wav2Vec2CTCTokenizer:Pt,BlenderbotTokenizer:hr,BlenderbotSmallTokenizer:$n,SpeechT5Tokenizer:xl,NougatTokenizer:El,VitsTokenizer:Sa,Qwen2Tokenizer:oi,GemmaTokenizer:Ki,Grok1Tokenizer:ls,CohereTokenizer:ha,MgpstrTokenizer:sl,Ernie4_5_Tokenizer:ud,PreTrainedTokenizer:Ut})},
3700"./src/utils/audio.js":(e,t,r)=>{r.r(t),r.d(t,{RawAudio:()=>M,hamming:()=>f,hanning:()=>d,mel_filter_bank:()=>b,read_audio:()=>u,spectrogram:()=>S,window_function:()=>A});var n=r("./src/utils/hub.js"),i=r("./src/utils/maths.js"),a=r("./src/utils/core.js"),s=r("./src/env.js"),o=r("./src/utils/tensor.js"),l=r("?7992");async function u(D,$){if(typeof AudioContext>"u")throw Error("Unable to load audio from path/URL since `AudioContext` is not available in your environment. Instead, audio data should be passed directly to the pipeline/processor. For more information and some example code, see https://huggingface.co/docs/transformers.js/guides/node-audio-processing.");const V=await(await(0,n.getFile)(D)).arrayBuffer(),U=new AudioContext({sampleRate:$});typeof $>"u"&&console.warn(`No sampling rate provided, using default of ${U.sampleRate}Hz.`);const B=await U.decodeAudioData(V);let z;if(B.numberOfChannels===2){const q=Math.sqrt(2),L=B.getChannelData(0),K=B.getChannelData(1);z=new Float32Array(L.length);for(let O=0;O<B.length;++O)z[O]=q*(L[O]+K[O])/2}else z=B.getChannelData(0);return z}function c(D,$){if(D<1)return new Float64Array;if(D===1)return new Float64Array([1]);const V=1-$,U=2*Math.PI/(D-1),B=new Float64Array(D);for(let z=0;z<D;++z)B[z]=$-V*Math.cos(z*U);return B}function d(D){return c(D,.5)}function f(D){return c(D,.54)}const h={htk:D=>2595*Math.log10(1+D/700),kaldi:D=>1127*Math.log(1+D/700),slaney:(D,$=1e3,V=15,U=27/Math.log(6.4))=>D>=$?V+Math.log(D/$)*U:3*D/200};function p(D,$="htk"){const V=h[$];if(!V)throw new Error('mel_scale should be one of "htk", "slaney" or "kaldi".');return typeof D=="number"?V(D):D.map(U=>V(U))}const m={htk:D=>700*(10**(D/2595)-1),kaldi:D=>700*(Math.exp(D/1127)-1),slaney:(D,$=1e3,V=15,U=Math.log(6.4)/27)=>D>=V?$*Math.exp(U*(D-V)):200*D/3};function _(D,$="htk"){const V=m[$];if(!V)throw new Error('mel_scale should be one of "htk", "slaney" or "kaldi".');return typeof D=="number"?V(D):D.map(U=>V(U))}function y(D,$){const V=Float64Array.from({length:$.length-1},(q,L)=>$[L+1]-$[L]),U=Array.from({length:D.length},()=>new Array($.length));for(let q=0;q<D.length;++q){const L=U[q];for(let K=0;K<$.length;++K)L[K]=$[K]-D[q]}const B=$.length-2,z=Array.from({length:B},()=>new Array(D.length));for(let q=0;q<D.length;++q){const L=U[q];for(let K=0;K<B;++K){const O=-L[K]/V[K],N=L[K+2]/V[K+1];z[K][q]=Math.max(0,Math.min(O,N))}}return z}function v(D,$,V){const U=($-D)/(V-1);return Float64Array.from({length:V},(B,z)=>D+U*z)}function b(D,$,V,U,B,z=null,q="htk",L=!1){if(z!==null&&z!=="slaney")throw new Error('norm must be one of null or "slaney"');if(D<2)throw new Error(`Require num_frequency_bins: ${D} >= 2`);if(V>U)throw new Error(`Require min_frequency: ${V} <= max_frequency: ${U}`);const K=p(V,q),O=p(U,q),N=v(K,O,$+2);let X=_(N,q),ie;if(L){const le=B/((D-1)*2);ie=p(Float64Array.from({length:D},(Te,be)=>be*le),q),X=N}else ie=v(0,Math.floor(B/2),D);const ee=y(ie,X);if(z!==null&&z==="slaney")for(let le=0;le<$;++le){const Te=ee[le],be=2/(X[le+2]-X[le]);for(let we=0;we<D;++we)Te[we]*=be}return ee}function w(D,$,V){const U=new D.constructor(D.length+$+V),B=D.length-1;for(let z=0;z<D.length;++z)U[$+z]=D[z];for(let z=1;z<=$;++z)U[$-z]=D[(0,a.calculateReflectOffset)(z,B)];for(let z=1;z<=V;++z)U[B+$+z]=D[(0,a.calculateReflectOffset)(B-z,B)];return U}function x(D,$,V,U,B){if(V<=0)throw new Error("reference must be greater than zero");if(U<=0)throw new Error("min_value must be greater than zero");V=Math.max(U,V);const z=Math.log10(V);for(let q=0;q<D.length;++q)D[q]=$*Math.log10(Math.max(U,D[q])-z);if(B!==null){if(B<=0)throw new Error("db_range must be greater than zero");const q=(0,i.max)(D)[0]-B;for(let L=0;L<D.length;++L)D[L]=Math.max(D[L],q)}return D}function E(D,$=1,V=1e-5,U=null){return x(D,20,$,V,U)}function T(D,$=1,V=1e-10,U=null){return x(D,10,$,V,U)}async function S(D,$,V,U,{fft_length:B=null,power:z=1,center:q=!0,pad_mode:L="reflect",onesided:K=!0,preemphasis:O=null,preemphasis_htk_flavor:N=!0,mel_filters:X=null,mel_floor:ie=1e-10,log_mel:ee=null,reference:le=1,min_value:Te=1e-10,db_range:be=null,remove_dc_offset:we=null,min_num_frames:ae=null,max_num_frames:H=null,do_pad:fe=!0,transpose:Se=!1,mel_offset:ne=0}={}){const $e=$.length;if(B===null&&(B=V),V>B)throw Error(`frame_length (${V}) may not be larger than fft_length (${B})`);if($e!==V)throw new Error(`Length of the window (${$e}) must equal frame_length (${V})`);
3700if(U<=0)throw new Error("hop_length must be greater than zero");if(z===null&&X!==null)throw new Error("You have provided `mel_filters` but `power` is `None`. Mel spectrogram computation is not yet supported for complex-valued spectrogram. Specify `power` to fix this issue.");if(!N)throw new Error("`preemphasis_htk_flavor=false` is not currently supported.");if(q)switch(L){case"reflect":{const Ke=Math.floor((B-1)/2)+1;D=w(D,Ke,Ke);break}case"constant":{const Ke=Math.floor(B/2),Xe=new D.constructor(D.length+2*Ke);Xe.set(D,Ke),D=Xe;break}default:throw new Error(`pad_mode="${L}" not implemented yet.`)}let me=Math.floor(1+Math.floor((D.length-V)/U));ae!==null&&me<ae&&(me=ae);const Ue=K?Math.floor(B/2)+1:B;let ke=me,ce=me;H!==null&&(H>me?fe&&(ce=H):ce=ke=H);const ve=new i.FFT(B),Re=new Float64Array(B),De=new Float64Array(ve.outputBufferSize),tt=new Float32Array(Ue*ce);for(let Ke=0;Ke<ke;++Ke){const Xe=Ke*U,mt=Math.min(D.length-Xe,V);mt!==V&&Re.fill(0,0,V);for(let gt=0;gt<mt;++gt)Re[gt]=D[Xe+gt];if(we){let gt=0;for(let kt=0;kt<mt;++kt)gt+=Re[kt];const $t=gt/mt;for(let kt=0;kt<mt;++kt)Re[kt]-=$t}if(O!==null){for(let gt=mt-1;gt>=1;--gt)Re[gt]-=O*Re[gt-1];Re[0]*=1-O}for(let gt=0;gt<$.length;++gt)Re[gt]*=$[gt];ve.realTransform(De,Re);for(let gt=0;gt<Ue;++gt){const $t=gt<<1;tt[gt*ce+Ke]=De[$t]**2+De[$t+1]**2}}if(z!==null&&z!==2){const Ke=z/2;for(let Xe=0;Xe<tt.length;++Xe)tt[Xe]**=Ke}const Ge=X.length;let Ie=await(0,o.matmul)(new o.Tensor("float32",X.flat(),[Ge,Ue]),new o.Tensor("float32",tt,[Ue,ce]));Se&&(Ie=Ie.transpose(1,0));const He=Ie.data;for(let Ke=0;Ke<He.length;++Ke)He[Ke]=ne+Math.max(ie,He[Ke]);if(z!==null&&ee!==null){const Ke=Math.min(He.length,ke*Ge);switch(ee){case"log":for(let Xe=0;Xe<Ke;++Xe)He[Xe]=Math.log(He[Xe]);break;case"log10":for(let Xe=0;Xe<Ke;++Xe)He[Xe]=Math.log10(He[Xe]);break;case"dB":if(z===1)E(He,le,Te,be);else if(z===2)T(He,le,Te,be);else throw new Error(`Cannot use log_mel option '${ee}' with power ${z}`);break;default:throw new Error(`log_mel must be one of null, 'log', 'log10' or 'dB'. Got '${ee}'`)}}return Ie}function A(D,$,{periodic:V=!0,frame_length:U=null,center:B=!0}={}){const z=V?D+1:D;let q;switch($){case"boxcar":q=new Float64Array(z).fill(1);break;case"hann":case"hann_window":q=d(z);break;case"hamming":q=f(z);break;case"povey":q=d(z).map(L=>Math.pow(L,.85));break;default:throw new Error(`Unknown window type ${$}.`)}if(V&&(q=q.subarray(0,D)),U===null)return q;if(D>U)throw new Error(`Length of the window (${D}) may not be larger than frame_length (${U})`);return q}function C(D,$){let V=44;const U=new ArrayBuffer(V+D.length*4),B=new DataView(U);k(B,0,"RIFF"),B.setUint32(4,36+D.length*4,!0),k(B,8,"WAVE"),k(B,12,"fmt "),B.setUint32(16,16,!0),B.setUint16(20,3,!0),B.setUint16(22,1,!0),B.setUint32(24,$,!0),B.setUint32(28,$*4,!0),B.setUint16(32,4,!0),B.setUint16(34,32,!0),k(B,36,"data"),B.setUint32(40,D.length*4,!0);for(let z=0;z<D.length;++z,V+=4)B.setFloat32(V,D[z],!0);return U}function k(D,$,V){for(let U=0;U<V.length;
3700++U)D.setUint8($+U,V.charCodeAt(U))}class M{constructor($,V){this.audio=$,this.sampling_rate=V}toWav(){return C(this.audio,this.sampling_rate)}toBlob(){const $=this.toWav();return new Blob([$],{type:"audio/wav"})}async save($){let V;if(s.apis.IS_BROWSER_ENV){if(s.apis.IS_WEBWORKER_ENV)throw new Error("Unable to save a file from a Web Worker.");V=a.saveBlob}else if(s.apis.IS_FS_AVAILABLE)V=async(U,B)=>{let z=await B.arrayBuffer();l.writeFileSync(U,Buffer.from(z))};else throw new Error("Unable to save because filesystem is disabled in this environment.");await V($,this.toBlob())}}},
3700"./src/utils/constants.js":(e,t,r)=>{r.r(t),r.d(t,{CHAT_TEMPLATE_NAME:()=>l,CONFIG_NAME:()=>i,FEATURE_EXTRACTOR_NAME:()=>a,GENERATION_CONFIG_NAME:()=>u,GITHUB_ISSUE_URL:()=>n,IMAGE_PROCESSOR_NAME:()=>s,PROCESSOR_NAME:()=>o});const n="https://github.com/huggingface/transformers.js/issues/new/choose",i="config.json",a="preprocessor_config.json",s=a,o="processor_config.json",l="chat_template.jinja",u="generation_config.json"},
3700"./src/utils/core.js":(e,t,r)=>{r.r(t),r.d(t,{calculateDimensions:()=>u,calculateReflectOffset:()=>h,count:()=>y,dispatchCallback:()=>n,escapeRegExp:()=>a,isIntegralNumber:()=>o,isNullishDimension:()=>l,isTypedArray:()=>s,len:()=>_,mergeArrays:()=>d,pick:()=>m,pop:()=>c,product:()=>f,reverseDictionary:()=>i,saveBlob:()=>p});function n(v,b){v&&v(b)}function i(v){return Object.fromEntries(Object.entries(v).map(([b,w])=>[w,b]))}function a(v){return v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function s(v){var b,w,x;return((x=(w=(b=v==null?void 0:v.prototype)==null?void 0:b.__proto__)==null?void 0:w.constructor)==null?void 0:x.name)==="TypedArray"}function o(v){return Number.isInteger(v)||typeof v=="bigint"}function l(v){return v==null||v===-1}function u(v){const b=[];let w=v;for(;Array.isArray(w);)b.push(w.length),w=w[0];return b}function c(v,b,w=void 0){const x=v[b];if(x!==void 0)return delete v[b],x;if(w===void 0)throw Error(`Key ${b} does not exist in object.`);return w}function d(...v){return Array.prototype.concat.apply([],v)}function f(...v){return v.reduce((b,w)=>b.flatMap(x=>w.map(E=>[x,E])))}function h(v,b){return Math.abs((v+b)%(2*b)-b)}function p(v,b){const w=URL.createObjectURL(b),x=document.createElement("a");x.href=w,x.download=v,x.click(),x.remove(),URL.revokeObjectURL(w)}function m(v,b){return Object.assign({},...b.map(w=>{if(v[w]!==void 0)return{[w]:v[w]}}))}function _(v){let b=0;for(const w of v)++b;return b}function y(v,b){let w=0;for(const x of v)x===b&&++w;return w}},
3700"./src/utils/data-structures.js":(e,t,r)=>{r.r(t),r.d(t,{CharTrie:()=>i,DictionarySplitter:()=>l,LRUCache:()=>u,PriorityQueue:()=>n,TokenLattice:()=>s});class n{constructor(d=(h,p)=>h>p,f=1/0){this._heap=[],this._comparator=d,this._maxSize=f}get size(){return this._heap.length}isEmpty(){return this.size===0}peek(){return this._heap[0]}push(...d){return this.extend(d)}extend(d){for(const f of d)if(this.size<this._maxSize)this._heap.push(f),this._siftUp();else{const h=this._smallest();this._comparator(f,this._heap[h])&&(this._heap[h]=f,this._siftUpFrom(h))}return this.size}pop(){const d=this.peek(),f=this.size-1;return f>0&&this._swap(0,f),this._heap.pop(),this._siftDown(),d}replace(d){const f=this.peek();return this._heap[0]=d,this._siftDown(),f}_parent(d){return(d+1>>>1)-1}_left(d){return(d<<1)+1}_right(d){return d+1<<1}_greater(d,f){return this._comparator(this._heap[d],this._heap[f])}_swap(d,f){const h=this._heap[d];this._heap[d]=this._heap[f],this._heap[f]=h}_siftUp(){this._siftUpFrom(this.size-1)}_siftUpFrom(d){for(;d>0&&this._greater(d,this._parent(d));)this._swap(d,this._parent(d)),d=this._parent(d)}_siftDown(){let d=0;for(;this._left(d)<this.size&&this._greater(this._left(d),d)||this._right(d)<this.size&&this._greater(this._right(d),d);){const f=this._right(d)<this.size&&this._greater(this._right(d),this._left(d))?this._right(d):this._left(d);this._swap(d,f),d=f}}_smallest(){return 2**Math.floor(Math.log2(this.size))-1}}class i{constructor(){this.root=a.default()}extend(d){for(const f of d)this.push(f)}push(d){let f=this.root;for(const h of d){let p=f.children.get(h);p===void 0&&(p=a.default(),f.children.set(h,p)),f=p}f.isLeaf=!0}*commonPrefixSearch(d){let f=this.root;if(f===void 0)return;let h="";for(const p of d){if(h+=p,f=f.children.get(p),f===void 0)return;f.isLeaf&&(yield h)}}}class a{constructor(d,f){this.isLeaf=d,this.children=f}static default(){return new a(!1,new Map)}}class s{constructor(d,f,h){this.chars=Array.from(d),this.len=this.chars.length,this.bosTokenId=f,this.eosTokenId=h,this.nodes=[],this.beginNodes=Array.from({length:this.len+1},()=>[]),this.endNodes=Array.from({length:this.len+1},()=>[]);const p=new o(this.bosTokenId,0,0,0,0),m=new o(this.eosTokenId,1,this.len,0,0);this.nodes.push(p.clone()),this.nodes.push(m.clone()),this.beginNodes[this.len].push(m),this.endNodes[0].push(p)}insert(d,f,h,p){const m=this.nodes.length,_=new o(p,m,d,f,h);this.beginNodes[d].push(_),this.endNodes[d+f].push(_),this.nodes.push(_)}viterbi(){const d=this.len;let f=0;for(;f<=d;){if(this.beginNodes[f].length==0)return[];for(let y of this.beginNodes[f]){y.prev=null;let v=0,b=null;for(let w of this.endNodes[f]){const x=w.backtraceScore+y.score;(b===null||x>v)&&(b=w.clone(),v=x)}if(b!==null)y.prev=b,y.backtraceScore=v;else return[]}++f}const h=[],m=this.beginNodes[d][0].prev;if(m===null)return[];let _=m.clone();for(;_.prev!==null;)h.push(_.clone()),_=_.clone().prev.clone();return h.reverse(),h}piece(d){return this.chars.slice(d.pos,d.pos+d.length).join("")}tokens(){return this.viterbi().map(f=>this.piece(f))}tokenIds(){return this.viterbi().map(f=>f.tokenId)}}class o{constructor(d,f,h,p,m){this.tokenId=d,this.nodeId=f,this.pos=h,this.length=p,this.score=m,this.prev=null,this.backtraceScore=0}clone(){const d=new o(this.tokenId,this.nodeId,this.pos,this.length,this.score);return d.prev=this.prev,d.backtraceScore=this.backtraceScore,d}}class l{constructor(d){this.trie=this._buildTrie(d)}_buildTrie(d){var h;const f=Object.create(null);for(const p of d){let m=f;for(let _=0;_<p.length;++_)m=m[h=p[_]]??(m[h]=Object.create(null));m.end=p}return f}split(d){const f=[],h=d.length;let p=0,m=0;for(;m<h;){let _=this.trie,y=null,v=m;for(;v<h&&(_=_[d[v]]);)_.end&&(y=_.end),++v;y?(m>p&&f.push(d.slice(p,m)),f.push(y),m+=y.length,p=m):++m}return p<h&&f.push(d.slice(p)),f}}class u{constructor(d){this.capacity=d,this.cache=new Map}get(d){if(!this.cache.has(d))return;const f=this.cache.get(d);return this.cache.delete(d),this.cache.set(d,f),f}put(d,f){this.cache.has(d)&&this.cache.delete(d),this.cache.set(d,f),this.cache.size>this.capacity&&this.cache.delete(this.cache.keys().next().value)}clear(){this.cache.clear()}}},
3700"./src/utils/devices.js":(e,t,r)=>{r.r(t),r.d(t,{DEVICE_TYPES:()=>n});const n=Object.freeze({auto:"auto",gpu:"gpu",cpu:"cpu",wasm:"wasm",webgpu:"webgpu",cuda:"cuda",dml:"dml",webnn:"webnn","webnn-npu":"webnn-npu","webnn-gpu":"webnn-gpu","webnn-cpu":"webnn-cpu"})},
3700"./src/utils/dtypes.js":(e,t,r)=>{r.r(t),r.d(t,{DATA_TYPES:()=>s,DEFAULT_DEVICE_DTYPE_MAPPING:()=>o,DEFAULT_DTYPE_SUFFIX_MAPPING:()=>l,isWebGpuFp16Supported:()=>a});var n=r("./src/env.js"),i=r("./src/utils/devices.js");const a=function(){let u;return async function(){if(u===void 0)if(!n.apis.IS_WEBGPU_AVAILABLE)u=!1;else try{u=(await navigator.gpu.requestAdapter()).features.has("shader-f16")}catch{u=!1}return u}}(),s=Object.freeze({auto:"auto",fp32:"fp32",fp16:"fp16",q8:"q8",int8:"int8",uint8:"uint8",q4:"q4",bnb4:"bnb4",q4f16:"q4f16"}),o=Object.freeze({[i.DEVICE_TYPES.wasm]:s.q8}),l=Object.freeze({[s.fp32]:"",[s.fp16]:"_fp16",[s.int8]:"_int8",[s.uint8]:"_uint8",[s.q8]:"_quantized",[s.q4]:"_q4",[s.q4f16]:"_q4f16",[s.bnb4]:"_bnb4"})},
3700"./src/utils/generic.js":(e,t,r)=>{r.r(t),r.d(t,{Callable:()=>n});const n=class{constructor(){let i=function(...a){return i._call(...a)};return Object.setPrototypeOf(i,new.target.prototype)}_call(...i){throw Error("Must implement _call method in subclass")}}},
3700"./src/utils/hub.js":(e,t,r)=>{r.r(t),r.d(t,{MAX_EXTERNAL_DATA_CHUNKS:()=>o,getFile:()=>h,getModelFile:()=>v,getModelJSON:()=>w,getModelText:()=>b});var n=r("?7992"),i=r("?5af5"),a=r("./src/env.js"),s=r("./src/utils/core.js");const o=100,l={txt:"text/plain",html:"text/html",css:"text/css",js:"text/javascript",json:"application/json",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif"};class u{constructor(S){if(this.filePath=S,this.headers=new Headers,this.exists=n.existsSync(S),this.exists){this.status=200,this.statusText="OK";let A=n.statSync(S);this.headers.set("content-length",A.size.toString()),this.updateContentType();const C=n.createReadStream(S);this.body=new ReadableStream({start(k){C.on("data",M=>k.enqueue(M)),C.on("end",()=>k.close()),C.on("error",M=>k.error(M))},cancel(){C.destroy()}})}else this.status=404,this.statusText="Not Found",this.body=null}updateContentType(){const S=this.filePath.toString().split(".").pop().toLowerCase();this.headers.set("content-type",l[S]??"application/octet-stream")}clone(){let S=new u(this.filePath);return S.exists=this.exists,S.status=this.status,S.statusText=this.statusText,S.headers=new Headers(this.headers),S}async arrayBuffer(){return(await n.promises.readFile(this.filePath)).buffer}async blob(){const S=await n.promises.readFile(this.filePath);return new Blob([S],{type:this.headers.get("content-type")})}async text(){return await n.promises.readFile(this.filePath,"utf8")}async json(){return JSON.parse(await this.text())}}function c(T,S=null,A=null){let C;try{C=new URL(T)}catch{return!1}return!(S&&!S.includes(C.protocol)||A&&!A.includes(C.hostname))}const d=/^(\b[\w\-.]+\b\/)?\b[\w\-.]{1,96}\b$/;function f(T){return!(!d.test(T)||T.includes("..")||T.includes("--")||T.endsWith(".git")||T.endsWith(".ipynb"))}async function h(T){var S;if(a.env.useFS&&!c(T,["http:","https:","blob:"]))return new u(T instanceof URL?T.protocol==="file:"?T.pathname:T.toString():T);if(typeof process<"u"&&((S=process==null?void 0:process.release)==null?void 0:S.name)==="node"){const A=!!(bp!=null&&bp.TESTING_REMOTELY),C=a.env.version,k=new Headers;if(k.set("User-Agent",`transformers.js/${C}; is_ci/${A};`),c(T,["http:","https:"],["huggingface.co","hf.co"])){const D=(bp==null?void 0:bp.HF_TOKEN)??(bp==null?void 0:bp.HF_ACCESS_TOKEN);D&&k.set("Authorization",`Bearer ${D}`)}return fetch(T,{headers:k})}else return fetch(T)}const p={400:"Bad request error occurred while trying to load file",401:"Unauthorized access to file",403:"Forbidden access to file",404:"Could not locate file",408:"Request timeout error occurred while trying to load file",500:"Internal server error error occurred while trying to load file",502:"Bad gateway error occurred while trying to load file",503:"Service unavailable error occurred while trying to load file",504:"Gateway timeout error occurred while trying to load file"};function m(T,S,A){if(!A)return null;const C=p[T]??`Error (${T}) occurred while trying to load file`;throw Error(`${C}: "${S}".`)}class _{constructor(S){this.path=S}async match(S){let A=i.join(this.path,S),C=new u(A);if(C.exists)return C}async put(S,A,C=void 0){let k=i.join(this.path,S);try{const M=A.headers.get("Content-Length"),D=parseInt(M??"0");let $=0;await n.promises.mkdir(i.dirname(k),{recursive:!0});const V=n.createWriteStream(k),U=A.body.getReader();for(;;){const{done:B,value:z}=await U.read();if(B)break;await new Promise((L,K)=>{V.write(z,O=>{if(O){K(O);return}L()})}),$+=z.length;const q=D?$/D*100:0;C==null||C({progress:q,loaded:$,total:D})}V.close()}catch(M){try{await n.promises.unlink(k)}catch{}throw M}}}async function y(T,...S){for(let A of S)try{let C=await T.match(A);if(C)return C}catch{continue}}async function v(T,S,A=!0,C={},k=!1){if(!a.env.allowLocalModels){if(C.local_files_only)throw Error("Invalid configuration detected: local models are disabled (`env.allowLocalModels=false`) but you have requested to only use local models (`local_files_only=true`).");if(!a.env.allowRemoteModels)throw Error("Invalid configuration detected: both local and remote models are disabled. Fix by setting `env.allowLocalModels` or `env.allowRemoteModels` to `true`.")}(0,s.dispatchCallback)(C.progress_callback,{status:"initiate",name:T,file:S});let M;if(!M&&a.env.useCustomCache){if(!a.env.customCache)throw Error("`env.useCustomCache=true`, but `env.customCache` is not defined.");if(!a.env.customCache.match||!a.env.customCache.put)throw new Error("`env.customCache` must be an object which implements the `match` and `put` functions of the Web Cache API. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Cache");M=a.env.customCache}if(!M&&a.env.useBrowserCache){if(typeof caches>"u")throw Error("Browser cache is not available in this environment.");try{M=await caches.open("transformers-cache")}catch(ie){console.warn("An error occurred while opening the browser cache:",ie)}}if(!M&&a.env.useFSCache){if(!a.apis.IS_FS_AVAILABLE)throw Error("File System Cache is not available in this environment.");M=new _(C.cache_dir??a.env.cacheDir)}const D=C.revision??"main",$=E(T,S),V=f(T),U=V?E(a.env.localModelPath,$):$,B=E(a.env.remoteHost,a.env.remotePathTemplate.replaceAll("{model}",T).replaceAll("{revision}",encodeURIComponent(D)),S);let z;const q=M instanceof _?D==="main"?$:E(T,D,S):B;let L=!1,K;M&&(K=await y(M,U,q));const O=K!==void 0;if(K===void 0){if(a.env.allowLocalModels)if(c($,["http:","https:"])){if(C.local_files_only)throw new Error(`\`local_files_only=true\`, but attempted to load a remote file from: ${$}.`);if(!a.env.allowRemoteModels)throw new Error(`\`env.allowRemoteModels=false\`, but attempted to load a remote file from: ${$}.`)}else try{K=await h(U),z=U}catch(ee){console.warn(`Unable to load from local path "${U}": "${ee}"`)}if(K===void 0||K.status===404){if(C.local_files_only||!a.env.allowRemoteModels){if
3700(A)throw Error(`\`local_files_only=true\` or \`env.allowRemoteModels=false\` and file was not found locally at "${U}".`);return null}if(!V)throw Error(`Local file missing at "${U}" and download aborted due to invalid model ID "${T}".`);if(K=await h(B),K.status!==200)return m(K.status,B,A);z=q}L=M&&typeof Response<"u"&&K instanceof Response&&K.status===200}(0,s.dispatchCallback)(C.progress_callback,{status:"download",name:T,file:S});let N;if(!(a.apis.IS_NODE_ENV&&k)){let ie;C.progress_callback?O&&typeof navigator<"u"&&/firefox/i.test(navigator.userAgent)?(ie=new Uint8Array(await K.arrayBuffer()),(0,s.dispatchCallback)(C.progress_callback,{status:"progress",name:T,file:S,progress:100,loaded:ie.length,total:ie.length})):ie=await x(K,ee=>{(0,s.dispatchCallback)(C.progress_callback,{status:"progress",name:T,file:S,...ee})}):ie=new Uint8Array(await K.arrayBuffer()),N=ie}if(L&&z&&await M.match(z)===void 0)if(N)await M.put(z,new Response(N,{headers:K.headers})).catch(ie=>{console.warn(`Unable to add response to browser cache: ${ie}.`)});else{const ie=C.progress_callback?ee=>(0,s.dispatchCallback)(C.progress_callback,{status:"progress",name:T,file:S,...ee}):void 0;await M.put(z,K,ie)}if((0,s.dispatchCallback)(C.progress_callback,{status:"done",name:T,file:S}),N){if(!a.apis.IS_NODE_ENV&&k)throw new Error("Cannot return path in a browser environment.");return N}if(K instanceof u)return K.filePath;const X=await(M==null?void 0:M.match(z));if(X instanceof u)return X.filePath;if(X instanceof Response)return new Uint8Array(await X.arrayBuffer());if(typeof X=="string")return X;throw new Error("Unable to get model file path or buffer.")}async function b(T,S,A=!0,C={}){const k=await v(T,S,A,C,!1);return k===null?null:new TextDecoder("utf-8").decode(k)}async function w(T,S,A=!0,C={}){const k=await b(T,S,A,C);return k===null?{}:JSON.parse(k)}async function x(T,S){const A=T.headers.get("Content-Length");A===null&&console.warn("Unable to determine content-length from response headers. Will expand buffer when needed.");
3700let C=parseInt(A??"0"),k=new Uint8Array(C),M=0;const D=T.body.getReader();async function $(){const{done:V,value:U}=await D.read();if(V)return;const B=M+U.length;if(B>C){C=B;const q=new Uint8Array(C);q.set(k),k=q}k.set(U,M),M=B;const z=M/C*100;return S({progress:z,loaded:M,total:C}),$()}return await $(),k}function E(...T){return T=T.map((S,A)=>(A&&(S=S.replace(new RegExp("^/"),"")),A!==T.length-1&&(S=S.replace(new RegExp("/$"),"")),S)),T.join("/")}},
vendor: 9,186 bytes, line 3700
3700"./src/utils/image.js":(e,t,r)=>{r.r(t),r.d(t,{RawImage:()=>p,load_image:()=>m});var n=r("./src/utils/core.js"),i=r("./src/utils/hub.js"),a=r("./src/env.js"),s=r("./src/utils/tensor.js"),o=r("?2b25");let l,u,c;const d=a.apis.IS_BROWSER_ENV||a.apis.IS_WEBWORKER_ENV;if(d)l=(_,y)=>{if(!self.OffscreenCanvas)throw new Error("OffscreenCanvas not supported by this browser.");return new self.OffscreenCanvas(_,y)},c=self.createImageBitmap,u=self.ImageData;else if(o)c=async _=>{const v=(await _.metadata()).channels,{data:b,info:w}=await _.rotate().raw().toBuffer({resolveWithObject:!0}),x=new p(new Uint8ClampedArray(b),w.width,w.height,w.channels);return v!==void 0&&v!==w.channels&&x.convert(v),x};else throw new Error("Unable to load image processing library.");const f={0:"nearest",1:"lanczos",2:"bilinear",3:"bicubic",4:"box",5:"hamming"},h=new Map([["png","image/png"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["gif","image/gif"]]);class p{constructor(y,v,b,w){this.data=y,this.width=v,this.height=b,this.channels=w}get size(){return[this.width,this.height]}static async read(y){if(y instanceof p)return y;if(typeof y=="string"||y instanceof URL)return await this.fromURL(y);if(y instanceof Blob)return await this.fromBlob(y);if(typeof HTMLCanvasElement<"u"&&y instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&y instanceof OffscreenCanvas)return this.fromCanvas(y);throw new Error(`Unsupported input type: ${typeof y}`)}static fromCanvas(y){if(!d)throw new Error("fromCanvas() is only supported in browser environments.");const b=y.getContext("2d").getImageData(0,0,y.width,y.height).data;return new p(b,y.width,y.height,4)}static async fromURL(y){const v=await(0,i.getFile)(y);if(v.status!==200)throw new Error(`Unable to read image from "${y}" (${v.status} ${v.statusText})`);const b=await v.blob();return this.fromBlob(b)}static async fromBlob(y){if(d){const v=await c(y),b=l(v.width,v.height).getContext("2d");return b.drawImage(v,0,0),new this(b.getImageData(0,0,v.width,v.height).data,v.width,v.height,4)}else{const v=o(await y.arrayBuffer());return await c(v)}}static fromTensor(y,v="CHW"){if(y.dims.length!==3)throw new Error(`Tensor should have 3 dimensions, but has ${y.dims.length} dimensions.`);if(v==="CHW")y=y.transpose(1,2,0);else if(v!=="HWC")throw new Error(`Unsupported channel format: ${v}`);if(!(y.data instanceof Uint8ClampedArray||y.data instanceof Uint8Array))throw new Error(`Unsupported tensor type: ${y.type}`);switch(y.dims[2]){case 1:case 2:case 3:case 4:return new p(y.data,y.dims[1],y.dims[0],y.dims[2]);default:throw new Error(`Unsupported number of channels: ${y.dims[2]}`)}}grayscale(){if(this.channels===1)return this;const y=new Uint8ClampedArray(this.width*this.height*1);switch(this.channels){case 3:case 4:for(let v=0,b=0;v<this.data.length;v+=this.channels){const w=this.data[v],x=this.data[v+1],E=this.data[v+2];y[b++]=Math.round(.2989*w+.587*x+.114*E)}break;default:throw new Error(`Conversion failed due to unsupported number of channels: ${this.channels}`)}return this._update(y,this.width,this.height,1)}rgb(){if(this.channels===3)return this;const y=new Uint8ClampedArray(this.width*this.height*3);switch(this.channels){case 1:for(let v=0,b=0;v<this.data.length;++v)y[b++]=this.data[v],y[b++]=this.data[v],y[b++]=this.data[v];break;case 4:for(let v=0,b=0;v<this.data.length;v+=4)y[b++]=this.data[v],y[b++]=this.data[v+1],y[b++]=this.data[v+2];break;default:throw new Error(`Conversion failed due to unsupported number of channels: ${this.channels}`)}return this._update(y,this.width,this.height,3)}rgba(){if(this.channels===4)return this;const y=new Uint8ClampedArray(this.width*this.height*4);switch(this.channels){case 1:for(let v=0,b=0;v<this.data.length;++v)y[b++]=this.data[v],y[b++]=this.data[v],y[b++]=this.data[v],y[b++]=255;break;case 3:for(let v=0,b=0;v<this.data.length;v+=3)y[b++]=this.data[v],y[b++]=this.data[v+1],y[b++]=this.data[v+2],y[b++]=255;break;default:throw new Error(`Conversion failed due to unsupported number of channels: ${this.channels}`)}return this._update(y,this.width,this.height,4)}putAlpha(y){if(y.width!==this.width||y.height!==this.height)throw new Error(`Expected mask size to be ${this.width}x${this.height}, but got ${y.width}x${y.height}`);if(y.channels!==1)throw new Error(`Expected mask to have 1 channel, but got ${y.channels}`);const v=this.data,b=y.data,w=this.width*this.height;if(this.channels===3){const x=new Uint8ClampedArray(w*4);for(let E=0,T=0,S=0;E<w;++E)x[S++]=v[T++],x[S++]=v[T++],x[S++]=v[T++],x[S++]=b[E];return this._update(x,this.width,this.height,4)}else if(this.channels===4){for(let x=0;x<w;++x)v[4*x+3]=b[x];return this}throw new Error(`Expected image to have 3 or 4 channels, but got ${this.channels}`)}async resize(y,v,{resample:b=2}={}){if(this.width===y&&this.height===v)return this;let w=f[b]??b;const x=(0,n.isNullishDimension)(y),E=(0,n.isNullishDimension)(v);if(x&&E)return this;if(x?y=v/this.height*this.width:E&&(v=y/this.width*this.height),d){const T=this.channels,S=this.toCanvas(),A=l(y,v).getContext("2d");return A.drawImage(S,0,0,y,v),new p(A.getImageData(0,0,y,v).data,y,v,4).convert(T)}else{let T=this.toSharp();switch(w){case"box":case"hamming":(w==="box"||w==="hamming")&&(console.warn(`Resampling method ${w} is not yet supported. Using bilinear instead.`),w="bilinear");case"nearest":case"bilinear":case"bicubic":T=T.affine([y/this.width,0,0,v/this.height],{interpolator:w});break;case"lanczos":T=T.resize({width:y,height:v,fit:"fill",kernel:"lanczos3"});break;default:throw new Error(`Resampling method ${w} is not supported.`)}return await c(T)}}async pad([y,v,b,w]){if(y=Math.max(y,0),v=Math.max(v,0),b=Math.max(b,0),w=Math.max(w,0),y===0&&v===0&&b===0&&w===0)return this;if(d){const x=this.channels,E=this.toCanvas(),T=this.width+y+v,S=this.height+b+w,A=l(T,S).getContext("2d");return A.drawImage(E,0,0,this.width,this.height,y,b,this.width,this.height),new p(A.getImageData(0,0,T,S).data,T,S,4).convert(x)}else{const x=this.toSharp().extend({left:y,right:v,top:b,bottom:w});return await c(x)}}async crop([y,v,b,w]){if(y=Math.max(y,0),v=Math.max(v,0),b=Math.min(b,this.width-1),w=Math.min(w,this.height-1),y===0&&v===0&&b===this.width-1&&w===this.height-1)return this;const x=b-y+1,E=w-v+1;if(d){const T=this.channels,S=this.toCanvas(),A=l(x,E).getContext("2d");return A.drawImage(S,y,v,x,E,0,0,x,E),new p(A.getImageData(0,0,x,E).data,x,E,4).convert(T)}else{const T=this.toSharp().extract({left:y,top:v,width:x,height:E});return await c(T)}}async center_crop(y,v){if(this.width===y&&this.height===v)return this;const b=(this.width-y)/2,w=(this.height-v)/2;if(d){const x=this.channels,E=this.toCanvas(),T=l(y,v).getContext("2d");let S=0,A=0,C=0,k=0;return b>=0?S=b:C=-b,w>=0?A=w:k=-w,T.drawImage(E,S,A,y,v,C,k,y,v),new p(T.getImageData(0,0,y,v).data,y,v,4).convert(x)}else{let x=this.toSharp();if(b>=0&&w>=0)x=x.extract({left:Math.floor(b),top:Math.floor(w),width:y,height:v});else if(b<=0&&w<=0){const E=Math.floor(-w),T=Math.floor(-b);x=x.extend({top:E,left:T,right:y-this.width-T,bottom:v-this.height-E})}else{let E=[0,0],T=0;w<0?(E[0]=Math.floor(-w),E[1]=v-this.height-E[0]):T=Math.floor(w);let S=[0,0],A=0;b<0?(S[0]=Math.floor(-b),S[1]=y-this.width-S[0]):A=Math.floor(b),x=x.extend({top:E[0],bottom:E[1],left:S[0],right:S[1]}).extract({left:A,top:T,width:y,height:v})}return await c(x)}}async toBlob(y="image/png",v=1){if(!d)throw new Error("toBlob() is only supported in browser environments.");return await this.toCanvas().convertToBlob({type:y,quality:v})}toTensor(y="CHW"){let v=new s.Tensor("uint8",new Uint8Array(this.data),[this.height,this.width,this.channels]);if(y!=="HWC")if(y==="CHW")v=v.permute(2,0,1);else throw new Error(`Unsupported channel format: ${y}`);return v}toCanvas(){if(!d)throw new Error("toCanvas() is only supported in browser environments.");const y=this.clone().rgba(),v=l(y.width,y.height),b=new u(y.data,y.width,y.height);return v.getContext("2d").putImageData(b,0,0),v}split(){const{data:y,width:v,height:b,channels:w}=this,x=y.constructor,E=y.length/w,T=Array.from({length:w},()=>new x(E));for(let S=0;S<E;++S){const A=w*S;for(let C=0;C<w;++C)T[C][S]=y[A+C]}return T.map(S=>new p(S,v,b,1))}_update(y,v,b,w=null){return this.data=y,this.width=v,this.height=b,w!==null&&(this.channels=w),this}clone(){return new p(this.data.slice(),this.width,this.height,this.channels)}convert(y){if(this.channels===y)return this;switch(y){case 1:this.grayscale();break;case 3:this.rgb();break;case 4:this.rgba();break;default:throw new Error(`Conversion failed due to unsupported number of channels: ${this.channels}`)}return this}async save(y){if(d){if(a.apis.IS_WEBWORKER_ENV)throw new Error("Unable to save an image from a Web Worker.");const v=y.split(".").pop().toLowerCase(),b=h.get(v)??"image/png",w=await this.toBlob(b);(0,n.saveBlob)(y,w)}else{if(a.apis.IS_FS_AVAILABLE)return await this.toSharp().toFile(y);throw new Error("Unable to save the image because filesystem is disabled in this environment.")}}toSharp(){if(d)throw new Error("toSharp() is only supported in server-side environments.");return o(this.data,{raw:{width:this.width,height:this.height,channels:this.channels}})}}const m=p.read.bind(p)},
vendor: 8,397 bytes, line 3700
3700"./src/utils/maths.js":(e,t,r)=>{r.r(t),r.d(t,{FFT:()=>m,bankers_round:()=>v,cos_sim:()=>l,dot:()=>o,dynamic_time_warping:()=>b,interpolate_data:()=>n,log_softmax:()=>s,magnitude:()=>u,max:()=>d,medianFilter:()=>_,min:()=>c,permute_data:()=>i,round:()=>y,softmax:()=>a});function n(w,[x,E,T],[S,A],C="bilinear",k=!1){const M=A/T,D=S/E,$=new w.constructor(S*A*x),V=E*T,U=S*A;for(let B=0;B<S;++B)for(let z=0;z<A;++z){const q=B*A+z,L=(z+.5)/M-.5,K=(B+.5)/D-.5;let O=Math.floor(L),N=Math.floor(K);const X=Math.min(O+1,T-1),ie=Math.min(N+1,E-1);O=Math.max(O,0),N=Math.max(N,0);const ee=L-O,le=K-N,Te=(1-ee)*(1-le),be=ee*(1-le),we=(1-ee)*le,ae=ee*le,H=N*T,fe=ie*T,Se=H+O,ne=H+X,$e=fe+O,me=fe+X;for(let Ue=0;Ue<x;++Ue){const ke=Ue*V;$[Ue*U+q]=Te*w[ke+Se]+be*w[ke+ne]+we*w[ke+$e]+ae*w[ke+me]}}return $}function i(w,x,E){const T=new Array(E.length),S=new Array(E.length);for(let k=E.length-1,M=1;k>=0;--k)S[k]=M,T[k]=x[E[k]],M*=T[k];const A=E.map((k,M)=>S[E.indexOf(M)]),C=new w.constructor(w.length);for(let k=0;k<w.length;++k){let M=0;for(let D=x.length-1,$=k;D>=0;--D)M+=$%x[D]*A[D],$=Math.floor($/x[D]);C[M]=w[k]}return[C,T]}function a(w){const x=d(w)[0],E=w.map(A=>Math.exp(A-x)),T=E.reduce((A,C)=>A+C,0);return E.map(A=>A/T)}function s(w){const x=d(w)[0];let E=0;for(let A=0;A<w.length;++A)E+=Math.exp(w[A]-x);const T=Math.log(E);return w.map(A=>A-x-T)}function o(w,x){let E=0;for(let T=0;T<w.length;++T)E+=w[T]*x[T];return E}function l(w,x){const E=o(w,x),T=u(w),S=u(x);return E/(T*S)}function u(w){return Math.sqrt(w.reduce((x,E)=>x+E*E,0))}function c(w){if(w.length===0)throw Error("Array must not be empty");let x=w[0],E=0;for(let T=1;T<w.length;++T)w[T]<x&&(x=w[T],E=T);return[x,E]}function d(w){if(w.length===0)throw Error("Array must not be empty");let x=w[0],E=0;for(let T=1;T<w.length;++T)w[T]>x&&(x=w[T],E=T);return[x,E]}function f(w){return w>0&&(w&w-1)===0}class h{constructor(x){if(this.size=x|0,this.size<=1||!f(this.size))throw new Error("FFT size must be a power of two larger than 1");this._csize=x<<1,this.table=new Float64Array(this.size*2);for(let T=0;T<this.table.length;T+=2){const S=Math.PI*T/this.size;this.table[T]=Math.cos(S),this.table[T+1]=-Math.sin(S)}let E=0;for(let T=1;this.size>T;T<<=1)++E;this._width=E%2===0?E-1:E,this._bitrev=new Int32Array(1<<this._width);for(let T=0;T<this._bitrev.length;++T){this._bitrev[T]=0;for(let S=0;S<this._width;S+=2){const A=this._width-S-2;this._bitrev[T]|=(T>>>S&3)<<A}}}createComplexArray(){return new Float64Array(this._csize)}fromComplexArray(x,E){const T=E||new Array(x.length>>>1);for(let S=0;S<x.length;S+=2)T[S>>>1]=x[S];return T}toComplexArray(x,E){const T=E||this.createComplexArray();for(let S=0;S<T.length;S+=2)T[S]=x[S>>>1],T[S+1]=0;return T}transform(x,E){if(x===E)throw new Error("Input and output buffers must be different");this._transform4(x,E,1)}realTransform(x,E){if(x===E)throw new Error("Input and output buffers must be different");this._realTransform4(x,E,1)}inverseTransform(x,E){if(x===E)throw new Error("Input and output buffers must be different");this._transform4(x,E,-1);for(let T=0;T<x.length;++T)x[T]/=this.size}_transform4(x,E,T){const S=this._csize;let C=1<<this._width,k=S/C<<1,M,D;const $=this._bitrev;if(k===4)for(M=0,D=0;M<S;M+=k,++D){const U=$[D];this._singleTransform2(E,x,M,U,C)}else for(M=0,D=0;M<S;M+=k,++D){const U=$[D];this._singleTransform4(E,x,M,U,C,T)}const V=this.table;for(C>>=2;C>=2;C>>=2){k=S/C<<1;const U=k>>>2;for(M=0;M<S;M+=k){const B=M+U-1;for(let z=M,q=0;z<B;z+=2,q+=C){const L=z,K=L+U,O=K+U,N=O+U,X=x[L],ie=x[L+1],ee=x[K],le=x[K+1],Te=x[O],be=x[O+1],we=x[N],ae=x[N+1],H=V[q],fe=T*V[q+1],Se=ee*H-le*fe,ne=ee*fe+le*H,$e=V[2*q],me=T*V[2*q+1],Ue=Te*$e-be*me,ke=Te*me+be*$e,ce=V[3*q],ve=T*V[3*q+1],Re=we*ce-ae*ve,De=we*ve+ae*ce,tt=X+Ue,Ge=ie+ke,Ie=X-Ue,He=ie-ke,Ke=Se+Re,Xe=ne+De,mt=T*(Se-Re),gt=T*(ne-De);x[L]=tt+Ke,x[L+1]=Ge+Xe,x[K]=Ie+gt,x[K+1]=He-mt,x[O]=tt-Ke,x[O+1]=Ge-Xe,x[N]=Ie-gt,x[N+1]=He+mt}}}}_singleTransform2(x,E,T,S,A){const C=x[S],k=x[S+1],M=x[S+A],D=x[S+A+1];E[T]=C+M,E[T+1]=k+D,E[T+2]=C-M,E[T+3]=k-D}_singleTransform4(x,E,T,S,A,C){const k=A*2,M=A*3,D=x[S],$=x[S+1],V=x[S+A],U=x[S+A+1],B=x[S+k],z=x[S+k+1],q=x[S+M],L=x[S+M+1],K=D+B,O=$+z,N=D-B,X=$-z,ie=V+q,ee=U+L,le=C*(V-q),Te=C*(U-L);E[T]=K+ie,E[T+1]=O+ee,E[T+2]=N+Te,E[T+3]=X-le,E[T+4]=K-ie,E[T+5]=O-ee,E[T+6]=N-Te,E[T+7]=X+le}_realTransform4(x,E,T){const S=this._csize;let C=1<<this._width,k=S/C<<1,M,D;const $=this._bitrev;if(k===4)for(M=0,D=0;M<S;M+=k,++D){const B=$[D];this._singleRealTransform2(E,x,M,B>>>1,C>>>1)}else for(M=0,D=0;M<S;M+=k,++D){const B=$[D];this._singleRealTransform4(E,x,M,B>>>1,C>>>1,T)}const V=this.table;for(C>>=2;C>=2;C>>=2){k=S/C<<1;const B=k>>>1,z=B>>>1,q=z>>>1;for(M=0;M<S;M+=k)for(let L=0,K=0;L<=q;L+=2,K+=C){const O=M+L,N=O+z,X=N+z,ie=X+z,ee=x[O],le=x[O+1],Te=x[N],be=x[N+1],we=x[X],ae=x[X+1],H=x[ie],fe=x[ie+1],Se=ee,ne=le,$e=V[K],me=T*V[K+1],Ue=Te*$e-be*me,ke=Te*me+be*$e,ce=V[2*K],ve=T*V[2*K+1],Re=we*ce-ae*ve,De=we*ve+ae*ce,tt=V[3*K],Ge=T*V[3*K+1],Ie=H*tt-fe*Ge,He=H*Ge+fe*tt,Ke=Se+Re,Xe=ne+De,mt=Se-Re,gt=ne-De,$t=Ue+Ie,kt=ke+He,Zt=T*(Ue-Ie),fr=T*(ke-He);if(x[O]=Ke+$t,x[O+1]=Xe+kt,x[N]=mt+fr,x[N+1]=gt-Zt,L===0){x[X]=Ke-$t,x[X+1]=Xe-kt;continue}if(L===q)continue;const yr=M+z-L,Kt=M+B-L;x[yr]=mt-T*fr,x[yr+1]=-gt-T*Zt,x[Kt]=Ke-T*$t,x[Kt+1]=-Xe+T*kt}}const U=S>>>1;for(let B=2;B<U;B+=2)x[S-B]=x[B],x[S-B+1]=-x[B+1]}_singleRealTransform2(x,E,T,S,A){const C=x[S],k=x[S+A];E[T]=C+k,E[T+1]=0,E[T+2]=C-k,E[T+3]=0}_singleRealTransform4(x,E,T,S,A,C){const k=A*2,M=A*3,D=x[S],$=x[S+A],V=x[S+k],U=x[S+M],B=D+V,z=D-V,q=$+U,L=C*($-U);E[T]=B+q,E[T+1]=0,E[T+2]=z,E[T+3]=-L,E[T+4]=B-q,E[T+5]=0,E[T+6]=z,E[T+7]=L}}class p{constructor(x){const E=2*(x-1),T=2*(2*x-1),S=2**Math.ceil(Math.log2(T));this.bufferSize=S,this._a=E;const A=new Float64Array(T),C=new Float64Array(S);this._chirpBuffer=new Float64Array(S),this._buffer1=new Float64Array(S),this._buffer2=new Float64Array(S),this._outBuffer1=new Float64Array(S),this._outBuffer2=new Float64Array(S);const k=-2*Math.PI/x,M=Math.cos(k),D=Math.sin(k);for(let $=0;$<T>>1;++$){const V=($+1-x)**2/2,U=Math.sqrt(M**2+D**2)**V,B=V*Math.atan2(D,M),z=2*$;A[z]=U*Math.cos(B),A[z+1]=U*Math.sin(B),C[z]=A[z],C[z+1]=-A[z+1]}this._slicedChirpBuffer=A.subarray(E,T),this._f=new h(S>>1),this._f.transform(this._chirpBuffer,C)}_transform(x,E,T){const S=this._buffer1,A=this._buffer2,C=this._outBuffer1,k=this._outBuffer2,M=this._chirpBuffer,D=this._slicedChirpBuffer,$=this._a;if(T)for(let V=0;V<D.length;V+=2){const U=V+1,B=V>>1,z=E[B];S[V]=z*D[V],S[U]=z*D[U]}else for(let V=0;V<D.length;V+=2){const U=V+1;S[V]=E[V]*D[V]-E[U]*D[U],S[U]=E[V]*D[U]+E[U]*D[V]}this._f.transform(C,S);for(let V=0;V<M.length;V+=2){const U=V+1;A[V]=C[V]*M[V]-C[U]*M[U],A[U]=C[V]*M[U]+C[U]*M[V]}this._f.inverseTransform(k,A);for(let V=0;V<k.length;V+=2){const U=k[V+$],B=k[V+$+1],z=D[V],q=D[V+1];x[V]=U*z-B*q,x[V+1]=U*q+B*z}}transform(x,E){this._transform(x,E,!1)}realTransform(x,E){this._transform(x,E,!0)}}class m{constructor(x){this.fft_length=x,this.isPowerOfTwo=f(x),this.isPowerOfTwo?(this.fft=new h(x),this.outputBufferSize=2*x):(this.fft=new p(x),this.outputBufferSize=this.fft.bufferSize)}realTransform(x,E){this.fft.realTransform(x,E)}transform(x,E){this.fft.transform(x,E)}}function _(w,x){if(x%2===0||x<=0)throw new Error("Window size must be a positive odd number");const E=new w.constructor(w.length),T=new w.constructor(x),S=Math.floor(x/2);for(let A=0;A<w.length;++A){let C=0;for(let k=-S;k<=S;++k){let M=A+k;M<0?M=Math.abs(M):M>=w.length&&(M=2*(w.length-1)-M),T[C++]=w[M]}T.sort(),E[A]=T[S]}return E}function y(w,x){const E=Math.pow(10,x);return Math.round(w*E)/E}function v(w){const x=Math.round(w);return Math.abs(w)%1===.5?x%2===0?x:x-1:x}function b(w){const x=w.length,E=w[0].length,T=[x+1,E+1],S=Array.from({length:T[0]},()=>Array(T[1]).fill(1/0));S[0][0]=0;const A=Array.from({length:T[0]},()=>Array(T[1]).fill(-1));for(let $=1;$<T[1];++$)for(let V=1;V<T[0];++V){const U=S[V-1][$-1],B=S[V-1][$],z=S[V][$-1];let q,L;U<B&&U<z?(q=U,L=0):B<U&&B<z?(q=B,L=1):(q=z,L=2),S[V][$]=w[V-1][$-1]+q,A[V][$]=L}for(let $=0;$<T[1];++$)A[0][$]=2;for(let $=0;$<T[0];++$)A[$][0]=1;let C=x,k=E,M=[],D=[];for(;C>0||k>0;)switch(M.push(C-1),D.push(k-1),A[C][k]){case 0:--C,--k;break;case 1:--C;break;case 2:--k;break;default:throw new Error(`Internal error in dynamic time warping. Unexpected trace[${C}, ${k}]. Please file a bug report.`)}return M.reverse(),D.reverse(),[M,D]}},
3700"./src/utils/tensor.js":(e,t,r)=>{r.r(t),r.d(t,{DataTypeMap:()=>s,Tensor:()=>o,cat:()=>E,full:()=>D,full_like:()=>$,interpolate:()=>c,interpolate_4d:()=>d,layer_norm:()=>v,matmul:()=>f,mean:()=>C,mean_pooling:()=>y,ones:()=>V,ones_like:()=>U,permute:()=>u,quantize_embeddings:()=>L,rand:()=>q,rfft:()=>h,slice:()=>_,stack:()=>T,std_mean:()=>A,topk:()=>p,zeros:()=>B,zeros_like:()=>z});var n=r("./src/utils/maths.js"),i=r("./src/backends/onnx.js"),a=r("./src/ops/registry.js");const s=Object.freeze({float32:Float32Array,float16:typeof Float16Array<"u"?Float16Array:Uint16Array,float64:Float64Array,string:Array,int8:Int8Array,uint8:Uint8Array,int16:Int16Array,uint16:Uint16Array,int32:Int32Array,uint32:Uint32Array,int64:BigInt64Array,uint64:BigUint64Array,bool:Uint8Array,uint4:Uint8Array,int4:Int8Array});class o{constructor(...O){Le(this,"ort_tensor");return(0,i.isONNXTensor)(O[0])?this.ort_tensor=O[0]:this.ort_tensor=new i.Tensor(O[0],O[1],O[2]),new Proxy(this,{get:(N,X)=>{if(typeof X=="string"){let ie=Number(X);if(Number.isInteger(ie))return N._getitem(ie)}return N[X]},set:(N,X,ie)=>N[X]=ie})}get dims(){return this.ort_tensor.dims}set dims(O){this.ort_tensor.dims=O}get type(){return this.ort_tensor.type}get data(){return this.ort_tensor.data}get size(){return this.ort_tensor.size}get location(){return this.ort_tensor.location}dispose(){this.ort_tensor.dispose()}*[Symbol.iterator](){const[O,...N]=this.dims;if(N.length>0){const X=N.reduce((ie,ee)=>ie*ee);for(let ie=0;ie<O;++ie)yield this._subarray(ie,X,N)}else yield*this.data}_getitem(O){const[N,...X]=this.dims;if(O=x(O,N),X.length>0){const ie=X.reduce((ee,le)=>ee*le);return this._subarray(O,ie,X)}else return new o(this.type,[this.data[O]],X)}indexOf(O){const N=this.data;for(let X=0;X<N.length;++X)if(N[X]==O)return X;return-1}_subarray(O,N,X){const ie=O*N,ee=(O+1)*N,le="subarray"in this.data?this.data.subarray(ie,ee):this.data.slice(ie,ee);return new o(this.type,le,X)}item(){const O=this.data;if(O.length!==1)throw new Error(`a Tensor with ${O.length} elements cannot be converted to Scalar`);return O[0]}tolist(){return l(this.data,this.dims)}sigmoid(){return this.clone().sigmoid_()}sigmoid_(){const O=this.data;for(let N=0;N<O.length;++N)O[N]=1/(1+Math.exp(-O[N]));return this}map(O){return this.clone().map_(O)}map_(O){const N=this.data;for(let X=0;X<N.length;++X)N[X]=O(N[X],X,N);return this}mul(O){return this.clone().mul_(O)}mul_(O){const N=this.data;for(let X=0;X<N.length;++X)N[X]*=O;return this}div(O){return this.clone().div_(O)}div_(O){const N=this.data;for(let X=0;X<N.length;++X)N[X]/=O;return this}add(O){return this.clone().add_(O)}add_(O){const N=this.data;for(let X=0;X<N.length;++X)N[X]+=O;return this}sub(O){return this.clone().sub_(O)}sub_(O){const N=this.data;for(let X=0;X<N.length;++X)N[X]-=O;return this}clone(){return new o(this.type,this.data.slice(),this.dims.slice())}slice(...O){const N=[],X=[];for(let ae=0;ae<this.dims.length;++ae){let H=O[ae];if(H==null)X.push([0,this.dims[ae]]),N.push(this.dims[ae]);else if(typeof H=="number")H=x(H,this.dims[ae],ae),X.push([H,H+1]);else if(Array.isArray(H)&&H.length===2){let[fe,Se]=H;if(fe=fe===null?0:x(fe,this.dims[ae],ae,!1),Se=Se===null?this.dims[ae]:x(Se,this.dims[ae],ae,!1),fe>Se)throw new Error(`Invalid slice: ${H}`);const ne=[Math.max(fe,0),Math.min(Se,this.dims[ae])];X.push(ne),N.push(ne[1]-ne[0])}else throw new Error(`Invalid slice: ${H}`)}const ie=X.map(([ae,H])=>H-ae),ee=ie.reduce((ae,H)=>ae*H),le=this.data,Te=new le.constructor(ee),be=this.stride();let we=!0;for(let ae=1;ae<ie.length;++ae)if(X[ae][0]!==0||X[ae][1]!==this.dims[ae]){we=!1;break}if(we){const ae=X[0][0]*be[0],H=X[0][1]*be[0];if(ArrayBuffer.isView(le))Te.set(le.subarray(ae,H));else if(Array.isArray(le)){const fe=le.slice(ae,H);for(let Se=0;Se<fe.length;++Se)Te[Se]=fe[Se]}else throw new Error("Unsupported data type for slicing")}else for(let ae=0;ae<ee;++ae){let H=0;for(let fe=ie.length-1,Se=ae;fe>=0;--fe){const ne=ie[fe];H+=(Se%ne+X[fe][0])*be[fe],Se=Math.floor(Se/ne)}Te[ae]=le[H]}return new o(this.type,Te,N)}permute(...O){return u(this,O)}transpose(...O){return this.permute(...O)}sum(O=null,N=!1){return this.norm(1,O,N)}norm(O="fro",N=null,X=!1){if(O==="fro")O=2;else if(typeof O=="string")throw Error(`Unsupported norm: ${O}`);const ie=this.data,ee=(we,ae)=>
3700we+ae**O;if(N===null){const we=ie.reduce(ee,0)**(1/O);return new o(this.type,[we],[])}const[le,Te,be]=S(ee,this,N,X);if(O!==1)for(let we=0;we<Te.length;++we)Te[we]=Te[we]**(1/O);return new o(le,Te,be)}normalize_(O=2,N=1){N=x(N,this.dims.length);const X=this.norm(O,N,!0),ie=this.data,ee=X.data;for(let le=0;le<ie.length;++le){let Te=0;for(let be=this.dims.length-1,we=le,ae=1;be>=0;--be){const H=this.dims[be];if(be!==N){const fe=we%H;Te+=fe*ae,ae*=this.dims[be]}we=Math.floor(we/H)}ie[le]/=ee[Te]}return this}normalize(O=2,N=1){return this.clone().normalize_(O,N)}stride(){return k(this.dims)}squeeze(O=null){return new o(this.type,this.data,b(this.dims,O))}squeeze_(O=null){return this.dims=b(this.dims,O),this}unsqueeze(O=null){return new o(this.type,this.data,w(this.dims,O))}unsqueeze_(O=null){return this.dims=w(this.dims,O),this}flatten_(O=0,N=-1){N=(N+this.dims.length)%this.dims.length;let X=this.dims.slice(0,O),ie=this.dims.slice(O,N+1),ee=this.dims.slice(N+1);return this.dims=[...X,ie.reduce((le,Te)=>le*Te,1),...ee],this}flatten(O=0,N=-1){return this.clone().flatten_(O,N)}view(...O){let N=-1;for(let ie=0;ie<O.length;++ie)if(O[ie]===-1){if(N!==-1)throw new Error("Only one dimension can be inferred");N=ie}const X=this.data;if(N!==-1){const ie=O.reduce((ee,le,Te)=>Te!==N?ee*le:ee,1);O[N]=X.length/ie}return new o(this.type,X,O)}neg_(){const O=this.data;for(let N=0;N<O.length;++N)O[N]=-O[N];return this}neg(){return this.clone().neg_()}gt(O){const N=new Uint8Array(this.data.length),X=this.data;for(let ie=0;ie<X.length;++ie)N[ie]=X[ie]>O?1:0;return new o("bool",N,this.dims)}lt(O){const N=new Uint8Array(this.data.length),X=this.data;for(let ie=0;ie<X.length;++ie)N[ie]=X[ie]<O?1:0;return new o("bool",N,this.dims)}clamp_(O,N){const X=this.data;for(let ie=0;ie<X.length;++ie)X[ie]=Math.min(Math.max(X[ie],O),N);return this}clamp(O,N){return this.clone().clamp_(O,N)}round_(){const O=this.data;for(let N=0;N<O.length;++N)O[N]=Math.round(O[N]);return this}round(){return this.clone().round_()}mean(O=null,N=!1){return C(this,O,N)}min(O=null,N=!1){if(O===null){const le=(0,n.min)(this.data)[0];return new o(this.type,[le],[])}const[X,ie,ee]=S((le,Te)=>Math.min(le,Te),this,O,N,1/0);return new o(X,ie,ee)}max(O=null,N=!1){if(O===null){const le=(0,n.max)(this.data)[0];return new o(this.type,[le],[])}const[X,ie,ee]=S((le,Te)=>Math.max(le,Te),this,O,N,-1/0);return new o(X,ie,ee)}argmin(O=null,N=!1){if(O!==null)throw new Error("`dim !== null` not yet implemented.");const X=(0,n.min)(this.data)[1];return new o("int64",[BigInt(X)],[])}argmax(O=null,N=!1){if(O!==null)throw new Error("`dim !== null` not yet implemented.");const X=(0,n.max)(this.data)[1];return new o("int64",[BigInt(X)],[])}to(O){if(this.type===O)return this;if(!s.hasOwnProperty(O))throw new Error(`Unsupported type: ${O}`);let N;const X=["int64","uint64"].includes(this.type),ie=["int64","uint64"].includes(O);return X&&!ie?N=Number:!X&&ie&&(N=BigInt),new o(O,s[O].from(this.data,N),this.dims)}}function l(K,O){const N=K.length,X=O.reduce((ee,le)=>ee*le);if(N!==X)throw Error(`cannot reshape array of size ${N} into shape (${O})`);let ie=K;for(let ee=O.length-1;ee>=0;ee--)ie=ie.reduce((le,Te)=>{let be=le[le.length-1];return be.length<O[ee]?be.push(Te):le.push([Te]),le},[[]]);return ie[0]}function u(K,O){const[N,X]=(0,n.permute_data)(K.data,K.dims,O);return new o(K.type,N,X)}function c(K,[O,N],X="bilinear",ie=!1){const ee=K.dims.at(-3)??1,le=K.dims.at(-2),Te=K.dims.at(-1);let be=(0,n.interpolate_data)(K.data,[ee,le,Te],[O,N],X,ie);return new o(K.type,be,[ee,O,N])}async function d(K,{size:O=null,mode:N="bilinear"}={}){if(K.dims.length!==4)throw new Error("`interpolate_4d` currently only supports 4D input.");if(!O)throw new Error("`interpolate_4d` requires a `size` argument.");let X;if(O.length===2)X=[...K.dims.slice(0,2),...O];else if(O.length===3)X=[K.dims[0],...O];else if(O.length===4)X=O;else throw new Error("`size` must be of length 2, 3, or 4.");let ie;if(N==="nearest")ie=await a.TensorOpRegistry.nearest_interpolate_4d;else if(N==="bilinear")ie=await a.TensorOpRegistry.bilinear_interpolate_4d;else if(N==="bicubic")ie=await a.TensorOpRegistry.bicubic_interpolate_4d;else throw new Error(`Unsupported mode: ${N}`);const ee=new o("int64",new BigInt64Array(X.map(BigInt)),[X.length]);return await ie({x:K,s:ee})}async function f(K,O){return await(await a.TensorOpRegistry.matmul)({a:K,b:O})}async function h(K,O){return await(await a.TensorOpRegistry.rfft)({x:K,a:O})}async function p(K,O){const N=await a.TensorOpRegistry.top_k;return O==null?O=K.dims.at(-1):O=Math.min(O,K.dims.at(-1)),await N({x:K,k:new o("int64",[BigInt(O)],[1])})}const m=K=>new o("int64",K,[K.length]);async function _(K,O,N,X,ie){return await(await a.TensorOpRegistry.slice)({x:K,s:m(O),e:m(N),a:m(X),t:m(ie??new Array(X.length).fill(1))})}function y(K,O){const N=K.data,X=O.data,ie=[K.dims[0],K.dims[2]],ee=new N.constructor(ie[0]*ie[1]),[le,Te,be]=K.dims;let we=0;for(let ae=0;ae<le;++ae){const H=ae*be*Te;for(let fe=0;fe<be;++fe){let Se=0,ne=0;const $e=ae*Te,me=H+fe;for(let ke=0;ke<Te;++ke){const ce=Number(X[$e+ke]);ne+=ce,Se+=N[me+ke*be]*ce}const Ue=Se/ne;ee[we++]=Ue}}return new o(K.type,ee,ie)}function v(K,O,{eps:N=1e-5}={}){if(K.dims.length!==2)throw new Error("`layer_norm` currently only supports 2D input.");const[X,ie]=K.dims;if(O.length!==1&&O[0]!==ie)throw new Error("`normalized_shape` must be a 1D array with shape `[input.dims[1]]`.");const[ee,le]=A(K,1,0,!0),Te=ee.data,be=le.data,we=K.data,ae=new we.constructor(we.length);for(let H=0;H<X;++H){const fe=H*ie;for(let Se=0;Se<ie;++Se){const ne=fe+Se;ae[ne]=(we[ne]-be[H])/(Te[H]+N)}}return new o(K.type,ae,K.dims)}function b(K,O){return K=K.slice(),O===null?K=K.filter(N=>N!==1):typeof O=="number"?K[O]===1&&K.splice(O,1):Array.isArray(O)&&(K=K.filter((N,X)=>N!==1||!O.includes(X))),K}function w(K,O){return O=x(O,K.length+1),K=K.slice(),K.splice(O,0,1),K}function x(K,O,N=null,X=!0){if(K<-O||K>=O){if(X)throw new Error(`IndexError: index ${K} is out of bounds for dimension${N===null?"":" "+N} with size ${O}`);return K<-O?0:O}return K<0&&(K=(K%O+O)%O),K}function E(K,O=0){O=x(O,K[0].dims.length);const N=K[0].dims.slice();N[O]=K.reduce((le,Te)=>le+Te.dims[O],0);const X=N.reduce((le,Te)=>le*Te,1),ie=new K[0].data.constructor(X),ee=K[0].type;if(O===0){let le=0;for(const Te of K){const be=Te.data;ie.set(be,le),le+=be.length}}else{let le=0;for(let Te=0;Te<K.length;++Te){const{data:be,dims:we}=K[Te];for(let ae=0;ae<be.length;++ae){let H=0;for(let fe=we.length-1,Se=ae,ne=1;fe>=0;--fe){const $e=we[fe];let me=Se%$e;fe===O&&(me+=le),H+=me*ne,ne*=N[fe],Se=Math.floor(Se/$e)}ie[H]=be[ae]}le+=we[O]}}return new o(ee,ie,N)}function T(K,O=0){return E(K.map(N=>N.unsqueeze(O)),O)}function S(K,O,N=null,X=!1,ie=null){const ee=O.data,le=O.dims;N=x(N,le.length);const Te=le.slice();Te[N]=1;const be=new ee.constructor(ee.length/le[N]);ie!==null&&be.fill(ie);for(let we=0;we<ee.length;++we){let ae=0;for(let H=le.length-1,fe=we,Se=1;H>=0;--H){const ne=le[H];if(H!==N){const $e=fe%ne;ae+=$e*Se,Se*=Te[H]}fe=Math.floor(fe/ne)}be[ae]=K(be[ae],ee[we],we,ae)}return X||Te.splice(N,1),[O.type,be,Te]}
vendor: 2,032 bytes, line 3700
3700function A(K,O=null,N=1,X=!1){const ie=K.data,ee=K.dims;if(O===null){const Se=ie.reduce((Ue,ke)=>Ue+ke,0)/ie.length,ne=Math.sqrt(ie.reduce((Ue,ke)=>Ue+(ke-Se)**2,0)/(ie.length-N)),$e=new o(K.type,[Se],[]);return[new o(K.type,[ne],[]),$e]}O=x(O,ee.length);const le=C(K,O,X),Te=le.data,[be,we,ae]=S((fe,Se,ne,$e)=>fe+(Se-Te[$e])**2,K,O,X);for(let fe=0;fe<we.length;++fe)we[fe]=Math.sqrt(we[fe]/(ee[O]-N));return[new o(be,we,ae),le]}function C(K,O=null,N=!1){const X=K.dims,ie=K.data;if(O===null){const be=ie.reduce((we,ae)=>we+ae,0);return new o(K.type,[be/ie.length],[])}O=x(O,X.length);const[ee,le,Te]=S((be,we)=>be+we,K,O,N);if(X[O]!==1)for(let be=0;be<le.length;++be)le[be]/=X[O];return new o(ee,le,Te)}function k(K){const O=new Array(K.length);for(let N=K.length-1,X=1;N>=0;--N)O[N]=X,X*=K[N];return O}function M(K,O,N,X){const ie=K.reduce((ee,le)=>ee*le,1);return new o(N,new X(ie).fill(O),K)}function D(K,O){let N,X;if(typeof O=="number")N="float32",X=Float32Array;else if(typeof O=="bigint")N="int64",X=BigInt64Array;else if(typeof O=="boolean")N="bool",X=Uint8Array;else throw new Error(`Unsupported data type: ${typeof O}`);return M(K,O,N,X)}function $(K,O){return D(K.dims,O)}function V(K){return M(K,1n,"int64",BigInt64Array)}function U(K){return V(K.dims)}function B(K){return M(K,0n,"int64",BigInt64Array)}function z(K){return B(K.dims)}function q(K){const O=K.reduce((N,X)=>N*X,1);return new o("float32",Float32Array.from({length:O},()=>Math.random()),K)}function L(K,O){if(K.dims.length!==2)throw new Error("The tensor must have 2 dimensions");if(K.dims.at(-1)%8!==0)throw new Error("The last dimension of the tensor must be a multiple of 8");if(!["binary","ubinary"].includes(O))throw new Error("The precision must be either 'binary' or 'ubinary'");const N=O==="binary",X=N?"int8":"uint8",ie=N?Int8Array:Uint8Array,ee=K.data,le=new ie(ee.length/8);for(let Te=0;Te<ee.length;++Te){const be=ee[Te]>0?1:0,we=Math.floor(Te/8),ae=Te%8;le[we]|=be<<7-ae,N&&ae===0&&(le[we]-=128)}return new o(X,le,[K.dims[0],K.dims[1]/8])}},
3700"./src/utils/video.js":(e,t,r)=>{r.r(t),r.d(t,{RawVideo:()=>s,RawVideoFrame:()=>a,load_video:()=>o});var n=r("./src/utils/image.js"),i=r("./src/env.js");class a{constructor(u,c){this.image=u,this.timestamp=c}}class s{constructor(u,c){u.length>0&&u[0]instanceof n.RawImage&&(u=u.map((d,f)=>new a(d,(f+1)/(u.length+1)*c))),this.frames=u,this.duration=c}get width(){return this.frames[0].image.width}get height(){return this.frames[0].image.height}get fps(){return this.frames.length/this.duration}}async function o(l,{num_frames:u=null,fps:c=null}={}){if(!i.apis.IS_BROWSER_ENV)throw new Error("`load_video` is currently only supported in browser environments.");if(u==null&&c==null)throw new Error("Either num_frames or fps must be provided.");const d=[],f=document.createElement("video");if(f.crossOrigin="anonymous",f.muted=!0,typeof l=="string")f.src=l;else if(l instanceof Blob)f.src=URL.createObjectURL(l);else if(l instanceof HTMLVideoElement)f.src=l.src;else throw new Error("Invalid URL or video element provided.");if(await new Promise(b=>f.onloadedmetadata=b),f.seekable.start(0)===f.seekable.end(0)){const w=await(await fetch(f.src)).blob();f.src=URL.createObjectURL(w),await new Promise(x=>f.onloadedmetadata=x)}const h=f.duration;let p,m;u!=null?(p=u,m=u===1?0:h/(u-1)):(m=1/c,p=Math.floor(h/m));let _=[];for(let b=0;b<p;++b)_.push(u===1?h/2:b*m);const y=document.createElement("canvas");y.width=f.videoWidth,y.height=f.videoHeight;const v=y.getContext("2d",{willReadFrequently:!0});for(const b of _){f.currentTime=b,await new Promise(T=>{f.onseeked=T}),v.drawImage(f,0,0,y.width,y.height);const w=v.getImageData(0,0,y.width,y.height),x=new n.RawImage(w.data,y.width,y.height,4),E=new a(x,b);d.push(E)}return f.remove(),new s(d,h)}}
3700},Fse={};function Ci(e){var t=Fse[e];if(t!==void 0)return t.exports;var r=Fse[e]={exports:{}};return Swt[e](r,r.exports,Ci),r.exports}(()=>{var e=Object.getPrototypeOf?r=>Object.getPrototypeOf(r):r=>r.__proto__,t;Ci.t=function(r,n){if(n&1&&(r=this(r)),n&8||typeof r=="object"&&r&&(n&4&&r.__esModule||n&16&&typeof r.then=="function"))return r;var i=Object.create(null);Ci.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=n&2&&r;typeof s=="object"&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(o=>a[o]=()=>r[o]);return a.default=()=>r,Ci.d(i,a),i}})();Ci.d=(e,t)=>{for(var r in t)Ci.o(t,r)&&!Ci.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})};Ci.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Ci.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var F={};(()=>{/*!*****************************!*\ 3701 !*** ./src/transformers.js ***! 3702 \*****************************/Ci.r(F),Ci.d(F,{ASTFeatureExtractor:()=>d.ASTFeatureExtractor,ASTForAudioClassification:()=>r.ASTForAudioClassification,ASTModel:()=>r.ASTModel,ASTPreTrainedModel:()=>r.ASTPreTrainedModel,AlbertForMaskedLM:()=>r.AlbertForMaskedLM,AlbertForQuestionAnswering:()=>r.AlbertForQuestionAnswering,AlbertForSequenceClassification:()=>r.AlbertForSequenceClassification,AlbertModel:()=>r.AlbertModel,AlbertPreTrainedModel:()=>r.AlbertPreTrainedModel,AlbertTokenizer:()=>n.AlbertTokenizer,ArceeForCausalLM:()=>r.ArceeForCausalLM,ArceeModel:()=>r.ArceeModel,ArceePreTrainedModel:()=>r.ArceePreTrainedModel,AudioClassificationPipeline:()=>t.AudioClassificationPipeline,AutoConfig:()=>i.AutoConfig,AutoFeatureExtractor:()=>f.AutoFeatureExtractor,AutoImageProcessor:()=>m.AutoImageProcessor,AutoModel:()=>r.AutoModel,AutoModelForAudioClassification:()=>r.AutoModelForAudioClassification,AutoModelForAudioFrameClassification:()=>r.AutoModelForAudioFrameClassification,AutoModelForAudioTextToText:()=>r.AutoModelForAudioTextToText,AutoModelForCTC:()=>r.AutoModelForCTC,AutoModelForCausalLM:()=>r.AutoModelForCausalLM,AutoModelForDepthEstimation:()=>r.AutoModelForDepthEstimation,AutoModelForDocumentQuestionAnswering:()=>r.AutoModelForDocumentQuestionAnswering,AutoModelForImageClassification:()=>r.AutoModelForImageClassification,AutoModelForImageFeatureExtraction:()=>r.AutoModelForImageFeatureExtraction,AutoModelForImageMatting:()=>r.AutoModelForImageMatting,AutoModelForImageSegmentation:()=>r.AutoModelForImageSegmentation,AutoModelForImageTextToText:()=>r.AutoModelForImageTextToText,AutoModelForImageToImage:()=>r.AutoModelForImageToImage,AutoModelForMaskGeneration:()=>r.AutoModelForMaskGeneration,AutoModelForMaskedLM:()=>r.AutoModelForMaskedLM,AutoModelForNormalEstimation:()=>r.AutoModelForNormalEstimation,AutoModelForObjectDetection:()=>r.AutoModelForObjectDetection,AutoModelForPoseEstimation:()=>r.AutoModelForPoseEstimation,AutoModelForQuestionAnswering:()=>r.AutoModelForQuestionAnswering,AutoModelForSemanticSegmentation:()=>r.AutoModelForSemanticSegmentation,AutoModelForSeq2SeqLM:()=>r.AutoModelForSeq2SeqLM,AutoModelForSequenceClassification:()=>r.AutoModelForSequenceClassification,AutoModelForSpeechSeq2Seq:()=>r.AutoModelForSpeechSeq2Seq,AutoModelForTextToSpectrogram:()=>r.AutoModelForTextToSpectrogram,AutoModelForTextToWaveform:()=>r.AutoModelForTextToWaveform,AutoModelForTokenClassification:()=>r.AutoModelForTokenClassification,AutoModelForUniversalSegmentation:()=>r.AutoModelForUniversalSegmentation,AutoModelForVision2Seq:()=>r.AutoModelForVision2Seq,AutoModelForXVector:()=>r.AutoModelForXVector,AutoModelForZeroShotObjectDetection:()=>r.AutoModelForZeroShotObjectDetection,AutoProcessor:()=>v.AutoProcessor,AutoTokenizer:()=>n.AutoTokenizer,AutomaticSpeechRecognitionPipeline:()=>t.AutomaticSpeechRecognitionPipeline,BackgroundRemovalPipeline:()=>t.BackgroundRemovalPipeline,BartForConditionalGeneration:()=>r.BartForConditionalGeneration,BartForSequenceClassification:()=>r.BartForSequenceClassification,BartModel:()=>r.BartModel,BartPretrainedModel:()=>r.BartPretrainedModel,BartTokenizer:()=>n.BartTokenizer,BaseModelOutput:()=>r.BaseModelOutput,BaseStreamer:()=>b.BaseStreamer,BeitFeatureExtractor:()=>p.BeitFeatureExtractor,BeitForImageClassification:()=>
3702r.BeitForImageClassification,BeitModel:()=>r.BeitModel,BeitPreTrainedModel:()=>r.BeitPreTrainedModel,BertForMaskedLM:()=>r.BertForMaskedLM,BertForQuestionAnswering:()=>r.BertForQuestionAnswering,BertForSequenceClassification:()=>r.BertForSequenceClassification,BertForTokenClassification:()=>r.BertForTokenClassification,BertModel:()=>r.BertModel,BertPreTrainedModel:()=>r.BertPreTrainedModel,BertTokenizer:()=>n.BertTokenizer,BitImageProcessor:()=>p.BitImageProcessor,BlenderbotForConditionalGeneration:()=>r.BlenderbotForConditionalGeneration,BlenderbotModel:()=>r.BlenderbotModel,BlenderbotPreTrainedModel:()=>r.BlenderbotPreTrainedModel,BlenderbotSmallForConditionalGeneration:()=>r.BlenderbotSmallForConditionalGeneration,BlenderbotSmallModel:()=>r.BlenderbotSmallModel,BlenderbotSmallPreTrainedModel:()=>r.BlenderbotSmallPreTrainedModel,BlenderbotSmallTokenizer:()=>n.BlenderbotSmallTokenizer,BlenderbotTokenizer:()=>n.BlenderbotTokenizer,BloomForCausalLM:()=>r.BloomForCausalLM,BloomModel:()=>r.BloomModel,BloomPreTrainedModel:()=>r.BloomPreTrainedModel,BloomTokenizer:()=>n.BloomTokenizer,CLIPFeatureExtractor:()=>p.CLIPFeatureExtractor,CLIPImageProcessor:()=>p.CLIPImageProcessor,CLIPModel:()=>r.CLIPModel,CLIPPreTrainedModel:()=>r.CLIPPreTrainedModel,CLIPSegForImageSegmentation:()=>r.CLIPSegForImageSegmentation,CLIPSegModel:()=>r.CLIPSegModel,CLIPSegPreTrainedModel:()=>r.CLIPSegPreTrainedModel,CLIPTextModel:()=>r.CLIPTextModel,CLIPTextModelWithProjection:()=>r.CLIPTextModelWithProjection,CLIPTokenizer:()=>n.CLIPTokenizer,CLIPVisionModel:()=>r.CLIPVisionModel,CLIPVisionModelWithProjection:()=>r.CLIPVisionModelWithProjection,CamembertForMaskedLM:()=>r.CamembertForMaskedLM,CamembertForQuestionAnswering:()=>r.CamembertForQuestionAnswering,CamembertForSequenceClassification:()=>r.CamembertForSequenceClassification,CamembertForTokenClassification:()=>r.CamembertForTokenClassification,CamembertModel:()=>r.CamembertModel,CamembertPreTrainedModel:()=>r.CamembertPreTrainedModel,CamembertTokenizer:()=>n.CamembertTokenizer,CausalLMOutput:()=>r.CausalLMOutput,CausalLMOutputWithPast:()=>r.CausalLMOutputWithPast,ChineseCLIPFeatureExtractor:()=>p.ChineseCLIPFeatureExtractor,ChineseCLIPModel:()=>r.ChineseCLIPModel,ChineseCLIPPreTrainedModel:()=>r.ChineseCLIPPreTrainedModel,ClapAudioModelWithProjection:()=>r.ClapAudioModelWithProjection,ClapFeatureExtractor:()=>d.ClapFeatureExtractor,ClapModel:()=>r.ClapModel,ClapPreTrainedModel:()=>r.ClapPreTrainedModel,ClapTextModelWithProjection:()=>r.ClapTextModelWithProjection,ClassifierFreeGuidanceLogitsProcessor:()=>x.ClassifierFreeGuidanceLogitsProcessor,CodeGenForCausalLM:()=>r.CodeGenForCausalLM,CodeGenModel:()=>r.CodeGenModel,CodeGenPreTrainedModel:()=>r.CodeGenPreTrainedModel,CodeGenTokenizer:()=>n.CodeGenTokenizer,CodeLlamaTokenizer:()=>n.CodeLlamaTokenizer,CohereForCausalLM:()=>r.CohereForCausalLM,CohereModel:()=>r.CohereModel,CoherePreTrainedModel:()=>r.CoherePreTrainedModel,CohereTokenizer:()=>n.CohereTokenizer,ConvBertForMaskedLM:()=>r.ConvBertForMaskedLM,ConvBertForQuestionAnswering:()=>r.ConvBertForQuestionAnswering,ConvBertForSequenceClassification:()=>r.ConvBertForSequenceClassification,ConvBertForTokenClassification:()=>r.ConvBertForTokenClassification,ConvBertModel:()=>r.ConvBertModel,ConvBertPreTrainedModel:()=>r.ConvBertPreTrainedModel,ConvBertTokenizer:()=>n.ConvBertTokenizer,ConvNextFeatureExtractor:()=>p.ConvNextFeatureExtractor,ConvNextForImageClassification:()=>r.ConvNextForImageClassification,ConvNextImageProcessor:()=>p.ConvNextImageProcessor,ConvNextModel:()=>r.ConvNextModel,ConvNextPreTrainedModel:()=>r.ConvNextPreTrainedModel,ConvNextV2ForImageClassification:()=>r.ConvNextV2ForImageClassification,ConvNextV2Model:()=>r.ConvNextV2Model,ConvNextV2PreTrainedModel:()=>r.ConvNextV2PreTrainedModel,DFineForObjectDetection:()=>r.DFineForObjectDetection,DFineModel:()=>r.DFineModel,DFinePreTrainedModel:()=>r.DFinePreTrainedModel,DINOv3ConvNextModel:()=>r.DINOv3ConvNextModel,DINOv3ConvNextPreTrainedModel:()=>r.DINOv3ConvNextPreTrainedModel,DINOv3ViTImageProcessor:()=>p.DINOv3ViTImageProcessor,DINOv3ViTModel:()=>r.DINOv3ViTModel,DINOv3ViTPreTrainedModel:()=>r.DINOv3ViTPreTrainedModel,DPTFeatureExtractor:()=>p.DPTFeatureExtractor,DPTForDepthEstimation:()=>r.DPTForDepthEstimation,DPTImageProcessor:()=>p.DPTImageProcessor,DPTModel:()=>r.DPTModel,DPTPreTrainedModel:()=>r.DPTPreTrainedModel,DacDecoderModel:()=>r.DacDecoderModel,DacDecoderOutput:()=>r.DacDecoderOutput,DacEncoderModel:()=>r.DacEncoderModel,DacEncoderOutput:()=>r.DacEncoderOutput,DacFeatureExtractor:()=>d.DacFeatureExtractor,DacModel:()=>r.DacModel,DacPreTrainedModel:()=>r.DacPreTrainedModel,DataTypeMap:()=>l.DataTypeMap,DebertaForMaskedLM:()=>r.DebertaForMaskedLM,DebertaForQuestionAnswering:()=>r.DebertaForQuestionAnswering,DebertaForSequenceClassification:()=>r.DebertaForSequenceClassification,DebertaForTokenClassification:()=>r.DebertaForTokenClassification,DebertaModel:()=>r.DebertaModel,DebertaPreTrainedModel:()=>r.DebertaPreTrainedModel,DebertaTokenizer:()=>n.DebertaTokenizer,DebertaV2ForMaskedLM:()=>r.DebertaV2ForMaskedLM,DebertaV2ForQuestionAnswering:()=>r.DebertaV2ForQuestionAnswering,DebertaV2ForSequenceClassification:()=>r.DebertaV2ForSequenceClassification,DebertaV2ForTokenClassification:()=>r.DebertaV2ForTokenClassification,DebertaV2Model:()=>r.DebertaV2Model,DebertaV2PreTrainedModel:()=>r.DebertaV2PreTrainedModel,DebertaV2Tokenizer:()=>n.DebertaV2Tokenizer,DecisionTransformerModel:()=>r.DecisionTransformerModel,DecisionTransformerPreTrainedModel:()=>r.DecisionTransformerPreTrainedModel,DeiTFeatureExtractor:()=>p.DeiTFeatureExtractor,DeiTForImageClassification:()=>r.DeiTForImageClassification,DeiTImageProcessor:()=>p.DeiTImageProcessor,DeiTModel:()=>r.DeiTModel,DeiTPreTrainedModel:()=>r.DeiTPreTrainedModel,DepthAnythingForDepthEstimation:()=>r.DepthAnythingForDepthEstimation,DepthAnythingPreTrainedModel:()=>r.DepthAnythingPreTrainedModel,DepthEstimationPipeline:()=>t.DepthEstimationPipeline,DepthProForDepthEstimation:()=>r.DepthProForDepthEstimation,DepthProPreTrainedModel:()=>r.DepthProPreTrainedModel,DetrFeatureExtractor:()=>p.DetrFeatureExtractor,DetrForObjectDetection:()=>r.DetrForObjectDetection,DetrForSegmentation:()=>r.DetrForSegmentation,DetrImageProcessor:()=>p.DetrImageProcessor,DetrModel:()=>r.DetrModel,DetrObjectDetectionOutput:()=>r.DetrObjectDetectionOutput,DetrPreTrainedModel:()=>r.DetrPreTrainedModel,DetrSegmentationOutput:()=>r.DetrSegmentationOutput,Dinov2ForImageClassification:()=>r.Dinov2ForImageClassification,Dinov2Model:()=>r.Dinov2Model,Dinov2PreTrainedModel:()=>r.Dinov2PreTrainedModel,Dinov2WithRegistersForImageClassification:()=>r.Dinov2WithRegistersForImageClassification,Dinov2WithRegistersModel:()=>r.Dinov2WithRegistersModel,Dinov2WithRegistersPreTrainedModel:()=>r.Dinov2WithRegistersPreTrainedModel,DistilBertForMaskedLM:()=>r.DistilBertForMaskedLM,DistilBertForQuestionAnswering:()=>r.DistilBertForQuestionAnswering,DistilBertForSequenceClassification:()=>r.DistilBertForSequenceClassification,DistilBertForTokenClassification:()=>r.DistilBertForTokenClassification,DistilBertModel:()=>r.DistilBertModel,DistilBertPreTrainedModel:()=>r.DistilBertPreTrainedModel,DistilBertTokenizer:()=>n.DistilBertTokenizer,DocumentQuestionAnsweringPipeline:()=>t.DocumentQuestionAnsweringPipeline,DonutFeatureExtractor:()=>p.DonutFeatureExtractor,DonutImageProcessor:()=>p.DonutImageProcessor,DonutSwinModel:()=>r.DonutSwinModel,DonutSwinPreTrainedModel:()=>r.DonutSwinPreTrainedModel,EfficientNetForImageClassification:()=>r.EfficientNetForImageClassification,EfficientNetImageProcessor:()=>p.EfficientNetImageProcessor,EfficientNetModel:()=>r.EfficientNetModel,EfficientNetPreTrainedModel:()=>
3702r.EfficientNetPreTrainedModel,ElectraForMaskedLM:()=>r.ElectraForMaskedLM,ElectraForQuestionAnswering:()=>r.ElectraForQuestionAnswering,ElectraForSequenceClassification:()=>r.ElectraForSequenceClassification,ElectraForTokenClassification:()=>r.ElectraForTokenClassification,ElectraModel:()=>r.ElectraModel,ElectraPreTrainedModel:()=>r.ElectraPreTrainedModel,ElectraTokenizer:()=>n.ElectraTokenizer,EncodecFeatureExtractor:()=>d.EncodecFeatureExtractor,EosTokenCriteria:()=>w.EosTokenCriteria,Ernie4_5_ForCausalLM:()=>r.Ernie4_5_ForCausalLM,Ernie4_5_Model:()=>r.Ernie4_5_Model,Ernie4_5_PretrainedModel:()=>r.Ernie4_5_PretrainedModel,Ernie4_5_Tokenizer:()=>n.Ernie4_5_Tokenizer,EsmForMaskedLM:()=>r.EsmForMaskedLM,EsmForSequenceClassification:()=>r.EsmForSequenceClassification,EsmForTokenClassification:()=>r.EsmForTokenClassification,EsmModel:()=>r.EsmModel,EsmPreTrainedModel:()=>r.EsmPreTrainedModel,EsmTokenizer:()=>n.EsmTokenizer,ExaoneForCausalLM:()=>r.ExaoneForCausalLM,ExaoneModel:()=>r.ExaoneModel,ExaonePreTrainedModel:()=>r.ExaonePreTrainedModel,FFT:()=>u.FFT,FalconForCausalLM:()=>r.FalconForCausalLM,FalconModel:()=>r.FalconModel,FalconPreTrainedModel:()=>r.FalconPreTrainedModel,FalconTokenizer:()=>n.FalconTokenizer,FastViTForImageClassification:()=>r.FastViTForImageClassification,FastViTModel:()=>r.FastViTModel,FastViTPreTrainedModel:()=>r.FastViTPreTrainedModel,FeatureExtractionPipeline:()=>t.FeatureExtractionPipeline,FeatureExtractor:()=>c.FeatureExtractor,FillMaskPipeline:()=>t.FillMaskPipeline,Florence2ForConditionalGeneration:()=>r.Florence2ForConditionalGeneration,Florence2PreTrainedModel:()=>r.Florence2PreTrainedModel,Florence2Processor:()=>y.Florence2Processor,ForcedBOSTokenLogitsProcessor:()=>x.ForcedBOSTokenLogitsProcessor,ForcedEOSTokenLogitsProcessor:()=>x.ForcedEOSTokenLogitsProcessor,GLPNFeatureExtractor:()=>p.GLPNFeatureExtractor,GLPNForDepthEstimation:()=>r.GLPNForDepthEstimation,GLPNModel:()=>r.GLPNModel,GLPNPreTrainedModel:()=>r.GLPNPreTrainedModel,GPT2LMHeadModel:()=>r.GPT2LMHeadModel,GPT2Model:()=>r.GPT2Model,GPT2PreTrainedModel:()=>r.GPT2PreTrainedModel,GPT2Tokenizer:()=>n.GPT2Tokenizer,GPTBigCodeForCausalLM:()=>r.GPTBigCodeForCausalLM,GPTBigCodeModel:()=>r.GPTBigCodeModel,GPTBigCodePreTrainedModel:()=>r.GPTBigCodePreTrainedModel,GPTJForCausalLM:()=>r.GPTJForCausalLM,GPTJModel:()=>r.GPTJModel,GPTJPreTrainedModel:()=>r.GPTJPreTrainedModel,GPTNeoForCausalLM:()=>r.GPTNeoForCausalLM,GPTNeoModel:()=>r.GPTNeoModel,GPTNeoPreTrainedModel:()=>r.GPTNeoPreTrainedModel,GPTNeoXForCausalLM:()=>r.GPTNeoXForCausalLM,GPTNeoXModel:()=>r.GPTNeoXModel,GPTNeoXPreTrainedModel:()=>r.GPTNeoXPreTrainedModel,GPTNeoXTokenizer:()=>n.GPTNeoXTokenizer,Gemma2ForCausalLM:()=>r.Gemma2ForCausalLM,Gemma2Model:()=>r.Gemma2Model,Gemma2PreTrainedModel:()=>r.Gemma2PreTrainedModel,Gemma3ForCausalLM:()=>r.Gemma3ForCausalLM,Gemma3Model:()=>r.Gemma3Model,Gemma3PreTrainedModel:()=>r.Gemma3PreTrainedModel,Gemma3nAudioFeatureExtractor:()=>d.Gemma3nAudioFeatureExtractor,Gemma3nForConditionalGeneration:()=>r.Gemma3nForConditionalGeneration,Gemma3nPreTrainedModel:()=>r.Gemma3nPreTrainedModel,Gemma3nProcessor:()=>y.Gemma3nProcessor,GemmaForCausalLM:()=>r.GemmaForCausalLM,GemmaModel:()=>r.GemmaModel,GemmaPreTrainedModel:()=>r.GemmaPreTrainedModel,GemmaTokenizer:()=>n.GemmaTokenizer,GlmForCausalLM:()=>r.GlmForCausalLM,GlmModel:()=>r.GlmModel,GlmPreTrainedModel:()=>r.GlmPreTrainedModel,GraniteForCausalLM:()=>r.GraniteForCausalLM,GraniteModel:()=>r.GraniteModel,GraniteMoeHybridForCausalLM:()=>r.GraniteMoeHybridForCausalLM,GraniteMoeHybridModel:()=>r.GraniteMoeHybridModel,GraniteMoeHybridPreTrainedModel:()=>r.GraniteMoeHybridPreTrainedModel,GranitePreTrainedModel:()=>r.GranitePreTrainedModel,Grok1Tokenizer:()=>n.Grok1Tokenizer,GroundingDinoForObjectDetection:()=>r.GroundingDinoForObjectDetection,GroundingDinoImageProcessor:()=>p.GroundingDinoImageProcessor,GroundingDinoPreTrainedModel:()=>r.GroundingDinoPreTrainedModel,GroundingDinoProcessor:()=>y.GroundingDinoProcessor,GroupViTModel:()=>r.GroupViTModel,GroupViTPreTrainedModel:()=>r.GroupViTPreTrainedModel,HeliumForCausalLM:()=>r.HeliumForCausalLM,HeliumModel:()=>r.HeliumModel,HeliumPreTrainedModel:()=>r.HeliumPreTrainedModel,HerbertTokenizer:()=>n.HerbertTokenizer,HieraForImageClassification:()=>r.HieraForImageClassification,HieraModel:()=>r.HieraModel,HieraPreTrainedModel:()=>r.HieraPreTrainedModel,HubertForCTC:()=>r.HubertForCTC,HubertForSequenceClassification:()=>r.HubertForSequenceClassification,HubertModel:()=>r.HubertModel,HubertPreTrainedModel:()=>r.HubertPreTrainedModel,IJepaForImageClassification:()=>r.IJepaForImageClassification,IJepaModel:()=>r.IJepaModel,IJepaPreTrainedModel:()=>r.IJepaPreTrainedModel,Idefics3ForConditionalGeneration:()=>r.Idefics3ForConditionalGeneration,Idefics3ImageProcessor:()=>p.Idefics3ImageProcessor,Idefics3PreTrainedModel:()=>r.Idefics3PreTrainedModel,Idefics3Processor:()=>
3702y.Idefics3Processor,ImageClassificationPipeline:()=>t.ImageClassificationPipeline,ImageFeatureExtractionPipeline:()=>t.ImageFeatureExtractionPipeline,ImageFeatureExtractor:()=>d.ImageFeatureExtractor,ImageMattingOutput:()=>r.ImageMattingOutput,ImageProcessor:()=>h.ImageProcessor,ImageSegmentationPipeline:()=>t.ImageSegmentationPipeline,ImageToImagePipeline:()=>t.ImageToImagePipeline,ImageToTextPipeline:()=>t.ImageToTextPipeline,InterruptableStoppingCriteria:()=>w.InterruptableStoppingCriteria,JAISLMHeadModel:()=>r.JAISLMHeadModel,JAISModel:()=>r.JAISModel,JAISPreTrainedModel:()=>r.JAISPreTrainedModel,JinaCLIPImageProcessor:()=>p.JinaCLIPImageProcessor,JinaCLIPModel:()=>r.JinaCLIPModel,JinaCLIPPreTrainedModel:()=>r.JinaCLIPPreTrainedModel,JinaCLIPProcessor:()=>y.JinaCLIPProcessor,JinaCLIPTextModel:()=>r.JinaCLIPTextModel,JinaCLIPVisionModel:()=>r.JinaCLIPVisionModel,Lfm2ForCausalLM:()=>r.Lfm2ForCausalLM,Lfm2Model:()=>r.Lfm2Model,Lfm2PreTrainedModel:()=>r.Lfm2PreTrainedModel,LiteWhisperForConditionalGeneration:()=>r.LiteWhisperForConditionalGeneration,Llama4ForCausalLM:()=>r.Llama4ForCausalLM,Llama4PreTrainedModel:()=>r.Llama4PreTrainedModel,LlamaForCausalLM:()=>r.LlamaForCausalLM,LlamaModel:()=>r.LlamaModel,LlamaPreTrainedModel:()=>r.LlamaPreTrainedModel,LlamaTokenizer:()=>n.LlamaTokenizer,LlavaForConditionalGeneration:()=>r.LlavaForConditionalGeneration,LlavaOnevisionForConditionalGeneration:()=>r.LlavaOnevisionForConditionalGeneration,LlavaOnevisionImageProcessor:()=>p.LlavaOnevisionImageProcessor,LlavaPreTrainedModel:()=>r.LlavaPreTrainedModel,LlavaProcessor:()=>y.LlavaProcessor,LlavaQwen2ForCausalLM:()=>r.LlavaQwen2ForCausalLM,LogitsProcessor:()=>x.LogitsProcessor,LogitsProcessorList:()=>x.LogitsProcessorList,LogitsWarper:()=>x.LogitsWarper,LongT5ForConditionalGeneration:()=>r.LongT5ForConditionalGeneration,LongT5Model:()=>r.LongT5Model,LongT5PreTrainedModel:()=>r.LongT5PreTrainedModel,M2M100ForConditionalGeneration:()=>r.M2M100ForConditionalGeneration,M2M100Model:()=>r.M2M100Model,M2M100PreTrainedModel:()=>r.M2M100PreTrainedModel,M2M100Tokenizer:()=>n.M2M100Tokenizer,MBart50Tokenizer:()=>n.MBart50Tokenizer,MBartForCausalLM:()=>r.MBartForCausalLM,MBartForConditionalGeneration:()=>r.MBartForConditionalGeneration,MBartForSequenceClassification:()=>r.MBartForSequenceClassification,MBartModel:()=>r.MBartModel,MBartPreTrainedModel:()=>r.MBartPreTrainedModel,MBartTokenizer:()=>n.MBartTokenizer,MPNetForMaskedLM:()=>r.MPNetForMaskedLM,MPNetForQuestionAnswering:()=>r.MPNetForQuestionAnswering,MPNetForSequenceClassification:()=>r.MPNetForSequenceClassification,MPNetForTokenClassification:()=>r.MPNetForTokenClassification,MPNetModel:()=>r.MPNetModel,MPNetPreTrainedModel:()=>r.MPNetPreTrainedModel,MPNetTokenizer:()=>n.MPNetTokenizer,MT5ForConditionalGeneration:()=>r.MT5ForConditionalGeneration,MT5Model:()=>r.MT5Model,MT5PreTrainedModel:()=>r.MT5PreTrainedModel,MarianMTModel:()=>r.MarianMTModel,MarianModel:()=>r.MarianModel,MarianPreTrainedModel:()=>r.MarianPreTrainedModel,MarianTokenizer:()=>n.MarianTokenizer,Mask2FormerImageProcessor:()=>p.Mask2FormerImageProcessor,MaskFormerFeatureExtractor:()=>p.MaskFormerFeatureExtractor,MaskFormerForInstanceSegmentation:()=>r.MaskFormerForInstanceSegmentation,MaskFormerImageProcessor:()=>p.MaskFormerImageProcessor,MaskFormerModel:()=>r.MaskFormerModel,MaskFormerPreTrainedModel:()=>r.MaskFormerPreTrainedModel,MaskedLMOutput:()=>r.MaskedLMOutput,MaxLengthCriteria:()=>w.MaxLengthCriteria,Metric3DForDepthEstimation:()=>r.Metric3DForDepthEstimation,Metric3DPreTrainedModel:()=>r.Metric3DPreTrainedModel,Metric3Dv2ForDepthEstimation:()=>r.Metric3Dv2ForDepthEstimation,Metric3Dv2PreTrainedModel:()=>r.Metric3Dv2PreTrainedModel,MgpstrForSceneTextRecognition:()=>r.MgpstrForSceneTextRecognition,MgpstrModelOutput:()=>r.MgpstrModelOutput,MgpstrPreTrainedModel:()=>r.MgpstrPreTrainedModel,MgpstrProcessor:()=>y.MgpstrProcessor,MgpstrTokenizer:()=>n.MgpstrTokenizer,MimiDecoderModel:()=>r.MimiDecoderModel,MimiDecoderOutput:()=>r.MimiDecoderOutput,MimiEncoderModel:()=>r.MimiEncoderModel,MimiEncoderOutput:()=>r.MimiEncoderOutput,MimiModel:()=>r.MimiModel,MimiPreTrainedModel:()=>r.MimiPreTrainedModel,MinLengthLogitsProcessor:()=>x.MinLengthLogitsProcessor,MinNewTokensLengthLogitsProcessor:()=>x.MinNewTokensLengthLogitsProcessor,MistralForCausalLM:()=>r.MistralForCausalLM,MistralModel:()=>r.MistralModel,MistralPreTrainedModel:()=>r.MistralPreTrainedModel,MobileBertForMaskedLM:()=>r.MobileBertForMaskedLM,MobileBertForQuestionAnswering:()=>r.MobileBertForQuestionAnswering,MobileBertForSequenceClassification:()=>r.MobileBertForSequenceClassification,MobileBertModel:()=>r.MobileBertModel,MobileBertPreTrainedModel:()=>r.MobileBertPreTrainedModel,MobileBertTokenizer:()=>n.MobileBertTokenizer,MobileLLMForCausalLM:()=>r.MobileLLMForCausalLM,MobileLLMModel:()=>r.MobileLLMModel,MobileLLMPreTrainedModel:()=>r.MobileLLMPreTrainedModel,MobileNetV1FeatureExtractor:()=>p.MobileNetV1FeatureExtractor,MobileNetV1ForImageClassification:()=>r.MobileNetV1ForImageClassification,MobileNetV1ForSemanticSegmentation:()=>r.MobileNetV1ForSemanticSegmentation,MobileNetV1ImageProcessor:()=>p.MobileNetV1ImageProcessor,MobileNetV1Model:()=>r.MobileNetV1Model,MobileNetV1PreTrainedModel:()=>r.MobileNetV1PreTrainedModel,MobileNetV2FeatureExtractor:()=>p.MobileNetV2FeatureExtractor,MobileNetV2ForImageClassification:()=>r.MobileNetV2ForImageClassification,MobileNetV2ForSemanticSegmentation:()=>r.MobileNetV2ForSemanticSegmentation,MobileNetV2ImageProcessor:()=>p.MobileNetV2ImageProcessor,MobileNetV2Model:()=>r.MobileNetV2Model,MobileNetV2PreTrainedModel:()=>r.MobileNetV2PreTrainedModel,MobileNetV3FeatureExtractor:()=>p.MobileNetV3FeatureExtractor,MobileNetV3ForImageClassification:()=>r.MobileNetV3ForImageClassification,MobileNetV3ForSemanticSegmentation:()=>r.MobileNetV3ForSemanticSegmentation,MobileNetV3ImageProcessor:()=>p.MobileNetV3ImageProcessor,MobileNetV3Model:()=>r.MobileNetV3Model,MobileNetV3PreTrainedModel:()=>r.MobileNetV3PreTrainedModel,MobileNetV4FeatureExtractor:()=>p.MobileNetV4FeatureExtractor,MobileNetV4ForImageClassification:()=>r.MobileNetV4ForImageClassification,MobileNetV4ForSemanticSegmentation:()=>r.MobileNetV4ForSemanticSegmentation,MobileNetV4ImageProcessor:()=>p.MobileNetV4ImageProcessor,MobileNetV4Model:()=>r.MobileNetV4Model,MobileNetV4PreTrainedModel:()=>r.MobileNetV4PreTrainedModel,MobileViTFeatureExtractor:()=>p.MobileViTFeatureExtractor,MobileViTForImageClassification:()=>r.MobileViTForImageClassification,MobileViTImageProcessor:()=>p.MobileViTImageProcessor,MobileViTModel:()=>r.MobileViTModel,MobileViTPreTrainedModel:()=>r.MobileViTPreTrainedModel,MobileViTV2ForImageClassification:()=>r.MobileViTV2ForImageClassification,MobileViTV2Model:()=>r.MobileViTV2Model,MobileViTV2PreTrainedModel:()=>r.MobileViTV2PreTrainedModel,ModelOutput:()=>r.ModelOutput,ModernBertDecoderForCausalLM:()=>r.ModernBertDecoderForCausalLM,ModernBertDecoderModel:()=>r.ModernBertDecoderModel,ModernBertDecoderPreTrainedModel:()=>r.ModernBertDecoderPreTrainedModel,ModernBertForMaskedLM:()=>r.ModernBertForMaskedLM,ModernBertForSequenceClassification:()=>r.ModernBertForSequenceClassification,ModernBertForTokenClassification:()=>r.ModernBertForTokenClassification,ModernBertModel:()=>r.ModernBertModel,ModernBertPreTrainedModel:()=>r.ModernBertPreTrainedModel,Moondream1ForConditionalGeneration:()=>r.Moondream1ForConditionalGeneration,MoonshineFeatureExtractor:()=>d.MoonshineFeatureExtractor,MoonshineForConditionalGeneration:()=>r.MoonshineForConditionalGeneration,MoonshineModel:()=>r.MoonshineModel,MoonshinePreTrainedModel:()=>r.MoonshinePreTrainedModel,MoonshineProcessor:()=>y.MoonshineProcessor,MptForCausalLM:()=>r.MptForCausalLM,MptModel:()=>r.MptModel,MptPreTrainedModel:()=>
3702r.MptPreTrainedModel,MultiModalityCausalLM:()=>r.MultiModalityCausalLM,MultiModalityPreTrainedModel:()=>r.MultiModalityPreTrainedModel,MusicgenForCausalLM:()=>r.MusicgenForCausalLM,MusicgenForConditionalGeneration:()=>r.MusicgenForConditionalGeneration,MusicgenModel:()=>r.MusicgenModel,MusicgenPreTrainedModel:()=>r.MusicgenPreTrainedModel,NanoChatForCausalLM:()=>r.NanoChatForCausalLM,NanoChatModel:()=>r.NanoChatModel,NanoChatPreTrainedModel:()=>r.NanoChatPreTrainedModel,NeoBertForMaskedLM:()=>r.NeoBertForMaskedLM,NeoBertForQuestionAnswering:()=>r.NeoBertForQuestionAnswering,NeoBertForSequenceClassification:()=>r.NeoBertForSequenceClassification,NeoBertForTokenClassification:()=>r.NeoBertForTokenClassification,NeoBertModel:()=>r.NeoBertModel,NeoBertPreTrainedModel:()=>r.NeoBertPreTrainedModel,NllbTokenizer:()=>n.NllbTokenizer,NoBadWordsLogitsProcessor:()=>x.NoBadWordsLogitsProcessor,NoRepeatNGramLogitsProcessor:()=>x.NoRepeatNGramLogitsProcessor,NomicBertModel:()=>r.NomicBertModel,NomicBertPreTrainedModel:()=>r.NomicBertPreTrainedModel,NougatImageProcessor:()=>p.NougatImageProcessor,NougatTokenizer:()=>n.NougatTokenizer,OPTForCausalLM:()=>r.OPTForCausalLM,OPTModel:()=>r.OPTModel,OPTPreTrainedModel:()=>r.OPTPreTrainedModel,ObjectDetectionPipeline:()=>t.ObjectDetectionPipeline,Olmo2ForCausalLM:()=>r.Olmo2ForCausalLM,Olmo2Model:()=>r.Olmo2Model,Olmo2PreTrainedModel:()=>r.Olmo2PreTrainedModel,OlmoForCausalLM:()=>r.OlmoForCausalLM,OlmoModel:()=>r.OlmoModel,OlmoPreTrainedModel:()=>r.OlmoPreTrainedModel,OpenELMForCausalLM:()=>r.OpenELMForCausalLM,OpenELMModel:()=>r.OpenELMModel,OpenELMPreTrainedModel:()=>r.OpenELMPreTrainedModel,OwlViTFeatureExtractor:()=>p.OwlViTFeatureExtractor,OwlViTForObjectDetection:()=>r.OwlViTForObjectDetection,OwlViTImageProcessor:()=>p.OwlViTImageProcessor,OwlViTModel:()=>r.OwlViTModel,OwlViTPreTrainedModel:()=>r.OwlViTPreTrainedModel,OwlViTProcessor:()=>y.OwlViTProcessor,Owlv2ForObjectDetection:()=>r.Owlv2ForObjectDetection,Owlv2ImageProcessor:()=>p.Owlv2ImageProcessor,Owlv2Model:()=>r.Owlv2Model,Owlv2PreTrainedModel:()=>r.Owlv2PreTrainedModel,PaliGemmaForConditionalGeneration:()=>r.PaliGemmaForConditionalGeneration,PaliGemmaPreTrainedModel:()=>r.PaliGemmaPreTrainedModel,PaliGemmaProcessor:()=>y.PaliGemmaProcessor,ParakeetFeatureExtractor:()=>d.ParakeetFeatureExtractor,ParakeetForCTC:()=>r.ParakeetForCTC,ParakeetPreTrainedModel:()=>r.ParakeetPreTrainedModel,PatchTSMixerForPrediction:()=>r.PatchTSMixerForPrediction,PatchTSMixerModel:()=>r.PatchTSMixerModel,PatchTSMixerPreTrainedModel:()=>r.PatchTSMixerPreTrainedModel,PatchTSTForPrediction:()=>r.PatchTSTForPrediction,PatchTSTModel:()=>r.PatchTSTModel,PatchTSTPreTrainedModel:()=>r.PatchTSTPreTrainedModel,Phi3ForCausalLM:()=>r.Phi3ForCausalLM,Phi3Model:()=>r.Phi3Model,Phi3PreTrainedModel:()=>r.Phi3PreTrainedModel,Phi3VForCausalLM:()=>r.Phi3VForCausalLM,Phi3VImageProcessor:()=>p.Phi3VImageProcessor,Phi3VPreTrainedModel:()=>r.Phi3VPreTrainedModel,Phi3VProcessor:()=>y.Phi3VProcessor,PhiForCausalLM:()=>r.PhiForCausalLM,PhiModel:()=>r.PhiModel,PhiPreTrainedModel:()=>r.PhiPreTrainedModel,Pipeline:()=>t.Pipeline,PreTrainedModel:()=>r.PreTrainedModel,PreTrainedTokenizer:()=>n.PreTrainedTokenizer,PretrainedConfig:()=>i.PretrainedConfig,PretrainedMixin:()=>r.PretrainedMixin,Processor:()=>_.Processor,PvtForImageClassification:()=>r.PvtForImageClassification,PvtImageProcessor:()=>p.PvtImageProcessor,PvtModel:()=>r.PvtModel,PvtPreTrainedModel:()=>r.PvtPreTrainedModel,PyAnnoteFeatureExtractor:()=>d.PyAnnoteFeatureExtractor,PyAnnoteForAudioFrameClassification:()=>r.PyAnnoteForAudioFrameClassification,PyAnnoteModel:()=>r.PyAnnoteModel,PyAnnotePreTrainedModel:()=>r.PyAnnotePreTrainedModel,PyAnnoteProcessor:()=>
3702y.PyAnnoteProcessor,QuestionAnsweringModelOutput:()=>r.QuestionAnsweringModelOutput,QuestionAnsweringPipeline:()=>t.QuestionAnsweringPipeline,Qwen2ForCausalLM:()=>r.Qwen2ForCausalLM,Qwen2Model:()=>r.Qwen2Model,Qwen2PreTrainedModel:()=>r.Qwen2PreTrainedModel,Qwen2Tokenizer:()=>n.Qwen2Tokenizer,Qwen2VLForConditionalGeneration:()=>r.Qwen2VLForConditionalGeneration,Qwen2VLImageProcessor:()=>p.Qwen2VLImageProcessor,Qwen2VLPreTrainedModel:()=>r.Qwen2VLPreTrainedModel,Qwen2VLProcessor:()=>y.Qwen2VLProcessor,Qwen3ForCausalLM:()=>r.Qwen3ForCausalLM,Qwen3Model:()=>r.Qwen3Model,Qwen3PreTrainedModel:()=>r.Qwen3PreTrainedModel,RFDetrForObjectDetection:()=>r.RFDetrForObjectDetection,RFDetrModel:()=>r.RFDetrModel,RFDetrObjectDetectionOutput:()=>r.RFDetrObjectDetectionOutput,RFDetrPreTrainedModel:()=>r.RFDetrPreTrainedModel,RTDetrForObjectDetection:()=>r.RTDetrForObjectDetection,RTDetrImageProcessor:()=>p.RTDetrImageProcessor,RTDetrModel:()=>r.RTDetrModel,RTDetrObjectDetectionOutput:()=>r.RTDetrObjectDetectionOutput,RTDetrPreTrainedModel:()=>r.RTDetrPreTrainedModel,RTDetrV2ForObjectDetection:()=>r.RTDetrV2ForObjectDetection,RTDetrV2Model:()=>r.RTDetrV2Model,RTDetrV2ObjectDetectionOutput:()=>r.RTDetrV2ObjectDetectionOutput,RTDetrV2PreTrainedModel:()=>r.RTDetrV2PreTrainedModel,RawAudio:()=>a.RawAudio,RawImage:()=>s.RawImage,RawVideo:()=>o.RawVideo,RawVideoFrame:()=>o.RawVideoFrame,RepetitionPenaltyLogitsProcessor:()=>x.RepetitionPenaltyLogitsProcessor,ResNetForImageClassification:()=>r.ResNetForImageClassification,ResNetModel:()=>r.ResNetModel,ResNetPreTrainedModel:()=>r.ResNetPreTrainedModel,RoFormerForMaskedLM:()=>r.RoFormerForMaskedLM,RoFormerForQuestionAnswering:()=>r.RoFormerForQuestionAnswering,RoFormerForSequenceClassification:()=>r.RoFormerForSequenceClassification,RoFormerForTokenClassification:()=>r.RoFormerForTokenClassification,RoFormerModel:()=>r.RoFormerModel,RoFormerPreTrainedModel:()=>r.RoFormerPreTrainedModel,RoFormerTokenizer:()=>n.RoFormerTokenizer,RobertaForMaskedLM:()=>
3702r.RobertaForMaskedLM,RobertaForQuestionAnswering:()=>r.RobertaForQuestionAnswering,RobertaForSequenceClassification:()=>r.RobertaForSequenceClassification,RobertaForTokenClassification:()=>r.RobertaForTokenClassification,RobertaModel:()=>r.RobertaModel,RobertaPreTrainedModel:()=>r.RobertaPreTrainedModel,RobertaTokenizer:()=>n.RobertaTokenizer,SamImageProcessor:()=>p.SamImageProcessor,SamImageSegmentationOutput:()=>r.SamImageSegmentationOutput,SamModel:()=>r.SamModel,SamPreTrainedModel:()=>r.SamPreTrainedModel,SamProcessor:()=>y.SamProcessor,SapiensForDepthEstimation:()=>r.SapiensForDepthEstimation,SapiensForNormalEstimation:()=>r.SapiensForNormalEstimation,SapiensForSemanticSegmentation:()=>r.SapiensForSemanticSegmentation,SapiensPreTrainedModel:()=>r.SapiensPreTrainedModel,SeamlessM4TFeatureExtractor:()=>d.SeamlessM4TFeatureExtractor,SegformerFeatureExtractor:()=>p.SegformerFeatureExtractor,SegformerForImageClassification:()=>r.SegformerForImageClassification,SegformerForSemanticSegmentation:()=>r.SegformerForSemanticSegmentation,SegformerImageProcessor:()=>p.SegformerImageProcessor,SegformerModel:()=>r.SegformerModel,SegformerPreTrainedModel:()=>r.SegformerPreTrainedModel,Seq2SeqLMOutput:()=>r.Seq2SeqLMOutput,SequenceClassifierOutput:()=>r.SequenceClassifierOutput,SiglipImageProcessor:()=>p.SiglipImageProcessor,SiglipModel:()=>r.SiglipModel,SiglipPreTrainedModel:()=>r.SiglipPreTrainedModel,SiglipTextModel:()=>r.SiglipTextModel,SiglipTokenizer:()=>n.SiglipTokenizer,SiglipVisionModel:()=>r.SiglipVisionModel,SmolLM3ForCausalLM:()=>r.SmolLM3ForCausalLM,SmolLM3Model:()=>r.SmolLM3Model,SmolLM3PreTrainedModel:()=>r.SmolLM3PreTrainedModel,SmolVLMForConditionalGeneration:()=>r.SmolVLMForConditionalGeneration,SmolVLMImageProcessor:()=>p.SmolVLMImageProcessor,SmolVLMProcessor:()=>y.SmolVLMProcessor,SnacDecoderModel:()=>r.SnacDecoderModel,SnacEncoderModel:()=>r.SnacEncoderModel,SnacFeatureExtractor:()=>d.SnacFeatureExtractor,SnacModel:()=>r.SnacModel,SnacPreTrainedModel:()=>r.SnacPreTrainedModel,SpeechT5FeatureExtractor:()=>d.SpeechT5FeatureExtractor,SpeechT5ForSpeechToText:()=>r.SpeechT5ForSpeechToText,SpeechT5ForTextToSpeech:()=>r.SpeechT5ForTextToSpeech,SpeechT5HifiGan:()=>r.SpeechT5HifiGan,SpeechT5Model:()=>r.SpeechT5Model,SpeechT5PreTrainedModel:()=>r.SpeechT5PreTrainedModel,SpeechT5Processor:()=>y.SpeechT5Processor,SpeechT5Tokenizer:()=>n.SpeechT5Tokenizer,SqueezeBertForMaskedLM:()=>r.SqueezeBertForMaskedLM,SqueezeBertForQuestionAnswering:()=>r.SqueezeBertForQuestionAnswering,SqueezeBertForSequenceClassification:()=>r.SqueezeBertForSequenceClassification,SqueezeBertModel:()=>r.SqueezeBertModel,SqueezeBertPreTrainedModel:()=>r.SqueezeBertPreTrainedModel,SqueezeBertTokenizer:()=>n.SqueezeBertTokenizer,StableLmForCausalLM:()=>r.StableLmForCausalLM,StableLmModel:()=>r.StableLmModel,StableLmPreTrainedModel:()=>r.StableLmPreTrainedModel,Starcoder2ForCausalLM:()=>r.Starcoder2ForCausalLM,Starcoder2Model:()=>r.Starcoder2Model,Starcoder2PreTrainedModel:()=>r.Starcoder2PreTrainedModel,StoppingCriteria:()=>w.StoppingCriteria,StoppingCriteriaList:()=>w.StoppingCriteriaList,StyleTextToSpeech2Model:()=>r.StyleTextToSpeech2Model,StyleTextToSpeech2PreTrainedModel:()=>r.StyleTextToSpeech2PreTrainedModel,SummarizationPipeline:()=>t.SummarizationPipeline,SuppressTokensAtBeginLogitsProcessor:()=>x.SuppressTokensAtBeginLogitsProcessor,Swin2SRForImageSuperResolution:()=>r.Swin2SRForImageSuperResolution,Swin2SRImageProcessor:()=>p.Swin2SRImageProcessor,Swin2SRModel:()=>r.Swin2SRModel,Swin2SRPreTrainedModel:()=>r.Swin2SRPreTrainedModel,SwinForImageClassification:()=>r.SwinForImageClassification,SwinForSemanticSegmentation:()=>r.SwinForSemanticSegmentation,SwinModel:()=>r.SwinModel,SwinPreTrainedModel:()=>r.SwinPreTrainedModel,T5ForConditionalGeneration:()=>r.T5ForConditionalGeneration,T5Model:()=>r.T5Model,T5PreTrainedModel:()=>r.T5PreTrainedModel,T5Tokenizer:()=>n.T5Tokenizer,TableTransformerForObjectDetection:()=>r.TableTransformerForObjectDetection,TableTransformerModel:()=>r.TableTransformerModel,TableTransformerObjectDetectionOutput:()=>r.TableTransformerObjectDetectionOutput,TableTransformerPreTrainedModel:()=>r.TableTransformerPreTrainedModel,TemperatureLogitsWarper:()=>x.TemperatureLogitsWarper,Tensor:()=>l.Tensor,Text2TextGenerationPipeline:()=>t.Text2TextGenerationPipeline,TextClassificationPipeline:()=>t.TextClassificationPipeline,TextGenerationPipeline:()=>t.TextGenerationPipeline,TextStreamer:()=>b.TextStreamer,TextToAudioPipeline:()=>t.TextToAudioPipeline,TokenClassificationPipeline:()=>t.TokenClassificationPipeline,TokenClassifierOutput:()=>r.TokenClassifierOutput,TokenizerModel:()=>n.TokenizerModel,TopKLogitsWarper:()=>x.TopKLogitsWarper,TopPLogitsWarper:()=>x.TopPLogitsWarper,TrOCRForCausalLM:()=>r.TrOCRForCausalLM,TrOCRPreTrainedModel:()=>r.TrOCRPreTrainedModel,TranslationPipeline:()=>t.TranslationPipeline,UltravoxModel:()=>r.UltravoxModel,UltravoxPreTrainedModel:()=>r.UltravoxPreTrainedModel,UltravoxProcessor:()=>y.UltravoxProcessor,UniSpeechForCTC:()=>r.UniSpeechForCTC,UniSpeechForSequenceClassification:()=>r.UniSpeechForSequenceClassification,UniSpeechModel:()=>r.UniSpeechModel,UniSpeechPreTrainedModel:()=>r.UniSpeechPreTrainedModel,UniSpeechSatForAudioFrameClassification:()=>r.UniSpeechSatForAudioFrameClassification,UniSpeechSatForCTC:()=>r.UniSpeechSatForCTC,UniSpeechSatForSequenceClassification:()=>r.UniSpeechSatForSequenceClassification,UniSpeechSatModel:()=>r.UniSpeechSatModel,UniSpeechSatPreTrainedModel:()=>r.UniSpeechSatPreTrainedModel,VLChatProcessor:()=>y.VLChatProcessor,VLMImageProcessor:()=>
3702p.VLMImageProcessor,VaultGemmaForCausalLM:()=>r.VaultGemmaForCausalLM,VaultGemmaModel:()=>r.VaultGemmaModel,VaultGemmaPreTrainedModel:()=>r.VaultGemmaPreTrainedModel,ViTFeatureExtractor:()=>p.ViTFeatureExtractor,ViTForImageClassification:()=>r.ViTForImageClassification,ViTImageProcessor:()=>p.ViTImageProcessor,ViTMAEModel:()=>r.ViTMAEModel,ViTMAEPreTrainedModel:()=>r.ViTMAEPreTrainedModel,ViTMSNForImageClassification:()=>r.ViTMSNForImageClassification,ViTMSNModel:()=>r.ViTMSNModel,ViTMSNPreTrainedModel:()=>r.ViTMSNPreTrainedModel,ViTModel:()=>r.ViTModel,ViTPreTrainedModel:()=>r.ViTPreTrainedModel,VisionEncoderDecoderModel:()=>r.VisionEncoderDecoderModel,VitMatteForImageMatting:()=>r.VitMatteForImageMatting,VitMatteImageProcessor:()=>p.VitMatteImageProcessor,VitMattePreTrainedModel:()=>r.VitMattePreTrainedModel,VitPoseForPoseEstimation:()=>r.VitPoseForPoseEstimation,VitPoseImageProcessor:()=>p.VitPoseImageProcessor,VitPosePreTrainedModel:()=>r.VitPosePreTrainedModel,VitsModel:()=>r.VitsModel,VitsModelOutput:()=>r.VitsModelOutput,VitsPreTrainedModel:()=>r.VitsPreTrainedModel,VitsTokenizer:()=>n.VitsTokenizer,VoxtralForConditionalGeneration:()=>r.VoxtralForConditionalGeneration,VoxtralProcessor:()=>y.VoxtralProcessor,Wav2Vec2BertForCTC:()=>r.Wav2Vec2BertForCTC,Wav2Vec2BertForSequenceClassification:()=>r.Wav2Vec2BertForSequenceClassification,Wav2Vec2BertModel:()=>r.Wav2Vec2BertModel,Wav2Vec2BertPreTrainedModel:()=>r.Wav2Vec2BertPreTrainedModel,Wav2Vec2CTCTokenizer:()=>n.Wav2Vec2CTCTokenizer,Wav2Vec2FeatureExtractor:()=>d.Wav2Vec2FeatureExtractor,Wav2Vec2ForAudioFrameClassification:()=>r.Wav2Vec2ForAudioFrameClassification,Wav2Vec2ForCTC:()=>r.Wav2Vec2ForCTC,Wav2Vec2ForSequenceClassification:()=>r.Wav2Vec2ForSequenceClassification,Wav2Vec2Model:()=>r.Wav2Vec2Model,Wav2Vec2PreTrainedModel:()=>r.Wav2Vec2PreTrainedModel,Wav2Vec2Processor:()=>y.Wav2Vec2Processor,Wav2Vec2ProcessorWithLM:()=>y.Wav2Vec2ProcessorWithLM,WavLMForAudioFrameClassification:()=>r.WavLMForAudioFrameClassification,WavLMForCTC:()=>r.WavLMForCTC,WavLMForSequenceClassification:()=>r.WavLMForSequenceClassification,WavLMForXVector:()=>r.WavLMForXVector,WavLMModel:()=>r.WavLMModel,WavLMPreTrainedModel:()=>r.WavLMPreTrainedModel,WeSpeakerFeatureExtractor:()=>d.WeSpeakerFeatureExtractor,WeSpeakerResNetModel:()=>r.WeSpeakerResNetModel,WeSpeakerResNetPreTrainedModel:()=>r.WeSpeakerResNetPreTrainedModel,WhisperFeatureExtractor:()=>d.WhisperFeatureExtractor,WhisperForConditionalGeneration:()=>r.WhisperForConditionalGeneration,WhisperModel:()=>r.WhisperModel,WhisperPreTrainedModel:()=>r.WhisperPreTrainedModel,WhisperProcessor:()=>y.WhisperProcessor,WhisperTextStreamer:()=>b.WhisperTextStreamer,WhisperTimeStampLogitsProcessor:()=>x.WhisperTimeStampLogitsProcessor,WhisperTokenizer:()=>n.WhisperTokenizer,XLMForQuestionAnswering:()=>r.XLMForQuestionAnswering,XLMForSequenceClassification:()=>r.XLMForSequenceClassification,XLMForTokenClassification:()=>r.XLMForTokenClassification,XLMModel:()=>r.XLMModel,XLMPreTrainedModel:()=>r.XLMPreTrainedModel,XLMRobertaForMaskedLM:()=>r.XLMRobertaForMaskedLM,XLMRobertaForQuestionAnswering:()=>r.XLMRobertaForQuestionAnswering,XLMRobertaForSequenceClassification:()=>r.XLMRobertaForSequenceClassification,XLMRobertaForTokenClassification:()=>r.XLMRobertaForTokenClassification,XLMRobertaModel:()=>r.XLMRobertaModel,XLMRobertaPreTrainedModel:()=>r.XLMRobertaPreTrainedModel,XLMRobertaTokenizer:()=>n.XLMRobertaTokenizer,XLMTokenizer:()=>n.XLMTokenizer,XLMWithLMHeadModel:()=>r.XLMWithLMHeadModel,XVectorOutput:()=>r.XVectorOutput,YolosFeatureExtractor:()=>p.YolosFeatureExtractor,YolosForObjectDetection:()=>r.YolosForObjectDetection,YolosImageProcessor:()=>p.YolosImageProcessor,YolosModel:()=>r.YolosModel,YolosObjectDetectionOutput:()=>r.YolosObjectDetectionOutput,YolosPreTrainedModel:()=>r.YolosPreTrainedModel,ZeroShotAudioClassificationPipeline:()=>t.ZeroShotAudioClassificationPipeline,ZeroShotClassificationPipeline:()=>t.ZeroShotClassificationPipeline,ZeroShotImageClassificationPipeline:()=>t.ZeroShotImageClassificationPipeline,ZeroShotObjectDetectionPipeline:()=>t.ZeroShotObjectDetectionPipeline,bankers_round:()=>u.bankers_round,cat:()=>l.cat,cos_sim:()=>u.cos_sim,dot:()=>u.dot,dynamic_time_warping:()=>u.dynamic_time_warping,env:()=>e.env,full:()=>l.full,full_like:()=>l.full_like,getCacheShapes:()=>i.getCacheShapes,hamming:()=>a.hamming,hanning:()=>a.hanning,interpolate:()=>l.interpolate,interpolate_4d:()=>l.interpolate_4d,interpolate_data:()=>u.interpolate_data,is_chinese_char:()=>n.is_chinese_char,layer_norm:()=>l.layer_norm,load_image:()=>s.load_image,load_video:()=>o.load_video,log_softmax:()=>u.log_softmax,magnitude:()=>u.magnitude,matmul:()=>l.matmul,max:()=>u.max,mean:()=>l.mean,mean_pooling:()=>l.mean_pooling,medianFilter:()=>u.medianFilter,mel_filter_bank:()=>a.mel_filter_bank,min:()=>u.min,ones:()=>l.ones,ones_like:()=>l.ones_like,permute:()=>l.permute,permute_data:()=>u.permute_data,pipeline:()=>t.pipeline,quantize_embeddings:()=>l.quantize_embeddings,rand:()=>l.rand,read_audio:()=>a.read_audio,rfft:()=>l.rfft,round:()=>u.round,slice:()=>l.slice,softmax:()=>u.softmax,spectrogram:()=>a.spectrogram,stack:()=>l.stack,std_mean:()=>l.std_mean,topk:()=>l.topk,window_function:()=>a.window_function,zeros:()=>l.zeros,zeros_like:()=>l.zeros_like});var e=Ci("./src/env.js"),t=Ci("./src/pipelines.js"),r=Ci("./src/models.js"),n=Ci("./src/tokenizers.js"),i=Ci("./src/configs.js"),a=Ci("./src/utils/audio.js"),s=Ci("./src/utils/image.js"),o=Ci("./src/utils/video.js"),l=Ci("./src/utils/tensor.js"),u=Ci("./src/utils/maths.js"),c=Ci("./src/base/feature_extraction_utils.js"),d=Ci("./src/models/feature_extractors.js"),f=Ci("./src/models/auto/feature_extraction_auto.js"),h=Ci("./src/base/image_processors_utils.js"),p=Ci("./src/models/image_processors.js"),m=Ci("./src/models/auto/image_processing_auto.js"),_=Ci("./src/base/processing_utils.js"),y=Ci("./src/models/processors.js"),v=Ci("./src/models/auto/processing_auto.js"),b=Ci("./src/generation/streamers.js"),w=Ci("./src/generation/stopping_criteria.js"),x=Ci("./src/generation/logits_process.js")})();F.ASTFeatureExtractor;F.ASTForAudioClassification;F.ASTModel;F.ASTPreTrainedModel;F.AlbertForMaskedLM;F.AlbertForQuestionAnswering;F.AlbertForSequenceClassification;F.AlbertModel;F.AlbertPreTrainedModel;F.AlbertTokenizer;F.ArceeForCausalLM;F.ArceeModel;F.ArceePreTrainedModel;F.AudioClassificationPipeline;F.AutoConfig;F.AutoFeatureExtractor;F.AutoImageProcessor;F.AutoModel;F.AutoModelForAudioClassification;F.AutoModelForAudioFrameClassification;F.AutoModelForAudioTextToText;F.AutoModelForCTC;F.AutoModelForCausalLM;F.AutoModelForDepthEstimation;F.AutoModelForDocumentQuestionAnswering;F.AutoModelForImageClassification;F.AutoModelForImageFeatureExtraction;F.AutoModelForImageMatting;F.AutoModelForImageSegmentation;F.AutoModelForImageTextToText;F.AutoModelForImageToImage;F.AutoModelForMaskGeneration;F.AutoModelForMaskedLM;F.AutoModelForNormalEstimation;F.AutoModelForObjectDetection;F.AutoModelForPoseEstimation;F.AutoModelForQuestionAnswering;F.AutoModelForSemanticSegmentation;F.AutoModelForSeq2SeqLM;F.AutoModelForSequenceClassification;F.AutoModelForSpeechSeq2Seq;F.AutoModelForTextToSpectrogram;F.AutoModelForTextToWaveform;F.AutoModelForTokenClassification;F.AutoModelForUniversalSegmentation;F.AutoModelForVision2Seq;F.AutoModelForXVector;F.AutoModelForZeroShotObjectDetection;F.AutoProcessor;F.AutoTokenizer;F.AutomaticSpeechRecognitionPipeline;
3702F.BackgroundRemovalPipeline;F.BartForConditionalGeneration;F.BartForSequenceClassification;F.BartModel;F.BartPretrainedModel;F.BartTokenizer;F.BaseModelOutput;F.BaseStreamer;F.BeitFeatureExtractor;F.BeitForImageClassification;F.BeitModel;F.BeitPreTrainedModel;F.BertForMaskedLM;F.BertForQuestionAnswering;F.BertForSequenceClassification;F.BertForTokenClassification;F.BertModel;F.BertPreTrainedModel;F.BertTokenizer;F.BitImageProcessor;F.BlenderbotForConditionalGeneration;F.BlenderbotModel;F.BlenderbotPreTrainedModel;F.BlenderbotSmallForConditionalGeneration;F.BlenderbotSmallModel;F.BlenderbotSmallPreTrainedModel;F.BlenderbotSmallTokenizer;F.BlenderbotTokenizer;F.BloomForCausalLM;F.BloomModel;F.BloomPreTrainedModel;F.BloomTokenizer;F.CLIPFeatureExtractor;F.CLIPImageProcessor;F.CLIPModel;F.CLIPPreTrainedModel;F.CLIPSegForImageSegmentation;F.CLIPSegModel;F.CLIPSegPreTrainedModel;F.CLIPTextModel;F.CLIPTextModelWithProjection;F.CLIPTokenizer;F.CLIPVisionModel;F.CLIPVisionModelWithProjection;F.CamembertForMaskedLM;F.CamembertForQuestionAnswering;F.CamembertForSequenceClassification;F.CamembertForTokenClassification;F.CamembertModel;F.CamembertPreTrainedModel;F.CamembertTokenizer;F.CausalLMOutput;F.CausalLMOutputWithPast;F.ChineseCLIPFeatureExtractor;F.ChineseCLIPModel;F.ChineseCLIPPreTrainedModel;F.ClapAudioModelWithProjection;F.ClapFeatureExtractor;F.ClapModel;F.ClapPreTrainedModel;F.ClapTextModelWithProjection;F.ClassifierFreeGuidanceLogitsProcessor;F.CodeGenForCausalLM;F.CodeGenModel;F.CodeGenPreTrainedModel;F.CodeGenTokenizer;F.CodeLlamaTokenizer;F.CohereForCausalLM;F.CohereModel;F.CoherePreTrainedModel;F.CohereTokenizer;F.ConvBertForMaskedLM;F.ConvBertForQuestionAnswering;F.ConvBertForSequenceClassification;F.ConvBertForTokenClassification;F.ConvBertModel;F.ConvBertPreTrainedModel;F.ConvBertTokenizer;F.ConvNextFeatureExtractor;F.ConvNextForImageClassification;F.ConvNextImageProcessor;F.ConvNextModel;F.ConvNextPreTrainedModel;F.ConvNextV2ForImageClassification;F.ConvNextV2Model;F.ConvNextV2PreTrainedModel;F.DFineForObjectDetection;F.DFineModel;F.DFinePreTrainedModel;F.DINOv3ConvNextModel;F.DINOv3ConvNextPreTrainedModel;F.DINOv3ViTImageProcessor;F.DINOv3ViTModel;F.DINOv3ViTPreTrainedModel;F.DPTFeatureExtractor;F.DPTForDepthEstimation;F.DPTImageProcessor;F.DPTModel;F.DPTPreTrainedModel;F.DacDecoderModel;F.DacDecoderOutput;F.DacEncoderModel;F.DacEncoderOutput;F.DacFeatureExtractor;F.DacModel;F.DacPreTrainedModel;F.DataTypeMap;F.DebertaForMaskedLM;F.DebertaForQuestionAnswering;F.DebertaForSequenceClassification;F.DebertaForTokenClassification;F.DebertaModel;F.DebertaPreTrainedModel;F.DebertaTokenizer;F.DebertaV2ForMaskedLM;F.DebertaV2ForQuestionAnswering;F.DebertaV2ForSequenceClassification;F.DebertaV2ForTokenClassification;F.DebertaV2Model;F.DebertaV2PreTrainedModel;F.DebertaV2Tokenizer;F.DecisionTransformerModel;F.DecisionTransformerPreTrainedModel;F.DeiTFeatureExtractor;F.DeiTForImageClassification;F.DeiTImageProcessor;F.DeiTModel;F.DeiTPreTrainedModel;F.DepthAnythingForDepthEstimation;F.DepthAnythingPreTrainedModel;F.DepthEstimationPipeline;F.DepthProForDepthEstimation;F.DepthProPreTrainedModel;F.DetrFeatureExtractor;F.DetrForObjectDetection;F.DetrForSegmentation;F.DetrImageProcessor;F.DetrModel;F.DetrObjectDetectionOutput;F.DetrPreTrainedModel;F.DetrSegmentationOutput;F.Dinov2ForImageClassification;F.Dinov2Model;F.Dinov2PreTrainedModel;F.Dinov2WithRegistersForImageClassification;F.Dinov2WithRegistersModel;F.Dinov2WithRegistersPreTrainedModel;F.DistilBertForMaskedLM;F.DistilBertForQuestionAnswering;F.DistilBertForSequenceClassification;F.DistilBertForTokenClassification;F.DistilBertModel;F.DistilBertPreTrainedModel;F.DistilBertTokenizer;F.DocumentQuestionAnsweringPipeline;F.DonutFeatureExtractor;F.DonutImageProcessor;F.DonutSwinModel;F.DonutSwinPreTrainedModel;F.EfficientNetForImageClassification;F.EfficientNetImageProcessor;F.EfficientNetModel;F.EfficientNetPreTrainedModel;F.ElectraForMaskedLM;F.ElectraForQuestionAnswering;F.ElectraForSequenceClassification;F.ElectraForTokenClassification;F.ElectraModel;F.ElectraPreTrainedModel;F.ElectraTokenizer;F.EncodecFeatureExtractor;F.EosTokenCriteria;F.Ernie4_5_ForCausalLM;F.Ernie4_5_Model;F.Ernie4_5_PretrainedModel;F.Ernie4_5_Tokenizer;F.EsmForMaskedLM;F.EsmForSequenceClassification;F.EsmForTokenClassification;F.EsmModel;F.EsmPreTrainedModel;F.EsmTokenizer;F.ExaoneForCausalLM;F.ExaoneModel;F.ExaonePreTrainedModel;F.FFT;F.FalconForCausalLM;F.FalconModel;F.FalconPreTrainedModel;F.FalconTokenizer;F.FastViTForImageClassification;F.FastViTModel;F.FastViTPreTrainedModel;F.FeatureExtractionPipeline;F.FeatureExtractor;F.FillMaskPipeline;F.Florence2ForConditionalGeneration;F.Florence2PreTrainedModel;F.Florence2Processor;F.ForcedBOSTokenLogitsProcessor;F.ForcedEOSTokenLogitsProcessor;F.GLPNFeatureExtractor;F.GLPNForDepthEstimation;F.GLPNModel;F.GLPNPreTrainedModel;F.GPT2LMHeadModel;F.GPT2Model;F.GPT2PreTrainedModel;F.GPT2Tokenizer;F.GPTBigCodeForCausalLM;F.GPTBigCodeModel;F.GPTBigCodePreTrainedModel;F.GPTJForCausalLM;F.GPTJModel;F.GPTJPreTrainedModel;F.GPTNeoForCausalLM;F.GPTNeoModel;F.GPTNeoPreTrainedModel;
3702F.GPTNeoXForCausalLM;F.GPTNeoXModel;F.GPTNeoXPreTrainedModel;F.GPTNeoXTokenizer;F.Gemma2ForCausalLM;F.Gemma2Model;F.Gemma2PreTrainedModel;F.Gemma3ForCausalLM;F.Gemma3Model;F.Gemma3PreTrainedModel;F.Gemma3nAudioFeatureExtractor;F.Gemma3nForConditionalGeneration;F.Gemma3nPreTrainedModel;F.Gemma3nProcessor;F.GemmaForCausalLM;F.GemmaModel;F.GemmaPreTrainedModel;F.GemmaTokenizer;F.GlmForCausalLM;F.GlmModel;F.GlmPreTrainedModel;F.GraniteForCausalLM;F.GraniteModel;F.GraniteMoeHybridForCausalLM;F.GraniteMoeHybridModel;F.GraniteMoeHybridPreTrainedModel;F.GranitePreTrainedModel;F.Grok1Tokenizer;F.GroundingDinoForObjectDetection;F.GroundingDinoImageProcessor;F.GroundingDinoPreTrainedModel;F.GroundingDinoProcessor;F.GroupViTModel;F.GroupViTPreTrainedModel;F.HeliumForCausalLM;F.HeliumModel;F.HeliumPreTrainedModel;F.HerbertTokenizer;F.HieraForImageClassification;F.HieraModel;F.HieraPreTrainedModel;F.HubertForCTC;F.HubertForSequenceClassification;F.HubertModel;F.HubertPreTrainedModel;F.IJepaForImageClassification;F.IJepaModel;F.IJepaPreTrainedModel;F.Idefics3ForConditionalGeneration;F.Idefics3ImageProcessor;F.Idefics3PreTrainedModel;F.Idefics3Processor;F.ImageClassificationPipeline;F.ImageFeatureExtractionPipeline;F.ImageFeatureExtractor;F.ImageMattingOutput;F.ImageProcessor;F.ImageSegmentationPipeline;F.ImageToImagePipeline;F.ImageToTextPipeline;F.InterruptableStoppingCriteria;F.JAISLMHeadModel;F.JAISModel;F.JAISPreTrainedModel;F.JinaCLIPImageProcessor;F.JinaCLIPModel;F.JinaCLIPPreTrainedModel;F.JinaCLIPProcessor;F.JinaCLIPTextModel;F.JinaCLIPVisionModel;F.Lfm2ForCausalLM;F.Lfm2Model;F.Lfm2PreTrainedModel;F.LiteWhisperForConditionalGeneration;F.Llama4ForCausalLM;F.Llama4PreTrainedModel;F.LlamaForCausalLM;F.LlamaModel;F.LlamaPreTrainedModel;F.LlamaTokenizer;F.LlavaForConditionalGeneration;F.LlavaOnevisionForConditionalGeneration;F.LlavaOnevisionImageProcessor;F.LlavaPreTrainedModel;F.LlavaProcessor;F.LlavaQwen2ForCausalLM;F.LogitsProcessor;F.LogitsProcessorList;F.LogitsWarper;F.LongT5ForConditionalGeneration;F.LongT5Model;F.LongT5PreTrainedModel;F.M2M100ForConditionalGeneration;F.M2M100Model;F.M2M100PreTrainedModel;F.M2M100Tokenizer;F.MBart50Tokenizer;F.MBartForCausalLM;F.MBartForConditionalGeneration;F.MBartForSequenceClassification;F.MBartModel;F.MBartPreTrainedModel;F.MBartTokenizer;F.MPNetForMaskedLM;F.MPNetForQuestionAnswering;F.MPNetForSequenceClassification;F.MPNetForTokenClassification;F.MPNetModel;F.MPNetPreTrainedModel;F.MPNetTokenizer;F.MT5ForConditionalGeneration;F.MT5Model;F.MT5PreTrainedModel;F.MarianMTModel;F.MarianModel;F.MarianPreTrainedModel;F.MarianTokenizer;F.Mask2FormerImageProcessor;F.MaskFormerFeatureExtractor;F.MaskFormerForInstanceSegmentation;F.MaskFormerImageProcessor;F.MaskFormerModel;F.MaskFormerPreTrainedModel;F.MaskedLMOutput;F.MaxLengthCriteria;F.Metric3DForDepthEstimation;F.Metric3DPreTrainedModel;F.Metric3Dv2ForDepthEstimation;F.Metric3Dv2PreTrainedModel;F.MgpstrForSceneTextRecognition;F.MgpstrModelOutput;F.MgpstrPreTrainedModel;F.MgpstrProcessor;F.MgpstrTokenizer;F.MimiDecoderModel;F.MimiDecoderOutput;F.MimiEncoderModel;F.MimiEncoderOutput;F.MimiModel;F.MimiPreTrainedModel;F.MinLengthLogitsProcessor;F.MinNewTokensLengthLogitsProcessor;F.MistralForCausalLM;F.MistralModel;F.MistralPreTrainedModel;F.MobileBertForMaskedLM;F.MobileBertForQuestionAnswering;F.MobileBertForSequenceClassification;F.MobileBertModel;F.MobileBertPreTrainedModel;F.MobileBertTokenizer;F.MobileLLMForCausalLM;F.MobileLLMModel;F.MobileLLMPreTrainedModel;F.MobileNetV1FeatureExtractor;F.MobileNetV1ForImageClassification;F.MobileNetV1ForSemanticSegmentation;F.MobileNetV1ImageProcessor;F.MobileNetV1Model;F.MobileNetV1PreTrainedModel;F.MobileNetV2FeatureExtractor;F.MobileNetV2ForImageClassification;F.MobileNetV2ForSemanticSegmentation;F.MobileNetV2ImageProcessor;F.MobileNetV2Model;F.MobileNetV2PreTrainedModel;F.MobileNetV3FeatureExtractor;F.MobileNetV3ForImageClassification;F.MobileNetV3ForSemanticSegmentation;F.MobileNetV3ImageProcessor;F.MobileNetV3Model;F.MobileNetV3PreTrainedModel;F.MobileNetV4FeatureExtractor;F.MobileNetV4ForImageClassification;F.MobileNetV4ForSemanticSegmentation;F.MobileNetV4ImageProcessor;F.MobileNetV4Model;F.MobileNetV4PreTrainedModel;F.MobileViTFeatureExtractor;F.MobileViTForImageClassification;F.MobileViTImageProcessor;F.MobileViTModel;F.MobileViTPreTrainedModel;F.MobileViTV2ForImageClassification;F.MobileViTV2Model;F.MobileViTV2PreTrainedModel;F.ModelOutput;F.ModernBertDecoderForCausalLM;F.ModernBertDecoderModel;F.ModernBertDecoderPreTrainedModel;F.ModernBertForMaskedLM;F.ModernBertForSequenceClassification;F.ModernBertForTokenClassification;F.ModernBertModel;F.ModernBertPreTrainedModel;F.Moondream1ForConditionalGeneration;F.MoonshineFeatureExtractor;F.MoonshineForConditionalGeneration;F.MoonshineModel;F.MoonshinePreTrainedModel;F.MoonshineProcessor;F.MptForCausalLM;F.MptModel;F.MptPreTrainedModel;F.MultiModalityCausalLM;F.MultiModalityPreTrainedModel;F.MusicgenForCausalLM;F.MusicgenForConditionalGeneration;F.MusicgenModel;F.MusicgenPreTrainedModel;F.NanoChatForCausalLM;F.NanoChatModel;F.NanoChatPreTrainedModel;F.NeoBertForMaskedLM;F.NeoBertForQuestionAnswering;F.NeoBertForSequenceClassification;F.NeoBertForTokenClassification;F.NeoBertModel;F.NeoBertPreTrainedModel;F.NllbTokenizer;F.NoBadWordsLogitsProcessor;F.NoRepeatNGramLogitsProcessor;F.NomicBertModel;F.NomicBertPreTrainedModel;F.NougatImageProcessor;F.NougatTokenizer;F.OPTForCausalLM;F.OPTModel;F.OPTPreTrainedModel;F.ObjectDetectionPipeline;F.Olmo2ForCausalLM;F.Olmo2Model;F.Olmo2PreTrainedModel;F.OlmoForCausalLM;F.OlmoModel;F.OlmoPreTrainedModel;F.OpenELMForCausalLM;F.OpenELMModel;F.OpenELMPreTrainedModel;F.OwlViTFeatureExtractor;F.OwlViTForObjectDetection;F.OwlViTImageProcessor;F.OwlViTModel;F.OwlViTPreTrainedModel;F.OwlViTProcessor;F.Owlv2ForObjectDetection;F.Owlv2ImageProcessor;F.Owlv2Model;F.Owlv2PreTrainedModel;F.PaliGemmaForConditionalGeneration;F.PaliGemmaPreTrainedModel;F.PaliGemmaProcessor;F.ParakeetFeatureExtractor;F.ParakeetForCTC;F.ParakeetPreTrainedModel;F.PatchTSMixerForPrediction;F.PatchTSMixerModel;F.PatchTSMixerPreTrainedModel;F.PatchTSTForPrediction;F.PatchTSTModel;F.PatchTSTPreTrainedModel;F.Phi3ForCausalLM;F.Phi3Model;F.Phi3PreTrainedModel;F.Phi3VForCausalLM;F.Phi3VImageProcessor;F.Phi3VPreTrainedModel;F.Phi3VProcessor;F.PhiForCausalLM;F.PhiModel;F.PhiPreTrainedModel;F.Pipeline;F.PreTrainedModel;F.PreTrainedTokenizer;F.PretrainedConfig;F.PretrainedMixin;F.Processor;F.PvtForImageClassification;F.PvtImageProcessor;F.PvtModel;F.PvtPreTrainedModel;F.PyAnnoteFeatureExtractor;F.PyAnnoteForAudioFrameClassification;F.PyAnnoteModel;F.PyAnnotePreTrainedModel;F.PyAnnoteProcessor;F.QuestionAnsweringModelOutput;F.QuestionAnsweringPipeline;F.Qwen2ForCausalLM;F.Qwen2Model;F.Qwen2PreTrainedModel;F.Qwen2Tokenizer;F.Qwen2VLForConditionalGeneration;F.Qwen2VLImageProcessor;F.Qwen2VLPreTrainedModel;F.Qwen2VLProcessor;F.Qwen3ForCausalLM;F.Qwen3Model;F.Qwen3PreTrainedModel;F.RFDetrForObjectDetection;F.RFDetrModel;F.RFDetrObjectDetectionOutput;F.RFDetrPreTrainedModel;F.RTDetrForObjectDetection;F.RTDetrImageProcessor;F.RTDetrModel;F.RTDetrObjectDetectionOutput;F.RTDetrPreTrainedModel;
3702F.RTDetrV2ForObjectDetection;F.RTDetrV2Model;F.RTDetrV2ObjectDetectionOutput;F.RTDetrV2PreTrainedModel;F.RawAudio;F.RawImage;F.RawVideo;F.RawVideoFrame;F.RepetitionPenaltyLogitsProcessor;F.ResNetForImageClassification;F.ResNetModel;F.ResNetPreTrainedModel;F.RoFormerForMaskedLM;F.RoFormerForQuestionAnswering;F.RoFormerForSequenceClassification;F.RoFormerForTokenClassification;F.RoFormerModel;F.RoFormerPreTrainedModel;F.RoFormerTokenizer;F.RobertaForMaskedLM;F.RobertaForQuestionAnswering;F.RobertaForSequenceClassification;F.RobertaForTokenClassification;F.RobertaModel;F.RobertaPreTrainedModel;F.RobertaTokenizer;F.SamImageProcessor;F.SamImageSegmentationOutput;F.SamModel;F.SamPreTrainedModel;F.SamProcessor;F.SapiensForDepthEstimation;F.SapiensForNormalEstimation;F.SapiensForSemanticSegmentation;F.SapiensPreTrainedModel;F.SeamlessM4TFeatureExtractor;F.SegformerFeatureExtractor;F.SegformerForImageClassification;F.SegformerForSemanticSegmentation;F.SegformerImageProcessor;F.SegformerModel;F.SegformerPreTrainedModel;F.Seq2SeqLMOutput;F.SequenceClassifierOutput;F.SiglipImageProcessor;F.SiglipModel;F.SiglipPreTrainedModel;F.SiglipTextModel;F.SiglipTokenizer;F.SiglipVisionModel;F.SmolLM3ForCausalLM;F.SmolLM3Model;F.SmolLM3PreTrainedModel;F.SmolVLMForConditionalGeneration;F.SmolVLMImageProcessor;F.SmolVLMProcessor;F.SnacDecoderModel;F.SnacEncoderModel;F.SnacFeatureExtractor;F.SnacModel;F.SnacPreTrainedModel;F.SpeechT5FeatureExtractor;F.SpeechT5ForSpeechToText;F.SpeechT5ForTextToSpeech;F.SpeechT5HifiGan;F.SpeechT5Model;F.SpeechT5PreTrainedModel;F.SpeechT5Processor;F.SpeechT5Tokenizer;F.SqueezeBertForMaskedLM;F.SqueezeBertForQuestionAnswering;F.SqueezeBertForSequenceClassification;F.SqueezeBertModel;F.SqueezeBertPreTrainedModel;F.SqueezeBertTokenizer;F.StableLmForCausalLM;F.StableLmModel;F.StableLmPreTrainedModel;F.Starcoder2ForCausalLM;F.Starcoder2Model;F.Starcoder2PreTrainedModel;F.StoppingCriteria;F.StoppingCriteriaList;F.StyleTextToSpeech2Model;F.StyleTextToSpeech2PreTrainedModel;F.SummarizationPipeline;F.SuppressTokensAtBeginLogitsProcessor;F.Swin2SRForImageSuperResolution;F.Swin2SRImageProcessor;F.Swin2SRModel;F.Swin2SRPreTrainedModel;F.SwinForImageClassification;F.SwinForSemanticSegmentation;F.SwinModel;F.SwinPreTrainedModel;F.T5ForConditionalGeneration;F.T5Model;F.T5PreTrainedModel;F.T5Tokenizer;F.TableTransformerForObjectDetection;F.TableTransformerModel;F.TableTransformerObjectDetectionOutput;F.TableTransformerPreTrainedModel;F.TemperatureLogitsWarper;F.Tensor;F.Text2TextGenerationPipeline;F.TextClassificationPipeline;F.TextGenerationPipeline;F.TextStreamer;F.TextToAudioPipeline;F.TokenClassificationPipeline;F.TokenClassifierOutput;F.TokenizerModel;F.TopKLogitsWarper;F.TopPLogitsWarper;F.TrOCRForCausalLM;F.TrOCRPreTrainedModel;F.TranslationPipeline;F.UltravoxModel;F.UltravoxPreTrainedModel;F.UltravoxProcessor;F.UniSpeechForCTC;F.UniSpeechForSequenceClassification;F.UniSpeechModel;F.UniSpeechPreTrainedModel;F.UniSpeechSatForAudioFrameClassification;F.UniSpeechSatForCTC;F.UniSpeechSatForSequenceClassification;F.UniSpeechSatModel;F.UniSpeechSatPreTrainedModel;F.VLChatProcessor;F.VLMImageProcessor;F.VaultGemmaForCausalLM;F.VaultGemmaModel;F.VaultGemmaPreTrainedModel;F.ViTFeatureExtractor;F.ViTForImageClassification;F.ViTImageProcessor;F.ViTMAEModel;F.ViTMAEPreTrainedModel;F.ViTMSNForImageClassification;F.ViTMSNModel;F.ViTMSNPreTrainedModel;F.ViTModel;F.ViTPreTrainedModel;F.VisionEncoderDecoderModel;F.VitMatteForImageMatting;F.VitMatteImageProcessor;F.VitMattePreTrainedModel;F.VitPoseForPoseEstimation;F.VitPoseImageProcessor;F.VitPosePreTrainedModel;F.VitsModel;F.VitsModelOutput;F.VitsPreTrainedModel;F.VitsTokenizer;F.VoxtralForConditionalGeneration;F.VoxtralProcessor;F.Wav2Vec2BertForCTC;F.Wav2Vec2BertForSequenceClassification;F.Wav2Vec2BertModel;F.Wav2Vec2BertPreTrainedModel;F.Wav2Vec2CTCTokenizer;F.Wav2Vec2FeatureExtractor;F.Wav2Vec2ForAudioFrameClassification;F.Wav2Vec2ForCTC;F.Wav2Vec2ForSequenceClassification;F.Wav2Vec2Model;F.Wav2Vec2PreTrainedModel;F.Wav2Vec2Processor;F.Wav2Vec2ProcessorWithLM;F.WavLMForAudioFrameClassification;F.WavLMForCTC;F.WavLMForSequenceClassification;F.WavLMForXVector;F.WavLMModel;F.WavLMPreTrainedModel;F.WeSpeakerFeatureExtractor;F.WeSpeakerResNetModel;F.WeSpeakerResNetPreTrainedModel;F.WhisperFeatureExtractor;F.WhisperForConditionalGeneration;F.WhisperModel;F.WhisperPreTrainedModel;F.WhisperProcessor;F.WhisperTextStreamer;F.WhisperTimeStampLogitsProcessor;F.WhisperTokenizer;F.XLMForQuestionAnswering;F.XLMForSequenceClassification;F.XLMForTokenClassification;F.XLMModel;F.XLMPreTrainedModel;F.XLMRobertaForMaskedLM;
3702F.XLMRobertaForQuestionAnswering;F.XLMRobertaForSequenceClassification;F.XLMRobertaForTokenClassification;F.XLMRobertaModel;F.XLMRobertaPreTrainedModel;F.XLMRobertaTokenizer;F.XLMTokenizer;F.XLMWithLMHeadModel;F.XVectorOutput;F.YolosFeatureExtractor;F.YolosForObjectDetection;F.YolosImageProcessor;F.YolosModel;F.YolosObjectDetectionOutput;F.YolosPreTrainedModel;F.ZeroShotAudioClassificationPipeline;F.ZeroShotClassificationPipeline;F.ZeroShotImageClassificationPipeline;F.ZeroShotObjectDetectionPipeline;F.bankers_round;F.cat;F.cos_sim;F.dot;F.dynamic_time_warping;var QTe=F.env;F.full;F.full_like;F.getCacheShapes;F.hamming;F.hanning;F.interpolate;F.interpolate_4d;F.interpolate_data;F.is_chinese_char;F.layer_norm;F.load_image;F.load_video;F.log_softmax;F.magnitude;F.matmul;F.max;F.mean;F.mean_pooling;F.medianFilter;F.mel_filter_bank;F.min;F.ones;F.ones_like;F.permute;F.permute_data;var Awt=F.pipeline;F.quantize_embeddings;F.rand;F.read_audio;F.rfft;F.round;F.slice;F.softmax;F.spectrogram;F.stack;F.std_mean;F.topk;F.window_function;F.zeros;F.zeros_like;QTe.allowLocalModels=!1;QTe.useBrowserCache=!1;const o1=1024;function Cwt(e,t,r){let n=r.naturalWidth,i=r.naturalHeight;return n>o1||i>o1?(n>i?(i=Math.round(i*o1/n),n=o1):(n=Math.round(n*o1/i),i=o1),e.width=n,e.height=i,t.drawImage(r,0,0,n,i),!0):(e.width=n,e.height=i,t.drawImage(r,0,0),!1)}const Pwt=async e=>{try{console.log("Starting background removal process...");const t=await Awt("image-segmentation","Xenova/segformer-b0-finetuned-ade-512-512",{device:"webgpu"}),r=document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("Could not get canvas context");const i=Cwt(r,n,e);console.log(`Image ${i?"was":"was not"} resized. Final dimensions: ${r.width}x${r.height}`);const a=r.toDataURL("image/jpeg",.8);console.log("Image converted to base64"),console.log("Processing with segmentation model...");const s=await t(a);if(console.log("Segmentation result:",s),!s||!Array.isArray(s)||s.length===0||!s[0].mask)throw new Error("Invalid segmentation result");const o=document.createElement("canvas");o.width=r.width,o.height=r.height;const l=o.getContext("2d");if(!l)throw new Error("Could not get output canvas context");l.drawImage(r,0,0);const u=l.getImageData(0,0,o.width,o.height),c=u.data;for(let d=0;d<s[0].mask.data.length;d++){const f=Math.round((1-s[0].mask.data[d])*255);c[d*4+3]=f}return l.putImageData(u,0,0),console.log("Mask applied successfully"),new Promise((d,f)=>{o.toBlob(h=>{h?(console.log("Successfully created final blob"),d(h)):f(new Error("Failed to create blob"))},"image/png",1)})}catch(t){throw console.error("Error removing background:",t),t}},Mwt=e=>new Promise((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=r,n.src=URL.createObjectURL(e)}),kwt=()=>{const[e,t]=R.useState(!1),[r,n]=R.useState(null),i=async()=>{try{t(!0),ba.info("Loading AI model... This may take a moment on first run.");const o=await(await fetch(u$)).blob(),l=await Mwt(o);ba.info("Removing background...");const u=await Pwt(l),c=URL.createObjectURL(u);
3702n(c),ba.success("Background removed successfully! You can now download the transparent logo.")}catch(s){console.error("Error processing logo:",s),ba.error("Failed to process logo. Please try again.")}finally{t(!1)}},a=()=>{if(!r)return;const s=document.createElement("a");s.href=r,s.download="logo-transparent.png",document.body.appendChild(s),s.click(),document.body.removeChild(s),ba.success("Logo downloaded! Now replace the logo files in your project.")};return g.jsx("div",{className:"min-h-screen bg-background py-12 px-4",children:g.jsx("div",{className:"container mx-auto max-w-4xl",children:g.jsxs(un,{children:[g.jsxs(zi,{children:[g.jsx(Ui,{children:"Logo Background Removal Tool"}),g.jsx(ho,{children:"Process your logo to remove the white background. After downloading, replace the logo files in your project."})]}),g.jsxs(kn,{className:"space-y-6",children:[g.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("h3",{className:"font-semibold text-sm text-muted-foreground",children:"Original Logo"}),g.jsx("div",{className:"bg-muted rounded-lg p-8 flex items-center justify-center",children:g.jsx("img",{src:u$,alt:"Original Logo",className:"max-w-full h-auto"})})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("h3",{className:"font-semibold text-sm text-muted-foreground",children:"Transparent Logo"}),g.jsx("div",{className:"rounded-lg p-8 flex items-center justify-center relative",style:{backgroundImage:"linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px"},children:r?g.jsx("img",{src:r,alt:"Transparent Logo",className:"max-w-full h-auto"}):g.jsx("div",{className:"text-muted-foreground text-sm text-center",children:e?"Processing...":"Click 'Process Logo' to start"})})]})]}),g.jsxs("div",{className:"flex gap-4 justify-center",children:[g.jsx(gr,{onClick:i,disabled:e,size:"lg",children:e?g.jsxs(g.Fragment,{children:[g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}),"Processing..."]}):"Process Logo"}),r&&g.jsxs(gr,{onClick:a,variant:"secondary",size:"lg",children:[g.jsx(Xw,{className:"mr-2 h-4 w-4"}),"Download PNG"]})]}),r&&g.jsxs("div",{className:"bg-muted p-4 rounded-lg space-y-2",children:[g.jsx("h4",{className:"font-semibold",children:"Next Steps:"}),g.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-sm text-muted-foreground",children:[g.jsx("li",{children:"Download the transparent PNG logo above"}),g.jsxs("li",{children:["Replace ",g.jsx("code",{className:"bg-background px-1 py-0.5 rounded",children:"src/assets/logo.jpg"})," with the new PNG (rename to logo.png)"]}),g.jsxs("li",{children:["Replace ",g.jsx("code",{className:"bg-background px-1 py-0.5 rounded",children:"public/logo.jpg"})," with the new PNG"]}),g.jsx("li",{children:"Update the import in Navigation.tsx and favicon in index.html"})]})]})]})]})})})},Owt="/assets/visit-alamo-hero-C7n6kmjk.jpg",Nwt=()=>{const[e,t]=R.useState("en"),r=()=>{t(e==="en"?"es":"en")},i={en:{title:"Visit Alamo",subtitle:"Discover the charm of Alamo",description:"Welcome to Alamo, Texas â a vibrant city where rich heritage meets modern amenities. Whether you're seeking outdoor adventures, cultural experiences, or a peaceful retreat, Alamo offers something special for every visitor.",attractions:[{title:"RV Parks",description:"Experience comfortable stays at our welcoming RV parks with modern amenities and friendly communities.",icon:RK,link:"/community/rv-parks"},{title:"Santa Ana Wildlife Refuge",description:"Explore one of the premier birding destinations in North America with diverse wildlife and nature trails.",icon:Rb,link:"/community/santa-ana-refuge"},{title:"Local Attractions",description:"Discover local shops, restaurants, and cultural sites that showcase the authentic spirit of South Texas.",icon:h5,link:"/community"},{title:"Community Events",description:"Join our community celebrations, festivals, and events that bring visitors and residents together.",icon:$b,link:"/community"}],cta:"Plan Your Visit Today"},es:{title:"Visita Alamo",subtitle:"Descubre el encanto de Alamo",description:"Bienvenido a Alamo, Texas â una ciudad vibrante donde el rico patrimonio se encuentra con las comodidades modernas. Ya sea que busques aventuras al aire libre, experiencias culturales o un retiro tranquilo, Alamo ofrece algo especial para cada visitante.",attractions:[{title:"Parques de RV",description:"Experimenta estadÃas cómodas en nuestros acogedores parques de RV con servicios modernos y comunidades amigables.",icon:RK,link:"/community/rv-parks"},{title:"Refugio de Vida Silvestre Santa Ana",description:"Explora uno de los principales destinos de observación de aves en Norteamérica con diversa vid
3702a silvestre y senderos naturales.",icon:Rb,link:"/community/santa-ana-refuge"},{title:"Atracciones Locales",description:"Descubre tiendas locales, restaurantes y sitios culturales que muestran el auténtico espÃritu del sur de Texas.",icon:h5,link:"/community"},{title:"Eventos Comunitarios",description:"Ãnete a nuestras celebraciones comunitarias, festivales y eventos que unen a visitantes y residentes.",icon:$b,link:"/community"}],cta:"Planifica Tu Visita Hoy"}}[e];return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsxs("section",{className:"relative pt-16 md:pt-24 h-[45vh] min-h-[300px] md:h-[60vh] md:min-h-[400px] flex items-end overflow-hidden",children:[g.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${Owt})`}}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_80%)]",children:i.title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:i.subtitle})]})})})]}),g.jsx("main",{className:"flex-1 py-10 md:py-16 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsx("div",{className:"max-w-3xl mx-auto text-center mb-16",children:g.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:i.description})}),g.jsx("div",{className:"grid md:grid-cols-2 gap-8 max-w-5xl mx-auto",children:i.attractions.map((a,s)=>{const o=[{bg:"bg-primary",border:"border-l-4 border-primary",cardBg:"bg-primary/5"},{bg:"bg-secondary",border:"border-l-4 border-secondary",cardBg:"bg-secondary/10"},{bg:"bg-accent",border:"border-l-4 border-accent",cardBg:"bg-accent/20"}],l=o[s%o.length];return g.jsx(Rs,{to:a.link,children:g.jsxs(un,{className:`h-full hover:shadow-lg transition-shadow cursor-pointer group ${l.border} ${l.cardBg}`,children:[g.jsx(zi,{children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:`p-3 ${l.bg} rounded-lg group-hover:opacity-90 transition-opacity`,children:g.jsx(a.icon,{className:"h-6 w-6 text-white"})}),g.jsx(Ui,{className:"text-xl",children:a.title})]})}),g.jsx(kn,{children:g.jsx(ho,{className:"text-base",children:a.description})})]})},s)})})]})}),g.jsx(mo,{language:e})]})},Iwt="/assets/alamo-inn-bb-Bf4jhB1I.png",Dwt="/assets/texas-inn-R54jbsjW.png",Lwt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL4AAACQCAMAAACBDCHpAAAAb1BMVEVHcEwBUTD///8ASyvGxcLCv723tLK9ubf29vXNycUATi/Awb8JUzNefmf3lR8xYkXK0st6k4D/5lDy9PKisaQfWTdHb1X1zkP1pyj6tzGSpZW4lTc2XjRlcjjg5OBMZjaBgDqvu7CffjDgkSXDuUs2d16bAAAACnRSTlMA////N1zPjCYWmwVn6wAADghJREFUeNrtnYt6o7rOhhdoptMqdsABcyYckvu/xl8SOCahzd/dlU7JfrbWPIMNBl7JnxVBuzL/PK/9flt0fr38+f1HTDZ+6+3eYen69pfs9+fOfHlx3M7e/rzExyR8DkuOv9MrB/78OYZPZcmfdEH/O3w6e325oT9WRj+BmV0o9sfpJ5XpMBaewRCCbCfA6Rz8mEOfAQZPYhBUzD/nzZeEXMkgeB5DTDnik/pfX8OweiZ6in/EmXJWz2uYRN+D36jv4jeE/+Lw42+a5Pbb8DMWv8NP4ZEhR9dSo3VtfOxEYEQLdvf2DfjYXvht7Ztt8Cz4PbqIl51r9j0+CX5TzDHHrmznli26h+KD4H+L9tWpnqHbsoc5+LnddvTVBQ/HvJEO9OXkCNrT2d9ZPSL6D8bHrkHXbB31WDK1NHq4aOsRMsKHi2fswHlSHAQR61I0g80pb8HR1wo3qH1sCkGcaCXq9lQeGsYf2R/nWodb1D4vzxZQWnVxaIHc2JeELdt55WJbkK42qH1CU3XeI4rU94ezQuwIn2dk3Oe1oxc/tqj9AEjzfYBMuc+JG1vC74G8KGgjmWjPa2Cj+KJxXpgCnFvsCZ/CXvMk0F6ehTNuLe+jb9lTcThbpDVL4e9hJO4zzcH+cGgQFXcb3Ninrmq8AyKXvAEJeG7d3zIV0uvhMhQbtQnxNH0bgKvMagp73sFIyIda8Mc97Tqj82Jmx27sNqL9pi76BhEl5e+Fv5PNnvAPBXvSNifedDDB274+N7gN7QeAfZnXrQKUnFnkh0PP5IJfig/9if2pkdlVN57yWuF2Mg+0J6KVKVAS5sOe/hb8vczD9Dcfb9opEeGWEic2NQe9bi10e+YviJcDX3Kv3MsUtMCBp9nJO9hY3kc7qSbv7eg0U4992451MdOfLQWeBlEDHpT3Xx9XMAe9QBImKyXfj02AACyXXuYjP50mN/pgixUnLwDBE60UHaLP8HVeFnuGzw8s+20WDdiIOFj4dbNkBFUzvIir21TNgywQZ6BGocxPDd4WowJ/qC3glf1s3m/avm/JOramsVb4y/YWCzvSDSX+xjZNI4Pblk9tflj7TU+ZJc8Ps+U5p/j63WK0KPYnXr5iRVmWdd+onxYPoG3HE+M4J4p9i+tx3d6Bi7t53VoE3EDmQRQPHBnxN2ssrvoL56OwB1upebwHYu8/zeLI4I4dcRuZ5z0Pxnfx+6J0mtnkex4E+Xz6AB96npixQdjimwaEoOvPszrej/5erO47hbihZ11hbxx7npe1em8MFw7FxYPNFMwXdgIvJ77uHTZ7yt2Ywnnw4/iIitgduLN+DQYtl3POePxp7Cziz2rftnVRnGqxkawfS7LC4jrtS0rtex55Fiuo2/ys9m1jrVIKEaRyg0ZUVIy4yjt5yarvgI+gRF0pa+0Pi0dQ0CmpzRl+JR957TYfCNDvJdtQ3g96eVZhK3tcYsqDzOTZaHFbLwlnA1sTPEeYKx/+gMJZKLYv2al8cq5utvh+H7pconsaa8LkRt/xsrBdf9qXsqNmaZX7U4tbw0dsBb7urcqFfs+gp3N9KnJ5Uhfdt2dWEDVwUzUPy55oxy5AqEUiRc4+lIQukSdq4m8Bm54nabS4oZoH7DkvpA4OsBP6E0G6F23ijfCfeISlKShPHW5GPNgVBQceeRrOzFm34kTJbXGkn+ZkFJ3xFJQtbgW/r9sGJxroGXZEwi/cFFCTuM/CP0Ej2rYe7Ta03/nqC5tDzqxYM3jLM3Fqc+KuUZ3FozlrIvBp24g++lZNiD2iymlbixMnlAlpwBL/8iXEhl6Qz0aaKVkf2HCkO1FSjU3OHUQry6LHLb1lWxrafEop2JEbI0JLvCOyF+zUzN9t9ee62OdELw2KN6mc8Xskrw7kRcD8vAxY8pt7Qc7rNp/rGayFF5sp7DQLBUE7/nGjb5jPtcWLiBqkLeF3tFV5TpMx8xf7dovv97EdFbr0WfQYCLZkSqTwd86zQ3GyuLnoY9MrR9XmEyGeqTFNTNmjUxgt5229KBFrLvTQC6ys5XouK3KHDMzfbqvivLH6pGY9OWo8n6xf4eW+2do7Tm9oixZd0C+tssEFf73d6GN3gWvyzkHX5IjnL3rcTr1/m4IcKdqicc1OgD1/t72aZzZfSqraS4b2ems4N/0IPordG7Hg7K3fq64EVo741xMnAgQ2iiKrAD5zd7Wu6T1/i39X+wg2Mzs6LUziSkcAn+C/93t7Df7N6EOg4zCMK1OlR3a
3702hiuDfLZHxb9Y8EO3CMI0QyBQ7Eh414AMy1F+JPmQUcgMwy0hVIZnBi65mmwdPhlfH0IvQ/9b25agb6QzlDywA/g0+RELvT8eJH+aLaZ1FUaYzJf2MelmmI5yOZb4ngdCO39IfPpPGy0hD7aVlWgVuaGXxXyROUk6s0PcxGHgBZDDjV9wzDp/FtXP41EnCweObMHP8jG8SPpEP6NBZMm+P7pZ0TMOX8cFIqFeLJxzQ6eFIl/PiIZIM/K2l5691JH4vu4FuD3LgaIzRWtOlUtoYE8eX6A90q6+KB1VMEbF47VIakl1AaMQAfqXIEd8JI1iG4ui7AVRhJT1MI2DjSxlpRYPysUoy+GLel/jFvu+p6M5eXemn8cM4ghV+kKGLlZtprRbnVPA18UigV2NQcfrfBV/BX/KjcWAY3OLj5VaJLIQv4MsFvfPecMeLy+IH+NHH+APzW3B9Bxus8P3sG7q+hnvaR7ipZNBt7dGt3NWcJBF+Nvo+2pFZ8OMdfB8oawgXP9Y+Ws3r3vohylh0rr6LX30JHyo6lDr+e9H3rOEOMr4X3BGPGsKdulqaGhb4a/GYu/jRPXzl9LPGD1b4aIiEb2Du4YNxiO42A3rxeDgvYtH+l6KPwr+zcC/6XruJRTByszvad/iuTEjcbKl4mWM8h0un/2H0OZZgdzM/6PvR5wEVoKhdw2ejD2aQsPhFavFGPOnX8r7gE7/ERCHou9GXS2eoVJC6EK7x19HHWEeSat3HlnPdWxx6yM9HHwXf8Q//b/QhItWwJXKZ+9H3ACS0eEYW8bu85SWZhL4QwUE6ntit6XX00+mqs36G+9EXrNSIJbz/c9qHtALQjgjMOvxgXMXp9BUv5RqrD/AxZQjPX92PvixcYHOLF+Fe9N1J8TDs3G3RxpJllvkgcHfxzviAy6Xu4nt+muM70ecYMi9O19GAUabwrvaleM2yLNpdApVJeazgqoxLA7xaSwa8a/pD/MHDofDf4NvjFf4gh31VG5nKKPg4+koWrgEyfUm1oIU/gqmL7E8q+liqx8JaO67eX+O79bvG93EkTs4fXsJZpCtj4V3tp8JsOWARTEWlhstaZv0Yi0BmTcJJI/Am+tpFQIY6cQX9Gh9xJ7fz/Df4QuZGIFQLRcsRZYxeaX9OHibLTIqB2k0uQ0URRXejih1IBmNMmkgrQ7h5FZFUWps4jBf0SqU02Cg1d/nJI6Ke5xd8b5rDNI1QijpVoJY1rrERvoOvdFVVA61XzfKqtGhIp6nJ/GsqPUj2DY+pHng7ZACeP8hScXCnld+LFA+6cGqkAES6dEr/mQg9/87jywAyGpERpJZz3WCMqjRNB6PVuw+LAIBs0nTIKL5fejZiU9TScUiWRgA3h29/S1nNlfjMsK
37027LJdDeEBYj8GqwAH7xHae7O8LkoTUioTTzd/ja/9GBP/KTRYSoCtlSrW4Ceu9y2/mlAIRsCNlikyknPQQIMnvnrA39BjmgrGHxQGeRJYt4rdq1ILb5FSuAkSRUMa4LjzsTAT6DeCYDUJkZ4pjY412lIyT4p9D+MtUFylrl89xzaH9hNynzSbT/YHt83p+1zAnRfx4vOvdF5U7GxXjXmWzRXpz1KO1jZCKUDVeNymi+sjWaOqjN/RCZdK6drMmQT87AdfhkMY1SGIlZbisutCw+SDyQhRnI5hgB2nAQgoR3wnC8Vr+Cq1sckyGW4h4i3tDJlZws+7A6HjnVyvEqPMZkgp+Gux0/LzwGHy/4dE2wSSoER35lB0O8HGir2Fw/DEcQaJm6GT8xHj9QKoh3gZKhVeJwZShEGh+kfR/9Kqw8/nCM1TU+mF10zGCJb+ZiCFb485PLDnGNP1gEeJT2PX5mQh0wvoCQOzfRN4N1+O75KxkkjLjGFyN852lMpmW3IbDv0L6GIcmOM34F5Ey6xOcnY20j9PdQmuqJCi/RVzf4FH03UUlFNvmOGT+vWXw8vqWa5oKPQ3KMl+OOJjaDgesP4zS0yNGn8WDDFT4Gs3jQJU7klg41PFo8Gvj9QuXwyRn/0pERYoiWb0LBpFEQpLIHd0kW2DTMPsSXalUx2KAVfg8+IfHYOQWSM1fRJwHER7PAT8L4yKiSRMNjEhq/EMTi2OGHCVuEJJ2Ykmi4e4x4/MeWnTY6w0A+gJCJ9ZWflVFZhn6H1ZWMk7ahNgT+M4xNy/k3H1tBxi8K8FEVJ64/9/0+N8g/6t8WDeu2r6ivj7oet/BTNc+GSjbEADfxe5zBM9b7S3uup60b21a9v0X7r4i+0/7wNF/g/W704+DJbPE9zL/4W7CfTD1gCH8Q/DQJn038qOLLd5APb0/3DfAS/H/+TNp/ofbx8pYeg6u6ZdlD+SNDlj0/Ujq3u1eH3W0+6vnT11dCRABrQvcN6oz/xr0qsypQW7dAWX4Y4+CnMz41QrZj/Ax2JFJH7/mfzITe8z/VP7ySEC9Te3t74Z+JPoURqYf39vb29vv17e0Xb99k+/qbNr9p+4u2v2g3b1/58Our7PaHeLcc8lfwh2+G0OEPDv2ivauzV2f+8z/biP0fZWvddONziTQAAAAASUVORK5CYII=",jwt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAACDCAMAAADMIrsKAAAAq1BMVEVHcEzMpFXJoVHIoFGyklPOpVTAomjMolFeSiXCm1DIoVKUVS/Fn1LFn1GVdzuFazaFbj9iAC///wBfAC9oDC7/ZwDRp1OAMzH9+gBzHyvMpk2wfxezjkf48QOzfknGnU/v5QaIbTbn2Qr/ZADfzBCmcRqIQCPBmxKSUT2cYB2SUSC5jhXYwAvStw3/fwD/qgDSuDP/4wD/xgDMrQ/BmU3/lADHpRCnbEX/YQBFm/lEAAAAEXRSTlMAxamFMeQV/nNTlthmc/dzXOUxgvwAAA19SURBVHja7ZoNV6O6FoZ1Ru111sxdBxILEWNzYgD5sla0+v9/2d17hxgqxaLnTHXu8nVGaAjJw8tOdqAefOlLX/rSl/5PdHLU6eS3NP9vtnp0dPrr++H8/r+gi+PD779+nh6dfE7ak6PT798Oj2dWc/fr+Pjwx09g/lw6Of0OqAR5Drq1gj2LDU6ffiLko1/WV+A0WislOymltAFsoEbkz+HyydGPYzAWTDVKxuFAcaw0MIPNx98+gclAS85qFYfjksogMhAffKiOvoO34CzA7lAsNRH/ODr4OJ0egre3RoaTFCPx/PjnRwXFyfdjiIQ+bby6W4LuVtJaulrJeEA8+/YxFh99w7hVfdiHm7Ons+Xy4eZhuQL0m5ubhweg7zFLA8CHHwF8dDgHc+NnWsA7u7o6u3qIYyKHT6Szs5uHO+mvSt1CFO992BHurfa+Lc+unoDt7GppL2G1vIGPKGR+WHqT9w3scZXHfThzdHfP4QFl5DH+RpNXEqyXq1jenu8b+OTbC9wrh3u28jPYEgoghrH46Qncx2hGo+PbPcfwyQ8Yah43RrCO9wZ4ffkNmLqCoXe3hIB+AFyKZASef9vjtHYKuNpzLcFWKxxuoZdcLsHNWMbwm/R8ABz+frAvnUCaMJ5rhSPLaUlF/tASnXWTmpeGEN5bRPyCpCZ7dx1xXfjehRu6w2kD/+N488UUET8gIvZmb7jV3icXvn4k2oM0RUD0+ojYn8E/vb0otNcPNwfkDSZYEiGv4pgi2uwtgn/M+/ZKsNfLDzfvPmCCCPvpyU5qdzFG8OFeAuLokCYHbyDx+myxqfjhDDMFzWow9lB28MnbPQXE6fHsfDDanFYD3mVXZo3vTWow4n7uhRfCN+75R7zDbOH9p7KhzGy+lwD+5XiH4fv0EG/hhWDdJj2b/XhP/3+dvk3fgHckWVwtwy28NMBWA2gccKdv1l8Hf8/epMX9Ju/ZWLbw4xHSBeaLYYq7X8zeqr8P/san8an/QPej/tLibMhrjyHyso9sqClqdnrvc+RdPF5P1v05mNLPxn3eG8+zkU6uULSed1lZxpb3/OL6DXrseCM2UQF/nAPvuRrODySw0AL1j7u1MTFjFQrn+Jb8vWYBm6xo4XiDqbqeLSDozDAdOyS3QvP+g6kgyhY3JDJZnUNL1PV0vZ0XLtEH8DC/DeeI1dnNnXTs+ITvnvENDrf5JQ9+K2/ALykg9CAgnJ42eZc0ZwwlXTj8Zt7g+nzx0uBX/F3dPIxkCwqHCxH8bl5xce4M9hlu1N+7m9Wr9ga/mZdGHBksBxE88Jeeh7baG5sZ2nsp9sArLuaLxQbwcszfeDlir4FoIHv3wAsGzzAiTDx46HH++mi4GwlejIb5I98HL+YMyqQEPEzKS4+7PRpihbg42NheeJm4nC/u7atUD3z1kjcew0V3IaIWURDsgRcV3VMI915J4cuyTV65HME1He51sDdeAr5HYB17NzEbI697F7x1na5uKRhgrPE98gbXCLzYeGENiPRiD1cLsFS4k1vNvZ153P3xksMzC+yimFylt0/9he7w6wC4zvkCcPfLG0SX8xlZvADiuAMCSYkLmi240tHO5veAu29eJh5nYDESg8lahq8qVgZpqf78MgrY3nkDxq/vwWIkwK+MjZbxCKu0sJ25i0ecd/fPSxYvOmIQMSsZx5uo2tw6WKSdkbl75vUWR0B8vrDIQEVfzRuQ1gZE39HPCLajvaDI/ShecAqI7+dk3j0kAa/n/XNkRVj09loEwUfxeo+vL2bzOWIhF8hDuzI8fv8ItOzDeQNGJl8uzufndN+9nOcIC9Zy7OUDeRnD/7gDPyK6frwAH1EYyPhjPwArOMvR2n+Zl4mk6pTsDjSepVWVZrAjuHWZI/Tl5QX6SkZfXD4+XkfIOoBlke+Lv5c3U2EntdNyniiqmPK0KZ8rE7UQEUqI7kK2iZXyuS/xXt5orWO7LMkF24FbQdLVUF0VbVywDRSERI2EwKAv/v74FXUIasTO2C1kGFdCJDJUEnnfoYj6asU/Gm9VCEp29i9MGNYCLEzApHfyMuorZf+ElyV4i1K2017ATHBHmHfzBtRXsQ9e3oahtKMsjd/t7954WaTDUGXM7n5+f3G0hTpi1urP7y85YwTVYmns6g/nWvYh/jIufD7tPPW8mXT1RSQ4s9xdAXx24Fxwzrb7y6wo2QSgQcHbeHm5NrpOha8kDNSqu6aEtvV5oqXCPMOyNE2SJOOpUU3pMn2tzbrkW/0VUZRlZRaItG1oIeAKoqRpUv5GXp5IykNr4XkVJhXeHa/DlFHCw1qtYMCBSlI8T5UMT2gpl8l0q78J/VHrOqtxLq84NEUFeWmwQuJPmMBLY0tqiaX+OmXPX54YjEGgU2voIOcskUjX6lBJyioBz4FVQ6HO2BZ/8xBlkI6GMW9tgbYbwab7S/aFbVQo2zOIQhZ53I2i4BYa3GOZwmlZlDmwqbguC/qM9eM0qmyOGfpbthL3QgkbmtYLKEBRgcom8vo1Wx4E6545rIw7Xq8kRmfw4tac4UlUnzdhWAUshTZLiqKWb5sfrKGqyNDRgrlljC5LhRfwJt7S3tOqdyIrXvIy7ECD/2vyg0XIm0OFHOOGVbQm4QZv7tBft2qpwBW3oFhbDN7QBUyOX4b+UgglmHZHeSlCDPJRh8QrC0YgSlCjFZq/udbt89qRWbnFVm4DwV7AZH9FETFhEA15w3ScN6UBaDtec+Cl7qg5mbGSLpZ4Izb015JrwehGVJaXXKJtMtVflsgEBr7SJWPpKC8ptxMcdWgE8WpBvBS5a9UIxhuCH/pr92rH22vP8k72N8fxzDM4nDV4YrCVt8xTRCFePF1ZXsOpOSISGeCmCnlH/a3xdMeL4G23RE6mzr+8wboMaCsV9nlL
3702afFccm6E6fHKiHhrx5tixuVlI8NRf9OOF7c59tDnrSbmNyYMIUY50vZ5M89Lya4Rus+bEW/T4w0s7Zi/rM+7fulvNc1fmhoSqGQwzda9ExHH5zcYTO1W3sDzYrpRuRr4O8qbdLzJdH8pTBM7ShKe9wNJaJcnyYpdvDQn6lLocX9jz9tyOuR582n+EklCsZpzlvcvlNeeF69nPYjfzXjIaTZG3rjv75C38LzUAB3Ip/lLVAlA08y/yZvbhYl7NGoH80N/vBVC09W94m8RUw3aNtwHCPGu+SR/qdPEPVn2eakZ9/xWSOR18yXNv3xzPiuJXoz4O+CtX/K2fLe/DioRTY+X+0UQlTqrWz7Ib5QvCElmmeeVZfCav+VL3gJ5p/lL9zgVtefN00r45U33/kHTyPDrBzy7y8du/dDnTap03F/iNRwLerzNFH/pRmM89PxdGyVY15Vtx6W6YLg+o1bs+qzPm8t2C28pX/LijuMd95ex7n0UY5mmPb4mXjLbaMcLQFRM5W49pNz6lw5jP4y3GPUUzYKyTFzLdeBUkTc7eetxf7l7BydKExIvgsQJJ7NjstCqwgZLkcpQxsgrNFYrFS0LLa9MBD1v2IVZBpFObeSbfa0F7Kbds1KB2wgKktDuJFggxvwVubbPhbWRISmhoaVaJVXocrCPYKkBt9I4IhiQq1rZVTo6CpLGBoJdzjRSSf+Cj0W56fpKslyHaH2U2m2RrRXutFFC26bc7i/Z4uR4eR7jOUkq/bMqysYLvlRtgdc9H4eNYF1DmipYuw3tFq1/HKNbb6UTuxvDcdI6tVtZ1iGp2u4vE1X+QiUWaqkqwROjc+F5GZgQS53woKyK7jlZ6Qpxrb9rqCBNYS+uod1orU3Ku76f+0rK3CpK7bbI7LZyBSP+onj/h3eBlkVooMDfXoxnZRn1SwTUs+YRL54oXPhkuMt4JIJhV7QPYq7sxVbwob8vxZ5Fu7ZoUGezyH8kXl9g94Zt+GOcCxR3bXoxkSYFH/PXNcDBzQz8y7JIcO7Qpor8badVZVxkad7UpKat0pKofY0yTdOMveIvgwbWRjlp0+RJgSExHdmuz6bARsVaUw9pAUqqdWN0XRW+N14WBfAO/fX+N1o1VVqUJRhcpNBGrZUydZ5m9oZN87fZCRuIotW6dc0yGxhRCW6ZpipsKfAUqRiP37LWbVfVtyGyMkFq3VTlFKN38wJsmSNsxDcdYIxCJAGfm6SMBI03Nha/PFVNxgc85KqIyqS1zIK/brN9KfSatVFSqzrBrsYjpaqVrlu80xkfWT+kqhIjIMSMg6M1WjdpJkZsphmbElcu2CvW5iW0sCNegBl81rpGwqG/LNM5Z7sHNPlc58V2m1mkR7/UJdoUrE2jgL2K62Mjysb85S1m+50in4vc2LEy7FW0htQINrzYjKzlk+caRhr5vtsUE5shnzKyuSoHkcGdBlGbNhC1aO17NPQ34m85HQcF2mxsZGwQB8EAlqJ2XYp/7++N3t4SYeA4XqeZDebxWsZayz7+72FEljZa14md54bBjpekTZUJOvjBvD4yrM3A7AUhVm5E+afgJeRuAGrTVikulDLI5VVbG00XYUPt8/A6mwUkbmRUCshxvVUgKzr7+XifmUWUoSLhl4aflRfFnCzrb+Dlf4SCa8s7u7j8M3QxI94/ScB78Sfp74P//Fk6+NKXvvSlL31pgv4H/h+MlyxO2gcAAAAASUVORK5CYII=",Rwt="/assets/where-to-stay-hero-CEm6uzrb.jpg",$wt=()=>{const[e,t]=R.useState("en"),r=()=>{t(e==="en"?"es":"en")},n=[{name:"Alamo Inn B&B",address:"801 Main Street, Alamo, TX 78516",phone:"(956) 782-9912",website:"http://www.alamoinnbnb.com/",mapUrl:"https://www.google.com/maps/search/?api=1&query=801+Main+Street+Alamo+TX+78516",image:Iwt},{name:"Texas Inn Alamo",address:"714 N. Alamo Road, Alamo, TX 78516",phone:"(956) 787-9444",website:"https://www.google.com/maps/search/Texas+Inn+Alamo+TX",mapUrl:"https://www.google.com/maps/search/?api=1&query=714+N+Alamo+Road+Alamo+TX+78516",image:Dwt},{name:"La Quinta by Wyndham",address:"909 E. Frontage Road, Alamo, TX 78516",phone:"(956) 783-6955",website:"https://www.wyndhamhotels.com/laquinta/alamo-texas/la-quinta-alamo-mcallen-east/overview",mapUrl:"https://www.google.com/maps/search/?api=1&query=909+E+Frontage+Road+Alamo+TX+78516",image:Lwt},{name:"La Copa Inn Alamo",address:"714 N. Tower Road, Alamo, TX 78516",phone:"(956) 787-6060",website:"https://www.lacopainn.com/alamo-motels",mapUrl:"https://www.google.com/maps/search/?api=1&query=714+N+Tower+Road+Alamo+TX+78516",image:jwt}],a={en:{title:"Where to Stay",subtitle:"Local Hotels in Alamo",description:"Find comfortable accommodations in Alamo, Texas. Our local hotels offer warm hospitality and convenient access to all the attractions the Rio Grande Valley has to offer.",visitWebsite:"Visit Website",viewMap:"View Map"},es:{title:"Dónde Hospedarse",subtitle:"Hoteles Locales en Alamo",description:"Encuentra alojamiento cómodo en Alamo, Texas. Nuestros hoteles locales ofrecen hospitalidad cálida y acceso conveniente a todas las atracciones que el Valle del RÃo Grande tiene para ofrecer.",visitWebsite:"Visitar Sitio Web",viewMap:"Ver Mapa"}}[e];return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx(po,{language:e,onLanguageToggle:r}),g.jsxs("section",{className:"relative pt-16 md:pt-24 h-[45vh] min-h-[300px] md:h-[60vh] md:min-h-[400px] flex items-end overflow-hidden",children:[g.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${Rwt})`}}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-3 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white mb-1 [text-shadow:_2px_2px_8px_rgb(0_0_0_/_8
37020%)]",children:a.title}),g.jsx("p",{className:"text-lg md:text-xl text-white [text-shadow:_1px_1px_6px_rgb(0_0_0_/_70%)]",children:a.subtitle})]})})})]}),g.jsx("main",{className:"flex-1 py-10 md:py-16 bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsxs("div",{className:"container mx-auto px-4",children:[g.jsx("div",{className:"max-w-3xl mx-auto text-center mb-8 md:mb-12",children:g.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:a.description})}),g.jsx("div",{className:"max-w-6xl mx-auto",children:g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map((s,o)=>g.jsxs(un,{className:"h-full hover:shadow-lg transition-shadow overflow-hidden",children:[g.jsx("div",{className:"h-32 bg-muted flex items-center justify-center p-4",children:g.jsx("img",{src:s.image,alt:s.name,className:"max-h-full max-w-full object-contain"})}),g.jsx(zi,{className:"pt-4",children:g.jsx(Ui,{className:"text-xl",children:s.name})}),g.jsxs(kn,{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(Yh,{className:"h-5 w-5 text-muted-foreground mt-0.5 flex-shrink-0"}),g.jsx(ho,{className:"text-base",children:s.address})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(c0,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"}),g.jsx("a",{href:`tel:${s.phone.replace(/[^\d]/g,"")}`,className:"text-base text-primary hover:underline",children:s.phone})]}),g.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[g.jsx(gr,{asChild:!0,variant:"default",size:"sm",children:g.jsxs("a",{href:s.website,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(Mz,{className:"h-4 w-4 mr-2"}),a.visitWebsite]})}),g.jsx(gr,{asChild:!0,variant:"outline",size:"sm",children:g.jsxs("a",{href:s.mapUrl,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(Yh,{className:"h-4 w-4 mr-2"}),a.viewMap]})})]})]})]},o))})})]})}),g.jsx(mo,{language:e})]})},Bse=[{border:"border-l-4 border-primary",cardBg:"bg-primary/5",iconBg:"bg-primary"},{border:"border-l-4 border-secondary",cardBg:"bg-secondary/10",iconBg:"bg-secondary"},{border:"border-l-4 border-accent",cardBg:"bg-accent/20",iconBg:"bg-accent"}],Fwt=()=>{const[e,t]=R.useState("en"),{data:r,isLoading:n}=r_({queryKey:["blog-articles"],queryFn:async()=>{const{data:o,error:l}=await nn.from("blog_articles").select("id, title, title_es, slug, excerpt, excerpt_es, featured_image, published_at, author").eq("is_published",!0).order("published_at",{ascending:!1});if(l)throw l;return o}}),i=()=>{t(e==="en"?"es":"en")},a=o=>e==="es"&&o.title_es?o.title_es:o.title,s=o=>e==="es"&&o.excerpt_es?o.excerpt_es:o.excerpt;return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx(po,{language:e,onLanguageToggle:i}),g.jsxs("section",{className:"relative h-[45vh] min-h-[300px] md:h-[60vh] md:min-h-[400px] bg-cover bg-center flex items-end",style:{backgroundImage:`url(${_0e})`},children:[g.jsx("div",{className:"absolute inset-0 bg-black/30"}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-4 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0) 80%)"},children:g.jsxs("div",{className:"container mx-auto text-center",children:[g.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-2",style:{textShadow:"2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5)"},children:e==="en"?"Alamo Blog":"Blog de Alamo"}),g.jsx("p",{className:"text-lg md:text-xl text-white/90 max-w-2xl mx-auto",style:{textShadow:"1px 1px 4px rgba(0,0,0,0.8)"},children:e==="en"?"Stay updated with the latest news, stories, and insights from Alamo, Texas":"Mantente al dÃa con las últimas noticias, historias e información de Alamo, Texas"})]})})})]}),g.jsx("section",{className:"py-10 md:py-16 flex-grow bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsx("div",{className:"container mx-auto px-4",children:n?g.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[...Array(6)].map((o,l)=>g.jsxs(un,{className:"overflow-hidden",children:[g.jsx(Gu,{className:"h-48 w-full"}),g.jsxs(kn,{className:"p-6",children:[g.jsx(Gu,{className:"h-6 w-3/4 mb-2"}),g.jsx(Gu,{className:"h-4 w-full mb-1"}),g.jsx(Gu,{className:"h-4 w-2/3"})]})]},l))}):r&&r.length>0?g.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:r.map((o,l)=>{const u=Bse[l%Bse.length];return g.jsx(Rs,{to:`/visit-alamo/blog/${o.slug}`,children:g.jsxs(un,{className:`overflow-hidden h-full hover:shadow-xl transition-all duration-300 group ${u.border} ${u.cardBg}`,children:[o.featured_image?g.jsx("div",{className:"h-48 overflow-hidden",children:g.jsx("img",{src:o.featured_image,alt:a(o),className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}):g.jsx("div",{className:"h-48 bg-gradient-to-br from-muted to-muted/50 flex items-center justify-center",children:g.jsx("div",{className:`w-16 h-16 rounded-full ${u.iconBg} flex items-center justify-center`,children:g.jsx(LK,{className:"h-8 w-8 text-white"})})}),g.jsxs(kn,{className:"p-6",children:[g.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2 group-hover:text-primary transition-colors line-clamp-2",children:a(o)}),s(o)&&g.jsx("p",{className:"text-muted-foreground text-sm mb-4 line-clamp-3",children:s(o)}),g.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(jg,{className:"h-4 w-4"}),o.published_at?Ii(new Date(o.published_at),"MMM d, yyyy"):"Draft"]}),g.jsxs("span",{className:"flex items-center gap-1 text-primary font-medium group-hover:gap-2 transition-all",children:[e==="en"?"Read more":"Leer más",g.jsx(t_,{className:"h-4 w-4"})]})]})]})]})},o.id)})}):g.jsxs("div",{className:"text-center py-10 md:py-16",children:[g.jsx("div",{className:"w-20 h-20 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-6",children:g.jsx(LK,{className:"h-10 w-10 text-primary"})}),g.jsx("p",{className:"text-xl text-muted-foreground mb-4",children:e==="en"?"No articles published yet. Check back soon!":"Aún no hay artÃculos publicados. ¡Vuelve pronto!"})]})})}),g.jsx(mo,{language:e})]})};function zse(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const s=r.slice(i,n).trim();
vendor: 4,445 bytes, line 3702
3702(s||!a)&&t.push(s),i=n+1,n=r.indexOf(",",i)}return t}function ZTe(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Bwt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zwt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Uwt={};function Use(e,t){return(Uwt.jsx?zwt:Bwt).test(e)}const Wwt=/[ \t\n\f\r]/g;function Vwt(e){return typeof e=="object"?e.type==="text"?Wse(e.value):!1:Wse(e)}function Wse(e){return e.replace(Wwt,"")===""}class oC{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}oC.prototype.normal={};oC.prototype.property={};oC.prototype.space=void 0;function JTe(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new oC(r,n,t)}function mA(e){return e.toLowerCase()}class hc{constructor(t,r){this.attribute=r,this.property=t}}hc.prototype.attribute="";hc.prototype.booleanish=!1;hc.prototype.boolean=!1;hc.prototype.commaOrSpaceSeparated=!1;hc.prototype.commaSeparated=!1;hc.prototype.defined=!1;hc.prototype.mustUseProperty=!1;hc.prototype.number=!1;hc.prototype.overloadedBoolean=!1;hc.prototype.property="";hc.prototype.spaceSeparated=!1;hc.prototype.space=void 0;let Hwt=0;const Rn=g_(),oo=g_(),uB=g_(),Qt=g_(),Oa=g_(),yb=g_(),Sc=g_();function g_(){return 2**++Hwt}const cB=Object.freeze(Object.defineProperty({__proto__:null,boolean:Rn,booleanish:oo,commaOrSpaceSeparated:Sc,commaSeparated:yb,number:Qt,overloadedBoolean:uB,spaceSeparated:Oa},Symbol.toStringTag,{value:"Module"})),Xj=Object.keys(cB);class SW extends hc{constructor(t,r,n,i){let a=-1;if(super(t,r),Vse(this,"space",i),typeof n=="number")for(;++a<Xj.length;){const s=Xj[a];Vse(this,Xj[a],(n&cB[s])===cB[s])}}}SW.prototype.defined=!0;function Vse(e,t,r){r&&(e[t]=r)}function Ax(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new SW(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[mA(n)]=n,r[mA(a.attribute)]=n}return new oC(t,r,e.space)}const eSe=Ax({properties:{ariaActiveDescendant:null,ariaAtomic:oo,ariaAutoComplete:null,ariaBusy:oo,ariaChecked:oo,ariaColCount:Qt,ariaColIndex:Qt,ariaColSpan:Qt,ariaControls:Oa,ariaCurrent:null,ariaDescribedBy:Oa,ariaDetails:null,ariaDisabled:oo,ariaDropEffect:Oa,ariaErrorMessage:null,ariaExpanded:oo,ariaFlowTo:Oa,ariaGrabbed:oo,ariaHasPopup:null,ariaHidden:oo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oa,ariaLevel:Qt,ariaLive:null,ariaModal:oo,ariaMultiLine:oo,ariaMultiSelectable:oo,ariaOrientation:null,ariaOwns:Oa,ariaPlaceholder:null,ariaPosInSet:Qt,ariaPressed:oo,ariaReadOnly:oo,ariaRelevant:null,ariaRequired:oo,ariaRoleDescription:Oa,ariaRowCount:Qt,ariaRowIndex:Qt,ariaRowSpan:Qt,ariaSelected:oo,ariaSetSize:Qt,ariaSort:null,ariaValueMax:Qt,ariaValueMin:Qt,ariaValueNow:Qt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function tSe(e,t){return t in e?e[t]:t}function rSe(e,t){return tSe(e,t.toLowerCase())}const Gwt=Ax({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yb,acceptCharset:Oa,accessKey:Oa,action:null,allow:null,allowFullScreen:Rn,allowPaymentRequest:Rn,allowUserMedia:Rn,alt:null,as:null,async:Rn,autoCapitalize:null,autoComplete:Oa,autoFocus:Rn,autoPlay:Rn,blocking:Oa,capture:null,charSet:null,checked:Rn,cite:null,className:Oa,cols:Qt,colSpan:null,content:null,contentEditable:oo,controls:Rn,controlsList:Oa,coords:Qt|yb,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Rn,defer:Rn,dir:null,dirName:null,disabled:Rn,download:uB,draggable:oo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Rn,formTarget:null,headers:Oa,height:Qt,hidden:uB,high:Qt,href:null,hrefLang:null,htmlFor:Oa,httpEquiv:Oa,id:null,imageSizes:null,imageSrcSet:null,inert:Rn,inputMode:null,integrity:null,is:null,isMap:Rn,itemId:null,itemProp:Oa,itemRef:Oa,itemScope:Rn,itemType:Oa,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Rn,low:Qt,manifest:null,max:null,maxLength:Qt,media:null,method:null,min:null,minLength:Qt,multiple:Rn,muted:Rn,name:null,nonce:null,noModule:Rn,noValidate:Rn,onAbort:null,onAfterPrint:null,onAuxCl
3702ick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Rn,optimum:Qt,pattern:null,ping:Oa,placeholder:null,playsInline:Rn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Rn,referrerPolicy:null,rel:Oa,required:Rn,reversed:Rn,rows:Qt,rowSpan:Qt,sandbox:Oa,scope:null,scoped:Rn,seamless:Rn,selected:Rn,shadowRootClonable:Rn,shadowRootDelegatesFocus:Rn,shadowRootMode:null,shape:null,size:Qt,sizes:null,slot:null,span:Qt,spellCheck:oo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Qt,step:null,style:null,tabIndex:Qt,target:null,title:null,translate:null,type:null,typeMustMatch:Rn,useMap:null,value:oo,width:Qt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oa,axis:null,background:null,bgColor:null,border:Qt,borderColor:null,bottomMargin:Qt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Rn,declare:Rn,event:null,face:null,frame:null,frameBorder:null,hSpace:Qt,leftMargin:Qt,link:null,longDesc:null,lowSrc:null,marginHeight:Qt,marginWidth:Qt,noResize:Rn,noHref:Rn,noShade:Rn,noWrap:Rn,object:null,profile:null,prompt:null,rev:null,rightMargin:Qt,rules:null,scheme:null,scrolling:oo,standby:null,summary:null,text:null,topMargin:Qt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Qt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Rn,disableRemotePlayback:Rn,prefix:null,property:null,results:Qt,security:null,unselectable:null},space:"html",transform:rSe}),qwt=Ax({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav
3702-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sc,accentHeight:Qt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Qt,amplitude:Qt,arabicForm:null,ascent:Qt,attributeName:null,attributeType:null,azimuth:Qt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Qt,by:null,calcMode:null,capHeight:Qt,className:Oa,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Qt,diffuseConstant:Qt,direction:null,display:null,dur:null,divisor:Qt,dominantBaseline:null,download:Rn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Qt,enableBackground:null,end:null,event:null,exponent:Qt,externalResourcesRequired:null,fill:null,fillOpacity:Qt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:yb,g2:yb,glyphName:yb,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Qt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Qt,horizOriginX:Qt,horizOriginY:Qt,
3702id:null,ideographic:Qt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Qt,k:Qt,k1:Qt,k2:Qt,k3:Qt,k4:Qt,kernelMatrix:Sc,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Qt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Qt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Qt,overlineThickness:Qt,paintOrder:null,panose1:null,path:null,pathLength:Qt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oa,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Qt,pointsAtY:Qt,pointsAtZ:Qt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sc,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sc,rev:Sc,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sc,requiredFeatures:Sc,requiredFonts:Sc,requiredFormats:Sc,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Qt,specularExponent:Qt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Qt,strikethroughThickness:Qt,string:null,stroke:null,strokeDashArray:Sc,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Qt,strokeOpacity:Qt,strokeWidth:null,style:null,surfaceScale:Qt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sc,tabIndex:Qt,tableValues:null,target:null,targetX:Qt,targetY:Qt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sc,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Qt,underlineThickness:Qt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Qt,values:null,vAlphabetic:Qt,vMathematical:Qt,vectorEffect:null,vHanging:Qt,vIdeographic:Qt,version:null,vertAdvY:Qt,vertOriginX:Qt,vertOriginY:Qt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Qt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tSe}),nSe=Ax({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 4,939 bytes, lines 3702-3703
3702,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),iSe=Ax({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rSe}),aSe=Ax({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Kwt={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ywt=/[A-Z]/g,Hse=/-[a-z]/g,Xwt=/^data[-\w.:]+$/i;function AI(e,t){const r=mA(t);let n=t,i=hc;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Xwt.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Hse,Zwt);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Hse.test(a)){let s=a.replace(Ywt,Qwt);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=SW}return new i(n,t)}function Qwt(e){return"-"+e.toLowerCase()}function Zwt(e){return e.charAt(1).toUpperCase()}const lC=JTe([eSe,Gwt,nSe,iSe,aSe],"html"),T0=JTe([eSe,qwt,nSe,iSe,aSe],"svg");function Gse(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function sSe(e){return e.join(" ").trim()}var AW={},qse=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Jwt=/\n/g,ext=/^\s*/,txt=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rxt=/^:\s*/,nxt=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ixt=/^[;\s]*/,axt=/^\s+|\s+$/g,sxt=` 3703`,Kse="/",Yse="*",Ay="",oxt="comment",lxt="declaration";function uxt(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(p){var m=p.match(Jwt);m&&(r+=m.length);var _=p.lastIndexOf(sxt);n=~_?p.length-_:n+p.length}function a(){var p={line:r,column:n};return function(m){return m.position=new s(p),u(),m}}function s(p){this.start=p,this.end={line:r,column:n},this.source=t.source}s.prototype.content=e;function o(p){var m=new Error(t.source+":"+r+":"+n+": "+p);if(m.reason=p,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var _=m[0];return i(_),e=e.slice(_.length),m}}function u(){l(ext)}function c(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=a();if(!(Kse!=e.charAt(0)||Yse!=e.charAt(1))){for(var m=2;Ay!=e.charAt(m)&&(Yse!=e.charAt(m)||Kse!=e.charAt(m+1));)++m;if(m+=2,Ay===e.charAt(m-1))return o("End of comment missing");var _=e.slice(2,m-2);return n+=2,i(_),e=e.slice(m),n+=2,p({type:oxt,comment:_})}}function f(){var p=a(),m=l(txt);if(m){if(d(),!l(rxt))return o("property missing ':'");var _=l(nxt),y=p({type:lxt,property:Xse(m[0].replace(qse,Ay)),value:_?Xse(_[0].replace(qse,Ay)):Ay});return l(ixt),y}}function h(){var p=[];c(p);for(var m;m=f();)m!==!1&&(p.push(m),c(p));return p}return u(),h()}function Xse(e){return e?e.replace(axt,Ay):Ay}var cxt=uxt,dxt=Wf&&Wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(AW,"__esModule",{value:!0});AW.default=hxt;const fxt=dxt(cxt);function hxt(e,t){let r=null;if(!e||typeof e!="string")return r;const n=(0,fxt.default)(e),i=typeof t=="function";return n.forEach(a=>{if(a.type!=="declaration")return;const{property:s,value:o}=a;i?t(s,o,a):o&&(r=r||{},r[s]=o)}),r}var CI={};Object.defineProperty(CI,"__esModule",{value:!0});CI.camelCase=void 0;var pxt=/^--[a-zA-Z0-9_-]+$/,mxt=/-([a-z])/g,gxt=/^[^-]+$/,yxt=/^-(webkit|moz|ms|o|khtml)-/,vxt=/^-(ms)-/,_xt=function(e){return!e||gxt.test(e)||pxt.test(e)},bxt=function(e,t){return t.toUpperCase()},Qse=function(e,t){return"".concat(t,"-")},wxt=function(e,t){return t===void 0&&(t={}),_xt(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(vxt,Qse):e=e.replace(yxt,Qse),e.replace(mxt,bxt))};CI.camelCase=wxt;var xxt=Wf&&Wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ext=xxt(AW),Txt=CI;function dB(e,t){var r={};return!e||typeof e!="string"||(0,Ext.default)(e,function(n,i){n&&i&&(r[(0,Txt.camelCase)(n,t)]=i)}),r}dB.default=dB;var Sxt=dB;const Axt=mi(Sxt),PI=oSe("end"),ap=oSe("start");function oSe(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Cxt(e){const t=ap(e),r=PI(e);if(t&&r)return{start:t,end:r}}function ET(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Zse(e.position):"start"in e||"end"in e?Zse(e):"line"in e||"column"in e?fB(e):""}function fB(e){return Jse(e&&e.line)+":"+Jse(e&&e.column)}function Zse(e){return fB(e&&e.start)+"-"+fB(e&&e.end)}function Jse(e){return e&&typeof e=="number"?e:1}
vendor: 1,928 bytes, line 3703
3703class Ql extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},s=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ET(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ql.prototype.file="";Ql.prototype.name="";Ql.prototype.reason="";Ql.prototype.message="";Ql.prototype.stack="";Ql.prototype.column=void 0;Ql.prototype.line=void 0;Ql.prototype.ancestors=void 0;Ql.prototype.cause=void 0;Ql.prototype.fatal=void 0;Ql.prototype.place=void 0;Ql.prototype.ruleId=void 0;Ql.prototype.source=void 0;const CW={}.hasOwnProperty,Pxt=new Map,Mxt=/[A-Z]/g,kxt=new Set(["table","tbody","thead","tfoot","tr"]),Oxt=new Set(["td","th"]),lSe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Nxt(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=Bxt(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,935 bytes, line 3703
3703if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=Fxt(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?T0:lC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=uSe(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function uSe(e,t,r){if(t.type==="element")return Ixt(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Dxt(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jxt(e,t,r);if(t.type==="mdxjsEsm")return Lxt(e,t);if(t.type==="root")return Rxt(e,t,r);if(t.type==="text")return $xt(e,t)}function Ixt(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=T0,e.schema=i),e.ancestors.push(t);const a=dSe(e,t.tagName,!1),s=zxt(e,t);let o=MW(e,t);return kxt.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!Vwt(l):!0})),cSe(e,s,a,t),PW(s,o),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function Dxt(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}gA(e,t.position)}function Lxt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gA(e,t.position)}function jxt(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=T0,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:dSe(e,t.name,!0),s=Uxt(e,t),o=MW(e,t);return cSe(e,s,a,t),PW(s,o),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function Rxt(e,t,r){const n={};return PW(n,MW(e,t)),e.create(t,e.Fragment,n,r)}function $xt(e,t){return t.value}function cSe(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function PW(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Fxt(e,t,r){return n;function n(i,a,s,o){const u=Array.isArray(s.children)?r:t;return o?u(a,s,o):u(a,s)}}function Bxt(e,t){return r;function r(n,i,a,s){const o=Array.isArray(a.children),l=ap(n);return t(i,a,s,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function zxt(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&CW.call(t.properties,i)){const a=Wxt(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Oxt.has(t.tagName)?n=o:r[s]=o}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function Uxt(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else gA(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const o=n.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else gA(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function MW(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:Pxt;for(;++n<t.children.length;){const a=t.children[n];let s;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const u=i.get(l)||0;s=l+"-"+u,i.set(l,u+1)}}const o=uSe(e,a,s);o!==void 0&&r.push(o)}return r}function Wxt(e,t,r){const n=AI(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?ZTe(r):sSe(r)),n.property==="style"){let i=typeof r=="object"?r:Vxt(e,String(r));return e.stylePropertyNameCase==="css"&&(i=Hxt(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?Kwt[n.property]||n.property:n.attribute,r]}}function Vxt(e,t){try{return Axt(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Ql("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=lSe+"#cannot-parse-style-attribute",i}}function dSe(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=Use(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}n=s}else n=Use(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return CW.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);gA(e)}function gA(e,t){const r=new Ql("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=lSe+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Hxt(e){const t={};let r;for(r in e)CW.call(e,r)&&(t[Gxt(r)]=e[r]);return t}function Gxt(e){let t=e.replace(Mxt,qxt);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function qxt(e){return"-"+e.toLowerCase()}const Qj={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Kxt={};function kW(e,t){const r=Kxt,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return fSe(e,n,i)}function fSe(e,t,r){if(Yxt(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return eoe(e.children,t,r)}return Array.isArray(e)?eoe(e,t,r):""}function eoe(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=fSe(e[i],t,r);return n.join("")}function Yxt(e){return!!(e&&typeof e=="object")}const toe=document.createElement("i");function OW(e){const t="&"+e+";";toe.innerHTML=t;const r=toe.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function ed(e,t,r,n){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);a<n.length;)s=n.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Rd(e,t){return e.length>0?(ed(e,e.length,0,t),e):t}const roe={}.hasOwnProperty;function hSe(e){const t={};let r=-1;for(;++r<e.length;)Xxt(t,e[r]);return t}function Xxt(e,t){let r;for(r in t){const i=(roe.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let s;
vendor: 10,368 bytes, line 3703
3703if(a)for(s in a){roe.call(i,s)||(i[s]=[]);const o=a[s];Qxt(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Qxt(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);ed(e,0,0,n)}function pSe(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Yf(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Eu=S0(/[A-Za-z]/),Kl=S0(/[\dA-Za-z]/),Zxt=S0(/[#-'*+\--9=?A-Z^-~]/);function xO(e){return e!==null&&(e<32||e===127)}const hB=S0(/\d/),Jxt=S0(/[\dA-Fa-f]/),e2t=S0(/[!-/:-@[-`{-~]/);function an(e){return e!==null&&e<-2}function Ea(e){return e!==null&&(e<0||e===32)}function ri(e){return e===-2||e===-1||e===32}const MI=S0(new RegExp("\\p{P}|\\p{S}","u")),Xv=S0(/\s/);function S0(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Cx(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let s="";if(a===37&&Kl(e.charCodeAt(r+1))&&Kl(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(r+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+i+1,s=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function wi(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return ri(l)?(e.enter(r),o(l)):t(l)}function o(l){return ri(l)&&a++<i?(e.consume(l),o):(e.exit(r),t(l))}}const t2t={tokenize:r2t};function r2t(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),wi(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return an(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const n2t={tokenize:i2t},noe={tokenize:a2t};function i2t(e){const t=this,r=[];let n=0,i,a,s;return o;function o(b){if(n<r.length){const w=r[n];return t.containerState=w[1],e.attempt(w[0].continuation,l,u)(b)}return u(b)}function l(b){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const w=t.events.length;let x=w,E;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){E=t.events[x][1].end;break}y(n);let T=w;for(;T<t.events.length;)t.events[T][1].end={...E},T++;return ed(t.events,x+1,0,t.events.slice(w)),t.events.length=T,u(b)}return o(b)}function u(b){if(n===r.length){if(!i)return f(b);if(i.currentConstruct&&i.currentConstruct.concrete)return p(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(noe,c,d)(b)}function c(b){return i&&v(),y(n),f(b)}function d(b){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,p(b)}function f(b){return t.containerState={},e.attempt(noe,h,p)(b)}function h(b){return n++,r.push([t.currentConstruct,t.containerState]),f(b)}function p(b){if(b===null){i&&v(),y(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),m(b)}function m(b){if(b===null){_(e.exit("chunkFlow"),!0),y(0),e.consume(b);return}return an(b)?(e.consume(b),_(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(b),m)}function _(b,w){const x=t.sliceStream(b);if(w&&x.push(null),b.previous=a,a&&(a.next=b),a=b,i.defineSkip(b.start),i.write(x),t.parser.lazy[b.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<s&&(!i.events[E][1].end||i.events[E][1].end.offset>s))return;const T=t.events.length;let S=T,A,C;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(A){C=t.events[S][1].end;break}A=!0}for(y(n),E=T;E<t.events.length;)t.events[E][1].end={...C},E++;ed(t.events,S+1,0,t.events.slice(T)),t.events.length=E}}function y(b){let w=r.length;for(;w-- >b;){const x=r[w];t.containerState=x[1],x[0].exit.call(t,e)}r.length=b}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function a2t(e,t,r){return wi(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Uw(e){if(e===null||Ea(e)||Xv(e))return 1;if(MI(e))return 2}function kI(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const pB={name:"attention",resolveAll:s2t,tokenize:o2t};function s2t(e,t){let r=-1,n,i,a,s,o,l,u,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[r][1].start};ioe(d,-l),ioe(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:f},a={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[n][1].end={...s.start},e[r][1].start={...o.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=Rd(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=Rd(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),u=Rd(u,kI(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=Rd(u,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,u=Rd(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,ed(e,n-1,r-n+3,u),r=n+u.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function o2t(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Uw(n);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===a)return e.consume(l),o;const u=e.exit("attentionSequence"),c=Uw(l),d=!c||c===2&&i||r.includes(l),f=!i||i===2&&c||r.includes(n);return u._open=!!(a===42?d:d&&(i||!f)),u._close=!!(a===42?f:f&&(c||!d)),t(l)}}function ioe(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const l2t={name:"autolink",tokenize:u2t};function u2t(e,t,r){let n=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Eu(h)?(e.consume(h),s):h===64?r(h):u(h)}function s(h){return h===43||h===45||h===46||Kl(h)?(n=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),n=0,l):(h===43||h===45||h===46||Kl(h))&&n++<32?(e.consume(h),o):(n=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||xO(h)?r(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):Zxt(h)?(e.consume(h),u):r(h)}function c(h){return Kl(h)?d(h):r(h)}function d(h){return h===46?(e.consume(h),n=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||Kl(h))&&n++<63){const p=h===45?f:d;return e.consume(h),p}return r(h)}}const uC={partial:!0,tokenize:c2t};function c2t(e,t,r){return n;function n(a){return ri(a)?wi(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||an(a)?t(a):r(a)}}const mSe={continuation:{tokenize:f2t},exit:h2t,name:"blockQuote",tokenize:d2t};function d2t(e,t,r){const n=this;return i;function i(s){if(s===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return r(s)}function a(s){return ri(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function f2t(e,t,r){const n=this;return i;function i(s){return ri(s)?wi(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(mSe,t,r)(s)}}function h2t(e){e.exit("blockQuote")}const gSe={name:"characterEscape",tokenize:p2t};function p2t(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return e2t(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const ySe={name:"characterReference",tokenize:m2t};function m2t(e,t,r){const n=this;let i=0,a,s;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,s=Kl,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Jxt,c):(e.enter("characterReferenceValue"),a=7,s=hB,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===Kl&&!OW(n.sliceSerialize(f))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),c):r(d)}}const aoe={partial:!0,tokenize:y2t},soe={concrete:!0,name:"codeFenced",tokenize:g2t};function g2t(e,t,r){const n=this,i={partial:!0,tokenize:x};let a=0,s=0,o;return l;function l(E){return u(E)}function u(E){const T=n.events[n.events.length-1];return a=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,o=E,e.enter("co
3703deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===o?(s++,e.consume(E),c):s<3?r(E):(e.exit("codeFencedFenceSequence"),ri(E)?wi(e,d,"whitespace")(E):d(E))}function d(E){return E===null||an(E)?(e.exit("codeFencedFence"),n.interrupt?t(E):e.check(aoe,m,w)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(E))}function f(E){return E===null||an(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):ri(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),wi(e,h,"whitespace")(E)):E===96&&E===o?r(E):(e.consume(E),f)}function h(E){return E===null||an(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||an(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===o?r(E):(e.consume(E),p)}function m(E){return e.attempt(i,w,_)(E)}function _(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),y}function y(E){return a>0&&ri(E)?wi(e,v,"linePrefix",a+1)(E):v(E)}function v(E){return E===null||an(E)?e.check(aoe,m,w)(E):(e.enter("codeFlowValue"),b(E))}function b(E){return E===null||an(E)?(e.exit("codeFlowValue"),v(E)):(e.consume(E),b)}function w(E){return e.exit("codeFenced"),t(E)}function x(E,T,S){let A=0;return C;function C(V){return E.enter("lineEnding"),E.consume(V),E.exit("lineEnding"),k}function k(V){return E.enter("codeFencedFence"),ri(V)?wi(E,M,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):M(V)}function M(V){return V===o?(E.enter("codeFencedFenceSequence"),D(V)):S(V)}function D(V){return V===o?(A++,E.consume(V),D):A>=s?(E.exit("codeFencedFenceSequence"),ri(V)?wi(E,$,"whitespace")(V):$(V)):S(V)}function $(V){return V===null||an(V)?(E.exit("codeFencedFence"),T(V)):S(V)}}}function y2t(e,t,r){const n=this;return i;function i(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}const Zj={name:"codeIndented",tokenize:_2t},v2t={partial:!0,tokenize:b2t};function _2t(e,t,r){const n=this;return i;function i(u){return e.enter("codeIndented"),wi(e,a,"linePrefix",5)(u)}function a(u){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):r(u)}function s(u){return u===null?l(u):an(u)?e.attempt(v2t,s,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||an(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function b2t(e,t,r){const n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):an(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):wi(e,a,"linePrefix",5)(s)}function a(s){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):an(s)?i(s):r(s)}}const w2t={name:"codeText",previous:E2t,resolve:x2t,tokenize:T2t};function x2t(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function E2t(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function T2t(e,t,r){let n=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),n++,o):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?r(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(a=e.enter("codeTextSequence"),i=0,c(d)):an(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||an(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",u(
vendor: 13,504 bytes, line 3703
3703d))}}class S2t{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&J2(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),J2(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),J2(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);J2(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);J2(this.left,r.reverse())}}}function J2(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function vSe(e){const t={};let r=-1,n,i,a,s,o,l,u;const c=new S2t(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,A2t(c,r)),r=t[r],u=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(s=c.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},o=c.slice(i,r),o.unshift(n),c.splice(i,r-i+1,o))}}return ed(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function A2t(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,l=[],u={};let c,d,f=-1,h=r,p=0,m=0;const _=[m];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(c=n.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=r;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(m=f+1,_.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):_.pop(),f=_.length;f--;){const y=o.slice(_[f],_[f+1]),v=a.pop();l.push([v,v+y.length-1]),e.splice(v,2,y)}for(l.reverse(),f=-1;++f<l.length;)u[p+l[f][0]]=p+l[f][1],p+=l[f][1]-l[f][0]-1;return u}const C2t={resolve:M2t,tokenize:k2t},P2t={partial:!0,tokenize:O2t};function M2t(e){return vSe(e),e}function k2t(e,t){let r;return n;function n(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):an(o)?e.check(P2t,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function O2t(e,t,r){const n=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),wi(e,a,"linePrefix")}function a(s){if(s===null||an(s))return r(s);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function _Se(e,t,r,n,i,a,s,o,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(y),e.exit(a),f):y===null||y===32||y===41||xO(y)?r(y):(e.enter(n),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(o),f(y)):y===null||y===60||an(y)?r(y):(e.consume(y),y===92?p:h)}function p(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function m(y){return!c&&(y===null||y===41||Ea(y))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(n),t(y)):c<u&&y===40?(e.consume(y),c++,m):y===41?(e.consume(y),c--,m):y===null||y===32||y===40||xO(y)?r(y):(e.consume(y),y===92?_:m)}function _(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function bSe(e,t,r,n,i,a){const s=this;let o=0,l;return u;function u(h){return e.enter(n),e.enter(i),e.consume(h),e.exit(i),e.enter(a),c}function c(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?r(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(n),t):an(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||an(h)||o++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!ri(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}}function wSe(e,t,r,n,i,a){let s;return o;function o(f){return f===34||f===39||f===40?(e.enter(n),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,l):r(f)}function l(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):(e.enter(a),u(f))}function u(f){return f===s?(e.exit(a),l(s)):f===null?r(f):an(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),wi(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||an(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function TT(e,t){let r;return n;function n(i){return an(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):ri(i)?wi(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const N2t={name:"definition",tokenize:D2t},I2t={partial:!0,tokenize:L2t};function D2t(e,t,r){const n=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return bSe.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Yf(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):r(h)}function l(h){return Ea(h)?TT(e,u)(h):u(h)}function u(h){return _Se(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(I2t,d,d)(h)}function d(h){return ri(h)?wi(e,f,"whitespace")(h):f(h)}function f(h){return h===null||an(h)?(e.exit("definition"),n.parser.defined.push(i),t(h)):r(h)}}function L2t(e,t,r){return n;function n(o){return Ea(o)?TT(e,i)(o):r(o)}function i(o){return wSe(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return ri(o)?wi(e,s,"whitespace")(o):s(o)}function s(o){return o===null||an(o)?t(o):r(o)}}const j2t={name:"hardBreakEscape",tokenize:R2t};function R2t(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return an(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const $2t={name:"headingAtx",resolve:F2t,tokenize:B2t};function F2t(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},ed(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function B2t(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&n++<6?(e.consume(c),s):c===null||Ea(c)?(e.exit("atxHeadingSequence"),o(c)):r(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||an(c)?(e.exit("atxHeading"),t(c)):ri(c)?wi(e,o,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),o(c))}function u(c){return c===null||c===35||Ea(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),u)}}const z2t=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ooe=["pre","script","style","textarea"],U2t={concrete:!0,name:"htmlFlow",resolveTo:H2t,tokenize:G2t},W2t={partial:!0,tokenize:K2t},V2t={partial:!0,tokenize:q2t};function H2t(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function G2t(e,t,r){const n=this;let i,a,s,o,l;return u;function u(N){return c(N)}function c(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),a=!0,m):N===63?(e.consume(N),i=3,n.interrupt?t:L):Eu(N)?(e.consume(N),s=String.fromCharCode(N),_):r(N)}function f(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,o=0,p):Eu(N)?(e.consume(N),i=4,n.interrupt?t:L):r(N)}function h(N){return N===45?(e.consume(N),n.interrupt?t:L):r(N)}function p(N){const X="CDATA[";return N===X.charCodeAt(o++)?(e.consume(N),o===X.length?n.interrupt?t:M:p):r(N)}function m(N){return Eu(N)?(e.consume(N),s=String.fromCharCode(N),_):r(N)}function _(N){if(N===null||N===47||N===62||Ea(N)){const X=N===47,ie=s.toLowerCase();return!X&&!a&&ooe.includes(ie)?(i=1,n.interrupt?t(N):M(N)):z2t.includes(s.toLowerCase())?(i=6,X?(e.consume(N),y):n.interrupt?t(N):M(N)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(N):a?v(N):b(N))}return N===45||Kl(N)?(e.consume(N),s+=String.fromCharCode(N),_):r(N)}function y(N){return N===62?(e.consume(N),n.interrupt?t:M):r(N)}function v(N){return ri(N)?(e.consume(N),v):C(N)}function b(N){return N===47?(e.consume(N),C):N===58||N===95||Eu(N)?(e.consume(N),w):ri(N)?(e.consume(N),b):C(N)}function w(N){return N===45||N===46||N===58||N===95||Kl(N)?(e.consume(N),w):x(N)}function x(N){return N===61?(e.consume(N),E):ri(N)?(e.consume(N),x):b(N)}function E(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(e.consume(N),l=N,T):ri(N)?(e.consume(N),E):S(N)}function T(N){return N===l?(e.consume(N),l=null,A):N===null||an(N)?r(N):(e.consume(N),T)}function S(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ea(N)?x(N):(e.consume(N),S)}function A(N){return N===47||N===62||ri(N)?b(N):r(N)}function C(N){return N===62?(e.consume(N),k):r(N)}function k(N){return N===null||an(N)?M(N):ri(N)?(e.consume(N),k):r(N)}function M(N){return N===45&&i===2?(e.consume(N),U):N===60&&i===1?(e.consume(N),B):N===62&&i===4?(e.consume(N),K):N===63&&i===3?(e.consume(N),L):N===93&&i===5?(e.consume(N),q):an(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(W2t,O,D)(N)):N===null||an(N)?(e.exit("htmlFlowData"),D(N)):(e.consume(N),M)}function D(N){return e.check(V2t,$,O)(N)}function $(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),V}function V(N){return N===null||an(N)?D(N):(e.enter("htmlFlowData"),M(N))}function U(N){return N===45?(e.consume(N),L):M(N)}function B(N){return N===47?(e.consume(N),s="",z):M(N)}function z(N){if(N===62){const X=s.toLowerCase();return ooe.includes(X)?(e.consume(N),K):M(N)}return Eu(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),z):M(N)}function q(N){return N===93?(e.consume(N),L):M(N)}function L(N){return N===62?(e.consume(N),K):N===45&&i===2?(e.consume(N),L):M(N)}function K(N){return N===null||an(N)?(e.exit("htmlFlowData"),O(N)):(e.consume(N),K)}function O(N){return e.exit("htmlFlow"),t(N)}}function q2t(e,t,r){const n=this;return i;function i(s){return an(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):r(s)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function K2t(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(uC,t,r)}}
vendor: 8,098 bytes, line 3703
3703const Y2t={name:"htmlText",tokenize:X2t};function X2t(e,t,r){const n=this;let i,a,s;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),x):L===63?(e.consume(L),b):Eu(L)?(e.consume(L),S):r(L)}function u(L){return L===45?(e.consume(L),c):L===91?(e.consume(L),a=0,p):Eu(L)?(e.consume(L),v):r(L)}function c(L){return L===45?(e.consume(L),h):r(L)}function d(L){return L===null?r(L):L===45?(e.consume(L),f):an(L)?(s=d,B(L)):(e.consume(L),d)}function f(L){return L===45?(e.consume(L),h):d(L)}function h(L){return L===62?U(L):L===45?f(L):d(L)}function p(L){const K="CDATA[";return L===K.charCodeAt(a++)?(e.consume(L),a===K.length?m:p):r(L)}function m(L){return L===null?r(L):L===93?(e.consume(L),_):an(L)?(s=m,B(L)):(e.consume(L),m)}function _(L){return L===93?(e.consume(L),y):m(L)}function y(L){return L===62?U(L):L===93?(e.consume(L),y):m(L)}function v(L){return L===null||L===62?U(L):an(L)?(s=v,B(L)):(e.consume(L),v)}function b(L){return L===null?r(L):L===63?(e.consume(L),w):an(L)?(s=b,B(L)):(e.consume(L),b)}function w(L){return L===62?U(L):b(L)}function x(L){return Eu(L)?(e.consume(L),E):r(L)}function E(L){return L===45||Kl(L)?(e.consume(L),E):T(L)}function T(L){return an(L)?(s=T,B(L)):ri(L)?(e.consume(L),T):U(L)}function S(L){return L===45||Kl(L)?(e.consume(L),S):L===47||L===62||Ea(L)?A(L):r(L)}function A(L){return L===47?(e.consume(L),U):L===58||L===95||Eu(L)?(e.consume(L),C):an(L)?(s=A,B(L)):ri(L)?(e.consume(L),A):U(L)}function C(L){return L===45||L===46||L===58||L===95||Kl(L)?(e.consume(L),C):k(L)}function k(L){return L===61?(e.consume(L),M):an(L)?(s=k,B(L)):ri(L)?(e.consume(L),k):A(L)}function M(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),i=L,D):an(L)?(s=M,B(L)):ri(L)?(e.consume(L),M):(e.consume(L),$)}function D(L){return L===i?(e.consume(L),i=void 0,V):L===null?r(L):an(L)?(s=D,B(L)):(e.consume(L),D)}function $(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===47||L===62||Ea(L)?A(L):(e.consume(L),$)}function V(L){return L===47||L===62||Ea(L)?A(L):r(L)}function U(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):r(L)}function B(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),z}function z(L){return ri(L)?wi(e,q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):q(L)}function q(L){return e.enter("htmlTextData"),s(L)}}const NW={name:"labelEnd",resolveAll:eEt,resolveTo:tEt,tokenize:rEt},Q2t={tokenize:nEt},Z2t={tokenize:iEt},J2t={tokenize:aEt};function eEt(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&ed(e,0,e.length,r),e}function tEt(e,t){let r=e.length,n=0,i,a,s,o;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=Rd(o,e.slice(a+1,a+n+3)),o=Rd(o,[["enter",c,t]]),o=Rd(o,kI(t.parser.constructs.insideSpan.null,e.slice(a+n+4,s-3),t)),o=Rd(o,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),o=Rd(o,e.slice(s+1)),o=Rd(o,[["exit",l,t]]),ed(e,a,e.length,o),e}function rEt(e,t,r){const n=this;let i=n.events.length,a,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return o;function o(f){return a?a._inactive?d(f):(s=n.parser.defined.includes(Yf(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(Q2t,c,s?c:d)(f):f===91?e.attempt(Z2t,c,s?u:d)(f):s?c(f):d(f)}function u(f){return e.attempt(J2t,c,d)(f)}function c(f){return t(f)}function d(f){return a._balanced=!0,r(f)}}function nEt(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Ea(d)?TT(e,a)(d):a(d)}function a(d){return d===41?c(d):_Se(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Ea(d)?TT(e,l)(d):c(d)}function o(d){return r(d)}function l(d){return d===34||d===39||d===40?wSe(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Ea(d)?TT(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function iEt(e,t,r){const n=this;return i;function i(o){return bSe.call(n,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return n.parser.defined.includes(Yf(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function s(o){return r(o)}}function aEt(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const sEt={name:"labelStartImage",resolveAll:NW.resolveAll,tokenize:oEt};function oEt(e,t,r){const n=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):r(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const lEt={name:"labelStartLink",resolveAll:NW.resolveAll,tokenize:uEt};function uEt(e,t,r){const n=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const Jj={name:"lineEnding",tokenize:cEt};function cEt(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),wi(e,t,"linePrefix")}}const Rk={name:"thematicBreak",tokenize:dEt};function dEt(e,t,r){let n=0,i;return a;function a(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||an(u))?(e.exit("thematicBreak"),t(u)):r(u)}function l(u){return u===i?(e.consume(u),n++,l):(e.exit("thematicBreakSequence"),ri(u)?wi(e,o,"whitespace")(u):o(u))}}const Bu={continuation:{tokenize:mEt},exit:yEt,name:"list",tokenize:pEt},fEt={partial:!0,tokenize:vEt},hEt={partial:!0,tokenize:gEt};function pEt(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const p=n.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||h===n.containerState.marker:hB(h)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Rk,r,u)(h):u(h);if(!n.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return r(h)}function l(h){return hB(h)&&++s<10?(e.consume(h),l):(!n.interrupt||s<2)&&(n.containerState.marker?h===n.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):r(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||h,e.check(uC,n.interrupt?r:c,e.attempt(fEt,f,d))}
vendor: 5,423 bytes, line 3703
3703function c(h){return n.containerState.initialBlankLine=!0,a++,f(h)}function d(h){return ri(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):r(h)}function f(h){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function mEt(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(uC,i,a);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,wi(e,t,"listItemIndent",n.containerState.size+1)(o)}function a(o){return n.containerState.furtherBlankLines||!ri(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(hEt,t,s)(o))}function s(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,wi(e,e.attempt(Bu,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function gEt(e,t,r){const n=this;return wi(e,i,"listItemIndent",n.containerState.size+1);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(a):r(a)}}function yEt(e){e.exit(this.containerState.type)}function vEt(e,t,r){const n=this;return wi(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=n.events[n.events.length-1];return!ri(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const loe={name:"setextUnderline",resolveTo:_Et,tokenize:bEt};function _Et(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=s,e.push(["exit",s,t]),e}function bEt(e,t,r){const n=this;let i;return a;function a(u){let c=n.events.length,d;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){d=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):r(u)}function s(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),ri(u)?wi(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||an(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const wEt={tokenize:xEt};function xEt(e){const t=this,r=e.attempt(uC,n,e.attempt(this.parser.constructs.flowInitial,i,wi(e,e.attempt(this.parser.constructs.flow,i,e.attempt(C2t,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const EEt={resolveAll:ESe()},TEt=xSe("string"),SEt=xSe("text");function xSe(e){return{resolveAll:ESe(e==="text"?AEt:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,s,o);return s;function s(c){return u(c)?a(c):o(c)}function o(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return u(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(n,n.previous))return!0}return!1}}}function ESe(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function AEt(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,s=-1,o=0,l;for(;a--;){const u=i[a];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(u===-2)l=!0,o++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const u={type:r===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:n.start._bufferIndex+s,_index:n.start._index+a,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}const CEt={42:Bu,43:Bu,45:Bu,48:Bu,49:Bu,50:Bu,51:Bu,52:Bu,53:Bu,54:Bu,55:Bu,56:Bu,57:Bu,62:mSe},PEt={91:N2t},MEt={[-2]:Zj,[-1]:Zj,32:Zj},kEt={35:$2t,42:Rk,45:[loe,Rk],60:U2t,61:loe,95:Rk,96:soe,126:soe},OEt={38:ySe,92:gSe},NEt={[-5]:Jj,[-4]:Jj,[-3]:Jj,33:sEt,38:ySe,42:pB,60:[l2t,Y2t],91:lEt,92:[j2t,gSe],93:NW,95:pB,96:w2t},IEt={null:[pB,EEt]},DEt={null:[42,95]},LEt={null:[]},jEt=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:DEt,contentInitial:PEt,disable:LEt,document:CEt,flow:kEt,flowInitial:MEt,insideSpan:IEt,string:OEt,text:NEt},Symbol.toStringTag,{value:"Module"}));function REt(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,c
vendor: 14,847 bytes, lines 3703-3705
3703olumn:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let s=[],o=[];const l={attempt:T(x),check:T(E),consume:v,enter:b,exit:w,interrupt:T(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function d(k){return s=Rd(s,k),_(),s[s.length-1]!==null?[]:(S(t,0),u.events=kI(a,u.events,u),u.events)}function f(k,M){return FEt(h(k),M)}function h(k){return $Et(s,k)}function p(){const{_bufferIndex:k,_index:M,line:D,column:$,offset:V}=n;return{_bufferIndex:k,_index:M,line:D,column:$,offset:V}}function m(k){i[k.line]=k.column,C()}function _(){let k;for(;n._index<s.length;){const M=s[n._index];if(typeof M=="string")for(k=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===k&&n._bufferIndex<M.length;)y(M.charCodeAt(n._bufferIndex));else y(M)}}function y(k){c=c(k)}function v(k){an(k)?(n.line++,n.column=1,n.offset+=k===-3?2:1,C()):k!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=k}function b(k,M){const D=M||{};return D.type=k,D.start=p(),u.events.push(["enter",D,u]),o.push(D),D}function w(k){const M=o.pop();return M.end=p(),u.events.push(["exit",M,u]),M}function x(k,M){S(k,M.from)}function E(k,M){M.restore()}function T(k,M){return D;function D($,V,U){let B,z,q,L;return Array.isArray($)?O($):"tokenize"in $?O([$]):K($);function K(ee){return le;function le(Te){const be=Te!==null&&ee[Te],we=Te!==null&&ee.null,ae=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(we)?we:we?[we]:[]];return O(ae)(Te)}}function O(ee){return B=ee,z=0,ee.length===0?U:N(ee[z])}function N(ee){return le;function le(Te){return L=A(),q=ee,ee.partial||(u.currentConstruct=ee),ee.name&&u.parser.constructs.disable.null.includes(ee.name)?ie():ee.tokenize.call(M?Object.assign(Object.create(u),M):u,l,X,ie)(Te)}}function X(ee){return k(q,L),V}function ie(ee){return L.restore(),++z<B.length?N(B[z]):U}}}function S(k,M){k.resolveAll&&!a.includes(k)&&a.push(k),k.resolve&&ed(u.events,M,u.events.length-M,k.resolve(u.events.slice(M),u)),k.resolveTo&&(u.events=k.resolveTo(u.events,u))}function A(){const k=p(),M=u.previous,D=u.currentConstruct,$=u.events.length,V=Array.from(o);return{from:$,restore:U};function U(){n=k,u.previous=M,u.currentConstruct=D,u.events.length=$,o=V,C()}}function C(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function $Et(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(r===i)s=[e[r].slice(n,a)];else{if(s=e.slice(r,i),n>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(n):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function FEt(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=` 3704`;break}case-3:{s=`\r 3705`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,n.push(s)}return n.join("")}function BEt(e){const n={constructs:hSe([jEt,...(e||{}).extensions||[]]),content:i(t2t),defined:[],document:i(n2t),flow:i(wEt),lazy:{},string:i(TEt),text:i(SEt)};return n;function i(a){return s;function s(o){return REt(n,a,o)}}}function zEt(e){for(;!vSe(e););return e}const uoe=/[\0\t\n\r]/g;function UEt(){let e=1,t="",r=!0,n;return i;function i(a,s,o){const l=[];let u,c,d,f,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(uoe.lastIndex=d,u=uoe.exec(a),f=u&&u.index!==void 0?u.index:a.length,h=a.charCodeAt(f),!u){t=a.slice(d);break}if(h===10&&d===f&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),d<f&&(l.push(a.slice(d,f)),e+=f-d),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}d=f+1}return o&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const WEt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VEt(e){return e.replace(WEt,HEt)}function HEt(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return pSe(r.slice(a?2:1),a?16:10)}return OW(r)||e}const TSe={}.hasOwnProperty;function GEt(e,t,r){return typeof t!="string"&&(r=t,t=void 0),qEt(r)(zEt(BEt(r).document().write(UEt()(e,t,!0))))}function qEt(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ke),autolinkProtocol:A,autolinkEmail:A,atxHeading:a(ne),blockQuote:a(we),characterEscape:A,characterReference:A,codeFenced:a(ae),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ae,s),codeText:a(H,s),codeTextData:A,data:A,codeFlowValue:A,definition:a(fe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Se),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(me,s),htmlFlowData:A,htmlText:a(me,s),htmlTextData:A,image:a(Ue),label:s,link:a(ke),listItem:a(ve),listItemValue:f,listOrdered:a(ce,d),listUnordered:a(ce),paragraph:a(Re),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(ne),strong:a(De),thematicBreak:a(Ge)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:be,autolinkProtocol:Te,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:ee,characterReference:le,codeFenced:l(_),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:l(y),codeText:l(V),codeTextData:C,data:C,definition:l(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(D),htmlFlowData:C,htmlText:l($),htmlTextData:C,image:l(B),label:q,labelText:z,lineEnding:k,link:l(U),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:X,resourceDestinationString:L,resourceTitleString:K,resource:O,setextHeading:l(S),setextHeadingLineSequence:T,setextHeadingText:E,strong:l(),thematicBreak:l()}};SSe(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(Ie){let He={type:"root",children:[]};const Ke={stack:[He],tokenStack:[],config:t,enter:o,exit:u,buffer:s,resume:c,data:r},Xe=[];let mt=-1;for(;++mt<Ie.length;)if(Ie[mt][1].type==="listOrdered"||Ie[mt][1].type==="listUnordered")if(Ie[mt][0]==="enter")Xe.push(mt);else{const gt=Xe.pop();mt=i(Ie,gt,mt)}for(mt=-1;++mt<Ie.length;){const gt=t[Ie[mt][0]];TSe.call(gt,Ie[mt][1].type)&>[Ie[mt][1].type].call(Object.assign({sliceSerialize:Ie[mt][2].sliceSerialize},Ke),Ie[mt][1])}if(Ke.tokenStack.length>0){const gt=Ke.tokenStack[Ke.tokenStack.length-1];(gt[1]||coe).call(Ke,void 0,gt[0])}for(He.position={start:Bm(Ie.length>0?Ie[0][1].start:{line:1,column:1,offset:0}),end:Bm(Ie.length>0?Ie[Ie.length-2][1].end:{line:1,column:1,offset:0})},mt=-1;++mt<t.transforms.length;)He=t.transforms[mt](He)||He;return He}function i(Ie,He,Ke){let Xe=He-1,mt=-1,gt=!1,$t,kt,Zt,fr;for(;++Xe<=Ke;){const yr=Ie[Xe];switch(yr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{yr[0]==="enter"?mt++:mt--,fr=void 0;break}case"lineEndingBlank":{yr[0]==="enter"&&($t&&!fr&&!mt&&!Zt&&(Zt=Xe),fr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fr=void 0}if(!mt&&yr[0]==="enter"&&yr[1].type==="listItemPrefix"||mt===-1&&yr[0]==="exit"&&(yr[1].type==="listUnordered"||yr[1].type==="listOrdered")){if($t){let Kt=Xe;for(kt=void 0;Kt--;){const pr=Ie[Kt];if(pr[1].type==="lineEnding"||pr[1].type==="lineEndingBlank"){if(pr[0]==="exit")continue;kt&&(Ie[kt][1].type="lineEndingBlank",gt=!0),pr[1].type="lineEnding",kt=Kt}else if(!(pr[1].type==="linePrefix"||pr[1].type==="blockQuotePrefix"||pr[1].type==="blockQuotePrefixWhitespace"||pr[1].type==="blockQuoteMarker"||pr[1].type==="listItemIndent"))break}Zt&&(!kt||Zt<kt)&&($t._spread=!0),$t.end=Object.assign({},kt?Ie[kt][1].start:yr[1].end),Ie.splice(kt||Xe,0,["exit",$t,yr[2]]),Xe++,Ke++}if(yr[1].type==="listItemPrefix"){const Kt={type:"listItem",_spread:!1,start:Object.assign({},yr[1].start),end:void 0};$t=Kt,Ie.splice(Xe,0,["enter",Kt,yr[2]]),Xe++,Ke++,Zt=void 0,fr=!0}}}return Ie[He][1]._spread=gt,Ke}function a(Ie,He){return Ke;function Ke(Xe){o.call(this,Ie(Xe),Xe),He&&He.call(this,Xe)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(Ie,He,Ke){this.stack[this.stack.length-1].children.push(Ie),this.stack.push(Ie),this.tokenStack.push([He,Ke||void 0]),Ie.position={start:Bm(He.start),end:void 0}}function l(Ie){return He;function He(Ke){Ie&&Ie.call(this,Ke),u.call(this,Ke)}}function u(Ie,He){const Ke=this.stack.pop(),Xe=this.tokenStack.pop();if(Xe)Xe[0].type!==Ie.type&&(He?He.call(this,Ie,Xe[0]):(Xe[1]||coe).call(this,Ie,Xe[0]));else throw new Error("Cannot close `"+Ie.type+"` ("+ET({start:Ie.start,end:Ie.end})+"): itâs not open");Ke.position.end=Bm(Ie.end)}function c(){return kW(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(Ie){if(this.data.expectingFirstListItemValue){const He=this.stack[this.stack.length-2];He.start=Number.parseInt(this.sliceSerialize(Ie),10),this.data.expectingFirstListItemValue=void 0}}function h(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.lang=Ie}function p(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.meta=Ie}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.value=Ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.value=Ie.replace(/(\r?\n|\r)$/g,"")}function v(Ie){const He=this.resume(),Ke=this.stack[this.stack.length-1];Ke.label=He,Ke.identifier=Yf(this.sliceSerialize(Ie)).toLowerCase()}function b(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.title=Ie}function w(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.url=Ie}function x(Ie){const He=this.stack[this.stack.length-1];if(!He.depth){const Ke=this.sliceSerialize(Ie).length;He.depth=Ke}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(Ie){const He=this.stack[this.stack.length-1];He.depth=this.sliceSerialize(Ie).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function A(Ie){const Ke=this.stack[this.stack.length-1].children;let Xe=Ke[Ke.length-1];(!Xe||Xe.type!=="text")&&(Xe=tt(),Xe.position={start:Bm(Ie.start),end:void 0},Ke.push(Xe)),this.stack.push(Xe)}function C(Ie){const He=this.stack.pop();He.value+=this.sliceSerialize(Ie),He.position.end=Bm(Ie.end)}function k(Ie){const He=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ke=He.children[He.children.length-1];Ke.position.end=Bm(Ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(He.type)&&(A.call(this,Ie),C.call(this,Ie))}function M(){this.data.atHardBreak=!0}function D(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.value=Ie}function $(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.value=Ie}function V(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.value=Ie}function U(){const Ie=this.stack[this.stack.length-1];if(this.data.inReference){const He=this.data.referenceType||"shortcut";Ie.type+="Reference",Ie.referenceType=He,delete Ie.url,delete Ie.title}else delete Ie.identifier,delete Ie.label;this.data.referenceType=void 0}function B(){const Ie=this.stack[this.stack.length-1];if(this.data.inReference){const He=this.data.referenceType||"shortcut";Ie.type+="Reference",Ie.referenceType=He,delete Ie.url,delete Ie.title}else delete Ie.identifier,delete Ie.label;this.data.referenceType=void 0}function z(Ie){const He=this.sliceSerialize(Ie),Ke=this.stack[this.stack.length-2];Ke.label=VEt(He),Ke.identifier=Yf(He).toLowerCase()}function q(){const Ie=this.stack[this.stack.length-1],He=this.resume(),Ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ke.type==="link"){const Xe=Ie.children;Ke.children=Xe}else Ke.alt=He}function L(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.url=Ie}function K(){const Ie=this.resume(),He=this.stack[this.stack.length-1];He.title=Ie}function O(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function X(Ie){const He=this.resume(),Ke=this.stack[this.stack.length-1];Ke.label=He,Ke.identifier=Yf(this.sliceSerialize(Ie)).toLowerCase(),this.data.referenceType="full"}function ie(Ie){this.data.characterReferenceType=Ie.type}function ee(Ie){const He=this.sliceSerialize(Ie),Ke=this.data.characterReferenceType;let Xe;Ke?(Xe=pSe(He,Ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Xe=OW(He);const mt=this.stack[this.stack.length-1];mt.value+=Xe}function le(Ie){const He=this.stack.pop();He.position.end=Bm(Ie.end)}function Te(Ie){C.call(this,Ie);const He=this.stack[this.stack.length-1];He.url=this.sliceSerialize(Ie)}function be(Ie){C.call(this,Ie);const He=this.stack[this.stack.length-1];He.url="mailto:"+this.sliceSerialize(Ie)}function we(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function H(){return{type:"inlineCode",value:""}}function fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Se(){return{type:"emphasis",children:[]}}function ne(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function me(){return{type:"html",value:""}}function Ue(){return{type:"image",title:null,url:"",alt:null}}function ke(){return{type:"link",title:null,url:"",children:[]}}function ce(Ie){return{type:"list",ordered:Ie.type==="listOrdered",start:null,spread:Ie._spread,children:[]}}function ve(Ie){return{type:"listItem",spread:Ie._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function Ge(){return{type:"thematicBreak"}}}function Bm(e){return{line:e.line,column:e.column,offset:e.offset}}function SSe(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?SSe(e,n):KEt(e,n)}}function KEt(e,t){let r;for(r in t)if(TSe.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function coe(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ET({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ET({start:t.start,end:t.end}
vendor: 10,704 bytes, lines 3705-3709
3705)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ET({start:t.start,end:t.end})+") is still open")}function YEt(e){const t=this;t.parser=r;function r(n){return GEt(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function XEt(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function QEt(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:` 3706`}]}function ZEt(e,t){const r=t.value?t.value+` 3707`:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function JEt(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eTt(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tTt(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=Cx(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let s,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function rTt(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nTt(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function ASe(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=n:i.push({type:"text",value:n}),i}function iTt(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return ASe(e,t);const i={src:Cx(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function aTt(e,t){const r={src:Cx(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function sTt(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function oTt(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return ASe(e,t);const i={href:Cx(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function lTt(e,t){const r={href:Cx(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uTt(e,t,r){const n=e.all(t),i=r?cTt(r):CSe(t),a={},s=[];if(typeof t.checked=="boolean"){const c=n[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const c=n[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:` 3708`}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:` 3709`});const u={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,u),e.applyData(t,u)}function cTt(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=CSe(r[n])}return t}function CSe(e){const t=e.spread;return t??e.children.length>1}function dTt(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const s=n[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function fTt(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function hTt(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function pTt(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mTt(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),i.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=ap(t.children[1]),l=PI(t.children[t.children.length-1]);o&&l&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function gTt(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,o=s?s.length:t.children.length;let l=-1;const u=[];for(;++l<o;){const d=t.children[l],f={},h=s?s[l]:void 0;h&&(f.align=h);let p={type:"element",tagName:a,properties:f,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),u.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function yTt(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const doe=9,foe=32;function vTt(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(hoe(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(hoe(t.slice(i),i>0,!1)),a.join("")}function hoe(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===doe||a===foe;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===doe||a===foe;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function _Tt(e,t){const r={type:"text",value:vTt(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function bTt(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const wTt={blockquote:XEt,break:QEt,code:ZEt,delete:JEt,emphasis:eTt,footnoteReference:tTt,heading:rTt,html:nTt,imageReference:iTt,image:aTt,inlineCode:sTt,linkReference:oTt,link:lTt,listItem:uTt,list:dTt,paragraph:fTt,root:hTt,strong:pTt,table:mTt,tableCell:yTt,tableRow:gTt,text:_Tt,thematicBreak:bTt,toml:zM,yaml:zM,definition:zM,footnoteDefinition:zM};function zM(){}const PSe=-1,OI=0,ST=1,EO=2,IW=3,DW=4,LW=5,jW=6,MSe=7,kSe=8,poe=typeof self=="object"?self:globalThis,xTt=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case OI:case PSe:return r(s,i);case ST:{const o=r([],i);for(const l of s)o.push(n(l));return o}case EO:{const o=r({},i);for(const[l,u]of s)o[n(l)]=n(u);return o}case IW:return r(new Date(s),i);case DW:{const{source:o,flags:l}=s;return r(new RegExp(o,l),i)}case LW:{const o=r(new Map,i);for(const[l,u]of s)o.set(n(l),n(u));return o}case jW:{const o=r(new Set,i);for(const l of s)o.add(n(l));return o}case MSe:{const{name:o,message:l}=s;return r(new poe[o](l),i)}case kSe:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return r(new DataView(o),s)}}return r(new poe[a](s),i)};return n},moe=e=>xTt(new Map,e)(0),l1="",{toString:ETt}={},{keys:TTt}=Object,eE=e=>{const t=typeof e;if(t!=="object"||!e)return[OI,t];const r=ETt.call(e).slice(8,-1);switch(r){case"Array":return[ST,l1];case"Object":return[EO,l1];case"Date":return[IW,l1];case"RegExp":return[DW,l1];case"Map":return[LW,l1];case"Set":return[jW,l1];case"DataView":return[ST,r]}return r.includes("Array")?[ST,r]:r.includes("Error")?[MSe,r]:[EO,r]},UM=([e,t])=>e===OI&&(t==="function"||t==="symbol"),STt=(e,t,r,n)=>{const i=(s,o)=>{const l=n.push(s)-1;return r.set(o,l),l},a=s=>{if(r.has(s))return r.get(s);let[o,l]=eE(s);switch(o){case OI:{let c=s;switch(l){case"bigint":o=kSe,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([PSe],s)}return i([o,c],s)}case ST:{if(l){let f=s;return l==="DataView"?f=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(s)),i([l,[...f]],s)}const c=[],d=i([o,c],s);for(const f of s)c.push(a(f));return d}case EO:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const c=[],d=i([o,c],s);for(const f of TTt(s))(e||!UM(eE(s[f])))&&c.push([a(f),a(s[f])]);return d}case IW:return i([o,s.toISOString()],s);case DW:{const{source:c,flags:d}=s;return i([o,{source:c,flags:d}],s)}case LW:{const c=[],d=i([o,c],s);for(const[f,h]of s)(e||!(UM(eE(f))||UM(eE(h))))&&c.push([a(f),a(h)]);return d}case jW:{const c=[],d=i([o,c],s);for(const f of s)(e||!UM(eE(f)))&&c.push(a(f));return d}}const{message:u}=s;return i([o,{name:l,message:u}],s)};return a},goe=(e,{json:t,lossy:r}={})=>{const n=[];return STt(!(t||r),!!t,new Map,n)(e),n},Ww=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?moe(goe(e,t)):structuredClone(e):(e,t)=>moe(goe(e,t));function ATt(e,t){const r=[{type:"text",value:"â©"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function CTt(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}
vendor: 22,884 bytes, lines 3709-3715
3709function PTt(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||ATt,n=e.options.footnoteBackLabel||CTt,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),f=Cx(d.toLowerCase());let h=0;const p=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++h<=m;){p.length>0&&p.push({type:"text",value:" "});let v=typeof r=="string"?r:r(l,h);typeof v=="string"&&(v={type:"text",value:v}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const _=c[c.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const v=_.children[_.children.length-1];v&&v.type==="text"?v.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...p)}else c.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(c,!0)};e.patch(u,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ww(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` 3710`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:` 3711`}]}}const NI=function(e){if(e==null)return NTt;if(typeof e=="function")return II(e);if(typeof e=="object")return Array.isArray(e)?MTt(e):kTt(e);if(typeof e=="string")return OTt(e);throw new Error("Expected function, string, or object as test")};function MTt(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=NI(e[r]);return II(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function kTt(e){const t=e;return II(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function OTt(e){return II(t);function t(r){return r&&r.type===e}}function II(e){return t;function t(r,n,i){return!!(ITt(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function NTt(){return!0}function ITt(e){return e!==null&&typeof e=="object"&&"type"in e}const OSe=[],DTt=!0,mB=!1,LTt="skip";function NSe(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=NI(i),s=n?-1:1;o(e,void 0,[])();function o(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=OSe,p,m,_;if((!t||a(l,u,c[c.length-1]||void 0))&&(h=jTt(r(l,c)),h[0]===mB))return h;if("children"in l&&l.children){const y=l;if(y.children&&h[0]!==LTt)for(m=(n?y.children.length:-1)+s,_=c.concat(y);m>-1&&m<y.children.length;){const v=y.children[m];if(p=o(v,m,_)(),p[0]===mB)return p;m=typeof p[1]=="number"?p[1]:m+s}}return h}}}function jTt(e){return Array.isArray(e)?e:typeof e=="number"?[DTt,e]:e==null?OSe:[e]}function DI(e,t,r,n){let i,a,s;typeof t=="function"&&typeof r!="function"?(a=void 0,s=t,i=r):(a=t,s=r,i=n),NSe(e,a,o,i);function o(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return s(l,d,c)}}const gB={}.hasOwnProperty,RTt={};function $Tt(e,t){const r=t||RTt,n=new Map,i=new Map,a=new Map,s={...wTt,...r.handlers},o={all:u,applyData:BTt,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:l,options:r,patch:FTt,wrap:UTt};return DI(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?n:i,f=String(c.identifier).toUpperCase();d.has(f)||d.set(f,c)}}),o;function l(c,d){const f=c.type,h=o.handlers[f];if(gB.call(o.handlers,f)&&h)return h(o,c,d);if(o.options.passThrough&&o.options.passThrough.includes(f)){if("children"in c){const{children:m,..._}=c,y=Ww(_);return y.children=o.all(c),y}return Ww(c)}return(o.options.unknownHandler||zTt)(o,c,d)}function u(c){const d=[];if("children"in c){const f=c.children;let h=-1;for(;++h<f.length;){const p=o.one(f[h],c);if(p){if(h&&f[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=yoe(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=yoe(m.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function FTt(e,t){e.position&&(t.position=Cxt(e))}function BTt(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const s="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:s}}r.type==="element"&&a&&Object.assign(r.properties,Ww(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function zTt(e,t){const r=t.data||{},n="value"in t&&!(gB.call(r,"hProperties")||gB.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UTt(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:` 3712`});++n<e.length;)n&&r.push({type:"text",value:` 3713`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:` 3714`}),r}function yoe(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function voe(e,t){const r=$Tt(e,t),n=r.one(e,void 0),i=PTt(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` 3715`},i),a}function WTt(e,t){return e&&"run"in e?async function(r,n){const i=voe(r,{file:n,...t});await e.run(i,n)}:function(r,n){return voe(r,{file:n,...e||t})}}function _oe(e){if(e)throw e}var $k=Object.prototype.hasOwnProperty,ISe=Object.prototype.toString,boe=Object.defineProperty,woe=Object.getOwnPropertyDescriptor,xoe=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ISe.call(t)==="[object Array]"},Eoe=function(t){if(!t||ISe.call(t)!=="[object Object]")return!1;var r=$k.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&$k.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||$k.call(t,i)},Toe=function(t,r){boe&&r.name==="__proto__"?boe(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Soe=function(t,r){if(r==="__proto__")if($k.call(t,r)){if(woe)return woe(t,r).value}else return;return t[r]},VTt=function e(){var t,r,n,i,a,s,o=arguments[0],l=1,u=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<u;++l)if(t=arguments[l],t!=null)for(r in t)n=Soe(o,r),i=Soe(t,r),o!==i&&(c&&i&&(Eoe(i)||(a=xoe(i)))?(a?(a=!1,s=n&&xoe(n)?n:[]):s=n&&Eoe(n)?n:{},Toe(o,{name:r,newValue:e(c,s,i)})):typeof i<"u"&&Toe(o,{name:r,newValue:i}));return o};const eR=mi(VTt);function yB(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)}function HTt(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(l,...u){const c=e[++a];let d=-1;if(l){s(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?GTt(c,o)(...u):s(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function GTt(e,t){let r;return n;function n(...s){const o=e.length>s.length;let l;o&&s.push(i);try{l=e.apply(this,s)}catch(u){const c=u;if(o&&r)throw c;return i(c)}o||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){r||(r=!0,t(s,...o))}function a(s){i(null,s)}}const bh={basename:qTt,dirname:KTt,extname:YTt,join:XTt,sep:"/"};function qTt(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cC(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(n=i):(o=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function KTt(e){if(cC(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function YTt(e){cC(e);let t=e.length,r=-1,n=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function XTt(...e){let t=-1,r;for(;++t<e.length;)cC(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":QTt(r)}function QTt(e){cC(e);const t=e.codePointAt(0)===47;let r=ZTt(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function ZTt(e,t){let r="",n=0,i=-1,a=0,s=-1,o,l;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}}else if(r.length>0){r="",n=0,i=s,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),n=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return r}function cC(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JTt={cwd:eSt};function eSt(){return"/"}function vB(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tSt(e){if(typeof e=="string")e=new URL(e);else if(!vB(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return rSt(e)}function rSt(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const tR=["history","path","basename","stem","extname","dirname"];class DSe{constructor(t){let r;t?vB(t)?r={path:t}:typeof t=="string"||nSt(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":JTt.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<tR.length;){const a=tR[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)tR.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?bh.basename(this.path):void 0}set basename(t){nR(t,"basename"),rR(t,"basename"),this.path=bh.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bh.dirname(this.path):void 0}set dirname(t){Aoe(this.basename,"dirname"),this.path=bh.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bh.extname(this.path):void 0}set extname(t){if(rR(t,"extname"),Aoe(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=bh.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vB(t)&&(t=tSt(t)),nR(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bh.basename(this.path,this.extname):void 0}set stem(t){nR(t,"stem"),rR(t,"stem"),this.path=bh.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new Ql(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function rR(e,t){if(e&&e.includes(bh.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bh.sep+"`")}function nR(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Aoe(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nSt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iSt=function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a},aSt={}.hasOwnProperty;class RW extends iSt{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=HTt()}copy(){const t=new RW;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(eR(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(sR("data",this.frozen),this.namespace[t]=r,this):aSt.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sR("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=WM(t),n=this.parser||this.Parser;return iR("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),iR("process",this.parser||this.Parser),aR("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,s){const o=WM(t),l=n.parse(o);n.run(l,o,function(c,d,f){if(c||!d||!f)return u(c);const h=d,p=n.stringify(h,f);lSt(p)?f.value=p:f.result=p,u(c,f)});function u(c,d){c||!d?s(c):a?a(d):r(void 0,d)}}}processSync(t){let r=!1,n;return this.freeze(),iR("processSync",this.parser||this.Parser),aR("processSync",this.compiler||this.Compiler),this.process(t,i),Poe("processSync","process",r),n;function i(a,s){r=!0,_oe(a),n=s}}run(t,r,n){Coe(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(s,o){const l=WM(r);i.run(t,l,u);function u(c,d,f){const h=d||t;c?o(c):s?s(h):n(void 0,h,f)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Poe("runSync","run",n),i;function a(s,o){_oe(s),i=o,n=!0}}stringify(t,r){this.freeze();const n=WM(r),i=this.compiler||this.Compiler;return aR("stringify",i),Coe(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(sR("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(i.settings=eR(!0,i.settings,u.settings))}function o(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];a(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,f=-1;for(;++d<n.length;)if(n[d][0]===u){f=d;break}if(f===-1)n.push([u,...c]);else if(c.length>0){let[h,...p]=c;const m=n[f][1];yB(m)&&yB(h)&&(h=eR(!0,m,h)),n[f]=[u,h,...p]}}}}const sSt=new RW().freeze();function iR(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function aR(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sR(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Coe(e){if(!yB(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Poe(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function WM(e){return oSt(e)?e:new DSe(e)}function oSt(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lSt(e){return typeof e=="string"||uSt(e)}function uSt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cSt="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Moe=[],koe={allowDangerousHtml:!0},dSt=/^(https?|ircs?|mailto|xmpp)$/i,fSt=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function hSt(e){const t=pSt(e),r=mSt(e);return gSt(t.runSync(t.parse(r),r),e)}function pSt(e){const t=e.rehypePlugins||Moe,r=e.remarkPlugins||Moe,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...koe}:koe;return sSt().use(YEt).use(r).use(WTt,n).use(t)}function mSt(e){const t=e.children||"",r=new DSe;return typeof t=="string"&&(r.value=t),r}function gSt(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||ySt;for(const c of fSt)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+cSt+c.id,void 0);return DI(e,u),Nxt(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function u(c,d,f){if(c.type==="raw"&&f&&typeof d=="number")return s?f.children.splice(d,1):f.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in Qj)if(Object.hasOwn(Qj,h)&&Object.hasOwn(c.properties,h)){const p=c.properties[h],m=Qj[h];(m===null||m.includes(c.tagName))&&(c.properties[h]=l(String(p||""),h,c))}}if(c.type==="element"){let h=r?!r.includes(c.tagName):a?a.includes(c.tagName):!1;if(!h&&n&&typeof d=="number"&&(h=!n(c,d,f)),h&&f&&typeof d=="number")return o&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d}}}function ySt(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||r!==-1&&t>r||n!==-1&&t>n||dSt.test(e.slice(0,t))?e:""}function Ooe(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function vSt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _St(e,t,r){const i=NI((r||{}).ignore||[]),a=bSt(t);let s=-1;for(;++s<a.length;)NSe(e,"text",o);function o(u,c){let d=-1,f;for(;++d<c.length;){const h=c[d],p=f?f.children:void 0;if(i(h,p?p.indexOf(h):void 0,f))return;f=h}if(f)return l(u,c)}function l(u,c){const d=c[c.length-1],f=a[s][0],h=a[s][1];let p=0;const _=d.children.indexOf(u);let y=!1,v=[];f.lastIndex=0;let b=f.exec(u.value);for(;b;){const w=b.index,x={index:b.index,input:b.input,stack:[...c,u]};let E=h(...b,x);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?f.lastIndex=w+1:(p!==w&&v.push({type:"text",value:u.value.slice(p,w)}),Array.isArray(E)?v.push(...E):E&&v.push(E),p=w+b[0].length,y=!0),!f.global)break;b=f.exec(u.value)}return y?(p<u.value.length&&v.push({type:"text",value:u.value.slice(p)}),d.children.splice(_,1,...v)):v=[u],_+v.length}}function bSt(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([wSt(i[0]),xSt(i[1])])}return t}function wSt(e){return typeof e=="string"?new RegExp(vSt(e),"g"):e}function xSt(e){return typeof e=="function"?e:function(){return e}}const oR="phrasing",lR=["autolink","link","image","label"];function ESt(){return{transforms:[kSt],enter:{literalAutolink:SSt,literalAutolinkEmail:uR,literalAutolinkHttp:uR,literalAutolinkWww:uR},exit:{literalAutolink:MSt,literalAutolinkEmail:PSt,literalAutolinkHttp:ASt,literalAutolinkWww:CSt}}}function TSt(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:oR,notInConstruct:lR},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:oR,notInConstruct:lR},{character:":",before:"[ps]",after:"\\/",inConstruct:oR,notInConstruct:lR}]}}function SSt(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function uR(e){this.config.enter.autolinkProtocol.call(this,e)}function ASt(e){this.config.exit.autolinkProtocol.call(this,e)}function CSt(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function PSt(e){this.config.exit.autolinkEmail.call(this,e)}function MSt(e){this.exit(e)}function kSt(e){_St(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OSt],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S}
3715)([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),NSt]],{ignore:["link","linkReference"]})}function OSt(e,t,r,n,i){let a="";if(!LSe(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!ISt(r)))return!1;const s=DSt(r+n);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function NSt(e,t,r,n){return!LSe(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function ISt(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function DSt(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Ooe(e,"(");let a=Ooe(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function LSe(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Xv(r)||MI(r))&&(!t||r!==47)}jSe.peek=WSt;function LSt(){this.buffer()}function jSt(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function RSt(){this.buffer()}function $St(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function FSt(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Yf(this.sliceSerialize(e)).toLowerCase(),r.label=t}function BSt(e){this.exit(e)}function zSt(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Yf(this.sliceSerialize(e)).toLowerCase(),r.label=t}function USt(e){this.exit(e)}function WSt(){return"["}function jSe(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const s=r.enter("footnoteReference"),o=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function VSt(){return{enter:{gfmFootnoteCallString:LSt,gfmFootnoteCall:jSt,gfmFootnoteDefinitionLabelString:RSt,gfmFootnoteDefinition:$St},exit:{gfmFootnoteCallString:FSt,gfmFootnoteCall:BSt,gfmFootnoteDefinitionLabelString:zSt,gfmFootnoteDefinition:USt}}}function HSt(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:jSe},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,s){const o=a.createTracker(s);let l=o.move("[^");const u=a.enter("footnoteDefinition"),c=a.enter("label");return l+=o.move(a.safe(a.associationId(n),{before:l,after:"]"})),c(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((t?` 3716`:" ")+a.indentLines(a.containerFlow(n,o.current()),t?RSe:GSt))),u(),l}}function GSt(e,t,r){return t===0?e:RSe(e,t,r)}function RSe(e,t,r){return(r?"":" ")+e}const qSt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$Se.peek=ZSt;function KSt(){return{canContainEols:["delete"],enter:{strikethrough:XSt},exit:{strikethrough:QSt}}}function YSt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:qSt}],handlers:{delete:$Se}}}function XSt(e){this.enter({type:"delete",children:[]},e)}function QSt(e){this.exit(e)}function $Se(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let s=i.move("~~");return s+=r.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function ZSt(){return"~"}function JSt(e){return e.length}function eAt(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||JSt,a=[],s=[],o=[],l=[];let u=0,c=-1;for(;++c<e.length;){const m=[],_=[];let y=-1;for(e[c].length>u&&(u=e[c].length);++y<e[c].length;){const v=tAt(e[c][y]);if(r.alignDelimiters!==!1){const b=i(v);_[y]=b,(l[y]===void 0||b>l[y])&&(l[y]=b)}m.push(v)}s[c]=m,o[c]=_}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<u;)a[d]=Noe(n[d]);else{const m=Noe(n);for(;++d<u;)a[d]=m}d=-1;const f=[],h=[];for(;++d<u;){const m=a[d];let _="",y="";m===99?(_=":",y=":"):m===108?_=":":m===114&&(y=":");let v=r.alignDelimiters===!1?1:Math.max(1,l[d]-_.length-y.length);const b=_+"-".repeat(v)+y;r.alignDelimiters!==!1&&(v=_.length+v+y.length,v>
vendor: 7,301 bytes, lines 3716-3728
3716l[d]&&(l[d]=v),h[d]=v),f[d]=b}s.splice(1,0,f),o.splice(1,0,h),c=-1;const p=[];for(;++c<s.length;){const m=s[c],_=o[c];d=-1;const y=[];for(;++d<u;){const v=m[d]||"";let b="",w="";if(r.alignDelimiters!==!1){const x=l[d]-(_[d]||0),E=a[d];E===114?b=" ".repeat(x):E===99?x%2?(b=" ".repeat(x/2+.5),w=" ".repeat(x/2-.5)):(b=" ".repeat(x/2),w=b):w=" ".repeat(x)}r.delimiterStart!==!1&&!d&&y.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&v==="")&&(r.delimiterStart!==!1||d)&&y.push(" "),r.alignDelimiters!==!1&&y.push(b),y.push(v),r.alignDelimiters!==!1&&y.push(w),r.padding!==!1&&y.push(" "),(r.delimiterEnd!==!1||d!==u-1)&&y.push("|")}p.push(r.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(` 3717`)}function tAt(e){return e==null?"":String(e)}function Noe(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Ioe={}.hasOwnProperty;function FSe(e,t){const r=t||{};function n(i,...a){let s=n.invalid;const o=n.handlers;if(i&&Ioe.call(i,e)){const l=String(i[e]);s=Ioe.call(o,l)?o[l]:n.unknown}if(s)return s.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}function rAt(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const s=r.indentLines(r.containerFlow(e,a.current()),nAt);return i(),s}function nAt(e,t,r){return">"+(r?"":" ")+e}function iAt(e,t){return Doe(e,t.inConstruct,!0)&&!Doe(e,t.notInConstruct,!1)}function Doe(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Loe(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===` 3718`&&iAt(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\ 3719`}function aAt(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>s&&(s=a):a=1,i=n+t.length,n=r.indexOf(t,i);return s}function sAt(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function oAt(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function lAt(e,t,r,n){const i=oAt(r),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(sAt(e,r)){const d=r.enter("codeIndented"),f=r.indentLines(a,uAt);return d(),f}const o=r.createTracker(n),l=i.repeat(Math.max(aAt(a,i)+1,3)),u=r.enter("codeFenced");let c=o.move(l);if(e.lang){const d=r.enter(`codeFencedLang${s}`);c+=o.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=r.enter(`codeFencedMeta${s}`);c+=o.move(" "),c+=o.move(r.safe(e.meta,{before:c,after:` 3720`,encode:["`"],...o.current()})),d()}return c+=o.move(` 3721`),a&&(c+=o.move(a+` 3722`)),c+=o.move(l),u(),c}function uAt(e,t,r){return(r?"":" ")+e}function $W(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cAt(e,t,r,n){const i=$W(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let u=l.move("[");return u+=l.move(r.safe(r.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":` 3723`,...l.current()}))),o(),e.title&&(o=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),s(),u}function dAt(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function yA(e){return"&#x"+e.toString(16).toUpperCase()+";"}function TO(e,t,r){const n=Uw(e),i=Uw(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}BSe.peek=fAt;function BSe(e,t,r,n){const i=dAt(r),a=r.enter("emphasis"),s=r.createTracker(n),o=s.move(i);let l=s.move(r.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=l.charCodeAt(0),c=TO(n.before.charCodeAt(n.before.length-1),u,i);c.inside&&(l=yA(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=TO(n.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+yA(d));const h=s.move(i);return a(),r.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},o+l+h}function fAt(e,t,r){return r.options.emphasis||"*"}function hAt(e,t){let r=!1;return DI(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,mB}),!!((!e.depth||e.depth<3)&&kW(e)&&(t.options.setext||r))}function pAt(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(hAt(e,r)){const c=r.enter("headingSetext"),d=r.enter("phrasing"),f=r.containerPhrasing(e,{...a.current(),before:` 3724`,after:` 3725`});return d(),c(),f+` 3726`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(` 3727`))+1))}const s="#".repeat(i),o=r.enter("headingAtx"),l=r.enter("phrasing");a.move(s+" ");let u=r.containerPhrasing(e,{before:"# ",after:` 3728`,...a.current()});return/^[\t ]/.test(u)&&(u=yA(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,r.options.closeAtx&&(u+=" "+s),l(),o(),u}zSe.peek=mAt;function zSe(e){return e.value||""}function mAt(){return"<"}USe.peek=gAt;function USe(e,t,r,n){const i=$W(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let u=l.move("![");return u+=l.move(r.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),s(),u}function gAt(){return"!"}WSe.peek=yAt;function WSe(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const u=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),s();const c=r.stack;r.stack=[],s=r.enter("reference");const d=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return s(),r.stack=c,a(),i==="full"||!u||u!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function yAt(){return"!"}VSe.peek=vAt;function VSe(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const s=r.unsafe[a],o=r.compilePattern(s);let l;if(s.atBreak)for(;l=o.exec(n);){let u=l.index;
vendor: 5,495 bytes, line 3728
3728n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(l.index+1)}}return i+n+i}function vAt(){return"`"}function HSe(e,t){const r=kW(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}GSe.peek=_At;function GSe(e,t,r,n){const i=$W(r),a=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let o,l;if(HSe(e,r)){const c=r.stack;r.stack=[],o=r.enter("autolink");let d=s.move("<");return d+=s.move(r.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),o(),r.stack=c,d}o=r.enter("link"),l=r.enter("label");let u=s.move("[");return u+=s.move(r.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(r.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=r.enter("destinationRaw"),u+=s.move(r.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=r.enter(`title${a}`),u+=s.move(" "+i),u+=s.move(r.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),o(),u}function _At(e,t,r){return HSe(e,r)?"<":"["}qSe.peek=bAt;function qSe(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const u=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),s();const c=r.stack;r.stack=[],s=r.enter("reference");const d=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return s(),r.stack=c,a(),i==="full"||!u||u!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function bAt(){return"["}function FW(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wAt(e){const t=FW(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function xAt(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function KSe(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function EAt(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let s=e.ordered?xAt(r):FW(r);const o=e.ordered?s==="."?")":".":wAt(r);let l=t&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),KSe(r)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=o),r.bulletCurrent=s;const u=r.containerFlow(e,n);return r.bulletLastUsed=s,r.bulletCurrent=a,i(),u}function TAt(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function SAt(e,t,r,n){const i=TAt(r);let a=r.bulletCurrent||FW(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=r.createTracker(n);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,o.current()),c);return l(),u;function c(d,f,h){return f?(h?"":" ".repeat(s))+d:(h?a:a+" ".repeat(s-a.length))+d}}function AAt(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),s=r.containerPhrasing(e,n);return a(),i(),s}const CAt=NI(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function PAt(e,t,r,n){return(e.children.some(function(s){return CAt(s)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function MAt(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}YSe.peek=kAt;function YSe(e,t,r,n){const i=MAt(r),a=r.enter("strong"),s=r.createTracker(n),o=s.move(i+i);let l=s.move(r.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=l.charCodeAt(0),c=TO(n.before.charCodeAt(n.before.length-1),u,i);c.inside&&(l=yA(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=TO(n.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+yA(d));const h=s.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},o+l+h}function kAt(e,t,r){return r.options.strong||"*"}
vendor: 5,336 bytes, lines 3728-3730
3728function OAt(e,t,r,n){return r.safe(e.value,n)}function NAt(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function IAt(e,t,r){const n=(KSe(r)+(r.options.ruleSpaces?" ":"")).repeat(NAt(r));return r.options.ruleSpaces?n.slice(0,-1):n}const XSe={blockquote:rAt,break:Loe,code:lAt,definition:cAt,emphasis:BSe,hardBreak:Loe,heading:pAt,html:zSe,image:USe,imageReference:WSe,inlineCode:VSe,link:GSe,linkReference:qSe,list:EAt,listItem:SAt,paragraph:AAt,root:PAt,strong:YSe,text:OAt,thematicBreak:IAt};function DAt(){return{enter:{table:LAt,tableData:joe,tableHeader:joe,tableRow:RAt},exit:{codeText:$At,table:jAt,tableData:cR,tableHeader:cR,tableRow:cR}}}function LAt(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function jAt(e){this.exit(e),this.data.inTable=void 0}function RAt(e){this.enter({type:"tableRow",children:[]},e)}function cR(e){this.exit(e)}function joe(e){this.enter({type:"tableCell",children:[]},e)}function $At(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,FAt));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function FAt(e,t){return t==="|"?t:e}function BAt(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` 3729`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:l,tableRow:o}};function s(h,p,m,_){return u(c(h,m,_),h.align)}function o(h,p,m,_){const y=d(h,m,_),v=u([y]);return v.slice(0,v.indexOf(` 3730`))}function l(h,p,m,_){const y=m.enter("tableCell"),v=m.enter("phrasing"),b=m.containerPhrasing(h,{..._,before:a,after:a});return v(),y(),b}function u(h,p){return eAt(h,{align:p,alignDelimiters:n,padding:r,stringLength:i})}function c(h,p,m){const _=h.children;let y=-1;const v=[],b=p.enter("table");for(;++y<_.length;)v[y]=d(_[y],p,m);return b(),v}function d(h,p,m){const _=h.children;let y=-1;const v=[],b=p.enter("tableRow");for(;++y<_.length;)v[y]=l(_[y],h,p,m);return b(),v}function f(h,p,m){let _=XSe.inlineCode(h,p,m);return m.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function zAt(){return{exit:{taskListCheckValueChecked:Roe,taskListCheckValueUnchecked:Roe,paragraph:WAt}}}function UAt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VAt}}}function Roe(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function WAt(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function VAt(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);a&&o.move(s);let l=XSe.listItem(e,t,r,{...n,...o.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+s}}function HAt(){return[ESt(),VSt(),KSt(),DAt(),zAt()]}function GAt(e){return{extensions:[TSt(),HSt(e),YSt(),BAt(e),UAt()]}}const qAt={tokenize:JAt,partial:!0},QSe={tokenize:eCt,partial:!0},ZSe={tokenize:tCt,partial:!0},JSe={tokenize:rCt,partial:!0},KAt={tokenize:nCt,partial:!0},eAe={name:"wwwAutolink",tokenize:QAt,previous:rAe},tAe={name:"protocolAutolink",tokenize:ZAt,previous:nAe},vm={name:"emailAutolink",tokenize:XAt,previous:iAe},sp={};function YAt(){return{text:sp}}let ly=48;for(;ly<123;)sp[ly]=vm,ly++,ly===58?ly=65:ly===91&&(ly=97);sp[43]=vm;sp[45]=vm;sp[46]=vm;sp[95]=vm;sp[72]=[vm,tAe];sp[104]=[vm,tAe];sp[87]=[vm,eAe];sp[119]=[vm,eAe];function XAt(e,t,r){const n=this;let i,a;return s;function s(d){return!_B(d)||!iAe.call(n,n.previous)||BW(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return _B(d)?(e.consume(d),o):d===64?(e.consume(d),l):r(d)}function l(d){return d===46?e.check(KAt,c,u)(d):d===45||d===95||Kl(d)?(a=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),i=!0,l}function c(d){return a&&i&&Eu(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function QAt(e,t,r){const n=this;return i;function i(s){return s!==87&&s!==119||!rAe.call(n,n.previous)||BW(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(qAt,e.attempt(QSe,e.attempt(ZSe,a),r),r)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function ZAt(e,t,r){const n=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&nAe.call(n,n.previous)&&!BW(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):r(d)}
vendor: 5,658 bytes, line 3730
3730function o(d){if(Eu(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return r(d)}function l(d){return d===47?(e.consume(d),a?u:(a=!0,l)):r(d)}function u(d){return d===null||xO(d)||Ea(d)||Xv(d)||MI(d)?r(d):e.attempt(QSe,e.attempt(ZSe,c),r)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function JAt(e,t,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),i):s===46&&n===3?(e.consume(s),a):r(s)}function a(s){return s===null?r(s):t(s)}}function eCt(e,t,r){let n,i,a;return s;function s(u){return u===46||u===95?e.check(JSe,l,o)(u):u===null||Ea(u)||Xv(u)||u!==45&&MI(u)?l(u):(a=!0,e.consume(u),s)}function o(u){return u===95?n=!0:(i=n,n=void 0),e.consume(u),s}function l(u){return i||n||!a?r(u):t(u)}}function tCt(e,t){let r=0,n=0;return i;function i(s){return s===40?(r++,e.consume(s),i):s===41&&n<r?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(JSe,t,a)(s):s===null||Ea(s)||Xv(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&n++,e.consume(s),i}}function rCt(e,t,r){return n;function n(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),n):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ea(o)||Xv(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||Ea(o)||Xv(o)?t(o):n(o)}function a(o){return Eu(o)?s(o):r(o)}function s(o){return o===59?(e.consume(o),n):Eu(o)?(e.consume(o),s):r(o)}}function nCt(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return Kl(a)?r(a):t(a)}}function rAe(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ea(e)}function nAe(e){return!Eu(e)}function iAe(e){return!(e===47||_B(e))}function _B(e){return e===43||e===45||e===46||e===95||Kl(e)}function BW(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const iCt={tokenize:fCt,partial:!0};function aCt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:uCt,continuation:{tokenize:cCt},exit:dCt}},text:{91:{name:"gfmFootnoteCall",tokenize:lCt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sCt,resolveTo:oCt}}}}function sCt(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!s||!s._balanced)return r(l);const u=Yf(n.sliceSerialize({start:s.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function oCt(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function lCt(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,s;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(a>999||d===93&&!s||d===null||d===91||Ea(d))return r(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Yf(n.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return Ea(d)||(s=!0),a++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function uCt(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,s=0,o;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(p)}function c(p){if(s>999||p===93&&!o||p===null||p===91||Ea(p))return r(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=Yf(n.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}
vendor: 6,263 bytes, line 3730
3730return Ea(p)||(o=!0),s++,e.consume(p),p===92?d:c}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}function f(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(a)||i.push(a),wi(e,h,"gfmFootnoteDefinitionWhitespace")):r(p)}function h(p){return t(p)}}function cCt(e,t,r){return e.check(uC,t,e.attempt(iCt,t,r))}function dCt(e){e.exit("gfmFootnoteDefinition")}function fCt(e,t,r){const n=this;return wi(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):r(a)}}function hCt(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(s,o){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},f=[["enter",c,o],["enter",s[u][1],o],["exit",s[u][1],o],["enter",d,o]],h=o.parser.constructs.insideSpan.null;h&&ed(f,f.length,0,kI(h,s.slice(u+1,l),o)),ed(f,f.length,0,[["exit",d,o],["enter",s[l][1],o],["exit",s[l][1],o],["exit",c,o]]),ed(s,u-1,l-u+3,f),l=u+f.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,o,l){const u=this.previous,c=this.events;let d=0;return f;function f(p){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(p):(s.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const m=Uw(u);if(p===126)return d>1?l(p):(s.consume(p),d++,h);if(d<2&&!r)return l(p);const _=s.exit("strikethroughSequenceTemporary"),y=Uw(p);return _._open=!y||y===2&&!!m,_._close=!m||m===2&&!!y,o(p)}}}class pCt{constructor(){this.map=[]}add(t,r,n){mCt(this,t,r,n)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const a of i)t.push(a);i=n.pop()}this.map.length=0}}function mCt(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function gCt(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function yCt(){return{flow:{null:{name:"table",tokenize:vCt,resolveAll:_Ct}}}}function vCt(e,t,r){const n=this;let i=0,a=0,s;return o;function o(C){let k=n.events.length-1;for(;k>-1;){const $=n.events[k][1].type;if($==="lineEnding"||$==="linePrefix")k--;else break}const M=k>-1?n.events[k][1].type:null,D=M==="tableHead"||M==="tableRow"?E:l;return D===E&&n.parser.lazy[n.now().line]?r(C):D(C)}function l(C){return e.enter("tableHead"),e.enter("tableRow"),u(C)}function u(C){return C===124||(s=!0,a+=1),c(C)}function c(C){return C===null?r(C):an(C)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),h):r(C):ri(C)?wi(e,c,"whitespace")(C):(a+=1,s&&(s=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(C)))}function d(C){return C===null||C===124||Ea(C)?(e.exit("data"),c(C)):(e.consume(C),C===92?f:d)}function f(C){return C===92||C===124?(e.consume(C),d):d(C)}function h(C){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(C):(e.enter("tableDelimiterRow"),s=!1,ri(C)?wi(e,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):p(C))}function p(C){return C===45||C===58?_(C):C===124?(s=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),m):x(C)}function m(C){return ri(C)?wi(e,_,"whitespace")(C):_(C)}function _(C){return C===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):C===45?(a+=1,y(C)):C===null||an(C)?w(C):x(C)}function y(C){return C===45?(e.enter("tableDelimiterFiller"),v(C)):x(C)}function v(C){return C===45?(e.consume(C),v):C===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(C))}function b(C){return ri(C)?wi(e,w,"whitespace")(C):w(C)}function w(C){return C===124?p(C):C===null||an(C)?!s||i!==a?x(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):x(C)}function x(C){return r(C)}function E(C){return e.enter("tableRow"),T(C)}function T(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),T):C===null||an(C)?(e.exit("tableRow"),t(C)):ri(C)?wi(e,T,"whitespace")(C):(e.enter("data"),S(C))}function S(C){return C===null||C===124||Ea(C)?(e.exit("data"),T(C)):(e.consume(C),C===92?A:S)}function A(C){return C===92||C===124?(e.consume(C),S):S(C)}}function _Ct(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,l=0,u,c,d;const f=new pCt;for(;++r<e.length;){const h=e[r],p=h[1];h[0]==="enter"?p.type==="tableHead"?(o=!1,l!==0&&($oe(f,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(r,0,[["enter",u,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(n=!0,d=void 0,a=[0,0,0,0],s=[0,r+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(r,0,[["enter",c,t]])),i=p.type==="tableDelimiterRow"?2:c?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.t
vendor: 11,053 bytes, lines 3730-3731
3730ype==="tableDelimiterFiller")?(n=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=VM(f,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=r)):p.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(s[0]=s[1],d=VM(f,t,a,i,void 0,d)),a=s,s=[a[1],r,0,0])):p.type==="tableHead"?(o=!0,l=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=r,a[1]!==0?(s[0]=s[1],d=VM(f,t,a,i,r,d)):s[1]!==0&&(d=VM(f,t,s,i,r,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=r)}for(l!==0&&$oe(f,t,l,u,c),f.consume(t.events),r=-1;++r<t.events.length;){const h=t.events[r];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=gCt(t.events,r))}return e}function VM(e,t,r,n,i,a){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(a.end=Object.assign({},_1(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const l=_1(t.events,r[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const u=_1(t.events,r[2]),c=_1(t.events,r[3]),d={type:o,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){const f=t.events[r[2]],h=t.events[r[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",r[3]>r[2]+1){const p=r[2]+1,m=r[3]-r[2]-1;e.add(p,m,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},_1(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function $oe(e,t,r,n,i){const a=[],s=_1(t.events,r);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),n.end=Object.assign({},s),a.push(["exit",n,t]),e.add(r+1,0,a)}function _1(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const bCt={name:"tasklistCheck",tokenize:xCt};function wCt(){return{text:{91:bCt}}}function xCt(e,t,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return Ea(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):r(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return an(l)?t(l):ri(l)?e.check({tokenize:ECt},t,r)(l):r(l)}}function ECt(e,t,r){return wi(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function TCt(e){return hSe([YAt(),aCt(),hCt(e),yCt(),wCt()])}const SCt={};function ACt(e){const t=this,r=e||SCt,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(TCt(r)),a.push(HAt()),s.push(GAt(r))}const Foe=/[#.]/g;function CCt(e,t){const r=e||"",n={};let i=0,a,s;for(;i<r.length;){Foe.lastIndex=i;const o=Foe.exec(r),l=r.slice(i,o?o.index:r.length);l&&(a?a==="#"?n.id=l:Array.isArray(n.className)?n.className.push(l):n.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:n,children:[]}}function aAe(e,t,r){const n=r?OCt(r):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const u=s;o.unshift(u)}else{l=CCt(a,t);const u=l.tagName.toLowerCase(),c=n?n.get(u):void 0;if(l.tagName=c||u,PCt(s))o.unshift(s);else for(const[d,f]of Object.entries(s))MCt(e,l.properties,d,f)}for(const u of o)bB(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function PCt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function MCt(e,t,r,n){const i=AI(e,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=Gse(n):i.commaSeparated?a=zse(n):i.commaOrSpaceSeparated?a=Gse(zse(n).join(" ")):a=Boe(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?kCt(n):String(n);if(Array.isArray(a)){const s=[];for(const o of a)s.push(Boe(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function bB(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)bB(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?bB(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Boe(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||mA(r)===mA(t)))return!0}return r}function kCt(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function OCt(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const NCt=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],ICt=aAe(lC,"div"),DCt=aAe(T0,"g",NCt);function LCt(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=r[s];if(o===void 0){const l=zoe(t,r[s-1]);o=l===-1?t.length+1:l+1,r[s]=o}if(o>a)return{line:s+1,column:a-(s>0?r[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const o=r[r.length-1],l=zoe(t,o),u=l===-1?t.length+1:l+1;if(o===u)break;r.push(u)}const s=(a.line>1?r[a.line-2]:0)+a.column-1;if(s<r[a.line-1])return s}}}function zoe(e,t){const r=e.indexOf("\r",t),n=e.indexOf(` 3731`,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const Gy={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},sAe={}.hasOwnProperty,jCt=Object.prototype;function RCt(e,t){const r=t||{};return zW({file:r.file||void 0,location:!1,schema:r.space==="svg"?T0:lC,verbose:r.verbose||!1},e)}function zW(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},Fk(e,n,r),r}case"#document":case"#document-fragment":{const n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:oAe(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=LCt(a),o=s.toPoint(0),l=s.toPoint(a.length);r.position={start:o,end:l}}return r}case"#documentType":{const n=t;return r={type:"doctype"},Fk(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},Fk(e,n,r),r}default:return r=$Ct(e,t),r}}function oAe(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=zW(e,t[r]);n.push(i)}return n}function $Ct(e,t){const r=e.schema;e.schema=t.namespaceURI===Gy.svg?T0:lC;let n=-1;const i={};for(;++n<t.attrs.length;){const o=t.attrs[n],l=(o.prefix?o.prefix+":":"")+o.name;sAe.call(jCt,l)||(i[l]=o.value)}const s=(e.schema.space==="svg"?DCt:ICt)(t.tagName,i,oAe(e,t.childNodes));if(Fk(e,t,s),s.tagName==="template"){const o=t,l=o.sourceCodeLocation,u=l&&l.startTag&&V1(l.startTag),c=l&&l.endTag&&V1(l.endTag),d=zW(e,o.content);u&&c&&e.file&&(d.position={start:u.end,end:c.start}),s.content=d}return e.schema=r,s}function Fk(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=FCt(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function FCt(e,t,r){const n=V1(r);if(t.type==="element"){const i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(r.attrs)for(s in r.attrs)sAe.call(r.attrs,s)&&(a[AI(e.schema,s).property]=V1(r.attrs[s]));r.startTag;const o=V1(r.startTag),l=r.endTag?V1(r.endTag):void 0,u={opening:o};l&&(u.closing=l),u.properties=a,t.data={position:u}}}return n}function V1(e){const t=Uoe({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=Uoe({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function Uoe(e){return e.line&&e.column?e:void 0}const BCt={},zCt={}.hasOwnProperty,lAe=FSe("type",{handlers:{root:WCt,element:KCt,text:GCt,comment:qCt,doctype:HCt}});function UCt(e,t){const n=(t||BCt).space;return lAe(e,n==="svg"?T0:lC)}function WCt(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=UW(e.children,r,t),Px(e,r),r}function VCt(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=UW(e.children,r,t),Px(e,r),r}function HCt(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Px(e,t),t}function GCt(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Px(e,t),t}function qCt(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Px(e,t),t}function KCt(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=T0);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&zCt.call(e.properties,a)){const l=YCt(n,a,e.properties[a]);l&&i.push(l)}}const s=n.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Gy[s],childNodes:[],parentNode:null};return o.childNodes=UW(e.children,o,n),Px(e,o),e.tagName==="template"&&e.content&&(o.content=VCt(e.content,n)),o}function YCt(e,t,r){const n=AI(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?ZTe(r):sSe(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=n.attribute.slice(0,a)),i.namespace=Gy[n.space]}return i}function UW(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const a=lAe(e[n],r);a.parentNode=t,i.push(a)}return i}function Px(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const XCt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","
3731image","img","input","keygen","link","meta","param","source","track","wbr"],QCt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ns="�";var je;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(je||(je={}));const Fu={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function uAe(e){return e>=55296&&e<=57343}function ZCt(e){return e>=56320&&e<=57343}function JCt(e,t){return(e-55296)*1024+9216+t}function cAe(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function dAe(e){return e>=64976&&e<=65007||QCt.has(e)}var wt;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invali
vendor: 4,126 bytes, line 3731
3731dCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(wt||(wt={}));const ePt=65536;class tPt{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ePt,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:n,col:i,offset:a}=this,s=i+r,o=a+r;return{code:t,startLine:n,endLine:n,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(ZCt(r))return this.pos++,this._addGap(),JCt(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,je.EOF;return this._err(wt.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,je.EOF;const n=this.html.charCodeAt(r);return n===je.CARRIAGE_RETURN?je.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,je.EOF;let t=this.html.charCodeAt(this.pos);return t===je.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,je.LINE_FEED):t===je.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uAe(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===je.LINE_FEED||t===je.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){cAe(t)?this._err(wt.controlCharacterInInputStream):dAe(t)&&this._err(wt.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Qn;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Qn||(Qn={}));function fAe(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const rPt=new Uint16Array('
vendor: 16,129 bytes, line 3731
3731áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 3731
3731ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 3731
3731astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
3731'.split("").map(e=>e.charCodeAt(0))),nPt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function iPt(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=nPt.get(e))!==null&&t!==void 0?t:e}var rl;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(rl||(rl={}));const aPt=32;var Cg;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Cg||(Cg={}));function wB(e){return e>=rl.ZERO&&e<=rl.NINE}function sPt(e){return e>=rl.UPPER_A&&e<=rl.UPPER_F||e>=rl.LOWER_A&&e<=rl.LOWER_F}function oPt(e){return e>=rl.UPPER_A&&e<=rl.UPPER_Z||e>=rl.LOWER_A&&e<=rl.LOWER_Z||wB(e)}function lPt(e){return e===rl.EQUALS||oPt(e)}var Ko;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ko||(Ko={}));var Lp;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Lp||(Lp={}));class uPt{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=Ko.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Lp.Strict}startEntity(t){this.decodeMode=t,this.state=Ko.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Ko.EntityStart:return t.charCodeAt(r)===rl.NUM?(this.state=Ko.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Ko.NamedEntity,this.stateNamedEntity(t,r));case Ko.NumericStart:return this.stateNumericStart(t,r);case Ko.NumericDecimal:return this.stateNumericDecimal(t,r);case Ko.NumericHex:return this.stateNumericHex(t,r);case Ko.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|aPt)===rl.LOWER_X?(this.state=Ko.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Ko.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const a=n-r;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(r,a),i),this.consumed+=a}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(wB(i)||sPt(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(wB(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===rl.SEMI)this.consumed+=1;else if(this.decodeMode===Lp.Strict)return 0;return this.emitCodePoint(iPt(this.result),this.consumed),this.errors&&(t!==rl.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],a=(i&Cg.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const s=t.charCodeAt(r);if(this.treeIndex=cPt(n,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Lp.Attribute&&(a===0||lPt(s))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],a=(i&Cg.VALUE_LENGTH)>>14,a!==0){if(s===rl.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Lp.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&Cg.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~Cg.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case Ko.NamedEntity:return this.result!==0&&(this.decodeMode!==Lp.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ko.NumericDecimal:return this.emitNumericEntity(0,2);case Ko.NumericHex:return this.emitNumericEntity(0,3);case Ko.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ko.EntityStart:return 0}}}function cPt(e,t,r,n){const i=(t&Cg.BRANCH_LENGTH)>>7,a=t&Cg.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const l=n-a;return l<0||l>=i?-1:e[r+l]-1}let s=r,o=s+i-1;for(;s<=o;){const l=s+o>>>1,u=e[l];if(u<n)s=l+1;else if(u>n)o=l-1;else return e[l+i]}return-1}var Ft;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(Ft||(Ft={}));var _v;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(_v||(_v={}));var $d;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})($d||($d={}));var ht;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="str
3731ike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(ht||(ht={}));var W;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(W||(W={}));const dPt=new Map([[ht.A,W.A],[ht.ADDRESS,W.ADDRESS],[ht.ANNOTATION_XML,W.ANNOTATION_XML],[ht.APPLET,W.APPLET],[ht.AREA,W.AREA],[ht.ARTICLE,W.ARTICLE],[ht.ASIDE,W.ASIDE],[ht.B,W.B],[ht.BASE,W.BASE],[ht.BASEFONT,W.BASEFONT],[ht.BGSOUND,W.BGSOUND],[ht.BIG,W.BIG],[ht.BLOCKQUOTE,W.BLOCKQUOTE],[ht.BODY,W.BODY],[ht.BR,W.BR],[ht.BUTTON,W.BUTTON],[ht.CAPTION,W.CAPTION],[ht.CENTER,W.CENTER],[ht.CODE,W.CODE],[ht.COL,W.COL],[ht.COLGROUP,W.COLGROUP],[ht.DD,W.DD],[ht.DESC,W.DESC],[ht.DETAILS,W.DETAILS],[ht.DIALOG,W.DIALOG],[ht.DIR,W.DIR],[ht.DIV,W.DIV],[ht.DL,W.DL],[ht.DT,W.DT],[ht.EM,W.EM],[ht.EMBED,W.EMBED],[ht.FIELDSET,W.FIELDSET],[ht.FIGCAPTION,W.FIGCAPTION],[ht.FIGURE,W.FIGURE],[ht.FONT,W.FONT],[ht.FOOTER,W.FOOTER],[ht.FOREIGN_OBJECT,W.FOREIGN_OBJECT],[ht.FORM,W.FORM],[ht.FRAME,W.FRAME],[ht.FRAMESET,W.FRAMESET],[ht.H1,W.H1],[ht.H2,W.H2],[ht.H3,W.H3],[ht.H4,W.H4],[ht.H5,W.H5],[ht.H6,W.H6],[ht.HEAD,W.HEAD],[ht.HEADER,W.HEADER],[ht.HGROUP,W.HGROUP],[ht.HR,W.HR],[ht.HTML,W.HTML],[ht.I,W.I],[ht.IMG,W.IMG],[ht.IMAGE,W.IMAGE],[ht.INPUT,W.INPUT],[ht.IFRAME,W.IFRAME],[ht.KEYGEN,W.KEYGEN],[ht.LABEL,W.LABEL],[ht.LI,W.LI],[ht.LINK,W.LINK],[ht.LISTING,W.LISTING],[ht.MAIN,W.MAIN],[ht.MALIGNMARK,W.MALIGNMARK],[ht.MARQUEE,W.MARQUEE],[ht.MATH,W.MATH],[ht.MENU,W.MENU],[ht.META,W.META],[ht.MGLYPH,W.MGLYPH],[ht.MI,W.MI],[ht.MO,W.MO],[ht.MN,W.MN],[ht.MS,W.MS],[ht.MTEXT,W.MTEXT],[ht.NAV,W.NAV],[ht.NOBR,W.NOBR],[ht.NOFRAMES,W.NOFRAMES],[ht.NOEMBED,W.NOEMBED],[ht.NOSCRIPT,W.NOSCRIPT],[ht.OBJECT,W.OBJECT],[ht.OL,W.OL],[ht.OPTGROUP,W.OPTGROUP],[ht.OPTION,W.OPTION],[ht.P,W.P],[ht.PARAM,W.PARAM],[ht.PLAINTEXT,W.PLAINTEXT],[ht.PRE,W.PRE],[ht.RB,W.RB],[ht.RP,W.RP],[ht.RT,W.RT],[ht.RTC,W.RTC],[ht.RUBY,W.RUBY],[ht.S,W.S],[ht.SCRIPT,W.SCRIPT],[ht.SEARCH,W.SEARCH],[ht.SECTION,W.SECTION],[ht.SELECT,W.SELECT],[ht.SOURCE,W.SOURCE],[ht.SMALL,W.SMALL],[ht.SPAN,W.SPAN],[ht.STRIKE,W.STRIKE],[ht.STRONG,W.STRONG],[ht.STYLE,W.STYLE],[ht.SUB,W.SUB],[ht.SUMMARY,W.SUMMARY],[ht.SUP,W.SUP],[ht.TABLE,W.TABLE],[ht.TBODY,W.TBODY],[ht.TEMPLATE,W.TEMPLATE],[ht.TEXTAREA,W.TEXTAREA],[ht.TFOOT,W.TFOOT],[ht.TD,W.TD],[ht.TH,W.TH],[ht.THEAD,W.THEAD],[ht.TITLE,W.TITLE],[ht.TR,W.TR],[ht.TRACK,W.TRACK],[ht.TT,W.TT],[ht.U,W.U],[ht.UL,W.UL],[ht.SVG,W.
vendor: 21,612 bytes, line 3731
3731SVG],[ht.VAR,W.VAR],[ht.WBR,W.WBR],[ht.XMP,W.XMP]]);function Mx(e){var t;return(t=dPt.get(e))!==null&&t!==void 0?t:W.UNKNOWN}const Vt=W,fPt={[Ft.HTML]:new Set([Vt.ADDRESS,Vt.APPLET,Vt.AREA,Vt.ARTICLE,Vt.ASIDE,Vt.BASE,Vt.BASEFONT,Vt.BGSOUND,Vt.BLOCKQUOTE,Vt.BODY,Vt.BR,Vt.BUTTON,Vt.CAPTION,Vt.CENTER,Vt.COL,Vt.COLGROUP,Vt.DD,Vt.DETAILS,Vt.DIR,Vt.DIV,Vt.DL,Vt.DT,Vt.EMBED,Vt.FIELDSET,Vt.FIGCAPTION,Vt.FIGURE,Vt.FOOTER,Vt.FORM,Vt.FRAME,Vt.FRAMESET,Vt.H1,Vt.H2,Vt.H3,Vt.H4,Vt.H5,Vt.H6,Vt.HEAD,Vt.HEADER,Vt.HGROUP,Vt.HR,Vt.HTML,Vt.IFRAME,Vt.IMG,Vt.INPUT,Vt.LI,Vt.LINK,Vt.LISTING,Vt.MAIN,Vt.MARQUEE,Vt.MENU,Vt.META,Vt.NAV,Vt.NOEMBED,Vt.NOFRAMES,Vt.NOSCRIPT,Vt.OBJECT,Vt.OL,Vt.P,Vt.PARAM,Vt.PLAINTEXT,Vt.PRE,Vt.SCRIPT,Vt.SECTION,Vt.SELECT,Vt.SOURCE,Vt.STYLE,Vt.SUMMARY,Vt.TABLE,Vt.TBODY,Vt.TD,Vt.TEMPLATE,Vt.TEXTAREA,Vt.TFOOT,Vt.TH,Vt.THEAD,Vt.TITLE,Vt.TR,Vt.TRACK,Vt.UL,Vt.WBR,Vt.XMP]),[Ft.MATHML]:new Set([Vt.MI,Vt.MO,Vt.MN,Vt.MS,Vt.MTEXT,Vt.ANNOTATION_XML]),[Ft.SVG]:new Set([Vt.TITLE,Vt.FOREIGN_OBJECT,Vt.DESC]),[Ft.XLINK]:new Set,[Ft.XML]:new Set,[Ft.XMLNS]:new Set},xB=new Set([Vt.H1,Vt.H2,Vt.H3,Vt.H4,Vt.H5,Vt.H6]);ht.STYLE,ht.SCRIPT,ht.XMP,ht.IFRAME,ht.NOEMBED,ht.NOFRAMES,ht.PLAINTEXT;var We;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(We||(We={}));const qs={DATA:We.DATA,RCDATA:We.RCDATA,RAWTEXT:We.RAWTEXT,SCRIPT_DATA:We.SCRIPT_DATA,PLAINTEXT:We.PLAINTEXT,CDATA_SECTION:We.CDATA_SECTION};function hPt(e){return e>=je.DIGIT_0&&e<=je.DIGIT_9}function IE(e){return e>=je.LATIN_CAPITAL_A&&e<=je.LATIN_CAPITAL_Z}function pPt(e){return e>=je.LATIN_SMALL_A&&e<=je.LATIN_SMALL_Z}function Gm(e){return pPt(e)||IE(e)}function Woe(e){return Gm(e)||hPt(e)}function HM(e){return e+32}function hAe(e){return e===je.SPACE||e===je.LINE_FEED||e===je.TABULATION||e===je.FORM_FEED}function Voe(e){return hAe(e)||e===je.SOLIDUS||e===je.GREATER_THAN_SIGN}function mPt(e){return e===je.NULL?wt.nullCharacterReference:e>1114111?wt.characterReferenceOutsideUnicodeRange:uAe(e)?wt.surrogateCharacterReference:dAe(e)?wt.noncharacterCharacterReference:cAe(e)||e===je.CARRIAGE_RETURN?wt.controlCharacterReference:null}class gPt{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=We.DATA,this.returnState=We.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new tPt(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new uPt(rPt,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(wt.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(wt.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=mPt(n);i&&this._err(i,1)}}:void 0)}_err(t,r=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Qn.START_TAG,tagName:"",tagID:W.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Qn.END_TAG,tagName:"",tagID:W.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Qn.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Qn.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const n=this.currentToken;if(fAe(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const i=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(wt.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Mx(t.tagName),t.type===Qn.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(wt.endTagWithAttributes),t.selfClosing&&this._err(wt.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Qn.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qn.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qn.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Qn.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=hAe(t)?Qn.WHITESPACE_CHARACTER:t===je.NULL?Qn.NULL_CHARACTER:Qn.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qn.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=We.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Lp.Attribute:Lp.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===We.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===We.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===We.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case We.DATA:{this._stateData(t);break}case We.RCDATA:{this._stateRcdata(t);break}case We.RAWTEXT:{this._stateRawtext(t);break}case We.SCRIPT_DATA:{this._stateScriptData(t);break}case We.PLAINTEXT:{this._statePlaintext(t);break}case We.TAG_OPEN:{this._stateTagOpen(t);break}case We.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case We.TAG_NAME:{this._stateTagName(t);break}case We.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case We.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case We.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case We.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case We.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case We.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case We.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case We.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case We.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case We.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case We.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case We.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case We.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case We.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case We.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case We.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case We.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case We.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case We.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case We.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case We.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case We.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case We.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case We.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case We.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case We.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case We.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case We.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case We.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case We.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case We.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case We.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case We.BOGUS_COMMENT:{this._stateBogusComment(t);break}case We.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case We.COMMENT_START:{this._stateCommentStart(t);break}case We.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case We.COMMENT:{this._stateComment(t);break}case We.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case We.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case We.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case We.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case We.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case We.COMMENT_END:{this._stateCommentEnd(t);break}case We.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case We.DOCTYPE:{this._stateDoctype(t);break}case We.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case We.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case We.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case We.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case We.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case We.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case We.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case We.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case We.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case We.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case We.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case We.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case We.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case We.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case We.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case We.CDATA_SECTION:{this._stateCdataSection(t);break}case We.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case We.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case We.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case We.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case je.LESS_THAN_SIGN:{this.state=We.TAG_OPEN;break}case je.AMPERSAND:{this._startCharacterReference();break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this._emitCodePoint(t);break}case je.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case je.AMPERSAND:{this._startCharacterReference();break}case je.LESS_THAN_SIGN:{this.state=We.RCDATA_LESS_THAN_SIGN;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this._emitChars(ns);break}case je.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case je.LESS_THAN_SIGN:{this.state=We.RAWTEXT_LESS_THAN_SIGN;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this._emitChars(ns);break}case je.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case je.LESS_THAN_SIGN:{this.state=We.SCRIPT_DATA_LESS_THAN_SIGN;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this._emitChars(ns);break}case je.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case je.NULL:{this._err(wt.unexpectedNullCharacter),this._emitChars(ns);break}case je.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Gm(t))this._createStartTagToken(),this.state=We.TAG_NAME,this._stateTagName(t);else switch(t){case je.EXCLAMATION_MARK:{this.state=We.MARKUP_DECLARATION_OPEN;break}case je.SOLIDUS:{this.state=We.END_TAG_OPEN;break}case je.QUESTION_MARK:{this._err(wt.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=We.BOGUS_COMMENT,this._stateBogusComment(t);break}case je.EOF:{this._err(wt.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(wt.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=We.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Gm(t))this._createEndTagToken(),this.state=We.TAG_NAME,this._stateTagName(t);else switch(t){case je.GREATER_THAN_SIGN:{this._err(wt.missingEndTagName),this.state=We.DATA;break}case je.EOF:{this._err(wt.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(wt.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=We.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this.state=We.BEFORE_ATTRIBUTE_NAME;break}case je.SOLIDUS:{this.state=We.SELF_CLOSING_START_TAG;break}case je.GREATER_THAN_SIGN:{this.state=We.DATA,this.emitCurrentTagToken();break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.tagName+=ns;break}case je.EOF:{this._err(wt.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(IE(t)?HM(t):t)}}_stateRcdataLessThanSign(t){t===je.SOLIDUS?this.state=We.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=We.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Gm(t)?(this.state=We.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=We.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=We.BEFORE_ATTRIBUTE_NAME,
vendor: 8,480 bytes, line 3731
3731!1;case je.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=We.SELF_CLOSING_START_TAG,!1;case je.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=We.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=We.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===je.SOLIDUS?this.state=We.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=We.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Gm(t)?(this.state=We.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=We.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=We.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case je.SOLIDUS:{this.state=We.SCRIPT_DATA_END_TAG_OPEN;break}case je.EXCLAMATION_MARK:{this.state=We.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=We.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Gm(t)?(this.state=We.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=We.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=We.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===je.HYPHEN_MINUS?(this.state=We.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=We.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===je.HYPHEN_MINUS?(this.state=We.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=We.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case je.HYPHEN_MINUS:{this.state=We.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case je.LESS_THAN_SIGN:{this.state=We.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this._emitChars(ns);break}case je.EOF:{this._err(wt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case je.HYPHEN_MINUS:{this.state=We.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case je.LESS_THAN_SIGN:{this.state=We.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.state=We.SCRIPT_DATA_ESCAPED,this._emitChars(ns);break}case je.EOF:{this._err(wt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=We.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case je.HYPHEN_MINUS:{this._emitChars("-");break}case je.LESS_THAN_SIGN:{this.state=We.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case je.GREATER_THAN_SIGN:{this.state=We.SCRIPT_DATA,this._emitChars(">");break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.state=We.SCRIPT_DATA_ESCAPED,this._emitChars(ns);break}case je.EOF:{this._err(wt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=We.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===je.SOLIDUS?this.state=We.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Gm(t)?(this._emitChars("<"),this.state=We.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=We.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Gm(t)?(this.state=We.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=We.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=We.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Fu.SCRIPT,!1)&&Voe(this.preprocessor.peek(Fu.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<Fu.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=We.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case je.HYPHEN_MINUS:{this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case je.LESS_THAN_SIGN:{this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this._emitChars(ns);break}case je.EOF:{this._err(wt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case je.HYPHEN_MINUS:{this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case je.LESS_THAN_SIGN:{this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ns);break}case je.EOF:{this._err(wt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case je.HYPHEN_MINUS:{this._emitChars("-");break}case je.LESS_THAN_SIGN:{this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case je.GREATER_THAN_SIGN:{this.state=We.SCRIPT_DATA,this._emitChars(">");break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ns);break}case je.EOF:{this._err(wt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===je.SOLIDUS?(this.state=We.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Fu.SCRIPT,!1)&&Voe(this.preprocessor.peek(Fu.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<Fu.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=We.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=We.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.SOLIDUS:case je.GREATER_THAN_SIGN:case je.EOF:{this.state=We.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case je.EQUALS_SIGN:{this._err(wt.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=We.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=We.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:case je.SOLIDUS:case je.GREATER_THAN_SIGN:case je.EOF:{this._leaveAttrName(),this.state=We.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case je.EQUALS_SIGN:{this._leaveAttrName(),this.state=We.BEFORE_ATTRIBUTE_VALUE;break}case je.QUOTATION_MARK:case je.APOSTROPHE:case je.LESS_THAN_SIGN:{this._err(wt.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.currentAttr.name+=ns;break}default:this.currentAttr.name+=String.fromCodePoint(IE(t)?HM(t):t)}}_stateAfterAttributeName(t){switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.SOLIDUS:{this.state=We.SELF_CLOSING_START_TAG;break}case je.EQUALS_SIGN:{this.state=We.BEFORE_ATTRIBUTE_VALUE;break}case je.GREATER_THAN_SIGN:{this.state=We.DATA,this.emitCurrentTagToken();break}case je.EOF:{this._err(wt.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=We.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.QUOTATION_MARK:{this.state=We.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case je.APOSTROPHE:{this.state=We.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case je.GREATER_THAN_SIGN:{this._err(wt.missingAttributeValue),this.state=We.DATA,this.emitCurrentTagToken();break}default:this.state=We.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case je.QUOTATION_MARK:{this.state=We.AFT
vendor: 87,838 bytes, line 3731
3731ER_ATTRIBUTE_VALUE_QUOTED;break}case je.AMPERSAND:{this._startCharacterReference();break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.currentAttr.value+=ns;break}case je.EOF:{this._err(wt.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case je.APOSTROPHE:{this.state=We.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case je.AMPERSAND:{this._startCharacterReference();break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.currentAttr.value+=ns;break}case je.EOF:{this._err(wt.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this._leaveAttrValue(),this.state=We.BEFORE_ATTRIBUTE_NAME;break}case je.AMPERSAND:{this._startCharacterReference();break}case je.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=We.DATA,this.emitCurrentTagToken();break}case je.NULL:{this._err(wt.unexpectedNullCharacter),this.currentAttr.value+=ns;break}case je.QUOTATION_MARK:case je.APOSTROPHE:case je.LESS_THAN_SIGN:case je.EQUALS_SIGN:case je.GRAVE_ACCENT:{this._err(wt.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case je.EOF:{this._err(wt.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this._leaveAttrValue(),this.state=We.BEFORE_ATTRIBUTE_NAME;break}case je.SOLIDUS:{this._leaveAttrValue(),this.state=We.SELF_CLOSING_START_TAG;break}case je.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=We.DATA,this.emitCurrentTagToken();break}case je.EOF:{this._err(wt.eofInTag),this._emitEOFToken();break}default:this._err(wt.missingWhitespaceBetweenAttributes),this.state=We.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case je.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=We.DATA,this.emitCurrentTagToken();break}case je.EOF:{this._err(wt.eofInTag),this._emitEOFToken();break}default:this._err(wt.unexpectedSolidusInTag),this.state=We.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case je.GREATER_THAN_SIGN:{this.state=We.DATA,this.emitCurrentComment(r);break}case je.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.data+=ns;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Fu.DASH_DASH,!0)?(this._createCommentToken(Fu.DASH_DASH.length+1),this.state=We.COMMENT_START):this._consumeSequenceIfMatch(Fu.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Fu.DOCTYPE.length+1),this.state=We.DOCTYPE):this._consumeSequenceIfMatch(Fu.CDATA_START,!0)?this.inForeignNode?this.state=We.CDATA_SECTION:(this._err(wt.cdataInHtmlContent),this._createCommentToken(Fu.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=We.BOGUS_COMMENT):this._ensureHibernation()||(this._err(wt.incorrectlyOpenedComment),this._createCommentToken(2),this.state=We.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case je.HYPHEN_MINUS:{this.state=We.COMMENT_START_DASH;break}case je.GREATER_THAN_SIGN:{this._err(wt.abruptClosingOfEmptyComment),this.state=We.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=We.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case je.HYPHEN_MINUS:{this.state=We.COMMENT_END;break}case je.GREATER_THAN_SIGN:{this._err(wt.abruptClosingOfEmptyComment),this.state=We.DATA,this.emitCurrentComment(r);break}case je.EOF:{this._err(wt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=We.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case je.HYPHEN_MINUS:{this.state=We.COMMENT_END_DASH;break}case je.LESS_THAN_SIGN:{r.data+="<",this.state=We.COMMENT_LESS_THAN_SIGN;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.data+=ns;break}case je.EOF:{this._err(wt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case je.EXCLAMATION_MARK:{r.data+="!",this.state=We.COMMENT_LESS_THAN_SIGN_BANG;break}case je.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=We.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===je.HYPHEN_MINUS?this.state=We.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=We.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===je.HYPHEN_MINUS?this.state=We.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=We.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==je.GREATER_THAN_SIGN&&t!==je.EOF&&this._err(wt.nestedComment),this.state=We.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case je.HYPHEN_MINUS:{this.state=We.COMMENT_END;break}case je.EOF:{this._err(wt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=We.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case je.GREATER_THAN_SIGN:{this.state=We.DATA,this.emitCurrentComment(r);break}case je.EXCLAMATION_MARK:{this.state=We.COMMENT_END_BANG;break}case je.HYPHEN_MINUS:{r.data+="-";break}case je.EOF:{this._err(wt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=We.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case je.HYPHEN_MINUS:{r.data+="--!",this.state=We.COMMENT_END_DASH;break}case je.GREATER_THAN_SIGN:{this._err(wt.incorrectlyClosedComment),this.state=We.DATA,this.emitCurrentComment(r);break}case je.EOF:{this._err(wt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=We.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this.state=We.BEFORE_DOCTYPE_NAME;break}case je.GREATER_THAN_SIGN:{this.state=We.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case je.EOF:{this._err(wt.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.missingWhitespaceBeforeDoctypeName),this.state=We.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(IE(t))this._createDoctypeToken(String.fromCharCode(HM(t))),this.state=We.DOCTYPE_NAME;else switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.NULL:{this._err(wt.unexpectedNullCharacter),this._createDoctypeToken(ns),this.state=We.DOCTYPE_NAME;break}case je.GREATER_THAN_SIGN:{this._err(wt.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.EOF:{this._err(wt.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=We.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this.state=We.AFTER_DOCTYPE_NAME;break}case je.GREATER_THAN_SIGN:{this.state=We.DATA,this.emitCurrentDoctype(r);break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.name+=ns;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(IE(t)?HM(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.GREATER_THAN_SIGN:{this.state=We.DATA,this.emitCurrentDoctype(r);break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Fu.PUBLIC,!1)?this.state=We.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Fu.SYSTEM,!1)?this.state=We.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(wt.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this.state=We.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case je.QUOTATION_MARK:{this._err(wt.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=We.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case je.APOSTROPHE:{this._err(wt.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=We.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case je.GREATER_THAN_SIGN:{this._err(wt.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=We.DATA,this.emitCurrentDoctype(r);break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.QUOTATION_MARK:{r.publicId="",this.state=We.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case je.APOSTROPHE:{r.publicId="",this.state=We.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case je.GREATER_THAN_SIGN:{this._err(wt.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=We.DATA,this.emitCurrentDoctype(r);break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case je.QUOTATION_MARK:{this.state=We.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.publicId+=ns;break}case je.GREATER_THAN_SIGN:{this._err(wt.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case je.APOSTROPHE:{this.state=We.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.publicId+=ns;break}case je.GREATER_THAN_SIGN:{this._err(wt.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this.state=We.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case je.GREATER_THAN_SIGN:{this.state=We.DATA,this.emitCurrentDoctype(r);break}case je.QUOTATION_MARK:{this._err(wt.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case je.APOSTROPHE:{this._err(wt.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.QUOTATION_MARK:{r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case je.APOSTROPHE:{r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:{this.state=We.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case je.QUOTATION_MARK:{this._err(wt.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case je.APOSTROPHE:{this._err(wt.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case je.GREATER_THAN_SIGN:{this._err(wt.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=We.DATA,this.emitCurrentDoctype(r);break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.QUOTATION_MARK:{r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case je.APOSTROPHE:{r.systemId="",this.state=We.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case je.GREATER_THAN_SIGN:{this._err(wt.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=We.DATA,this.emitCurrentDoctype(r);break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case je.QUOTATION_MARK:{this.state=We.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.systemId+=ns;break}case je.GREATER_THAN_SIGN:{this._err(wt.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case je.APOSTROPHE:{this.state=We.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case je.NULL:{this._err(wt.unexpectedNullCharacter),r.systemId+=ns;break}case je.GREATER_THAN_SIGN:{this._err(wt.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case je.SPACE:case je.LINE_FEED:case je.TABULATION:case je.FORM_FEED:break;case je.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.EOF:{this._err(wt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(wt.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=We.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case je.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=We.DATA;break}case je.NULL:{this._err(wt.unexpectedNullCharacter);break}case je.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case je.RIGHT_SQUARE_BRACKET:{this.state=We.CDATA_SECTION_BRACKET;break}case je.EOF:{this._err(wt.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===je.RIGHT_SQUARE_BRACKET?this.state=We.CDATA_SECTION_END:(this._emitChars("]"),this.state=We.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case je.GREATER_THAN_SIGN:{this.state=We.DATA;break}case je.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=We.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(je.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Woe(this.preprocessor.peek(1))?We.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Woe(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===je.SEMICOLON&&this._err(wt.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const pAe=new Set([W.DD,W.DT,W.LI,W.OPTGROUP,W.OPTION,W.P,W.RB,W.RP,W.RT,W.RTC]),Hoe=new Set([...pAe,W.CAPTION,W.COLGROUP,W.TBODY,W.TD,W.TFOOT,W.TH,W.THEAD,W.TR]),SO=new Set([W.APPLET,W.CAPTION,W.HTML,W.MARQUEE,W.OBJECT,W.TABLE,W.TD,W.TEMPLATE,W.TH]),yPt=new Set([...SO,W.OL,W.UL]),vPt=new Set([...SO,W.BUTTON]),Goe=new Set([W.ANNOTATION_XML,W.MI,W.MN,W.MO,W.MS,W.MTEXT]),qoe=new Set([W.DESC,W.FOREIGN_OBJECT,W.TITLE]),_Pt=new Set([W.TR,W.TEMPLATE,W.HTML]),bPt=new Set([W.TBODY,W.TFOOT,W.THEAD,W.TEMPLATE,W.HTML]),wPt=new Set([W.TABLE,W.TEMPLATE,W.HTML]),xPt=new Set([W.TD,W.TH]);class EPt{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=W.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===W.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ft.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const i=this._indexOf(t)+1;this.items.splice(i,0,r),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==Ft.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(xB,Ft.HTML)}popUntilTableCellPopped(){this.popUntilPopped(xPt,Ft.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(wPt,Ft.HTML)}clearBackToTableBodyContext(){this.clearBackTo(bPt,Ft.HTML)}clearBackToTableRowContext(){this.clearBackTo(_Pt,Ft.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===W.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===W.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case Ft.HTML:{if(i===t)return!0;if(r.has(i))return!1;break}case Ft.SVG:{if(qoe.has(i))return!1;break}case Ft.MATHML:{if(Goe.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,SO)}hasInListItemScope(t){return this.hasInDynamicScope(t,yPt)}hasInButtonScope(t){return this.hasInDynamicScope(t,vPt)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Ft.HTML:{if(xB.has(r))return!0;if(SO.has(r))return!1;break}case Ft.SVG:{if(qoe.has(r))return!1;break}case Ft.MATHML:{if(Goe.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===Ft.HTML)switch(this.tagIDs[r]){case t:return!0;case W.TABLE:case W.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Ft.HTML)switch(this.tagIDs[t]){case W.TBODY:case W.THEAD:case W.TFOOT:return!0;case W.TABLE:case W.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===Ft.HTML)switch(this.tagIDs[r]){case t:return!0;case W.OPTION:case W.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&pAe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Hoe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Hoe.has(this.currentTagId);)this.pop()}}const dR=3;var Ch;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ch||(Ch={}));const Koe={type:Ch.Marker};class TPt{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],i=r.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Ch.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===a&&this.treeAdapter.getNamespaceURI(u)===s){const c=this.treeAdapter.getAttrList(u);c.length===i&&n.push({idx:o,attrs:c})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<dR)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<dR)return;const i=new Map(r.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<n.length;s++){const o=n[s];o.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=dR&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Koe)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ch.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Ch.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(Koe);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===Ch.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===Ch.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===Ch.Element&&r.element===t)}}const qm={createDocument(){return{nodeName:"#document",mode:$d.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};qm.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(qm.isTextNode(r)){r.value+=t;return}}qm.appendChild(e,qm.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&qm.isTextNode(n)?n.value+=t:qm.insertBefore(e,qm.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},mAe="html",SPt="about:legacy-compat",APt="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",gAe=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],CPt=[...gAe,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],PPt=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),yAe=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],MPt=[...yAe,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Yoe(e,t){return t.some(r=>e.startsWith(r))}function kPt(e){return e.name===mAe&&e.publicId===null&&(e.systemId===null||e.systemId===SPt)}function OPt(e){if(e.name!==mAe)return $d.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===APt)return $d.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),PPt.has(r))return $d.QUIRKS;let n=t===null?CPt:gAe;if(Yoe(r,n))return $d.QUIRKS;if(n=t===null?yAe:MPt,Yoe(r,n))return $d.LIMITED_QUIRKS}return $d.NO_QUIRKS}const Xoe={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},NPt="definitionurl",IPt="definitionURL",DPt=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),LPt=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Ft.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Ft.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Ft.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Ft.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Ft.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Ft.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Ft.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Ft.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Ft.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Ft.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Ft.XMLNS}]]),jPt=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),RPt=new Set([W.B,W.BIG,W.BLOCKQUOTE,W.BODY,W.BR,W.CENTER,W.CODE,W.DD,W.DIV,W.DL,W.DT,W.EM,W.EMBED,W.H1,W.H2,W.H3,W.H4,W.H5,W.H6,W.HEAD,W.HR,W.I,W.IMG,W.LI,W.LISTING,W.MENU,W.META,W.NOBR,W.OL,W.P,W.PRE,W.RUBY,W.S,W.SMALL,W.SPAN,W.STRONG,W.STRIKE,W.SUB,W.SUP,W.TABLE,W.TT,W.U,W.UL,W.VAR]);function $Pt(e){const t=e.tagID;return t===W.FONT&&e.attrs.some(({name:n})=>n===_v.COLOR||n===_v.SIZE||n===_v.FACE)||RPt.has(t)}function vAe(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===NPt){e.attrs[t].name=IPt;break}}function _Ae(e){for(let t=0;t<e.attrs.length;t++){const r=DPt.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function WW(e){for(let t=0;t<e.attrs.length;t++){const r=LPt.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function FPt(e){const t=jPt.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Mx(e.tagName))}function BPt(e,t){return t===Ft.MATHML&&(e===W.MI||e===W.MO||e===W.MN||e===W.MS||e===W.MTEXT)}function zPt(e,t,r){if(t===Ft.MATHML&&e===W.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===_v.ENCODING){const i=r[n].value.toLowerCase();return i===Xoe.TEXT_HTML||i===Xoe.APPLICATION_XML}}return t===Ft.SVG&&(e===W.FOREIGN_OBJECT||e===W.DESC||e===W.TITLE)}function UPt(e,t,r,n){return(!n||n===Ft.HTML)&&zPt(e,t,r)||(!n||n===Ft.MATHML)&&BPt(e,t)}const WPt="hidden",VPt=8,HPt=3;var qe;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(qe||(qe={}));const GPt={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bAe=new Set([W.TABLE,W.TBODY,W.TFOOT,W.THEAD,W.TR]),Qoe={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:qm,onParseError:null};class Zoe{constructor(t,r,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=qe.INITIAL,this.originalInsertionMode=qe.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Qoe,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new gPt(this.options,this),this.activeFormattingElements=new TPt(this.treeAdapter),this.fragmentContextID=n?Mx(this.treeAdapter.getTagName(n)):W.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new EPt(this.document,this.treeAdapter,this)}static parse(t,r){const n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){const n={...Qoe,...r};t??(t=n.treeAdapter.createElement(ht.TEMPLATE,Ft.HTML,[]));const i=n.treeAdapter.createElement("documentmock",Ft.HTML,[]),a=new this(n,i,t);return a.fragmentContextID===W.TEMPLATE&&a.tmplInsertionModeStack.unshift(qe.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:GPt,s={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,r,n){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,t,this.openElements.current),r){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Ft.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,Ft.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=qe.TEXT}switchToPlaintextParsing(){this.insertionMode=qe.TEXT,this.originalInsertionMode=qe.IN_BODY,this.tokenizer.state=qs.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===ht.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Ft.HTML))switch(this.fragmentContextID){case W.TITLE:case W.TEXTAREA:{this.tokenizer.state=qs.RCDATA;break}case W.STYLE:case W.XMP:case W.IFRAME:case W.NOEMBED:case W.NOFRAMES:case W.NOSCRIPT:{this.tokenizer.state=qs.RAWTEXT;break}case W.SCRIPT:{this.tokenizer.state=qs.SCRIPT_DATA;break}case W.PLAINTEXT:{this.tokenizer.state=qs.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,Ft.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,Ft.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(ht.HTML,Ft.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,W.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(r),a=n?i.lastIndexOf(n):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:u,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,i=this.treeAdapter.getTagName(t),a=r.type===Qn.END_TAG&&i===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===W.SVG&&this.treeAdapter.getTagName(r)===ht.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===Ft.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===W.MGLYPH||t.tagID===W.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,Ft.HTML)}_processToken(t){switch(t.type){case Qn.CHARACTER:{this.onCharacter(t);break}case Qn.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qn.COMMENT:{this.onComment(t);break}case Qn.DOCTYPE:{this.onDoctype(t);break}case Qn.START_TAG:{this._processStartTag(t);break}case Qn.END_TAG:{this.onEndTag(t);break}case Qn.EOF:{this.onEof(t);break}case Qn.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const i=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return UPt(t,i,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(i=>i.type===Ch.Marker||this.openElements.contains(i.element)),n=r===-1?t-1:r-1;for(let i=n;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=qe.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(W.P),this.openElements.popUntilTagNamePopped(W.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case W.TR:{this.insertionMode=qe.IN_ROW;return}case W.TBODY:case W.THEAD:case W.TFOOT:{this.insertionMode=qe.IN_TABLE_BODY;return}case W.CAPTION:{this.insertionMode=qe.IN_CAPTION;return}case W.COLGROUP:{this.insertionMode=qe.IN_COLUMN_GROUP;return}case W.TABLE:{this.insertionMode=qe.IN_TABLE;return}case W.BODY:{this.insertionMode=qe.IN_BODY;return}case W.FRAMESET:{this.insertionMode=qe.IN_FRAMESET;return}case W.SELECT:{this._resetInsertionModeForSelect(t);return}case W.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case W.HTML:{this.insertionMode=this.headElement?qe.AFTER_HEAD:qe.BEFORE_HEAD;return}case W.TD:case W.TH:{if(t>0){this.insertionMode=qe.IN_CELL;return}break}case W.HEAD:{if(t>0){this.insertionMode=qe.IN_HEAD;return}break}}this.insertionMode=qe.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===W.TEMPLATE)break;if(n===W.TABLE){this.insertionMode=qe.IN_SELECT_IN_TABLE;return}}this.insertionMode=qe.IN_SELECT}_isElementCausesFosterParenting(t){return bAe.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case W.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===Ft.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case W.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return fPt[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){xkt(this,t);return}switch(this.insertionMode){case qe.INITIAL:{tE(this,t);break}case qe.BEFORE_HTML:{AT(this,t);break}case qe.BEFORE_HEAD:{CT(this,t);break}case qe.IN_HEAD:{PT(this,t);break}case qe.IN_HEAD_NO_SCRIPT:{MT(this,t);break}case qe.AFTER_HEAD:{kT(this,t);break}case qe.IN_BODY:case qe.IN_CAPTION:case qe.IN_CELL:case qe.IN_TEMPLATE:{xAe(this,t);break}case qe.TEXT:case qe.IN_SELECT:case qe.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case qe.IN_TABLE:case qe.IN_TABLE_BODY:case qe.IN_ROW:{fR(this,t);break}case qe.IN_TABLE_TEXT:{PAe(this,t);break}case qe.IN_COLUMN_GROUP:{AO(this,t);break}case qe.AFTER_BODY:{CO(this,t);break}case qe.AFTER_AFTER_BODY:{Bk(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){wkt(this,t);return}switch(this.insertionMode){case qe.INITIAL:{tE(this,t);break}case qe.BEFORE_HTML:{AT(this,t);break}case qe.BEFORE_HEAD:{CT(this,t);break}case qe.IN_HEAD:{PT(this,t);break}case qe.IN_HEAD_NO_SCRIPT:{MT(this,t);break}case qe.AFTER_HEAD:{kT(this,t);break}case qe.TEXT:{this._insertCharacters(t);break}case qe.IN_TABLE:case qe.IN_TABLE_BODY:case qe.IN_ROW:{fR(this,t);break}case qe.IN_COLUMN_GROUP:{AO(this,t);break}case qe.AFTER_BODY:{CO(this,t);break}case qe.AFTER_AFTER_BODY:{Bk(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){EB(this,t);return}switch(this.insertionMode){case qe.INITIAL:case qe.BEFORE_HTML:case qe.BEFORE_HEAD:case qe.IN_HEAD:case qe.IN_HEAD_NO_SCRIPT:case qe.AFTER_HEAD:case qe.IN_BODY:case qe.IN_TABLE:case qe.IN_CAPTION:case qe.IN_COLUMN_GROUP:case qe.IN_TABLE_BODY:case qe.IN_ROW:case qe.IN_CELL:case qe.IN_SELECT:case qe.IN_SELECT_IN_TABLE:case qe.IN_TEMPLATE:case qe.IN_FRAMESET:case qe.AFTER_FRAMESET:{EB(this,t);break}case qe.IN_TABLE_TEXT:{rE(this,t);break}case qe.AFTER_BODY:{JPt(this,t);break}case qe.AFTER_AFTER_BODY:case qe.AFTER_AFTER_FRAMESET:{eMt(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case qe.INITIAL:{tMt(this,t);break}case qe.BEFORE_HEAD:case qe.IN_HEAD:case qe.IN_HEAD_NO_SCRIPT:case qe.AFTER_HEAD:{this._err(t,wt.misplacedDoctype);break}case qe.IN_TABLE_TEXT:{rE(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,wt.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Ekt(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case qe.INITIAL:{tE(this,t);break}case qe.BEFORE_HTML:{rMt(this,t);break}case qe.BEFORE_HEAD:{iMt(this,t);break}case qe.IN_HEAD:{uh(this,t);break}case qe.IN_HEAD_NO_SCRIPT:{oMt(this,t);break}case qe.AFTER_HEAD:{uMt(this,t);break}case qe.IN_BODY:{Zl(this,t);break}case qe.IN_TABLE:{Vw(this,t);break}case qe.IN_TABLE_TEXT:{rE(this,t);break}case qe.IN_CAPTION:{akt(this,t);break}case qe.IN_COLUMN_GROUP:{GW(this,t);break}case qe.IN_TABLE_BODY:{RI(this,t);break}case qe.IN_ROW:{$I(this,t);break}case qe.IN_CELL:{lkt(this,t);break}case qe.IN_SELECT:{OAe(this,t);break}case qe.IN_SELECT_IN_TABLE:{ckt(this,t);break}case qe.IN_TEMPLATE:{fkt(this,t);break}case qe.AFTER_BODY:{pkt(this,t);break}case qe.IN_FRAMESET:{mkt(this,t);break}case qe.AFTER_FRAMESET:{ykt(this,t);break}case qe.AFTER_AFTER_BODY:{_kt(this,t);break}case qe.AFTER_AFTER_FRAMESET:{bkt(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Tkt(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case qe.INITIAL:{tE(this,t);break}case qe.BEFORE_HTML:{nMt(this,t);break}case qe.BEFORE_HEAD:{aMt(this,t);break}case qe.IN_HEAD:{sMt(this,t);break}case qe.IN_HEAD_NO_SCRIPT:{lMt(this,t);break}case qe.AFTER_HEAD:{cMt(this,t);break}case qe.IN_BODY:{jI(this,t);break}case qe.TEXT:{YMt(this,t);break}case qe.IN_TABLE:{vA(this,t);break}case qe.IN_TABLE_TEXT:{rE(this,t);break}case qe.IN_CAPTION:{skt(this,t);break}case qe.IN_COLUMN_GROUP:{okt(this,t);break}case qe.IN_TABLE_BODY:{TB(this,t);break}case qe.IN_ROW:{kAe(this,t);break}case qe.IN_CELL:{ukt(this,t);break}case qe.IN_SELECT:{NAe(this,t);break}case qe.IN_SELECT_IN_TABLE:{dkt(this,t);break}case qe.IN_TEMPLATE:{hkt(this,t);break}case qe.AFTER_BODY:{DAe(this,t);break}case qe.IN_FRAMESET:{gkt(this,t);break}case qe.AFTER_FRAMESET:{vkt(this,t);break}case qe.AFTER_AFTER_BODY:{Bk(this,t);break}}}onEof(t){switch(this.insertionMode){case qe.INITIAL:{tE(this,t);break}case qe.BEFORE_HTML:{AT(this,t);break}case qe.BEFORE_HEAD:{CT(this,t);break}case qe.IN_HEAD:{PT(this,t);break}case qe.IN_HEAD_NO_SCRIPT:{MT(this,t);break}case qe.AFTER_HEAD:{kT(this,t);break}case qe.IN_BODY:case qe.IN_TABLE:case qe.IN_CAPTION:case qe.IN_COLUMN_GROUP:case qe.IN_TABLE_BODY:case qe.IN_ROW:case qe.IN_CELL:case qe.IN_SELECT:case qe.IN_SELECT_IN_TABLE:{AAe(this,t);break}case qe.TEXT:{XMt(this,t);break}case qe.IN_TABLE_TEXT:{rE(this,t);break}case qe.IN_TEMPLATE:{IAe(this,t);break}case qe.AFTER_BODY:case qe.IN_FRAMESET:case qe.AFTER_FRAMESET:case qe.AFTER_AFTER_BODY:case qe.AFTER_AFTER_FRAMESET:{HW(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===je.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case qe.IN_HEAD:case qe.IN_HEAD_NO_SCRIPT:case qe.AFTER_HEAD:case qe.TEXT:case qe.IN_COLUMN_GROUP:case qe.IN_SELECT:case qe.IN_SELECT_IN_TABLE:case qe.IN_FRAMESET:case qe.AFTER_FRAMESET:{this._insertCharacters(t);break}case qe.IN_BODY:case qe.IN_CAPTION:case qe.IN_CELL:case qe.IN_TEMPLATE:case qe.AFTER_BODY:case qe.AFTER_AFTER_BODY:case qe.AFTER_AFTER_FRAMESET:{wAe(this,t);break}case qe.IN_TABLE:case qe.IN_TABLE_BODY:case qe.IN_ROW:{fR(this,t);break}case qe.IN_TABLE_TEXT:{CAe(this,t);break}}}}function qPt(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):SAe(e,t),r}function KPt(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function YPt(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==r;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),l=o&&a>=HPt;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=XPt(e,o),n===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(s,n),n=s)}return n}function XPt(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function QPt(e,t,r){const n=e.treeAdapter.getTagName(t),i=Mx(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);i===W.TEMPLATE&&a===Ft.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function ZPt(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,i.tagID)}function VW(e,t){for(let r=0;r<VPt;r++){const n=qPt(e,t);if(!n)break;const i=KPt(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const a=YPt(e,i,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),s&&QPt(e,s,a),ZPt(e,i,n)}}function EB(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function JPt(e,t){e._appendCommentNode(t,e.openElements.items[0])}function eMt(e,t){e._appendCommentNode(t,e.document)}function HW(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function tMt(e,t){e._setDocumentType(t);const r=t.forceQuirks?$d.QUIRKS:OPt(t);kPt(t)||e._err(t,wt.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=qe.BEFORE_HTML}function tE(e,t){e._err(t,wt.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,$d.QUIRKS),e.insertionMode=qe.BEFORE_HTML,e._processToken(t)}function rMt(e,t){t.tagID===W.HTML?(e._insertElement(t,Ft.HTML),e.insertionMode=qe.BEFORE_HEAD):AT(e,t)}function nMt(e,t){const r=t.tagID;(r===W.HTML||r===W.HEAD||r===W.BODY||r===W.BR)&&AT(e,t)}function AT(e,t){e._insertFakeRootElement(),e.insertionMode=qe.BEFORE_HEAD,e._processToken(t)}function iMt(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.HEAD:{e._insertElement(t,Ft.HTML),e.headElement=e.openElements.current,e.insertionMode=qe.IN_HEAD;break}default:CT(e,t)}}function aMt(e,t){const r=t.tagID;r===W.HEAD||r===W.BODY||r===W.HTML||r===W.BR?CT(e,t):e._err(t,wt.endTagWithoutMatchingOpenElement)}function CT(e,t){e._insertFakeElement(ht.HEAD,W.HEAD),e.headElement=e.openElements.current,e.insertionMode=qe.IN_HEAD,e._processToken(t)}function uh(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:{e._appendElement(t,Ft.HTML),t.ackSelfClosing=!0;break}case W.TITLE:{e._switchToTextParsing(t,qs.RCDATA);break}case W.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,qs.RAWTEXT):(e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_HEAD_NO_SCRIPT);break}case W.NOFRAMES:case W.STYLE:{e._switchToTextParsing(t,qs.RAWTEXT);break}case W.SCRIPT:{e._switchToTextParsing(t,qs.SCRIPT_DATA);break}case W.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=qe.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(qe.IN_TEMPLATE);break}case W.HEAD:{e._err(t,wt.misplacedStartTagForHeadElement);break}default:PT(e,t)}}function sMt(e,t){switch(t.tagID){case W.HEAD:{e.openElements.pop(),e.insertionMode=qe.AFTER_HEAD;break}case W.BODY:case W.BR:case W.HTML:{PT(e,t);break}case W.TEMPLATE:{y_(e,t);break}default:e._err(t,wt.endTagWithoutMatchingOpenElement)}}function y_(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==W.TEMPLATE&&e._err(t,wt.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(W.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,wt.endTagWithoutMatchingOpenElement)}function PT(e,t){e.openElements.pop(),e.insertionMode=qe.AFTER_HEAD,e._processToken(t)}function oMt(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.BASEFONT:case W.BGSOUND:case W.HEAD:case W.LINK:case W.META:case W.NOFRAMES:case W.STYLE:{uh(e,t);break}case W.NOSCRIPT:{e._err(t,wt.nestedNoscriptInHead);break}default:MT(e,t)}}function lMt(e,t){switch(t.tagID){case W.NOSCRIPT:{e.openElements.pop(),e.insertionMode=qe.IN_HEAD;break}case W.BR:{MT(e,t);break}default:e._err(t,wt.endTagWithoutMatchingOpenElement)}}function MT(e,t){const r=t.type===Qn.EOF?wt.openElementsLeftAfterEof:wt.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=qe.IN_HEAD,e._processToken(t)}function uMt(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.BODY:{e._insertElement(t,Ft.HTML),e.framesetOk=!1,e.insertionMode=qe.IN_BODY;break}case W.FRAMESET:{e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_FRAMESET;break}case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:case W.NOFRAMES:case W.SCRIPT:case W.STYLE:case W.TEMPLATE:case W.TITLE:{e._err(t,wt.abandonedHeadElementChild),e.openElements.push(e.headElement,W.HEAD),uh(e,t),e.openElements.remove(e.headElement);break}case W.HEAD:{e._err(t,wt.misplacedStartTagForHeadElement);break}default:kT(e,t)}}function cMt(e,t){switch(t.tagID){case W.BODY:case W.HTML:case W.BR:{kT(e,t);break}case W.TEMPLATE:{y_(e,t);break}default:e._err(t,wt.endTagWithoutMatchingOpenElement)}}function kT(e,t){e._insertFakeElement(ht.BODY,W.BODY),e.insertionMode=qe.IN_BODY,LI(e,t)}function LI(e,t){switch(t.type){case Qn.CHARACTER:{xAe(e,t);break}case Qn.WHITESPACE_CHARACTER:{wAe(e,t);break}case Qn.COMMENT:{EB(e,t);break}case Qn.START_TAG:{Zl(e,t);break}case Qn.END_TAG:{jI(e,t);break}case Qn.EOF:{AAe(e,t);break}}}function wAe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function xAe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function dMt(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function fMt(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function hMt(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_FRAMESET)}function pMt(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,Ft.HTML)}function mMt(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&xB.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Ft.HTML)}function gMt(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,Ft.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function yMt(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,Ft.HTML),r||(e.formElement=e.openElements.current))}function vMt(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(r===W.LI&&i===W.LI||(r===W.DD||r===W.DT)&&(i===W.DD||i===W.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==W.ADDRESS&&i!==W.DIV&&i!==W.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,Ft.HTML)}function _Mt(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,Ft.HTML),e.tokenizer.state=qs.PLAINTEXT}function bMt(e,t){e.openElements.hasInScope(W.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ft.HTML),e.framesetOk=!1}function wMt(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(ht.A);r&&(VW(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ft.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xMt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ft.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function EMt(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(W.NOBR)&&(VW(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Ft.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TMt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ft.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function SMt(e,t){e.treeAdapter.getDocumentMode(e.document)!==$d.QUIRKS&&e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,Ft.HTML),e.framesetOk=!1,e.insertionMode=qe.IN_TABLE}function EAe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ft.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TAe(e){const t=fAe(e,_v.TYPE);return t!=null&&t.toLowerCase()===WPt}function AMt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ft.HTML),TAe(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function CMt(e,t){e._appendElement(t,Ft.HTML),t.ackSelfClosing=!0}function PMt(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._appendElement(t,Ft.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function MMt(e,t){t.tagName=ht.IMG,t.tagID=W.IMG,EAe(e,t)}function kMt(e,t){e._insertElement(t,Ft.HTML),e.skipNextNewLine=!0,e.tokenizer.state=qs.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=qe.TEXT}function OMt(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,qs.RAWTEXT)}function NMt(e,t){e.framesetOk=!1,e._switchToTextParsing(t,qs.RAWTEXT)}function Joe(e,t){e._switchToTextParsing(t,qs.RAWTEXT)}function IMt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ft.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===qe.IN_TABLE||e.insertionMode===qe.IN_CAPTION||e.insertionMode===qe.IN_TABLE_BODY||e.insertionMode===qe.IN_ROW||e.insertionMode===qe.IN_CELL?qe.IN_SELECT_IN_TABLE:qe.IN_SELECT}function DMt(e,t){e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Ft.HTML)}function LMt(e,t){e.openElements.hasInScope(W.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Ft.HTML)}function jMt(e,t){e.openElements.hasInScope(W.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(W.RTC),e._insertElement(t,Ft.HTML)}function RMt(e,t){e._reconstructActiveFormattingElements(),vAe(t),WW(t),t.selfClosing?e._appendElement(t,Ft.MATHML):e._insertElement(t,Ft.MATHML),t.ackSelfClosing=!0}function $Mt(e,t){e._reconstructActiveFormattingElements(),_Ae(t),WW(t),t.selfClosing?e._appendElement(t,Ft.SVG):e._insertElement(t,Ft.SVG),t.ackSelfClosing=!0}function ele(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ft.HTML)}function Zl(e,t){switch(t.tagID){case W.I:case W.S:case W.B:case W.U:case W.EM:case W.TT:case W.BIG:case W.CODE:case W.FONT:case W.SMALL:case W.STRIKE:case W.STRONG:{xMt(e,t);break}case W.A:{wMt(e,t);break}case W.H1:case W.H2:case W.H3:case W.H4:case W.H5:case W.H6:{mMt(e,t);break}case W.P:case W.DL:case W.OL:case W.UL:case W.DIV:case W.DIR:case W.NAV:case W.MAIN:case W.MENU:case W.ASIDE:case W.CENTER:case W.FIGURE:case W.FOOTER:case W.HEADER:case W.HGROUP:case W.DIALOG:case W.DETAILS:case W.ADDRESS:case W.ARTICLE:case W.SEARCH:case W.SECTION:case W.SUMMARY:case W.FIELDSET:case W.BLOCKQUOTE:case W.FIGCAPTION:{pMt(e,t);break}case W.LI:case W.DD:case W.DT:{vMt(e,t);break}case W.BR:case W.IMG:case W.WBR:case W.AREA:case W.EMBED:case W.KEYGEN:{EAe(e,t);break}case W.HR:{PMt(e,t);break}case W.RB:case W.RTC:{LMt(e,t);break}case W.RT:case W.RP:{jMt(e,t);break}case W.PRE:case W.LISTING:{gMt(e,t);break}case W.XMP:{OMt(e,t);break}case W.SVG:{$Mt(e,t);break}case W.HTML:{dMt(e,t);break}case W.BASE:case W.LINK:case W.META:case W.STYLE:case W.TITLE:case W.SCRIPT:case W.BGSOUND:case W.BASEFONT:case W.TEMPLATE:{uh(e,t);break}case W.BODY:{fMt(e,t);break}case W.FORM:{yMt(e,t);break}case W.NOBR:{EMt(e,t);break}case W.MATH:{RMt(e,t);break}case W.TABLE:{SMt(e,t);break}case W.INPUT:{AMt(e,t);break}case W.PARAM:case W.TRACK:case W.SOURCE:{CMt(e,t);break}case W.IMAGE:{MMt(e,t);break}case W.BUTTON:{bMt(e,t);break}case W.APPLET:case W.OBJECT:case W.MARQUEE:{TMt(e,t);break}case W.IFRAME:{NMt(e,t);break}case W.SELECT:{IMt(e,t);break}case W.OPTION:case W.OPTGROUP:{DMt(e,t);break}case W.NOEMBED:case W.NOFRAMES:{Joe(e,t);break}case W.FRAMESET:{hMt(e,t);break}case W.TEXTAREA:{kMt(e,t);break}case W.NOSCRIPT:{e.options.scriptingEnabled?Joe(e,t):ele(e,t);break}case W.PLAINTEXT:{_Mt(e,t);break}case W.COL:case W.TH:case W.TD:case W.TR:case W.HEAD:case W.FRAME:case W.TBODY:case W.TFOOT:case W.THEAD:case W.CAPTION:case W.COLGROUP:break;default:ele(e,t)}}function FMt(e,t){if(e.openElements.hasInScope(W.BODY)&&(e.insertionMode=qe.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function BMt(e,t){e.openElements.hasInScope(W.BODY)&&(e.insertionMode=qe.AFTER_BODY,DAe(e,t))}function zMt(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function UMt(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(W.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(W.FORM):r&&e.openElements.remove(r))}function WMt(e){e.openElements.hasInButtonScope(W.P)||e._insertFakeElement(ht.P,W.P),e._closePElement()}function VMt(e){e.openElements.hasInListItemScope(W.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(W.LI),e.openElements.popUntilTagNamePopped(W.LI))}function HMt(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function GMt(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function qMt(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function KMt(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ht.BR,W.BR),e.openElements.pop(),e.framesetOk=!1}function SAe(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(n===s&&(n!==W.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function jI(e,t){switch(t.tagID){case W.A:case W.B:case W.I:case W.S:case W.U:case W.EM:case W.TT:case W.BIG:case W.CODE:case W.FONT:case W.NOBR:case W.SMALL:case W.STRIKE:case W.STRONG:{VW(e,t);break}case W.P:{WMt(e);break}case W.DL:case W.UL:case W.OL:case W.DIR:case W.DIV:case W.NAV:case W.PRE:case W.MAIN:case W.MENU:case W.ASIDE:case W.BUTTON:case W.CENTER:case W.FIGURE:case W.FOOTER:case W.HEADER:case W.HGROUP:case W.DIALOG:case W.ADDRESS:case W.ARTICLE:case W.DETAILS:case W.SEARCH:case W.SECTION:case W.SUMMARY:case W.LISTING:case W.FIELDSET:case W.BLOCKQUOTE:case W.FIGCAPTION:{zMt(e,t);break}case W.LI:{VMt(e);break}case W.DD:case W.DT:{HMt(e,t);break}case W.H1:case W.H2:case W.H3:case W.H4:case W.H5:case W.H6:{GMt(e);break}case W.BR:{KMt(e);break}case W.BODY:{FMt(e,t);break}case W.HTML:{BMt(e,t);break}case W.FORM:{UMt(e);break}case W.APPLET:case W.OBJECT:case W.MARQUEE:{qMt(e,t);break}case W.TEMPLATE:{y_(e,t);break}default:SAe(e,t)}}function AAe(e,t){e.tmplInsertionModeStack.length>0?IAe(e,t):HW(e,t)}function YMt(e,t){var r;t.tagID===W.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function XMt(e,t){e._err(t,wt.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function fR(e,t){if(e.openElements.currentTagId!==void 0&&bAe.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=qe.IN_TABLE_TEXT,t.type){case Qn.CHARACTER:{PAe(e,t);break}case Qn.WHITESPACE_CHARACTER:{CAe(e,t);break}}else dC(e,t)}function QMt(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_CAPTION}function ZMt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_COLUMN_GROUP}function JMt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ht.COLGROUP,W.COLGROUP),e.insertionMode=qe.IN_COLUMN_GROUP,GW(e,t)}function ekt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_TABLE_BODY}function tkt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ht.TBODY,W.TBODY),e.insertionMode=qe.IN_TABLE_BODY,RI(e,t)}function rkt(e,t){e.openElements.hasInTableScope(W.TABLE)&&(e.openElements.popUntilTagNamePopped(W.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function nkt(e,t){TAe(t)?e._appendElement(t,Ft.HTML):dC(e,t),t.ackSelfClosing=!0}function ikt(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Ft.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Vw(e,t){switch(t.tagID){case W.TD:case W.TH:case W.TR:{tkt(e,t);break}case W.STYLE:case W.SCRIPT:case W.TEMPLATE:{uh(e,t);break}case W.COL:{JMt(e,t);break}case W.FORM:{ikt(e,t);break}case W.TABLE:{rkt(e,t);break}case W.TBODY:case W.TFOOT:case W.THEAD:{ekt(e,t);break}case W.INPUT:{nkt(e,t);break}case W.CAPTION:{QMt(e,t);break}case W.COLGROUP:{ZMt(e,t);break}default:dC(e,t)}}function vA(e,t){switch(t.tagID){case W.TABLE:{e.openElements.hasInTableScope(W.TABLE)&&(e.openElements.popUntilTagNamePopped(W.TABLE),e._resetInsertionMode());break}case W.TEMPLATE:{y_(e,t);break}case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TBODY:case W.TD:case W.TFOOT:case W.TH:case W.THEAD:case W.TR:break;default:dC(e,t)}}function dC(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,LI(e,t),e.fosterParentingEnabled=r}function CAe(e,t){e.pendingCharacterTokens.push(t)}function PAe(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function rE(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)dC(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const MAe=new Set([W.CAPTION,W.COL,W.COLGROUP,W.TBODY,W.TD,W.TFOOT,W.TH,W.THEAD,W.TR]);function akt(e,t){const r=t.tagID;MAe.has(r)?e.openElements.hasInTableScope(W.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=qe.IN_TABLE,Vw(e,t)):Zl(e,t)}function skt(e,t){const r=t.tagID;switch(r){case W.CAPTION:case W.TABLE:{e.openElements.hasInTableScope(W.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=qe.IN_TABLE,r===W.TABLE&&vA(e,t));break}case W.BODY:case W.COL:case W.COLGROUP:case W.HTML:case W.TBODY:case W.TD:case W.TFOOT:case W.TH:case W.THEAD:case W.TR:break;default:jI(e,t)}}function GW(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.COL:{e._appendElement(t,Ft.HTML),t.ackSelfClosing=!0;break}case W.TEMPLATE:{uh(e,t);break}default:AO(e,t)}}function okt(e,t){switch(t.tagID){case W.COLGROUP:{e.openElements.currentTagId===W.COLGROUP&&(e.openElements.pop(),e.insertionMode=qe.IN_TABLE);break}case W.TEMPLATE:{y_(e,t);break}case W.COL:break;default:AO(e,t)}}function AO(e,t){e.openElements.currentTagId===W.COLGROUP&&(e.openElements.pop(),e.insertionMode=qe.IN_TABLE,e._processToken(t))}function RI(e,t){switch(t.tagID){case W.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_ROW;break}case W.TH:case W.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ht.TR,W.TR),e.insertionMode=qe.IN_ROW,$I(e,t);break}case W.CAPTION:case W.COL:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=qe.IN_TABLE,Vw(e,t));break}default:Vw(e,t)}}function TB(e,t){const r=t.tagID;switch(t.tagID){case W.TBODY:case W.TFOOT:case W.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=qe.IN_TABLE);break}case W.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=qe.IN_TABLE,vA(e,t));break}case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TD:case W.TH:case W.TR:break;default:vA(e,t)}}function $I(e,t){switch(t.tagID){case W.TH:case W.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Ft.HTML),e.insertionMode=qe.IN_CELL,e.activeFormattingElements.insertMarker();break}case W.CAPTION:case W.COL:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:case W.TR:{e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=qe.IN_TABLE_BODY,RI(e,t));break}default:Vw(e,t)}}function kAe(e,t){switch(t.tagID){case W.TR:{e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=qe.IN_TABLE_BODY);break}case W.TABLE:{e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=qe.IN_TABLE_BODY,TB(e,t));break}case W.TBODY:case W.TFOOT:case W.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(W.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=qe.IN_TABLE_BODY,TB(e,t));break}case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TD:case W.TH:break;default:vA(e,t)}}function lkt(e,t){const r=t.tagID;MAe.has(r)?(e.openElements.hasInTableScope(W.TD)||e.openElements.hasInTableScope(W.TH))&&(e._closeTableCell(),$I(e,t)):Zl(e,t)}function ukt(e,t){const r=t.tagID;switch(r){case W.TD:case W.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=qe.IN_ROW);break}case W.TABLE:case W.TBODY:case W.TFOOT:case W.THEAD:case W.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),kAe(e,t));break}case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:break;default:jI(e,t)}}function OAe(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.OPTION:{e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e._insertElement(t,Ft.HTML);break}case W.OPTGROUP:{e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Ft.HTML);break}case W.HR:{e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Ft.HTML),t.ackSelfClosing=!0;break}case W.INPUT:case W.KEYGEN:case W.TEXTAREA:case W.SELECT:{e.openElements.hasInSelectScope(W.SELECT)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),t.tagID!==W.SELECT&&e._processStartTag(t));break}case W.SCRIPT:case W.TEMPLATE:{uh(e,t);break}}}function NAe(e,t){switch(t.tagID){case W.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===W.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===W.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop();break}case W.OPTION:{e.openElements.currentTagId===W.OPTION&&e.openElements.pop();break}case W.SELECT:{e.openElements.hasInSelectScope(W.SELECT)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode());break}case W.TEMPLATE:{y_(e,t);break}}}function ckt(e,t){const r=t.tagID;r===W.CAPTION||r===W.TABLE||r===W.TBODY||r===W.TFOOT||r===W.THEAD||r===W.TR||r===W.TD||r===W.TH?(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),e._processStartTag(t)):OAe(e,t)}function dkt(e,t){const r=t.tagID;r===W.CAPTION||r===W.TABLE||r===W.TBODY||r===W.TFOOT||r===W.THEAD||r===W.TR||r===W.TD||r===W.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),e.onEndTag(t)):NAe(e,t)}function fkt(e,t){switch(t.tagID){case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:case W.NOFRAMES:case W.SCRIPT:case W.STYLE:case W.TEMPLATE:case W.TITLE:{uh(e,t);break}case W.CAPTION:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:{e.tmplInsertionModeStack[0]=qe.IN_TABLE,e.insertionMode=qe.IN_TABLE,Vw(e,t);break}case W.COL:{e.tmplInsertionModeStack[0]=qe.IN_COLUMN_GROUP,e.insertionMode=qe.IN_COLUMN_GROUP,GW(e,t);break}case W.TR:{e.tmplInsertionModeStack[0]=qe.IN_TABLE_BODY,e.insertionMode=qe.IN_TABLE_BODY,RI(e,t);break}case W.TD:case W.TH:{e.tmplInsertionModeStack[0]=qe.IN_ROW,e.insertionMode=qe.IN_ROW,$I(e,t);break}default:e.tmplInsertionModeStack[0]=qe.IN_BODY,e.insertionMode=qe.IN_BODY,Zl(e,t)}}function hkt(e,t){t.tagID===W.TEMPLATE&&y_(e,t)}function IAe(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(W.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):HW(e,t)}function pkt(e,t){t.tagID===W.HTML?Zl(e,t):CO(e,t)}function DAe(e,t){var r;if(t.tagID===W.HTML){if(e.fragmentContext||(e.insertionMode=qe.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===W.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else CO(e,t)}function CO(e,t){e.insertionMode=qe.IN_BODY,LI(e,t)}function mkt(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.FRAMESET:{e._insertElement(t,Ft.HTML);break}case W.FRAME:{e._appendElement(t,Ft.HTML),t.ackSelfClosing=!0;break}case W.NOFRAMES:{uh(e,t);break}}}function gkt(e,t){t.tagID===W.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==W.FRAMESET&&(e.insertionMode=qe.AFTER_FRAMESET))}function ykt(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.NOFRAMES:{uh(e,t);break}}}function vkt(e,t){t.tagID===W.HTML&&(e.insertionMode=qe.AFTER_AFTER_FRAMESET)}function _kt(e,t){t.tagID===W.HTML?Zl(e,t):Bk(e,t)}function Bk(e,t){e.insertionMode=qe.IN_BODY,LI(e,t)}function bkt(e,t){switch(t.tagID){case W.HTML:{Zl(e,t);break}case W.NOFRAMES:{uh(e,t);break}}}function wkt(e,t){t.chars=ns,e._insertCharacters(t)}function xkt(e,t){e._insertCharacters(t),e.framesetOk=!1}function LAe(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Ft.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Ekt(e,t){if($Pt(t))LAe(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===Ft.MATHML?vAe(t):n===Ft.SVG&&(FPt(t),_Ae(t)),WW(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function Tkt(e,t){if(t.tagID===W.P||t.tagID===W.BR){LAe(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===Ft.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}ht.AREA,ht.BASE,ht.BASEFONT,ht.BGSOUND,ht.BR,ht.COL,ht.EMBED,ht.FRAME,ht.HR,ht.IMG,ht.INPUT,ht.KEYGEN,ht.LINK,ht.META,ht.PARAM,ht.SOURCE,ht.TRACK,ht.WBR;const Skt=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Akt=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),tle={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function jAe(e,t){const r=jkt(e),n=FSe("type",{handlers:{root:Ckt,element:Pkt,text:Mkt,comment:$Ae,doctype:kkt,raw:Nkt},unknown:Ikt}),i={parser:r?new Zoe(tle):Zoe.getFragmentParser(void 0,tle),handle(o){n(o,i)},stitches:!1,options:t||{}};n(e,i),kx(i,ap());const a=r?i.parser.document:i.parser.getFragment(),s=RCt(a,{file:i.options.file});return i.stitches&&DI(s,"comment",function(o,l,u){const c=o;if(c.value.stitch&&u&&l!==void 0){const d=u.children;return d[l]=c.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function RAe(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function Ckt(e,t){RAe(e.children,t)}function Pkt(e,t){Dkt(e,t),RAe(e.children,t),Lkt(e,t)}function Mkt(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:Qn.CHARACTER,chars:e.value,location:fC(e)};kx(t,ap(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function kkt(e,t){const r={type:Qn.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:fC(e)};kx(t,ap(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Okt(e,t){t.stitches=!0;const r=Rkt(e);if("children"in e&&"children"in r){const n=jAe({type:"root",children:e.children},t.options);r.children=n.children}$Ae({type:"comment",value:{stitch:r}},t)}function $Ae(e,t){const r=e.value,n={type:Qn.COMMENT,data:r,location:fC(e)};kx(t,ap(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Nkt(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,FAe(t,ap(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Skt,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function Ikt(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))Okt(r,t);else{let n="";throw Akt.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function kx(e,t){FAe(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=qs.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function FAe(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function Dkt(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===qs.PLAINTEXT)return;kx(t,ap(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:Gy.html;i===Gy.html&&r==="svg"&&(i=Gy.svg);const a=UCt({...e,children:[]},{space:i===Gy.svg?"svg":"html"}),s={type:Qn.START_TAG,tagName:r,tagID:Mx(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:fC(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function Lkt(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&XCt.includes(r)||t.parser.tokenizer.state===qs.PLAINTEXT)return;kx(t,PI(e));const n={type:Qn.END_TAG,tagName:r,tagID:Mx(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:fC(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===qs.RCDATA||t.parser.tokenizer.state===qs.RAWTEXT||t.parser.tokenizer.state===qs.SCRIPT_DATA)&&(t.parser.tokenizer.state=qs.DATA)}function jkt(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function fC(e){const t=ap(e)||{line:void 0,column:void 0,offset:void 0},r=PI(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function Rkt(e){return"children"in e?Ww({...e,children:[]}):Ww(e)}function $kt(e){return function(t,r){return jAe(t,{...e,file:r})}}const OT="https://www.alamoedc.org",SB=`${OT}/logo.jpg`,Fkt={"/":{title:"Alamo Economic Development Corporation | Building Prosperity in Texas",description:"Partner with Alamo EDC to grow your business in the heart of the Rio Grande Valley. Explore grants, incentives, and community resources in Alamo, Texas."},"/board":{title:"Board of Directors | Alamo EDC",description:"Meet the Alamo Economic Development Corporation Board of Directors leading business growth and investment in Alamo, Texas."},"/incentives":{title:"Business Incentives & Grant Programs | Alamo EDC",description:"Download Alamo EDC grant and loan applications, including start-up, equipment, revolving loan, and legacy business programs."},"/available-properties":{title:"Available Commercial Properties in Alamo, Texas | Alamo EDC",description:"Browse commercial land, retail, and industrial properties for sale or lease in Alamo, Texas, with broker
3731contact details for each listing."},"/community":{title:"Community & Quality of Life in Alamo, Texas | Alamo EDC",description:"Discover schools, housing, parks, and community life that make Alamo, Texas a great place to live, work, and invest."},"/community/schools":{title:"Schools in Alamo, Texas | Alamo EDC",description:"Learn about the public schools and education options serving families and the workforce in Alamo, Texas."},"/community/affordable-living":{title:"Affordable Living in Alamo, Texas | Alamo EDC",description:"See why the cost of living, housing, and everyday expenses in Alamo, Texas stretch your budget further."},"/community/rv-parks":{title:"RV Parks & Winter Texan Living in Alamo | Alamo EDC",description:"Find RV parks and Winter Texan communities in Alamo, Texas, and the amenities that welcome seasonal residents."},"/community/ecotourism":{title:"Ecotourism & Birding in Alamo, Texas | Alamo EDC",description:"Explore world-class birding, nature trails, and ecotourism destinations surrounding Alamo, Texas."},"/community/santa-ana-refuge":{title:"Santa Ana National Wildlife Refuge | Alamo EDC",description:"Visit the Santa Ana National Wildlife Refuge near Alamo, Texas, one of the top birding destinations in the country."},"/community/business-empowerment":{title:"Business Empowerment Programs | Alamo EDC",description:"Alamo EDC's three-phase strategy to empower local entrepreneurs with training, resources, and grant applications."},"/community/shop-local-biz":{title:"Shop Local Biz: Featured Alamo Businesses | Alamo EDC",description:"Meet the featured small businesses of Alamo, Texas and support the local shops that power our economy."},"/community/tshirt-program":{title:"Shop Alamo First T-Shirt Program | Alamo EDC",description:"Join the Shop Alamo First t-shirt program and show your support for local businesses in Alamo, Texas."},"/visit-alamo":{title:"Visit Alamo, Texas | Things to Do & See | Alamo EDC",description:"Plan your visit to Alamo, Texas with local attractions, nature, dining, and events in the Rio Grande Valley."},"/visit-alamo/where-to-stay":{title:"Where to Stay in Alamo, Texas | Alamo EDC",description:"Hotels, inns, and lodging options for visitors and business travelers staying in Alamo, Texas."},"/visit-alamo/blog":{title:"Alamo EDC Blog | News for Local Business & Visitors",description:"Articles, guides, and updates from the Alamo Economic Development Corporation for local businesses, workers, and visitors."},"/board-meetings":{title:"Board Meetings & Agendas | Alamo EDC",description:"View Alamo EDC board meeting agendas, schedules, and public notices for the Alamo Economic Development Corporation."}},Bkt=()=>{const{pathname:e}=rp(),t=e.length>1&&e.endsWith("/")?e.slice(0,-1):e,r=Fkt[t],n=`${OT}${t}`;return r?g.jsxs(p6,{children:[g.jsx("title",{children:r.title}),g.jsx("meta",{name:"description",content:r.description}),g.jsx("link",{rel:"canonical",href:n}),g.jsx("meta",{property:"og:title",content:r.title}),g.jsx("meta",{property:"og:description",content:r.description}),g.jsx("meta",{property:"og:type",content:"website"}),g.jsx("meta",{property:"og:url",content:n}),g.jsx("meta",{property:"og:image",content:SB}),g.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),g.jsx("meta",{name:"twitter:title",content:r.title}),g.jsx("meta",{name:"twitter:description",content:r.description}),g.jsx("meta",{name:"twitter:image",content:SB})]}):g.jsxs(p6,{children:[g.jsx("link",{rel:"canonical",href:n}),g.jsx("meta",{property:"og:url",content:n})]})},zkt=()=>{const{slug:e}=BIe(),[t,r]=R.useState("en"),{data:n,isLoading:i,error:a}=r_({queryKey:["blog-article",e],queryFn:async()=>{const{data:f,error:h}=await nn.from("blog_articles").select("*").eq("slug",e).eq("is_published",!0).maybeSingle();if(h)throw h;return f},enabled:!!e}),s=()=>{r(t==="en"?"es":"en")},o=()=>n?t==="es"&&n.title_es?n.title_es:n.title:"",l=()=>n?t==="es"&&n.content_es?n.content_es:n.content:"";if(i)return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx(po,{language:t,onLanguageToggle:s}),g.jsx("div",{className:"pt-32 pb-16 flex-grow",children:g.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[g.jsx(Gu,{className:"h-8 w-32 mb-8"}),g.jsx(Gu,{className:"h-12 w-3/4 mb-4"}),g.jsx(Gu,{className:"h-6 w-1/2 mb-8"}),g.jsx(Gu,{className:"h-64 w-full mb-8"}),g.jsx(Gu,{className:"h-4 w-full mb-2"}),g.jsx(Gu,{className:"h-4 w-full mb-2"}),g.jsx(Gu,{className:"h-4 w-3/4"})]})}),g.jsx(mo,{language:t})]});if(a||!n)return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx(po,{language:t,onLanguageToggle:s}),g.jsx("div",{className:"pt-32 pb-16 flex-grow bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsxs("div",{className:"container mx-auto px-4 text-center",children:[g.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:t==="en"?"Article Not Found":"ArtÃculo No Encontrado"}),g.jsx("p",{className:"text-muted-foreground mb-8",children:t==="en"?"The article you're looking for doesn't exist or has been removed.":"El artÃculo que buscas no existe o ha sido eliminado."}),g.jsx(Rs,{to:"/visit-alamo/blog",children:g.jsxs(gr,{className:"bg-primary hover:bg-primary/90",children:[g.jsx(_6,{className:"h-4 w-4 mr-2"}),t==="en"?"Back to Blog":"Volver al Blog"]})})]})}),g.jsx(mo,{language:t})]});const u=`${OT}/visit-alamo/blog/${n.slug}`,c=n.meta_description||(t==="es"&&n.excerpt_es?n.excerpt_es:n.excerpt)||"",d=n.featured_image?n.featured_image.startsWith("http")?n.featured_image:`${OT}${n.featured_image}`:SB;return g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsxs(p6,{children:[g.jsx("title",{children:`${o()} | Alamo EDC Blog`}),g.jsx("meta",{name:"description",content:c}),g.jsx("link",{rel:"canonical",href:u}),g.jsx("meta",{property:"og:type",content:"article"}),g.jsx("meta",{property:"og:title",content:o()}),g.jsx("meta",{property:"og:description",content:c}),g.jsx("meta",{property:"og:url",content:u}),g.jsx("meta",{property:"og:image",content:d}),g.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),g.jsx("meta",{name:"twitter:title",content:o()}),g.jsx("meta",{name:"twitter:description",content:c}),g.jsx("meta",{name:"twitter:image",content:d}),g.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:o(),description:c,image:d,datePublished:n.published_at||void 0,author:{"@type":"Person",name:n.author||"Alamo Economic Development Corporation"},publisher:{"@type":"Organization",name:"Alamo Economic Development Corporation",logo:{"@type":"ImageObject",url:`${OT}/logo.jpg`}},mainEntityOfPage:u})})]}),g.jsx(po,{language:t,onLanguageToggle:s}),n.featured_image?g.jsxs("section",{className:"relative h-[50vh] min-h-[350px] bg-cover bg-center flex items-end",style:{backgroundImage:`url(${n.featured_image})`},children:[g.jsx("div",{className:"absolute inset-0 bg-black/30"}),g.jsx("div",{className:"relative z-10 w-full",children:g.jsx("div",{className:"py-4 px-4",style:{background:"radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0) 80%)"},children:g.jsx("div",{className:"container mx-auto max-w-4xl",children:g.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-white",style:{textShadow:"2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5)"},children:o()})})})})]}):g.jsx("section",{className:"pt-16 md:pt-24 pb-8 bg-gradient-to-br from-primary/10 via-background to-secondary/10",children:g.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:g.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground",children:o()})})}),g.jsx("article",{className:"py-12 flex-grow bg-gradient-to-br from-primary/5 via-background to-secondary/5",children:g.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[g.jsxs(Rs,{to:"/visit-alamo/blog",className:"inline-flex items-center text-primary font-medium hover:text-primary/80 transition-colors mb-8 group",children:[g.jsx(_6,{className:"h-4 w-4 mr-2 group-hover:-translate-x-1 transition-transform"}),t==="en"?"Back to Blog":"Volver al Blog"]}),!n.featured_image&&g.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-6",children:o()}),g.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-muted-foreground mb-8 pb-8 border-b border-primary/20",children:[n.published_at&&g.jsxs("div",{className:"flex items-center gap-2 bg-primary/10 px-3 py-1.5 rounded-full",children:[g.jsx(jg,{className:"h-4 w-4 text-primary"}),g.jsx("span",{className:"text-sm font-medium",children:Ii(new Date(n.published_at),"MMMM d, yyyy")})]}),n.author&&g.jsxs("div",{className:"flex items-center gap-2 bg-secondary/10 px-3 py-1.5 rounded-full",children:[g.jsx(D5e,{className:"h-4 w-4 text-secondary"}),g.jsx("span",{className:"text-sm font-medium",children:n.author})]}),n.meta_keywords&&g.jsxs("div",{className:"flex items-center gap-2 bg-accent/20 px-3 py-1.5 rounded-full",children:[g.jsx(I5e,{className:"h-4 w-4 text-accent-foreground"}),g.jsx("span",{className:"text-sm",children:n.meta_keywords})]})]}),g.jsx("div",{className:"prose prose-lg max-w-none",children:g.jsx(hSt,{remarkPlugins:[ACt],rehypePlugins:[$kt],components:{h2:({children:f})=>g.jsx("h2",{className:"text-2xl font-bold text-foreground mt-8 mb-4 border-l-4 border-primary pl-4",children:f}),h3:({children:f})=>g.jsx("h3",{className:"text-xl font-bold text-foreground mt-6 mb-3",children:f}),h4:({children:f})=>g.jsx("h4",{className:"text-lg font-semibold text-foreground mt-4 mb-2",children:f}),p:({children:f})=>
3731g.jsx("p",{className:"text-foreground/80 leading-relaxed mb-4",children:f}),a:({href:f,children:h})=>{const p=f||"#";return/^https?:\/\//i.test(p)?g.jsx("a",{href:p,target:"_blank",className:"text-primary font-medium hover:underline",children:h}):g.jsx(Rs,{to:p,className:"text-primary font-medium hover:underline",children:h})},strong:({children:f})=>g.jsx("strong",{className:"text-foreground font-semibold",children:f}),ul:({children:f})=>g.jsx("ul",{className:"my-4 ml-6 list-disc space-y-2",children:f}),ol:({children:f})=>g.jsx("ol",{className:"my-4 ml-6 list-decimal space-y-2",children:f}),li:({children:f})=>g.jsx("li",{className:"text-foreground/80",children:f}),blockquote:({children:f})=>g.jsx("blockquote",{className:"border-l-4 border-primary bg-primary/5 py-2 px-4 italic my-4",children:f}),hr:()=>g.jsx("hr",{className:"my-8 border-primary/20"})},children:l()||""})})]})}),g.jsx(mo,{language:t})]})};var FI="Switch",[Ukt,x5t]=Ou(FI),[Wkt,Vkt]=Ukt(FI),BAe=R.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:a,required:s,disabled:o,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,h]=R.useState(null),p=Gn(t,b=>h(b)),m=R.useRef(!1),_=f?c||!!f.closest("form"):!0,[y,v]=rd({prop:i,defaultProp:a??!1,onChange:u,caller:FI});return g.jsxs(Wkt,{scope:r,checked:y,disabled:o,children:[g.jsx(Hr.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":VAe(y),"data-disabled":o?"":void 0,disabled:o,value:l,...d,ref:p,onClick:_r(e.onClick,b=>{v(w=>!w),_&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),_&&g.jsx(WAe,{control:f,bubbles:!m.current,name:n,value:l,checked:y,required:s,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});BAe.displayName=FI;var zAe="SwitchThumb",UAe=R.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=Vkt(zAe,r);return g.jsx(Hr.span,{"data-state":VAe(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});UAe.displayName=zAe;var Hkt="SwitchBubbleInput",WAe=R.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{const s=R.useRef(null),o=Gn(s,a),l=s7(r),u=Dde(t);return R.useEffect(()=>{const c=s.current;if(!c)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&h){const p=new Event("click",{bubbles:n});h.call(c,r),c.dispatchEvent(p)}},[l,r,n]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:o,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});WAe.displayName=Hkt;function VAe(e){return e?"checked":"unchecked"}var HAe=BAe,Gkt=UAe;const GAe=R.forwardRef(({className:e,...t},r)=>g.jsx(HAe,{className:Xt("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),...t,ref:r,children:g.jsx(Gkt,{className:Xt("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")})}));GAe.displayName=HAe.displayName;const hR={title:"",title_es:"",slug:"",excerpt:"",excerpt_es:"",content:"",content_es:"",featured_image:"",meta_description:"",meta_keywords:"",author:"",is_published:!1,published_at:null},qkt=()=>{const e=jA(),[t,r]=R.useState(!1),[n,i]=R.useState(null),[a,s]=R.useState(hR),{data:o,isLoading:l}=r_({queryKey:["admin-blog-articles"],queryFn:async()=>{const{data:v,error:b}=await nn.from("blog_articles").select("*").order("created_at",{ascending:!1});if(b)throw b;return v}}),u=$p({mutationFn:async v=>{const b={...v,published_at:v.is_published?new Date().toISOString():null},{error:w}=await nn.from("blog_articles").insert(b);if(w)throw w},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-blog-articles"]}),ba.success("Article created successfully"),m()},onError:v=>{ba.error(`Failed to create article: ${v.message}`)}}),c=$p({mutationFn:async({id:v,data:b})=>{const w={...b,published_at:b.is_published&&!(n!=null&&n.published_at)?new Date().toISOString():b.published_at},{error:x}=await nn.from("blog_articles").update(w).eq("id",v);if(x)throw x},onSuccess:()=>
3731{e.invalidateQueries({queryKey:["admin-blog-articles"]}),ba.success("Article updated successfully"),m()},onError:v=>{ba.error(`Failed to update article: ${v.message}`)}}),d=$p({mutationFn:async v=>{const{error:b}=await nn.from("blog_articles").delete().eq("id",v);if(b)throw b},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-blog-articles"]}),ba.success("Article deleted successfully")},onError:v=>{ba.error(`Failed to delete article: ${v.message}`)}}),f=$p({mutationFn:async({id:v,is_published:b})=>{const w={is_published:b,published_at:b?new Date().toISOString():null},{error:x}=await nn.from("blog_articles").update(w).eq("id",v);if(x)throw x},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-blog-articles"]}),ba.success("Article status updated")},onError:v=>{ba.error(`Failed to update status: ${v.message}`)}}),h=()=>{i(null),s(hR),r(!0)},p=v=>{i(v),s({title:v.title,title_es:v.title_es||"",slug:v.slug,excerpt:v.excerpt||"",excerpt_es:v.excerpt_es||"",content:v.content||"",content_es:v.content_es||"",featured_image:v.featured_image||"",meta_description:v.meta_description||"",meta_keywords:v.meta_keywords||"",author:v.author||"",is_published:v.is_published,published_at:v.published_at}),r(!0)},m=()=>{r(!1),i(null),s(hR)},_=v=>{if(v.preventDefault(),!a.title||!a.slug){ba.error("Title and slug are required");return}n?c.mutate({id:n.id,data:a}):u.mutate(a)},y=v=>v.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx(lx,{}),g.jsxs("div",{className:"container mx-auto px-4 py-8",children:[g.jsxs("div",{className:"flex items-center justify-between mb-8",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Blog Articles"}),g.jsx("p",{className:"text-muted-foreground",children:"Manage blog content for the website"})]}),g.jsxs(wN,{open:t,onOpenChange:r,children:[g.jsx(lBe,{asChild:!0,children:g.jsxs(gr,{onClick:h,children:[g.jsx(v5,{className:"h-4 w-4 mr-2"}),"New Article"]})}),g.jsxs(WA,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[g.jsx(VA,{children:g.jsx(HA,{children:n?"Edit Article":"Create New Article"})}),g.jsxs("form",{onSubmit:_,className:"space-y-6",children:[g.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"title",children:"Title (English) *"}),g.jsx(Ya,{id:"title",value:a.title,onChange:v=>{s({...a,title:v.target.value,slug:n?a.slug:y(v.target.value)})},placeholder:"Article title",required:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"title_es",children:"Title (Spanish)"}),g.jsx(Ya,{id:"title_es",value:a.title_es||"",onChange:v=>s({...a,title_es:v.target.value}),placeholder:"TÃtulo del artÃculo"})]})]}),g.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"slug",children:"URL Slug *"}),g.jsx(Ya,{id:"slug",value:a.slug,onChange:v=>s({...a,slug:y(v.target.value)}),placeholder:"article-url-slug",required:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"author",children:"Author"}),g.jsx(Ya,{id:"author",value:a.author||"",onChange:v=>s({...a,author:v.target.value}),placeholder:"Author name"})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"featured_image",children:"Featured Image URL"}),g.jsx(Ya,{id:"featured_image",value:a.featured_image||"",onChange:v=>s({...a,featured_image:v.target.value}),placeholder:"https://example.com/image.jpg"})]}),g.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"excerpt",children:"Excerpt (English)"}),g.jsx(yg,{id:"excerpt",value:a.excerpt||"",onChange:v=>s({...a,excerpt:v.target.value}),placeholder:"Brief summary of the article",rows:3})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"excerpt_es",children:"Excerpt (Spanish)"}),g.jsx(yg,{id:"excerpt_es",value:a.excerpt_es||"",onChange:v=>s({...a,excerpt_es:v.target.value}),placeholder:"Resumen breve del artÃculo",rows:3})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"content",children:"Content (English) - HTML supported"}),g.jsx(yg,{id:"content",value:a.content||"",onChange:v=>s({...a,content:v.target.value}),placeholder:"Full article content (HTML supported)",rows:8})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"content_es",children:"Content (Spanish) - HTML supported"}),g.jsx(yg,{id:"content_es",value:a.content_es||"",onChange:v=>s({...a,content_es:v.target.value}),placeholder:"Contenido completo del artÃculo (HTML soportado)",rows:8})]}),g.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"meta_description",children:"Meta Description"}),g.jsx(Ya,{id:"meta_description",value:a.meta_description||"",onChange:v=>s({...a,meta_description:v.target.value}),placeholder:"SEO meta description"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{htmlFor:"meta_keywords",children:"Meta Keywords"}),g.jsx(Ya,{id:"meta_keywords",value:a.meta_keywords||"",onChange:v=>s({...a,meta_keywords:v.target.value}),placeholder:"keyword1, keyword2, keyword3"})]})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(GAe,{id:"is_published",checked:a.is_published,onCheckedChange:v=>s({...a,is_published:v})}),g.jsx(vs,{htmlFor:"is_published",children:"Publish immediately"})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsxs(gr,{type:"button",variant:"outline",onClick:m,children:[g.jsx(Xg,{className:"h-4 w-4 mr-2"}),"Cancel"]}),g.jsxs(gr,{type:"submit",disabled:u.isPending||c.isPending,children:[g.jsx(C5e,{className:"h-4 w-4 mr-2"}),n?"Update":"Create"," Article"]})]})]})]})]})]}),l?g.jsx("div",{className:"grid gap-4",children:[...Array(3)].map((v,b)=>g.jsx(un,{children:g.jsxs(kn,{className:"p-6",children:[g.jsx(Gu,{className:"h-6 w-1/3 mb-2"}),g.jsx(Gu,{className:"h-4 w-1/4"})]})},b))}):o&&o.length>0?g.jsx("div",{className:"grid gap-4",children:o.map(v=>g.jsx(un,{children:g.jsx(kn,{className:"p-6",children:g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[g.jsx("h3",{className:"text-lg font-semibold",children:v.title}),g.jsx(Hp,{variant:v.is_published?"default":"secondary",children:v.is_published?"Published":"Draft"})]}),g.jsxs("p",{className:"text-sm text-muted-foreground mb-1",children:["Slug: /visit-alamo/blog/",v.slug]}),v.published_at&&g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Published: ",Ii(new Date(v.published_at),"MMM d, yyyy")]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(gr,{variant:"outline",size:"icon",onClick:()=>f.mutate({id:v.id,is_published:!v.is_published}),title:v.is_published?"Unpublish":"Publish",children:v.is_published?g.jsx(y5e,{className:"h-4 w-4"}):g.jsx(kz,{className:"h-4 w-4"})}),g.jsx(gr,{variant:"outline",size:"icon",onClick:()=>p(v),children:g.jsx(y5,{className:"h-4 w-4"})}),g.jsxs(wS,{children:[g.jsx(Lye,{asChild:!0,children:g.jsx(gr,{variant:"outline",size:"icon",children:g.jsx(DA,{className:"h-4 w-4 text-destructive"})})}),g.jsxs(rw,{children:[g.jsxs(nw,{children:[g.jsx(aw,{children:"Delete Article?"}),g.jsxs(sw,{children:['This will permanently delete "',v.title,'". This action cannot be undone.']})]}),g.jsxs(iw,{children:[g.jsx(lw,{children:"Cancel"}),g.jsx(ow,{onClick:()=>d.mutate(v.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})]})]})]})})},v.id))}):g.jsx(un,{children:g.jsxs(kn,{className:"p-12 text-center",children:[g.jsx("p",{className:"text-muted-foreground mb-4",children:"No articles yet"}),g.jsxs(gr,{onClick:h,children:[g.jsx(v5,{className:"h-4 w-4 mr-2"}),"Create Your First Article"]})]})})]})]})},pR=(()=>{const e=[],t=new Date;for(let r=6;r>=-12;r--){const n=new Date(t.getFullYear(),t.getMonth()+r,1),i=`${n.getFullYear()}
3731-${String(n.getMonth()+1).padStart(2,"0")}`,a=n.toLocaleDateString("en-US",{month:"long",year:"numeric"});e.push({value:i,label:a})}return e})();function mR(e){const[t,r]=e.split("-");return new Date(parseInt(t),parseInt(r)-1,1).toLocaleDateString("en-US",{month:"long",year:"numeric"})}const Kkt=()=>{var z;const[e,t]=R.useState([]),[r,n]=R.useState(!0),[i,a]=R.useState(!1),[s,o]=R.useState(null),[l,u]=R.useState(null),[c,d]=R.useState(""),[f,h]=R.useState(""),p=R.useRef(null),[m,_]=R.useState(""),[y,v]=R.useState(((z=pR[0])==null?void 0:z.value)||""),[b,w]=R.useState(!1),[x,E]=R.useState(null),T=R.useCallback(async()=>{n(!0);const{data:q,error:L}=await nn.from("featured_businesses").select("*").order("featured_month",{ascending:!1,nullsFirst:!1}).order("display_order",{ascending:!0});L?(ba.error("Failed to load businesses"),console.error(L)):t(q||[]),n(!1)},[]);R.useEffect(()=>{T()},[T]);const S=async()=>{if(!x||!m.trim()){ba.error("Please provide a name and select an image");return}a(!0);try{const q=x.name.split(".").pop(),K=`businesses/${`${Date.now()}-${Math.random().toString(36).substring(7)}.${q}`}`,{error:O}=await nn.storage.from("business-images").upload(K,x);if(O)throw O;const{data:N}=nn.storage.from("business-images").getPublicUrl(K),X=y==="past"?null:y,ie=e.filter(Te=>X?Te.featured_month===X:!Te.featured_month),ee=ie.length>0?Math.max(...ie.map(Te=>Te.display_order)):0,{error:le}=await nn.from("featured_businesses").insert({name:m.trim(),image_url:N.publicUrl,storage_path:K,featured_month:X,display_order:ee+1});if(le)throw le;ba.success("Business added successfully!"),_(""),E(null),w(!1),p.current&&(p.current.value=""),T()}catch(q){console.error("Upload error:",q),ba.error("Failed to add business")}finally{a(!1)}},A=async(q,L)=>{o(q);try{await nn.storage.from("business-images").remove([L]);const{error:K}=await nn.from("featured_businesses").delete().eq("id",q);if(K)throw K;ba.success("Business deleted"),T()}catch(K){console.error(K),ba.error("Failed to delete business")}finally{o(null)}},C=async(q,L,K)=>{const O=K.findIndex(ee=>ee.id===q);if(L==="up"&&O===0||L==="down"&&O===K.length-1)return;const N=L==="up"?O-1:O+1,X=K[O].display_order,ie=K[N].display_order;try{await Promise.all([nn.from("featured_businesses").update({display_order:ie}).eq("id",K[O].id),nn.from("featured_businesses").update({display_order:X}).eq("id",K[N].id)]),T()}catch(ee){console.error(ee),ba.error("Failed to reorder")}},k=q=>{u(q.id),d(q.name),h(q.featured_month||"past")},M=async q=>{try{const L=f==="past"?null:f,{error:K}=await nn.from("featured_businesses").update({name:c.trim(),featured_month:L}).eq("id",q);if(K)throw K;ba.success("Business updated"),u(null),T()}catch(L){console.error(L),ba.error("Failed to update")}},D=e.reduce((q,L)=>{const K=L.featured_month||"past";return q[K]||(q[K]=[]),q[K].push(L),q},{}),$=Object.keys(D).sort((q,L)=>q==="past"?1:L==="past"?-1:L.localeCompare(q)),U=(()=>{const q=e.map(X=>X.featured_month).filter(X=>X!==null);if(q.length===0){const X=new Date;return`${X.getFullYear()}-${String(X.getMonth()+1).padStart(2,"0")}`}const L=q.sort().pop(),[K,O]=L.split("-").map(Number),N=new Date(K,O,1);return`${N.getFullYear()}-${String(N.getMonth()+1).padStart(2,"0")}`})(),B=U?!!D[U]:!0;return g.jsxs(un,{children:[g.jsx(zi,{children:g.jsxs(Ui,{className:"flex items-center justify-between",children:[g.jsx("span",{children:"Shop Local Biz"}),g.jsxs(gr,{onClick:()=>w(!b),children:[b?g.jsx(Xg,{className:"mr-2 h-4 w-4"}):g.jsx(v5,{className:"mr-2 h-4 w-4"}),b?"Cancel":"Add Business"]})]})}),g.jsxs(kn,{children:[b&&g.jsxs("div",{className:"mb-8 p-6 border rounded-lg bg-muted/30 space-y-4",children:[g.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{children:"Business Name"}),g.jsx(Ya,{value:m,onChange:q=>_(q.target.value),placeholder:"e.g. Joe's Tacos"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{children:"Featured Month"}),g.jsxs(L1,{value:y,onValueChange:v,children:[g.jsx(Dy,{children:g.jsx(j1,{})}),g.jsxs(Ly,{children:[pR.map(q=>g.jsx(zl,{value:q.value,children:q.label},q.value)),g.jsx(zl,{value:"past",children:"Past Featured"})]})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(vs,{children:"Image"}),g.jsx(Ya,{ref:p,type:"file",accept:"image/*",onChange:q=>{var L;return E(((L=q.target.files)==null?void 0:L[0])||null)}})]}),g.jsxs(gr,{onClick:S,disabled:i||!x||!m.trim(),children:[i?g.jsx(yl,{className:"mr-2 h-4 w-4 animate-spin"}):g.jsx(b5,{className:"mr-2 h-4 w-4"}),"Upload & Add"]})]}),!r&&U&&!B&&!b&&g.jsxs("div",{className:"mb-6 p-4 border-2 border-dashed border-primary/40 rounded-lg bg-primary/5 flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("p",{className:"font-semibold text-primary",children:"Ready for the next spotlight?"}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Start adding businesses for ",mR(U)]})]}),g.jsxs(gr,{onClick:()=>{v(U),w(!0)},children:[g.jsx(h5e,{className:"mr-2 h-4 w-4"}),"Start ",mR(U)]})]}),r?g.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading businesses..."}):e.length===0?g.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'No businesses yet. Click "Add Business" to get started.'}):g.jsx("div",{className:"space-y-10",children:$.map(q=>{const L=D[q],K=q==="past"?"Past Featured Businesses":`${mR(q)} Featured Businesses`;return g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-semibold mb-4 text-primary",children:K}),g.jsx("div",{className:"space-y-2",children:L.map((O,N)=>g.jsxs("div",{className:"flex items-center gap-3 p-3 border rounded-lg bg-card",children:[g.jsx("img",{src:O.image_url,alt:O.name,className:"w-16 h-16 object-contain rounded"}),l===O.id?g.jsxs("div",{className:"flex-1 flex flex-wrap items-center gap-2",children:[g.jsx(Ya,{className:"max-w-[200px]",value:c,onChange:X=>d(X.target.value)}),g.jsxs(L1,{value:f,onValueChange:h,children:[g.jsx(Dy,{className:"w-[180px]",children:g.jsx(j1,{})}),g.jsxs(Ly,{children:[pR.map(X=>g.jsx(zl,{value:X.value,children:X.label},X.value)),g.jsx(zl,{value:"past",children:"Past Featured"})]})]}),g.jsx(gr,{size:"icon",variant:"ghost",onClick:()=>M(O.id),children:g.jsx(p5,{className:"h-4 w-4"})}),g.jsx(gr,{size:"icon",variant:"ghost",onClick:()=>u(null),children:g.jsx(Xg,{className:"h-4 w-4"})})]}):g.jsx("span",{className:"flex-1 font-medium",children:O.name}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(gr,{size:"icon",variant:"ghost",onClick:()=>C(O.id,"up",L),disabled:N===0,children:g.jsx(d5e,{className:"h-4 w-4"})}),g.jsx(gr,{size:"icon",variant:"ghost",onClick:()=>C(O.id,"down",L),disabled:N===L.length-1,children:g.jsx(c5e,{className:"h-4 w-4"})}),g.jsx(gr,{size:"icon",variant:"ghost",onClick:()=>k(O),children:g.jsx(y5,{className:"h-4 w-4"})}),g.jsxs(wS,{children:[g.jsx(Lye,{asChild:!0,children:g.jsx(gr,{size:"icon",variant:"ghost",className:"text-destructive",children:s===O.i
3731d?g.jsx(yl,{className:"h-4 w-4 animate-spin"}):g.jsx(DA,{className:"h-4 w-4"})})}),g.jsxs(rw,{children:[g.jsxs(nw,{children:[g.jsxs(aw,{children:['Delete "',O.name,'"?']}),g.jsx(sw,{children:"This will permanently remove the business and its image."})]}),g.jsxs(iw,{children:[g.jsx(lw,{children:"Cancel"}),g.jsx(ow,{onClick:()=>A(O.id,O.storage_path),children:"Delete"})]})]})]})]})]},O.id))})]},q)})})]})]})};function Ykt(){const{logout:e}=i_();return g.jsxs("div",{className:"min-h-screen bg-background",children:[g.jsx("header",{className:"border-b bg-card",children:g.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Admin Panel"}),g.jsxs(gr,{variant:"outline",onClick:e,children:[g.jsx(NA,{className:"mr-2 h-4 w-4"}),"Logout"]})]})}),g.jsx(lx,{}),g.jsx("main",{className:"container mx-auto px-4 py-8",children:g.jsx(Kkt,{})})]})}const Xkt=()=>{const e=rp();return R.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-100",children:g.jsxs("div",{className:"text-center",children:[g.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),g.jsx("p",{className:"mb-4 text-xl text-gray-600",children:"Oops! Page not found"}),g.jsx("a",{href:"/",className:"text-blue-500 underline hover:text-blue-700",children:"Return to Home"})]})})},Qkt=()=>{const e=rp(),t=R.useRef(null);return R.useEffect(()=>{e.pathname!==t.current&&(t.current=e.pathname,A0t(e.pathname))},[e.pathname]),null},Zkt=new XNe,Jkt=()=>g.jsx(tIe,{client:Zkt,children:g.jsxs(INe,{children:[g.jsx(y3e,{}),g.jsx(Y3e,{}),g.jsx(c4e,{children:g.jsxs(VLe,{children:[g.jsx(Bkt,{}),g.jsx(Qkt,{}),g.jsxs(r4e,{children:[g.jsx(Zi,{path:"/",element:g.jsx(S6e,{})}),g.jsx(Zi,{path:"/board",element:g.jsx(D6e,{})}),g.jsx(Zi,{path:"/incentives",element:g.jsx(L6e,{})}),g.jsx(Zi,{path:"/available-properties",element:g.jsx(fBe,{})}),g.jsx(Zi,{path:"/community",element:g.jsx(xBe,{})}),g.jsx(Zi,{path:"/community/schools",element:g.jsx(TBe,{})}),g.jsx(Zi,{path:"/community/affordable-living",element:g.jsx(ABe,{})}),g.jsx(Zi,{path:"/community/rv-parks",element:g.jsx(PBe,{})}),g.jsx(Zi,{path:"/community/ecotourism",element:g.jsx(kBe,{})}),g.jsx(Zi,{path:"/community/santa-ana-refuge",element:g.jsx(NBe,{})}),g.jsx(Zi,{path:"/community/business-empowerment",element:g.jsx(RBe,{})}),g.jsx(Zi,{path:"/community/shop-local-biz",element:g.jsx(JBe,{})}),g.jsx(Zi,{path:"/community/tshirt-program",element:g.jsx(XBe,{})}),g.jsx(Zi,{path:"/visit-alamo",element:g.jsx(Nwt,{})}),g.jsx(Zi,{path:"/visit-alamo/where-to-stay",element:g.jsx($wt,{})}),g.jsx(Zi,{path:"/visit-alamo/blog",element:g.jsx(Fwt,{})}),g.jsx(Zi,{path:"/visit-alamo/blog/:slug",element:g.jsx(zkt,{})}),g.jsx(Zi,{path:"/board-meetings",element:g.jsx(R7e,{})}),g.jsx(Zi,{path:"/admin/login",element:g.jsx($7e,{})}),g.jsx(Zi,{path:"/admin/reset-password",element:g.jsx(D1t,{})}),g.jsx(Zi,{path:"/admin/dashboard",element:g.jsx(W_,{children:g.jsx(Q9e,{})})}),g.jsx(Zi,{path:"/admin/analytics",element:g.jsx(W_,{children:g.jsx(I1t,{})})}),g.jsx(Zi,{path:"/admin/users",element:g.jsx(W_,{children:g.jsx(R1t,{})})}),g.jsx(Zi,{path:"/admin/community-photos",element:g.jsx(W_,{children:g.jsx(F1t,{})})}),g.jsx(Zi,{path:"/admin/blog",element:g.jsx(W_,{children:g.jsx(qkt,{})})}),g.jsx(Zi,{path:"/admin/shop-local-biz",element:g.jsx(W_,{children:g.jsx(Ykt,{})})}),g.jsx(Zi,{path:"/logo-processor",element:g.jsx(kwt,{})}),g.jsx(Zi,{path:"*",element:g.jsx(Xkt,{})})]})]})})]})});Sce(document.getElementById("root")).render(g.jsx(Nce,{children:g.jsx(Jkt,{})}));export{ra as _,Wf as c,mi as g};
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.