memctx 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/html2canvas.esm-ezMWrafe.js +22 -0
- package/dashboard/dist/assets/index-B83_W4qH.css +1 -0
- package/dashboard/dist/assets/index-DDN6Gx1_.js +628 -0
- package/dashboard/dist/assets/{index.es-Dqk41Tqn.js → index.es-D85_UUf8.js} +15 -2
- package/dashboard/dist/assets/{jszip.min-DxDw9jtU.js → jszip.min-CSBY1G_D.js} +11 -1
- package/dashboard/dist/assets/purify.es-BgtpMKW3.js +2 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/src/api/health.js +2 -1
- package/dist/src/api/health.js.map +1 -1
- package/dist/src/api/hook.js +3 -0
- package/dist/src/api/hook.js.map +1 -1
- package/dist/src/api/logs.js +3 -2
- package/dist/src/api/logs.js.map +1 -1
- package/dist/src/api/observations.js +2 -1
- package/dist/src/api/observations.js.map +1 -1
- package/dist/src/api/resync.js +3 -3
- package/dist/src/api/resync.js.map +1 -1
- package/dist/src/api/sessions.js +59 -0
- package/dist/src/api/sessions.js.map +1 -1
- package/dist/src/api/settings.js +3 -2
- package/dist/src/api/settings.js.map +1 -1
- package/dist/src/db/queries.d.ts +2 -0
- package/dist/src/db/queries.js +34 -4
- package/dist/src/db/queries.js.map +1 -1
- package/dist/src/db/schema.d.ts +1 -1
- package/dist/src/db/schema.js +7 -1
- package/dist/src/db/schema.js.map +1 -1
- package/dist/src/index.js +18 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/middleware/rate-limit.d.ts +8 -0
- package/dist/src/middleware/rate-limit.js +48 -0
- package/dist/src/middleware/rate-limit.js.map +1 -0
- package/dist/src/services/activity-tracker.d.ts +7 -0
- package/dist/src/services/activity-tracker.js +37 -0
- package/dist/src/services/activity-tracker.js.map +1 -0
- package/dist/src/services/project-detector.js +31 -4
- package/dist/src/services/project-detector.js.map +1 -1
- package/dist/src/services/stale-session-worker.d.ts +11 -0
- package/dist/src/services/stale-session-worker.js +90 -0
- package/dist/src/services/stale-session-worker.js.map +1 -0
- package/package.json +7 -7
- package/dashboard/dist/assets/html2canvas.esm-DXEQVQnt.js +0 -5
- package/dashboard/dist/assets/index-dFfiO3rw.js +0 -136
- package/dashboard/dist/assets/index-gazvDspk.css +0 -1
- package/dashboard/dist/assets/purify.es-CovBOfck.js +0 -2
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function a(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(o){if(o.ep)return;o.ep=!0;const u=a(o);fetch(o.href,u)}})();var e7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var g1={exports:{}},Jc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 P2;function Ev(){if(P2)return Jc;P2=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(i,o,u){var h=null;if(u!==void 0&&(h=""+u),o.key!==void 0&&(h=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:t,type:i,key:h,ref:o!==void 0?o:null,props:u}}return Jc.Fragment=n,Jc.jsx=a,Jc.jsxs=a,Jc}var q2;function Tv(){return q2||(q2=1,g1.exports=Ev()),g1.exports}var m=Tv(),m1={exports:{}},Yt={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 U2;function Cv(){if(U2)return Yt;U2=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),h=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),_=Symbol.iterator;function j(W){return W===null||typeof W!="object"?null:(W=_&&W[_]||W["@@iterator"],typeof W=="function"?W:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,L={};function R(W,ce,T){this.props=W,this.context=ce,this.refs=L,this.updater=T||w}R.prototype.isReactComponent={},R.prototype.setState=function(W,ce){if(typeof W!="object"&&typeof W!="function"&&W!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,W,ce,"setState")},R.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function E(){}E.prototype=R.prototype;function Y(W,ce,T){this.props=W,this.context=ce,this.refs=L,this.updater=T||w}var H=Y.prototype=new E;H.constructor=Y,k(H,R.prototype),H.isPureReactComponent=!0;var F=Array.isArray,X={H:null,A:null,T:null,S:null,V:null},_e=Object.prototype.hasOwnProperty;function xe(W,ce,T,q,V,te){return T=te.ref,{$$typeof:t,type:W,key:ce,ref:T!==void 0?T:null,props:te}}function oe(W,ce){return xe(W.type,ce,void 0,void 0,void 0,W.props)}function Z(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function ge(W){var ce={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(T){return ce[T]})}var O=/\/+/g;function U(W,ce){return typeof W=="object"&&W!==null&&W.key!=null?ge(""+W.key):ce.toString(36)}function ne(){}function re(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(ne,ne):(W.status="pending",W.then(function(ce){W.status==="pending"&&(W.status="fulfilled",W.value=ce)},function(ce){W.status==="pending"&&(W.status="rejected",W.reason=ce)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function ve(W,ce,T,q,V){var te=typeof W;(te==="undefined"||te==="boolean")&&(W=null);var se=!1;if(W===null)se=!0;else switch(te){case"bigint":case"string":case"number":se=!0;break;case"object":switch(W.$$typeof){case t:case n:se=!0;break;case v:return se=W._init,ve(se(W._payload),ce,T,q,V)}}if(se)return V=V(W),se=q===""?"."+U(W,0):q,F(V)?(T="",se!=null&&(T=se.replace(O,"$&/")+"/"),ve(V,ce,T,"",function(Ce){return Ce})):V!=null&&(Z(V)&&(V=oe(V,T+(V.key==null||W&&W.key===V.key?"":(""+V.key).replace(O,"$&/")+"/")+se)),ce.push(V)),1;se=0;var ye=q===""?".":q+":";if(F(W))for(var je=0;je<W.length;je++)q=W[je],te=ye+U(q,je),se+=ve(q,ce,T,te,V);else if(je=j(W),typeof je=="function")for(W=je.call(W),je=0;!(q=W.next()).done;)q=q.value,te=ye+U(q,je++),se+=ve(q,ce,T,te,V);else if(te==="object"){if(typeof W.then=="function")return ve(re(W),ce,T,q,V);throw ce=String(W),Error("Objects are not valid as a React child (found: "+(ce==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":ce)+"). If you meant to render a collection of children, use an array instead.")}return se}function ee(W,ce,T){if(W==null)return W;var q=[],V=0;return ve(W,q,"","",function(te){return ce.call(T,te,V++)}),q}function J(W){if(W._status===-1){var ce=W._result;ce=ce(),ce.then(function(T){(W._status===0||W._status===-1)&&(W._status=1,W._result=T)},function(T){(W._status===0||W._status===-1)&&(W._status=2,W._result=T)}),W._status===-1&&(W._status=0,W._result=ce)}if(W._status===1)return W._result.default;throw W._result}var le=typeof reportError=="function"?reportError:function(W){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ce=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W=="object"&&W!==null&&typeof W.message=="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(ce))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",W);return}console.error(W)};function Le(){}return Yt.Children={map:ee,forEach:function(W,ce,T){ee(W,function(){ce.apply(this,arguments)},T)},count:function(W){var ce=0;return ee(W,function(){ce++}),ce},toArray:function(W){return ee(W,function(ce){return ce})||[]},only:function(W){if(!Z(W))throw Error("React.Children.only expected to receive a single React element child.");return W}},Yt.Component=R,Yt.Fragment=a,Yt.Profiler=o,Yt.PureComponent=Y,Yt.StrictMode=i,Yt.Suspense=f,Yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,Yt.__COMPILER_RUNTIME={__proto__:null,c:function(W){return X.H.useMemoCache(W)}},Yt.cache=function(W){return function(){return W.apply(null,arguments)}},Yt.cloneElement=function(W,ce,T){if(W==null)throw Error("The argument must be a React element, but you passed "+W+".");var q=k({},W.props),V=W.key,te=void 0;if(ce!=null)for(se in ce.ref!==void 0&&(te=void 0),ce.key!==void 0&&(V=""+ce.key),ce)!_e.call(ce,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&ce.ref===void 0||(q[se]=ce[se]);var se=arguments.length-2;if(se===1)q.children=T;else if(1<se){for(var ye=Array(se),je=0;je<se;je++)ye[je]=arguments[je+2];q.children=ye}return xe(W.type,V,void 0,void 0,te,q)},Yt.createContext=function(W){return W={$$typeof:h,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:u,_context:W},W},Yt.createElement=function(W,ce,T){var q,V={},te=null;if(ce!=null)for(q in ce.key!==void 0&&(te=""+ce.key),ce)_e.call(ce,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(V[q]=ce[q]);var se=arguments.length-2;if(se===1)V.children=T;else if(1<se){for(var ye=Array(se),je=0;je<se;je++)ye[je]=arguments[je+2];V.children=ye}if(W&&W.defaultProps)for(q in se=W.defaultProps,se)V[q]===void 0&&(V[q]=se[q]);return xe(W,te,void 0,void 0,null,V)},Yt.createRef=function(){return{current:null}},Yt.forwardRef=function(W){return{$$typeof:d,render:W}},Yt.isValidElement=Z,Yt.lazy=function(W){return{$$typeof:v,_payload:{_status:-1,_result:W},_init:J}},Yt.memo=function(W,ce){return{$$typeof:g,type:W,compare:ce===void 0?null:ce}},Yt.startTransition=function(W){var ce=X.T,T={};X.T=T;try{var q=W(),V=X.S;V!==null&&V(T,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(Le,le)}catch(te){le(te)}finally{X.T=ce}},Yt.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},Yt.use=function(W){return X.H.use(W)},Yt.useActionState=function(W,ce,T){return X.H.useActionState(W,ce,T)},Yt.useCallback=function(W,ce){return X.H.useCallback(W,ce)},Yt.useContext=function(W){return X.H.useContext(W)},Yt.useDebugValue=function(){},Yt.useDeferredValue=function(W,ce){return X.H.useDeferredValue(W,ce)},Yt.useEffect=function(W,ce,T){var q=X.H;if(typeof T=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return q.useEffect(W,ce)},Yt.useId=function(){return X.H.useId()},Yt.useImperativeHandle=function(W,ce,T){return X.H.useImperativeHandle(W,ce,T)},Yt.useInsertionEffect=function(W,ce){return X.H.useInsertionEffect(W,ce)},Yt.useLayoutEffect=function(W,ce){return X.H.useLayoutEffect(W,ce)},Yt.useMemo=function(W,ce){return X.H.useMemo(W,ce)},Yt.useOptimistic=function(W,ce){return X.H.useOptimistic(W,ce)},Yt.useReducer=function(W,ce,T){return X.H.useReducer(W,ce,T)},Yt.useRef=function(W){return X.H.useRef(W)},Yt.useState=function(W){return X.H.useState(W)},Yt.useSyncExternalStore=function(W,ce,T){return X.H.useSyncExternalStore(W,ce,T)},Yt.useTransition=function(){return X.H.useTransition()},Yt.version="19.1.0",Yt}var F2;function y0(){return F2||(F2=1,m1.exports=Cv()),m1.exports}var ae=y0();const Mv=Pm(ae);var y1={exports:{}},ef={},v1={exports:{}},b1={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and 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
|
+
*/var I2;function Rv(){return I2||(I2=1,(function(t){function n(ee,J){var le=ee.length;ee.push(J);e:for(;0<le;){var Le=le-1>>>1,W=ee[Le];if(0<o(W,J))ee[Le]=J,ee[le]=W,le=Le;else break e}}function a(ee){return ee.length===0?null:ee[0]}function i(ee){if(ee.length===0)return null;var J=ee[0],le=ee.pop();if(le!==J){ee[0]=le;e:for(var Le=0,W=ee.length,ce=W>>>1;Le<ce;){var T=2*(Le+1)-1,q=ee[T],V=T+1,te=ee[V];if(0>o(q,le))V<W&&0>o(te,q)?(ee[Le]=te,ee[V]=le,Le=V):(ee[Le]=q,ee[T]=le,Le=T);else if(V<W&&0>o(te,le))ee[Le]=te,ee[V]=le,Le=V;else break e}}return J}function o(ee,J){var le=ee.sortIndex-J.sortIndex;return le!==0?le:ee.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var h=Date,d=h.now();t.unstable_now=function(){return h.now()-d}}var f=[],g=[],v=1,_=null,j=3,w=!1,k=!1,L=!1,R=!1,E=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function F(ee){for(var J=a(g);J!==null;){if(J.callback===null)i(g);else if(J.startTime<=ee)i(g),J.sortIndex=J.expirationTime,n(f,J);else break;J=a(g)}}function X(ee){if(L=!1,F(ee),!k)if(a(f)!==null)k=!0,_e||(_e=!0,U());else{var J=a(g);J!==null&&ve(X,J.startTime-ee)}}var _e=!1,xe=-1,oe=5,Z=-1;function ge(){return R?!0:!(t.unstable_now()-Z<oe)}function O(){if(R=!1,_e){var ee=t.unstable_now();Z=ee;var J=!0;try{e:{k=!1,L&&(L=!1,Y(xe),xe=-1),w=!0;var le=j;try{t:{for(F(ee),_=a(f);_!==null&&!(_.expirationTime>ee&&ge());){var Le=_.callback;if(typeof Le=="function"){_.callback=null,j=_.priorityLevel;var W=Le(_.expirationTime<=ee);if(ee=t.unstable_now(),typeof W=="function"){_.callback=W,F(ee),J=!0;break t}_===a(f)&&i(f),F(ee)}else i(f);_=a(f)}if(_!==null)J=!0;else{var ce=a(g);ce!==null&&ve(X,ce.startTime-ee),J=!1}}break e}finally{_=null,j=le,w=!1}J=void 0}}finally{J?U():_e=!1}}}var U;if(typeof H=="function")U=function(){H(O)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=O,U=function(){re.postMessage(null)}}else U=function(){E(O,0)};function ve(ee,J){xe=E(function(){ee(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(ee){ee.callback=null},t.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<ee?Math.floor(1e3/ee):5},t.unstable_getCurrentPriorityLevel=function(){return j},t.unstable_next=function(ee){switch(j){case 1:case 2:case 3:var J=3;break;default:J=j}var le=j;j=J;try{return ee()}finally{j=le}},t.unstable_requestPaint=function(){R=!0},t.unstable_runWithPriority=function(ee,J){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var le=j;j=ee;try{return J()}finally{j=le}},t.unstable_scheduleCallback=function(ee,J,le){var Le=t.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?Le+le:Le):le=Le,ee){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=le+W,ee={id:v++,callback:J,priorityLevel:ee,startTime:le,expirationTime:W,sortIndex:-1},le>Le?(ee.sortIndex=le,n(g,ee),a(f)===null&&ee===a(g)&&(L?(Y(xe),xe=-1):L=!0,ve(X,le-Le))):(ee.sortIndex=W,n(f,ee),k||w||(k=!0,_e||(_e=!0,U()))),ee},t.unstable_shouldYield=ge,t.unstable_wrapCallback=function(ee){var J=j;return function(){var le=j;j=J;try{return ee.apply(this,arguments)}finally{j=le}}}})(b1)),b1}var H2;function Ov(){return H2||(H2=1,v1.exports=Rv()),v1.exports}var x1={exports:{}},na={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and 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 W2;function Dv(){if(W2)return na;W2=1;var t=y0();function n(f){var g="https://react.dev/errors/"+f;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+f+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(f,g,v){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:_==null?null:""+_,children:f,containerInfo:g,implementation:v}}var h=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,g){if(f==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return na.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,na.createPortal=function(f,g){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(n(299));return u(f,g,null,v)},na.flushSync=function(f){var g=h.T,v=i.p;try{if(h.T=null,i.p=2,f)return f()}finally{h.T=g,i.p=v,i.d.f()}},na.preconnect=function(f,g){typeof f=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(f,g))},na.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},na.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var v=g.as,_=d(v,g.crossOrigin),j=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?i.d.S(f,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:_,integrity:j,fetchPriority:w}):v==="script"&&i.d.X(f,{crossOrigin:_,integrity:j,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},na.preinitModule=function(f,g){if(typeof f=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=d(g.as,g.crossOrigin);i.d.M(f,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(f)},na.preload=function(f,g){if(typeof f=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,_=d(v,g.crossOrigin);i.d.L(f,v,{crossOrigin:_,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},na.preloadModule=function(f,g){if(typeof f=="string")if(g){var v=d(g.as,g.crossOrigin);i.d.m(f,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(f)},na.requestFormReset=function(f){i.d.r(f)},na.unstable_batchedUpdates=function(f,g){return f(g)},na.useFormState=function(f,g,v){return h.H.useFormState(f,g,v)},na.useFormStatus=function(){return h.H.useHostTransitionStatus()},na.version="19.1.0",na}var Y2;function zv(){if(Y2)return x1.exports;Y2=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),x1.exports=Dv(),x1.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var G2;function Bv(){if(G2)return ef;G2=1;var t=Ov(),n=y0(),a=zv();function i(e){var r="https://react.dev/errors/"+e;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var r=e,s=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,(r.flags&4098)!==0&&(s=r.return),e=r.return;while(e)}return r.tag===3?s:null}function h(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(i(188))}function f(e){var r=e.alternate;if(!r){if(r=u(e),r===null)throw Error(i(188));return r!==e?null:e}for(var s=e,l=r;;){var p=s.return;if(p===null)break;var b=p.alternate;if(b===null){if(l=p.return,l!==null){s=l;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===s)return d(p),e;if(b===l)return d(p),r;b=b.sibling}throw Error(i(188))}if(s.return!==l.return)s=p,l=b;else{for(var N=!1,B=p.child;B;){if(B===s){N=!0,s=p,l=b;break}if(B===l){N=!0,l=p,s=b;break}B=B.sibling}if(!N){for(B=b.child;B;){if(B===s){N=!0,s=b,l=p;break}if(B===l){N=!0,l=b,s=p;break}B=B.sibling}if(!N)throw Error(i(189))}}if(s.alternate!==l)throw Error(i(190))}if(s.tag!==3)throw Error(i(188));return s.stateNode.current===s?e:r}function g(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e;for(e=e.child;e!==null;){if(r=g(e),r!==null)return r;e=e.sibling}return null}var v=Object.assign,_=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),Y=Symbol.for("react.consumer"),H=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function U(e){return e===null||typeof e!="object"?null:(e=O&&e[O]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case R:return"Profiler";case L:return"StrictMode";case X:return"Suspense";case _e:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case H:return(e.displayName||"Context")+".Provider";case Y:return(e._context.displayName||"Context")+".Consumer";case F:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xe:return r=e.displayName||null,r!==null?r:re(e.type)||"Memo";case oe:r=e._payload,e=e._init;try{return re(e(r))}catch{}}return null}var ve=Array.isArray,ee=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},Le=[],W=-1;function ce(e){return{current:e}}function T(e){0>W||(e.current=Le[W],Le[W]=null,W--)}function q(e,r){W++,Le[W]=e.current,e.current=r}var V=ce(null),te=ce(null),se=ce(null),ye=ce(null);function je(e,r){switch(q(se,r),q(te,e),q(V,null),r.nodeType){case 9:case 11:e=(e=r.documentElement)&&(e=e.namespaceURI)?d2(e):0;break;default:if(e=r.tagName,r=r.namespaceURI)r=d2(r),e=h2(r,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}T(V),q(V,e)}function Ce(){T(V),T(te),T(se)}function ze(e){e.memoizedState!==null&&q(ye,e);var r=V.current,s=h2(r,e.type);r!==s&&(q(te,e),q(V,s))}function We(e){te.current===e&&(T(V),T(te)),ye.current===e&&(T(ye),Qc._currentValue=le)}var Xe=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,dt=t.unstable_cancelCallback,G=t.unstable_shouldYield,Qe=t.unstable_requestPaint,xt=t.unstable_now,ut=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,mt=t.unstable_UserBlockingPriority,Ze=t.unstable_NormalPriority,bt=t.unstable_LowPriority,ht=t.unstable_IdlePriority,Wt=t.log,Gt=t.unstable_setDisableYieldValue,wt=null,_t=null;function Dt(e){if(typeof Wt=="function"&&Gt(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(wt,e)}catch{}}var $e=Math.clz32?Math.clz32:Dn,qt=Math.log,pt=Math.LN2;function Dn(e){return e>>>=0,e===0?32:31-(qt(e)/pt|0)|0}var we=256,Ye=4194304;function Je(e){var r=e&42;if(r!==0)return r;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kt(e,r,s){var l=e.pendingLanes;if(l===0)return 0;var p=0,b=e.suspendedLanes,N=e.pingedLanes;e=e.warmLanes;var B=l&134217727;return B!==0?(l=B&~b,l!==0?p=Je(l):(N&=B,N!==0?p=Je(N):s||(s=B&~e,s!==0&&(p=Je(s))))):(B=l&~b,B!==0?p=Je(B):N!==0?p=Je(N):s||(s=l&~e,s!==0&&(p=Je(s)))),p===0?0:r!==0&&r!==p&&(r&b)===0&&(b=p&-p,s=r&-r,b>=s||b===32&&(s&4194048)!==0)?r:p}function rt(e,r){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&r)===0}function fn(e,r){switch(e){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yt(){var e=we;return we<<=1,(we&4194048)===0&&(we=256),e}function At(){var e=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),e}function Et(e){for(var r=[],s=0;31>s;s++)r.push(e);return r}function Ct(e,r){e.pendingLanes|=r,r!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function St(e,r,s,l,p,b){var N=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var B=e.entanglements,ie=e.expirationTimes,Ne=e.hiddenUpdates;for(s=N&~s;0<s;){var Be=31-$e(s),Ue=1<<Be;B[Be]=0,ie[Be]=-1;var Ee=Ne[Be];if(Ee!==null)for(Ne[Be]=null,Be=0;Be<Ee.length;Be++){var Te=Ee[Be];Te!==null&&(Te.lane&=-536870913)}s&=~Ue}l!==0&&nn(e,l,0),b!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=b&~(N&~r))}function nn(e,r,s){e.pendingLanes|=r,e.suspendedLanes&=~r;var l=31-$e(r);e.entangledLanes|=r,e.entanglements[l]=e.entanglements[l]|1073741824|s&4194090}function ni(e,r){var s=e.entangledLanes|=r;for(e=e.entanglements;s;){var l=31-$e(s),p=1<<l;p&r|e[l]&r&&(e[l]|=r),s&=~p}}function pn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ra(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Oa(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:M2(e.type))}function jt(e,r){var s=J.p;try{return J.p=e,r()}finally{J.p=s}}var Lr=Math.random().toString(36).slice(2),Cn="__reactFiber$"+Lr,kn="__reactProps$"+Lr,xr="__reactContainer$"+Lr,Mn="__reactEvents$"+Lr,mr="__reactListeners$"+Lr,wr="__reactHandles$"+Lr,$i="__reactResources$"+Lr,ba="__reactMarker$"+Lr;function oa(e){delete e[Cn],delete e[kn],delete e[Mn],delete e[mr],delete e[wr]}function Ir(e){var r=e[Cn];if(r)return r;for(var s=e.parentNode;s;){if(r=s[xr]||s[Cn]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(e=y2(e);e!==null;){if(s=e[Cn])return s;e=y2(e)}return r}e=s,s=e.parentNode}return null}function Er(e){if(e=e[Cn]||e[xr]){var r=e.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return e}return null}function Hr(e){var r=e.tag;if(r===5||r===26||r===27||r===6)return e.stateNode;throw Error(i(33))}function Sr(e){var r=e[$i];return r||(r=e[$i]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Rn(e){e[ba]=!0}var Da=new Set,Zi={};function xa(e,r){za(e,r),za(e+"Capture",r)}function za(e,r){for(Zi[e]=r,e=0;e<r.length;e++)Da.add(r[e])}var xo=RegExp("^[: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]*$"),tu={},wo={};function nu(e){return Xe.call(wo,e)?!0:Xe.call(tu,e)?!1:xo.test(e)?wo[e]=!0:(tu[e]=!0,!1)}function Ms(e,r,s){if(nu(r))if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(r);return}}e.setAttribute(r,""+s)}}function Wr(e,r,s){if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttribute(r,""+s)}}function la(e,r,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(r,s,""+l)}}var So,_o;function wi(e){if(So===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);So=r&&r[1]||"",_o=-1<s.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+So+e+_o}var Ao=!1;function jo(e,r){if(!e||Ao)return"";Ao=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var Ue=function(){throw Error()};if(Object.defineProperty(Ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ue,[])}catch(Te){var Ee=Te}Reflect.construct(e,[],Ue)}else{try{Ue.call()}catch(Te){Ee=Te}e.call(Ue.prototype)}}else{try{throw Error()}catch(Te){Ee=Te}(Ue=e())&&typeof Ue.catch=="function"&&Ue.catch(function(){})}}catch(Te){if(Te&&Ee&&typeof Te.stack=="string")return[Te.stack,Ee.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=l.DetermineComponentFrameRoot(),N=b[0],B=b[1];if(N&&B){var ie=N.split(`
|
|
44
|
+
`),Ne=B.split(`
|
|
45
|
+
`);for(p=l=0;l<ie.length&&!ie[l].includes("DetermineComponentFrameRoot");)l++;for(;p<Ne.length&&!Ne[p].includes("DetermineComponentFrameRoot");)p++;if(l===ie.length||p===Ne.length)for(l=ie.length-1,p=Ne.length-1;1<=l&&0<=p&&ie[l]!==Ne[p];)p--;for(;1<=l&&0<=p;l--,p--)if(ie[l]!==Ne[p]){if(l!==1||p!==1)do if(l--,p--,0>p||ie[l]!==Ne[p]){var Be=`
|
|
46
|
+
`+ie[l].replace(" at new "," at ");return e.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",e.displayName)),Be}while(1<=l&&0<=p);break}}}finally{Ao=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?wi(s):""}function ri(e){switch(e.tag){case 26:case 27:case 5:return wi(e.type);case 16:return wi("Lazy");case 13:return wi("Suspense");case 19:return wi("SuspenseList");case 0:case 15:return jo(e.type,!1);case 11:return jo(e.type.render,!1);case 1:return jo(e.type,!0);case 31:return wi("Activity");default:return""}}function Rs(e){try{var r="";do r+=ri(e),e=e.return;while(e);return r}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}function ta(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vn(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function ru(e){var r=Vn(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var p=s.get,b=s.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return p.call(this)},set:function(N){l=""+N,b.call(this,N)}}),Object.defineProperty(e,r,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(N){l=""+N},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function ua(e){e._valueTracker||(e._valueTracker=ru(e))}function Os(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var s=r.getValue(),l="";return e&&(l=Vn(e)?e.checked?"true":"false":e.value),e=l,e!==s?(r.setValue(e),!0):!1}function Ji(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}}var ca=/[\n"\\]/g;function _r(e){return e.replace(ca,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ba(e,r,s,l,p,b,N,B){e.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.type=N:e.removeAttribute("type"),r!=null?N==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+ta(r)):e.value!==""+ta(r)&&(e.value=""+ta(r)):N!=="submit"&&N!=="reset"||e.removeAttribute("value"),r!=null?ko(e,N,ta(r)):s!=null?ko(e,N,ta(s)):l!=null&&e.removeAttribute("value"),p==null&&b!=null&&(e.defaultChecked=!!b),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.name=""+ta(B):e.removeAttribute("name")}function yr(e,r,s,l,p,b,N,B){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.type=b),r!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||r!=null))return;s=s!=null?""+ta(s):"",r=r!=null?""+ta(r):s,B||r===e.value||(e.value=r),e.defaultValue=r}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=B?e.checked:!!l,e.defaultChecked=!!l,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(e.name=N)}function ko(e,r,s){r==="number"&&Ji(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function es(e,r,s,l){if(e=e.options,r){r={};for(var p=0;p<s.length;p++)r["$"+s[p]]=!0;for(s=0;s<e.length;s++)p=r.hasOwnProperty("$"+e[s].value),e[s].selected!==p&&(e[s].selected=p),p&&l&&(e[s].defaultSelected=!0)}else{for(s=""+ta(s),r=null,p=0;p<e.length;p++){if(e[p].value===s){e[p].selected=!0,l&&(e[p].defaultSelected=!0);return}r!==null||e[p].disabled||(r=e[p])}r!==null&&(r.selected=!0)}}function au(e,r,s){if(r!=null&&(r=""+ta(r),r!==e.value&&(e.value=r),s==null)){e.defaultValue!==r&&(e.defaultValue=r);return}e.defaultValue=s!=null?""+ta(s):""}function iu(e,r,s,l){if(r==null){if(l!=null){if(s!=null)throw Error(i(92));if(ve(l)){if(1<l.length)throw Error(i(93));l=l[0]}s=l}s==null&&(s=""),r=s}s=ta(r),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l)}function Yr(e,r){if(r){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=r;return}}e.textContent=r}var su=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ds(e,r,s){var l=r.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="":l?e.setProperty(r,s):typeof s!="number"||s===0||su.has(r)?r==="float"?e.cssFloat=s:e[r]=(""+s).trim():e[r]=s+"px"}function zs(e,r,s){if(r!=null&&typeof r!="object")throw Error(i(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var p in r)l=r[p],r.hasOwnProperty(p)&&s[p]!==l&&Ds(e,p,l)}else for(var b in r)r.hasOwnProperty(b)&&Ds(e,b,r[b])}function Bs(e){if(e.indexOf("-")===-1)return!1;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 dc=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function No(e){return hc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ai=null;function Lo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fa=null,ts=null;function ns(e){var r=Er(e);if(r&&(e=r.stateNode)){var s=e[kn]||null;e:switch(e=r.stateNode,r.type){case"input":if(Ba(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),r=s.name,s.type==="radio"&&r!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+_r(""+r)+'"][type="radio"]'),r=0;r<s.length;r++){var l=s[r];if(l!==e&&l.form===e.form){var p=l[kn]||null;if(!p)throw Error(i(90));Ba(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<s.length;r++)l=s[r],l.form===e.form&&Os(l)}break e;case"textarea":au(e,s.value,s.defaultValue);break e;case"select":r=s.value,r!=null&&es(e,!!s.multiple,r,!1)}}}var kt=!1;function ou(e,r,s){if(kt)return e(r,s);kt=!0;try{var l=e(r);return l}finally{if(kt=!1,(fa!==null||ts!==null)&&(sd(),fa&&(r=fa,e=ts,ts=fa=null,ns(r),e)))for(r=0;r<e.length;r++)ns(e[r])}}function Ps(e,r){var s=e.stateNode;if(s===null)return null;var l=s[kn]||null;if(l===null)return null;s=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(i(231,r,typeof s));return s}var Pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xl=!1;if(Pa)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){xl=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{xl=!1}var Tr=null,qa=null,Eo=null;function lu(){if(Eo)return Eo;var e,r=qa,s=r.length,l,p="value"in Tr?Tr.value:Tr.textContent,b=p.length;for(e=0;e<s&&r[e]===p[e];e++);var N=s-e;for(l=1;l<=N&&r[s-l]===p[b-l];l++);return Eo=p.slice(e,1<l?1-l:void 0)}function Si(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function rs(){return!0}function Ua(){return!1}function Cr(e){function r(s,l,p,b,N){this._reactName=s,this._targetInst=p,this.type=l,this.nativeEvent=b,this.target=N,this.currentTarget=null;for(var B in e)e.hasOwnProperty(B)&&(s=e[B],this[B]=s?s(b):b[B]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?rs:Ua,this.isPropagationStopped=Ua,this}return v(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=rs)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=rs)},persist:function(){},isPersistent:rs}),r}var wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},To=Cr(wa),_i=v({},wa,{view:0,detail:0}),as=Cr(_i),Us,Ai,ji,ki=v({},_i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Re,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!==ji&&(ji&&e.type==="mousemove"?(Us=e.screenX-ji.screenX,Ai=e.screenY-ji.screenY):Ai=Us=0,ji=e),Us)},movementY:function(e){return"movementY"in e?e.movementY:Ai}}),Co=Cr(ki),Mo=v({},ki,{dataTransfer:0}),uu=Cr(Mo),Ni=v({},_i,{relatedTarget:0}),Fa=Cr(Ni),cu=v({},wa,{animationName:0,elapsedTime:0,pseudoElement:0}),fu=Cr(cu),du=v({},wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fs=Cr(du),hu=v({},wa,{data:0}),x=Cr(hu),C={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q={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"},ue={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pe(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=ue[e])?!!r[e]:!1}function Re(){return pe}var Fe=v({},_i,{key:function(e){if(e.key){var r=C[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=Si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Q[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Re,charCode:function(e){return e.type==="keypress"?Si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),st=Cr(Fe),at=v({},ki,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mt=Cr(at),Ft=v({},_i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Re}),Jt=Cr(Ft),tr=v({},wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),mn=Cr(tr),gn=v({},ki,{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}),Nn=Cr(gn),zn=v({},wa,{newState:0,oldState:0}),Bn=Cr(zn),Mr=[9,13,27,32],Ia=Pa&&"CompositionEvent"in window,Li=null;Pa&&"documentMode"in document&&(Li=document.documentMode);var Is=Pa&&"TextEvent"in window&&!Li,is=Pa&&(!Ia||Li&&8<Li&&11>=Li),Ei=" ",ss=!1;function Hs(e,r){switch(e){case"keyup":return Mr.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ws(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qn=!1;function Ys(e,r){switch(e){case"compositionend":return Ws(r);case"keypress":return r.which!==32?null:(ss=!0,Ei);case"textInput":return e=r.data,e===Ei&&ss?null:e;default:return null}}function Gs(e,r){if(Qn)return e==="compositionend"||!Ia&&Hs(e,r)?(e=lu(),Eo=qa=Tr=null,Qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return is&&r.locale!=="ko"?null:r.data;default:return null}}var wl={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 Ha(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!wl[e.type]:r==="textarea"}function Rr(e,r,s,l){fa?ts?ts.push(l):ts=[l]:fa=l,r=dd(r,"onChange"),0<r.length&&(s=new To("onChange","change",null,s,l),e.push({event:s,listeners:r}))}var os=null,ii=null;function pu(e){o2(e,0)}function Gr(e){var r=Hr(e);if(Os(r))return e}function ls(e,r){if(e==="change")return r}var Ro=!1;if(Pa){var us;if(Pa){var Ti="oninput"in document;if(!Ti){var Oo=document.createElement("div");Oo.setAttribute("oninput","return;"),Ti=typeof Oo.oninput=="function"}us=Ti}else us=!1;Ro=us&&(!document.documentMode||9<document.documentMode)}function Or(){os&&(os.detachEvent("onpropertychange",Vr),ii=os=null)}function Vr(e){if(e.propertyName==="value"&&Gr(ii)){var r=[];Rr(r,ii,e,Lo(e)),ou(pu,r)}}function Do(e,r,s){e==="focusin"?(Or(),os=r,ii=s,os.attachEvent("onpropertychange",Vr)):e==="focusout"&&Or()}function cs(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gr(ii)}function fs(e,r){if(e==="click")return Gr(r)}function zo(e,r){if(e==="input"||e==="change")return Gr(r)}function Vs(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var rn=typeof Object.is=="function"?Object.is:Vs;function Qs(e,r){if(rn(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var s=Object.keys(e),l=Object.keys(r);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var p=s[l];if(!Xe.call(r,p)||!rn(e[p],r[p]))return!1}return!0}function Wa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sa(e,r){var s=Wa(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=r&&l>=r)return{node:s,offset:r-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Wa(s)}}function ds(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?ds(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function Bo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var r=Ji(e.document);r instanceof e.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)e=r.contentWindow;else break;r=Ji(e.document)}return r}function Xs(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}var Po=Pa&&"documentMode"in document&&11>=document.documentMode,_a=null,Ci=null,Aa=null,Ya=!1;function Mi(e,r,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ya||_a==null||_a!==Ji(l)||(l=_a,"selectionStart"in l&&Xs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Aa&&Qs(Aa,l)||(Aa=l,l=dd(Ci,"onSelect"),0<l.length&&(r=new To("onSelect","select",null,r,s),e.push({event:r,listeners:l}),r.target=_a)))}function ja(e,r){var s={};return s[e.toLowerCase()]=r.toLowerCase(),s["Webkit"+e]="webkit"+r,s["Moz"+e]="moz"+r,s}var Xn={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionrun:ja("Transition","TransitionRun"),transitionstart:ja("Transition","TransitionStart"),transitioncancel:ja("Transition","TransitionCancel"),transitionend:ja("Transition","TransitionEnd")},ka={},yn={};Pa&&(yn=document.createElement("div").style,"AnimationEvent"in window||(delete Xn.animationend.animation,delete Xn.animationiteration.animation,delete Xn.animationstart.animation),"TransitionEvent"in window||delete Xn.transitionend.transition);function an(e){if(ka[e])return ka[e];if(!Xn[e])return e;var r=Xn[e],s;for(s in r)if(r.hasOwnProperty(s)&&s in yn)return ka[e]=r[s];return e}var Un=an("animationend"),nr=an("animationiteration"),si=an("animationstart"),Sl=an("transitionrun"),qo=an("transitionstart"),gu=an("transitioncancel"),pc=an("transitionend"),gc=new Map,mu="abort auxClick beforeToggle 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(" ");mu.push("scrollEnd");function Na(e,r){gc.set(e,r),xa(r,[e])}var Uo=new WeakMap;function da(e,r){if(typeof e=="object"&&e!==null){var s=Uo.get(e);return s!==void 0?s:(r={value:e,source:r,stack:Rs(r)},Uo.set(e,r),r)}return{value:e,source:r,stack:Rs(r)}}var ha=[],Ks=0,yu=0;function _l(){for(var e=Ks,r=yu=Ks=0;r<e;){var s=ha[r];ha[r++]=null;var l=ha[r];ha[r++]=null;var p=ha[r];ha[r++]=null;var b=ha[r];if(ha[r++]=null,l!==null&&p!==null){var N=l.pending;N===null?p.next=p:(p.next=N.next,N.next=p),l.pending=p}b!==0&&bu(s,p,b)}}function Al(e,r,s,l){ha[Ks++]=e,ha[Ks++]=r,ha[Ks++]=s,ha[Ks++]=l,yu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function vu(e,r,s,l){return Al(e,r,s,l),Zs(e)}function $s(e,r){return Al(e,null,null,r),Zs(e)}function bu(e,r,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var p=!1,b=e.return;b!==null;)b.childLanes|=s,l=b.alternate,l!==null&&(l.childLanes|=s),b.tag===22&&(e=b.stateNode,e===null||e._visibility&1||(p=!0)),e=b,b=b.return;return e.tag===3?(b=e.stateNode,p&&r!==null&&(p=31-$e(s),e=b.hiddenUpdates,l=e[p],l===null?e[p]=[r]:l.push(r),r.lane=s|536870912),b):null}function Zs(e){if(50<Uc)throw Uc=0,qh=null,Error(i(185));for(var r=e.return;r!==null;)e=r,r=e.return;return e.tag===3?e.stateNode:null}var vr={};function La(e,r,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dr(e,r,s,l){return new La(e,r,s,l)}function Fo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,r){var s=e.alternate;return s===null?(s=Dr(e.tag,r,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=r,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,r=e.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function jl(e,r){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=r,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,r=s.dependencies,e.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),e}function Js(e,r,s,l,p,b){var N=0;if(l=e,typeof e=="function")Fo(e)&&(N=1);else if(typeof e=="string")N=mv(e,s,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Z:return e=Dr(31,s,r,p),e.elementType=Z,e.lanes=b,e;case k:return Ri(s.children,p,b,r);case L:N=8,p|=24;break;case R:return e=Dr(12,s,r,p|2),e.elementType=R,e.lanes=b,e;case X:return e=Dr(13,s,r,p),e.elementType=X,e.lanes=b,e;case _e:return e=Dr(19,s,r,p),e.elementType=_e,e.lanes=b,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E:case H:N=10;break e;case Y:N=9;break e;case F:N=11;break e;case xe:N=14;break e;case oe:N=16,l=null;break e}N=29,s=Error(i(130,e===null?"null":typeof e,"")),l=null}return r=Dr(N,s,r,p),r.elementType=e,r.type=l,r.lanes=b,r}function Ri(e,r,s,l){return e=Dr(7,e,l,r),e.lanes=s,e}function xu(e,r,s){return e=Dr(6,e,null,r),e.lanes=s,e}function kl(e,r,s){return r=Dr(4,e.children!==null?e.children:[],e.key,r),r.lanes=s,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}var hs=[],Oi=0,Io=null,wu=0,Ea=[],pa=0,eo=null,Di=1,zi="";function to(e,r){hs[Oi++]=wu,hs[Oi++]=Io,Io=e,wu=r}function Tf(e,r,s){Ea[pa++]=Di,Ea[pa++]=zi,Ea[pa++]=eo,eo=e;var l=Di;e=zi;var p=32-$e(l)-1;l&=~(1<<p),s+=1;var b=32-$e(r)+p;if(30<b){var N=p-p%5;b=(l&(1<<N)-1).toString(32),l>>=N,p-=N,Di=1<<32-$e(r)+p|s<<p|l,zi=b+e}else Di=1<<b|s<<p|l,zi=e}function Nl(e){e.return!==null&&(to(e,1),Tf(e,1,0))}function Ll(e){for(;e===Io;)Io=hs[--Oi],hs[Oi]=null,wu=hs[--Oi],hs[Oi]=null;for(;e===eo;)eo=Ea[--pa],Ea[pa]=null,zi=Ea[--pa],Ea[pa]=null,Di=Ea[--pa],Ea[pa]=null}var sr=null,Fn=null,un=!1,ps=null,li=!1,mc=Error(i(519));function no(e){var r=Error(i(418,""));throw Ho(da(r,e)),mc}function Cf(e){var r=e.stateNode,s=e.type,l=e.memoizedProps;switch(r[Cn]=e,r[kn]=l,s){case"dialog":Zt("cancel",r),Zt("close",r);break;case"iframe":case"object":case"embed":Zt("load",r);break;case"video":case"audio":for(s=0;s<Ic.length;s++)Zt(Ic[s],r);break;case"source":Zt("error",r);break;case"img":case"image":case"link":Zt("error",r),Zt("load",r);break;case"details":Zt("toggle",r);break;case"input":Zt("invalid",r),yr(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),ua(r);break;case"select":Zt("invalid",r);break;case"textarea":Zt("invalid",r),iu(r,l.value,l.defaultValue,l.children),ua(r)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||r.textContent===""+s||l.suppressHydrationWarning===!0||f2(r.textContent,s)?(l.popover!=null&&(Zt("beforetoggle",r),Zt("toggle",r)),l.onScroll!=null&&Zt("scroll",r),l.onScrollEnd!=null&&Zt("scrollend",r),l.onClick!=null&&(r.onclick=hd),r=!0):r=!1,r||no(e)}function Bi(e){for(sr=e.return;sr;)switch(sr.tag){case 5:case 13:li=!1;return;case 27:case 3:li=!0;return;default:sr=sr.return}}function Qr(e){if(e!==sr)return!1;if(!un)return Bi(e),un=!0,!1;var r=e.tag,s;if((s=r!==3&&r!==27)&&((s=r===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||t1(e.type,e.memoizedProps)),s=!s),s&&Fn&&no(e),Bi(e),r===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,r=0;e;){if(e.nodeType===8)if(s=e.data,s==="/$"){if(r===0){Fn=Yi(e.nextSibling);break e}r--}else s!=="$"&&s!=="$!"&&s!=="$?"||r++;e=e.nextSibling}Fn=null}}else r===27?(r=Fn,il(e.type)?(e=i1,i1=null,Fn=e):Fn=r):Fn=sr?Yi(e.stateNode.nextSibling):null;return!0}function ga(){Fn=sr=null,un=!1}function Mf(){var e=ps;return e!==null&&(Ca===null?Ca=e:Ca.push.apply(Ca,e),ps=null),e}function Ho(e){ps===null?ps=[e]:ps.push(e)}var ui=ce(null),br=null,Pi=null;function gs(e,r,s){q(ui,r._currentValue),r._currentValue=s}function ci(e){e._currentValue=ui.current,T(ui)}function Su(e,r,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===s)break;e=e.return}}function _u(e,r,s,l){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var b=p.dependencies;if(b!==null){var N=p.child;b=b.firstContext;e:for(;b!==null;){var B=b;b=p;for(var ie=0;ie<r.length;ie++)if(B.context===r[ie]){b.lanes|=s,B=b.alternate,B!==null&&(B.lanes|=s),Su(b.return,s,e),l||(N=null);break e}b=B.next}}else if(p.tag===18){if(N=p.return,N===null)throw Error(i(341));N.lanes|=s,b=N.alternate,b!==null&&(b.lanes|=s),Su(N,s,e),N=null}else N=p.child;if(N!==null)N.return=p;else for(N=p;N!==null;){if(N===e){N=null;break}if(p=N.sibling,p!==null){p.return=N.return,N=p;break}N=N.return}p=N}}function Wo(e,r,s,l){e=null;for(var p=r,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var N=p.alternate;if(N===null)throw Error(i(387));if(N=N.memoizedProps,N!==null){var B=p.type;rn(p.pendingProps.value,N.value)||(e!==null?e.push(B):e=[B])}}else if(p===ye.current){if(N=p.alternate,N===null)throw Error(i(387));N.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(Qc):e=[Qc])}p=p.return}e!==null&&_u(r,e,s,l),r.flags|=262144}function Au(e){for(e=e.firstContext;e!==null;){if(!rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fi(e){br=e,Pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function or(e){return ju(br,e)}function ms(e,r){return br===null&&fi(e),ju(e,r)}function ju(e,r){var s=r._currentValue;if(r={context:r,memoizedValue:s,next:null},Pi===null){if(e===null)throw Error(i(308));Pi=r,e.dependencies={lanes:0,firstContext:r},e.flags|=524288}else Pi=Pi.next=r;return s}var ch=typeof AbortController<"u"?AbortController:function(){var e=[],r=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){r.aborted=!0,e.forEach(function(s){return s()})}},Rf=t.unstable_scheduleCallback,fh=t.unstable_NormalPriority,lr={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new ch,data:new Map,refCount:0}}function El(e){e.refCount--,e.refCount===0&&Rf(fh,function(){e.controller.abort()})}var Tl=null,vc=0,ro=0,qi=null;function dh(e,r){if(Tl===null){var s=Tl=[];vc=0,ro=Gh(),qi={status:"pending",value:void 0,then:function(l){s.push(l)}}}return vc++,r.then(Of,Of),r}function Of(){if(--vc===0&&Tl!==null){qi!==null&&(qi.status="fulfilled");var e=Tl;Tl=null,ro=0,qi=null;for(var r=0;r<e.length;r++)(0,e[r])()}}function Df(e,r){var s=[],l={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return e.then(function(){l.status="fulfilled",l.value=r;for(var p=0;p<s.length;p++)(0,s[p])(r)},function(p){for(l.status="rejected",l.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),l}var c=ee.S;ee.S=function(e,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&dh(e,r),c!==null&&c(e,r)};var y=ce(null);function S(){var e=y.current;return e!==null?e:On.pooledCache}function A(e,r){r===null?q(y,y.current):q(y,r.pool)}function M(){var e=S();return e===null?null:{parent:lr._currentValue,pool:e}}var D=Error(i(460)),z=Error(i(474)),P=Error(i(542)),I={then:function(){}};function $(e){return e=e.status,e==="fulfilled"||e==="rejected"}function fe(){}function ke(e,r,s){switch(s=e[s],s===void 0?e.push(r):s!==r&&(r.then(fe,fe),r=s),r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,be(e),e;default:if(typeof r.status=="string")r.then(fe,fe);else{if(e=On,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=r,e.status="pending",e.then(function(l){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=l}},function(l){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw e=r.reason,be(e),e}throw K=r,D}}var K=null;function he(){if(K===null)throw Error(i(459));var e=K;return K=null,e}function be(e){if(e===D||e===P)throw Error(i(483))}var Me=!1;function Ae(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function De(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oe(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function He(e,r,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(bn&2)!==0){var p=l.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),l.pending=r,r=Zs(e),bu(e,null,s),r}return Al(e,l,r,s),Zs(e)}function qe(e,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var l=r.lanes;l&=e.pendingLanes,s|=l,r.lanes=s,ni(e,s)}}function ft(e,r){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var p=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var N={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?p=b=N:b=b.next=N,s=s.next}while(s!==null);b===null?p=b=r:b=b.next=r}else p=b=r;s={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=r:e.next=r,s.lastBaseUpdate=r}var et=!1;function zt(){if(et){var e=qi;if(e!==null)throw e}}function tt(e,r,s,l){et=!1;var p=e.updateQueue;Me=!1;var b=p.firstBaseUpdate,N=p.lastBaseUpdate,B=p.shared.pending;if(B!==null){p.shared.pending=null;var ie=B,Ne=ie.next;ie.next=null,N===null?b=Ne:N.next=Ne,N=ie;var Be=e.alternate;Be!==null&&(Be=Be.updateQueue,B=Be.lastBaseUpdate,B!==N&&(B===null?Be.firstBaseUpdate=Ne:B.next=Ne,Be.lastBaseUpdate=ie))}if(b!==null){var Ue=p.baseState;N=0,Be=Ne=ie=null,B=b;do{var Ee=B.lane&-536870913,Te=Ee!==B.lane;if(Te?(on&Ee)===Ee:(l&Ee)===Ee){Ee!==0&&Ee===ro&&(et=!0),Be!==null&&(Be=Be.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var Ot=e,Lt=B;Ee=r;var jn=s;switch(Lt.tag){case 1:if(Ot=Lt.payload,typeof Ot=="function"){Ue=Ot.call(jn,Ue,Ee);break e}Ue=Ot;break e;case 3:Ot.flags=Ot.flags&-65537|128;case 0:if(Ot=Lt.payload,Ee=typeof Ot=="function"?Ot.call(jn,Ue,Ee):Ot,Ee==null)break e;Ue=v({},Ue,Ee);break e;case 2:Me=!0}}Ee=B.callback,Ee!==null&&(e.flags|=64,Te&&(e.flags|=8192),Te=p.callbacks,Te===null?p.callbacks=[Ee]:Te.push(Ee))}else Te={lane:Ee,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Be===null?(Ne=Be=Te,ie=Ue):Be=Be.next=Te,N|=Ee;if(B=B.next,B===null){if(B=p.shared.pending,B===null)break;Te=B,B=Te.next,Te.next=null,p.lastBaseUpdate=Te,p.shared.pending=null}}while(!0);Be===null&&(ie=Ue),p.baseState=ie,p.firstBaseUpdate=Ne,p.lastBaseUpdate=Be,b===null&&(p.shared.lanes=0),tl|=N,e.lanes=N,e.memoizedState=Ue}}function Qt(e,r){if(typeof e!="function")throw Error(i(191,e));e.call(r)}function rr(e,r){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Qt(s[e],r)}var Rt=ce(null),nt=ce(0);function Ge(e,r){e=fo,q(nt,e),q(Rt,r),fo=e|r.baseLanes}function Pn(){q(nt,fo),q(Rt,Rt.current)}function Bt(){fo=nt.current,T(Rt),T(nt)}var Ht=0,it=null,Ut=null,en=null,Ln=!1,Kn=!1,$n=!1,In=0,Vt=0,tn=null,Hn=0;function Nt(){throw Error(i(321))}function ur(e,r){if(r===null)return!1;for(var s=0;s<r.length&&s<e.length;s++)if(!rn(e[s],r[s]))return!1;return!0}function ma(e,r,s,l,p,b){return Ht=b,it=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ee.H=e===null||e.memoizedState===null?Y0:G0,$n=!1,b=s(l,p),$n=!1,Kn&&(b=Xr(r,s,l,p)),Wn(e),b}function Wn(e){ee.H=Vf;var r=Ut!==null&&Ut.next!==null;if(Ht=0,en=Ut=it=null,Ln=!1,Vt=0,tn=null,r)throw Error(i(300));e===null||Br||(e=e.dependencies,e!==null&&Au(e)&&(Br=!0))}function Xr(e,r,s,l){it=e;var p=0;do{if(Kn&&(tn=null),Vt=0,Kn=!1,25<=p)throw Error(i(301));if(p+=1,en=Ut=null,e.updateQueue!=null){var b=e.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}ee.H=Ny,b=r(s,l)}while(Kn);return b}function vn(){var e=ee.H,r=e.useState()[0];return r=typeof r.then=="function"?jr(r):r,e=e.useState()[0],(Ut!==null?Ut.memoizedState:null)!==e&&(it.flags|=1024),r}function Zn(){var e=In!==0;return In=0,e}function Kr(e,r,s){r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~s}function Ar(e){if(Ln){for(e=e.memoizedState;e!==null;){var r=e.queue;r!==null&&(r.pending=null),e=e.next}Ln=!1}Ht=0,en=Ut=it=null,Kn=!1,Vt=In=0,tn=null}function _n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?it.memoizedState=en=e:en=en.next=e,en}function sn(){if(Ut===null){var e=it.alternate;e=e!==null?e.memoizedState:null}else e=Ut.next;var r=en===null?it.memoizedState:en.next;if(r!==null)en=r,Ut=e;else{if(e===null)throw it.alternate===null?Error(i(467)):Error(i(310));Ut=e,e={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},en===null?it.memoizedState=en=e:en=en.next=e}return en}function zr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function jr(e){var r=Vt;return Vt+=1,tn===null&&(tn=[]),e=ke(tn,e,r),r=it,(en===null?r.memoizedState:en.next)===null&&(r=r.alternate,ee.H=r===null||r.memoizedState===null?Y0:G0),e}function hn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return jr(e);if(e.$$typeof===H)return or(e)}throw Error(i(438,String(e)))}function $r(e){var r=null,s=it.updateQueue;if(s!==null&&(r=s.memoCache),r==null){var l=it.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),s===null&&(s=zr(),it.updateQueue=s),s.memoCache=r,s=r.data[r.index],s===void 0)for(s=r.data[r.index]=Array(e),l=0;l<e;l++)s[l]=ge;return r.index++,s}function cr(e,r){return typeof r=="function"?r(e):r}function di(e){var r=sn();return Ga(r,Ut,e)}function Ga(e,r,s){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=s;var p=e.baseQueue,b=l.pending;if(b!==null){if(p!==null){var N=p.next;p.next=b.next,b.next=N}r.baseQueue=p=b,l.pending=null}if(b=e.baseState,p===null)e.memoizedState=b;else{r=p.next;var B=N=null,ie=null,Ne=r,Be=!1;do{var Ue=Ne.lane&-536870913;if(Ue!==Ne.lane?(on&Ue)===Ue:(Ht&Ue)===Ue){var Ee=Ne.revertLane;if(Ee===0)ie!==null&&(ie=ie.next={lane:0,revertLane:0,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),Ue===ro&&(Be=!0);else if((Ht&Ee)===Ee){Ne=Ne.next,Ee===ro&&(Be=!0);continue}else Ue={lane:0,revertLane:Ne.revertLane,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},ie===null?(B=ie=Ue,N=b):ie=ie.next=Ue,it.lanes|=Ee,tl|=Ee;Ue=Ne.action,$n&&s(b,Ue),b=Ne.hasEagerState?Ne.eagerState:s(b,Ue)}else Ee={lane:Ue,revertLane:Ne.revertLane,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null},ie===null?(B=ie=Ee,N=b):ie=ie.next=Ee,it.lanes|=Ue,tl|=Ue;Ne=Ne.next}while(Ne!==null&&Ne!==r);if(ie===null?N=b:ie.next=B,!rn(b,e.memoizedState)&&(Br=!0,Be&&(s=qi,s!==null)))throw s;e.memoizedState=b,e.baseState=N,e.baseQueue=ie,l.lastRenderedState=b}return p===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function fr(e){var r=sn(),s=r.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=e;var l=s.dispatch,p=s.pending,b=r.memoizedState;if(p!==null){s.pending=null;var N=p=p.next;do b=e(b,N.action),N=N.next;while(N!==p);rn(b,r.memoizedState)||(Br=!0),r.memoizedState=b,r.baseQueue===null&&(r.baseState=b),s.lastRenderedState=b}return[b,l]}function Cl(e,r,s){var l=it,p=sn(),b=un;if(b){if(s===void 0)throw Error(i(407));s=s()}else s=r();var N=!rn((Ut||p).memoizedState,s);N&&(p.memoizedState=s,Br=!0),p=p.queue;var B=Yo.bind(null,l,p,e);if(Qo(2048,8,B,[e]),p.getSnapshot!==r||N||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Fi(9,Dl(),Ml.bind(null,l,p,s,r),null),On===null)throw Error(i(349));b||(Ht&124)!==0||ku(l,r,s)}return s}function ku(e,r,s){e.flags|=16384,e={getSnapshot:r,value:s},r=it.updateQueue,r===null?(r=zr(),it.updateQueue=r,r.stores=[e]):(s=r.stores,s===null?r.stores=[e]:s.push(e))}function Ml(e,r,s,l){r.value=s,r.getSnapshot=l,zf(r)&&Bf(e)}function Yo(e,r,s){return s(function(){zf(r)&&Bf(e)})}function zf(e){var r=e.getSnapshot;e=e.value;try{var s=r();return!rn(e,s)}catch{return!0}}function Bf(e){var r=$s(e,2);r!==null&&Za(r,e,2)}function Rl(e){var r=_n();if(typeof e=="function"){var s=e;if(e=s(),$n){Dt(!0);try{s()}finally{Dt(!1)}}}return r.memoizedState=r.baseState=e,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:e},r}function Ui(e,r,s,l){return e.baseState=s,Ga(e,Ut,typeof l=="function"?l:cr)}function hh(e,r,s,l,p){if(Gf(e))throw Error(i(485));if(e=r.action,e!==null){var b={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){b.listeners.push(N)}};ee.T!==null?s(!0):b.isTransition=!1,l(b),s=r.pending,s===null?(b.next=r.pending=b,Pf(r,b)):(b.next=s.next,r.pending=s.next=b)}}function Pf(e,r){var s=r.action,l=r.payload,p=e.state;if(r.isTransition){var b=ee.T,N={};ee.T=N;try{var B=s(p,l),ie=ee.S;ie!==null&&ie(N,B),qf(e,r,B)}catch(Ne){Go(e,r,Ne)}finally{ee.T=b}}else try{b=s(p,l),qf(e,r,b)}catch(Ne){Go(e,r,Ne)}}function qf(e,r,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){bc(e,r,l)},function(l){return Go(e,r,l)}):bc(e,r,s)}function bc(e,r,s){r.status="fulfilled",r.value=s,xc(r),e.state=s,r=e.pending,r!==null&&(s=r.next,s===r?e.pending=null:(s=s.next,r.next=s,Pf(e,s)))}function Go(e,r,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=s,xc(r),r=r.next;while(r!==l)}e.action=null}function xc(e){e=e.listeners;for(var r=0;r<e.length;r++)(0,e[r])()}function wc(e,r){return r}function Ol(e,r){if(un){var s=On.formState;if(s!==null){e:{var l=it;if(un){if(Fn){t:{for(var p=Fn,b=li;p.nodeType!==8;){if(!b){p=null;break t}if(p=Yi(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){Fn=Yi(p.nextSibling),l=p.data==="F!";break e}}no(l)}l=!1}l&&(r=s[0])}}return s=_n(),s.memoizedState=s.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wc,lastRenderedState:r},s.queue=l,s=I0.bind(null,it,l),l.dispatch=s,l=Rl(!1),b=ph.bind(null,it,!1,l.queue),l=_n(),p={state:r,dispatch:null,action:e,pending:null},l.queue=p,s=hh.bind(null,it,p,b,s),p.dispatch=s,l.memoizedState=e,[r,s,!1]}function Nu(e){var r=sn();return Vo(r,Ut,e)}function Vo(e,r,s){if(r=Ga(e,r,wc)[0],e=di(cr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=jr(r)}catch(N){throw N===D?P:N}else l=r;r=sn();var p=r.queue,b=p.dispatch;return s!==r.memoizedState&&(it.flags|=2048,Fi(9,Dl(),Uf.bind(null,p,s),null)),[l,b,e]}function Uf(e,r){e.action=r}function Ff(e){var r=sn(),s=Ut;if(s!==null)return Vo(r,s,e);sn(),r=r.memoizedState,s=sn();var l=s.queue.dispatch;return s.memoizedState=e,[r,l,!1]}function Fi(e,r,s,l){return e={tag:e,create:s,deps:l,inst:r,next:null},r=it.updateQueue,r===null&&(r=zr(),it.updateQueue=r),s=r.lastEffect,s===null?r.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,r.lastEffect=e),e}function Dl(){return{destroy:void 0,resource:void 0}}function Lu(){return sn().memoizedState}function Va(e,r,s,l){var p=_n();l=l===void 0?null:l,it.flags|=e,p.memoizedState=Fi(1|r,Dl(),s,l)}function Qo(e,r,s,l){var p=sn();l=l===void 0?null:l;var b=p.memoizedState.inst;Ut!==null&&l!==null&&ur(l,Ut.memoizedState.deps)?p.memoizedState=Fi(r,b,s,l):(it.flags|=e,p.memoizedState=Fi(1|r,b,s,l))}function Sc(e,r){Va(8390656,8,e,r)}function If(e,r){Qo(2048,8,e,r)}function _c(e,r){return Qo(4,2,e,r)}function ao(e,r){return Qo(4,4,e,r)}function Hf(e,r){if(typeof r=="function"){e=e();var s=r(e);return function(){typeof s=="function"?s():r(null)}}if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function Ac(e,r,s){s=s!=null?s.concat([e]):null,Qo(4,4,Hf.bind(null,r,e),s)}function jc(){}function kc(e,r){var s=sn();r=r===void 0?null:r;var l=s.memoizedState;return r!==null&&ur(r,l[1])?l[0]:(s.memoizedState=[e,r],e)}function Wf(e,r){var s=sn();r=r===void 0?null:r;var l=s.memoizedState;if(r!==null&&ur(r,l[1]))return l[0];if(l=e(),$n){Dt(!0);try{e()}finally{Dt(!1)}}return s.memoizedState=[l,r],l}function io(e,r,s){return s===void 0||(Ht&1073741824)!==0?e.memoizedState=r:(e.memoizedState=s,e=Pp(),it.lanes|=e,tl|=e,s)}function Eu(e,r,s,l){return rn(s,r)?s:Rt.current!==null?(e=io(e,s,l),rn(e,r)||(Br=!0),e):(Ht&42)===0?(Br=!0,e.memoizedState=s):(e=Pp(),it.lanes|=e,tl|=e,r)}function zl(e,r,s,l,p){var b=J.p;J.p=b!==0&&8>b?b:8;var N=ee.T,B={};ee.T=B,ph(e,!1,r,s);try{var ie=p(),Ne=ee.S;if(Ne!==null&&Ne(B,ie),ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var Be=Df(ie,l);Tc(e,r,Be,$a(e))}else Tc(e,r,l,$a(e))}catch(Ue){Tc(e,r,{then:function(){},status:"rejected",reason:Ue},$a())}finally{J.p=b,ee.T=N}}function Ii(){}function hi(e,r,s,l){if(e.tag!==5)throw Error(i(476));var p=Hi(e).queue;zl(e,p,r,le,s===null?Ii:function(){return Bl(e),s(l)})}function Hi(e){var r=e.memoizedState;if(r!==null)return r;r={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:le},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:s},next:null},e.memoizedState=r,e=e.alternate,e!==null&&(e.memoizedState=r),r}function Bl(e){var r=Hi(e).next.queue;Tc(e,r,{},$a())}function Pl(){return or(Qc)}function Nc(){return sn().memoizedState}function Yf(){return sn().memoizedState}function Lc(e){for(var r=e.return;r!==null;){switch(r.tag){case 24:case 3:var s=$a();e=Oe(s);var l=He(r,e,s);l!==null&&(Za(l,r,s),qe(l,r,s)),r={cache:yc()},e.payload=r;return}r=r.return}}function Ec(e,r,s){var l=$a();s={lane:l,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null},Gf(e)?H0(r,s):(s=vu(e,r,s,l),s!==null&&(Za(s,e,l),W0(s,r,l)))}function I0(e,r,s){var l=$a();Tc(e,r,s,l)}function Tc(e,r,s,l){var p={lane:l,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(Gf(e))H0(r,p);else{var b=e.alternate;if(e.lanes===0&&(b===null||b.lanes===0)&&(b=r.lastRenderedReducer,b!==null))try{var N=r.lastRenderedState,B=b(N,s);if(p.hasEagerState=!0,p.eagerState=B,rn(B,N))return Al(e,r,p,0),On===null&&_l(),!1}catch{}if(s=vu(e,r,p,l),s!==null)return Za(s,e,l),W0(s,r,l),!0}return!1}function ph(e,r,s,l){if(l={lane:2,revertLane:Gh(),action:l,hasEagerState:!1,eagerState:null,next:null},Gf(e)){if(r)throw Error(i(479))}else r=vu(e,s,l,2),r!==null&&Za(r,e,2)}function Gf(e){var r=e.alternate;return e===it||r!==null&&r===it}function H0(e,r){Kn=Ln=!0;var s=e.pending;s===null?r.next=r:(r.next=s.next,s.next=r),e.pending=r}function W0(e,r,s){if((s&4194048)!==0){var l=r.lanes;l&=e.pendingLanes,s|=l,r.lanes=s,ni(e,s)}}var Vf={readContext:or,use:hn,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt},Y0={readContext:or,use:hn,useCallback:function(e,r){return _n().memoizedState=[e,r===void 0?null:r],e},useContext:or,useEffect:Sc,useImperativeHandle:function(e,r,s){s=s!=null?s.concat([e]):null,Va(4194308,4,Hf.bind(null,r,e),s)},useLayoutEffect:function(e,r){return Va(4194308,4,e,r)},useInsertionEffect:function(e,r){Va(4,2,e,r)},useMemo:function(e,r){var s=_n();r=r===void 0?null:r;var l=e();if($n){Dt(!0);try{e()}finally{Dt(!1)}}return s.memoizedState=[l,r],l},useReducer:function(e,r,s){var l=_n();if(s!==void 0){var p=s(r);if($n){Dt(!0);try{s(r)}finally{Dt(!1)}}}else p=r;return l.memoizedState=l.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},l.queue=e,e=e.dispatch=Ec.bind(null,it,e),[l.memoizedState,e]},useRef:function(e){var r=_n();return e={current:e},r.memoizedState=e},useState:function(e){e=Rl(e);var r=e.queue,s=I0.bind(null,it,r);return r.dispatch=s,[e.memoizedState,s]},useDebugValue:jc,useDeferredValue:function(e,r){var s=_n();return io(s,e,r)},useTransition:function(){var e=Rl(!1);return e=zl.bind(null,it,e.queue,!0,!1),_n().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,r,s){var l=it,p=_n();if(un){if(s===void 0)throw Error(i(407));s=s()}else{if(s=r(),On===null)throw Error(i(349));(on&124)!==0||ku(l,r,s)}p.memoizedState=s;var b={value:s,getSnapshot:r};return p.queue=b,Sc(Yo.bind(null,l,b,e),[e]),l.flags|=2048,Fi(9,Dl(),Ml.bind(null,l,b,s,r),null),s},useId:function(){var e=_n(),r=On.identifierPrefix;if(un){var s=zi,l=Di;s=(l&~(1<<32-$e(l)-1)).toString(32)+s,r="«"+r+"R"+s,s=In++,0<s&&(r+="H"+s.toString(32)),r+="»"}else s=Hn++,r="«"+r+"r"+s.toString(32)+"»";return e.memoizedState=r},useHostTransitionStatus:Pl,useFormState:Ol,useActionState:Ol,useOptimistic:function(e){var r=_n();r.memoizedState=r.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=s,r=ph.bind(null,it,!0,s),s.dispatch=r,[e,r]},useMemoCache:$r,useCacheRefresh:function(){return _n().memoizedState=Lc.bind(null,it)}},G0={readContext:or,use:hn,useCallback:kc,useContext:or,useEffect:If,useImperativeHandle:Ac,useInsertionEffect:_c,useLayoutEffect:ao,useMemo:Wf,useReducer:di,useRef:Lu,useState:function(){return di(cr)},useDebugValue:jc,useDeferredValue:function(e,r){var s=sn();return Eu(s,Ut.memoizedState,e,r)},useTransition:function(){var e=di(cr)[0],r=sn().memoizedState;return[typeof e=="boolean"?e:jr(e),r]},useSyncExternalStore:Cl,useId:Nc,useHostTransitionStatus:Pl,useFormState:Nu,useActionState:Nu,useOptimistic:function(e,r){var s=sn();return Ui(s,Ut,e,r)},useMemoCache:$r,useCacheRefresh:Yf},Ny={readContext:or,use:hn,useCallback:kc,useContext:or,useEffect:If,useImperativeHandle:Ac,useInsertionEffect:_c,useLayoutEffect:ao,useMemo:Wf,useReducer:fr,useRef:Lu,useState:function(){return fr(cr)},useDebugValue:jc,useDeferredValue:function(e,r){var s=sn();return Ut===null?io(s,e,r):Eu(s,Ut.memoizedState,e,r)},useTransition:function(){var e=fr(cr)[0],r=sn().memoizedState;return[typeof e=="boolean"?e:jr(e),r]},useSyncExternalStore:Cl,useId:Nc,useHostTransitionStatus:Pl,useFormState:Ff,useActionState:Ff,useOptimistic:function(e,r){var s=sn();return Ut!==null?Ui(s,Ut,e,r):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:$r,useCacheRefresh:Yf},Tu=null,Cc=0;function Qf(e){var r=Cc;return Cc+=1,Tu===null&&(Tu=[]),ke(Tu,e,r)}function Mc(e,r){r=r.props.ref,e.ref=r!==void 0?r:null}function Xf(e,r){throw r.$$typeof===_?Error(i(525)):(e=Object.prototype.toString.call(r),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e)))}function V0(e){var r=e._init;return r(e._payload)}function Q0(e){function r(me,de){if(e){var Se=me.deletions;Se===null?(me.deletions=[de],me.flags|=16):Se.push(de)}}function s(me,de){if(!e)return null;for(;de!==null;)r(me,de),de=de.sibling;return null}function l(me){for(var de=new Map;me!==null;)me.key!==null?de.set(me.key,me):de.set(me.index,me),me=me.sibling;return de}function p(me,de){return me=oi(me,de),me.index=0,me.sibling=null,me}function b(me,de,Se){return me.index=Se,e?(Se=me.alternate,Se!==null?(Se=Se.index,Se<de?(me.flags|=67108866,de):Se):(me.flags|=67108866,de)):(me.flags|=1048576,de)}function N(me){return e&&me.alternate===null&&(me.flags|=67108866),me}function B(me,de,Se,Pe){return de===null||de.tag!==6?(de=xu(Se,me.mode,Pe),de.return=me,de):(de=p(de,Se),de.return=me,de)}function ie(me,de,Se,Pe){var ot=Se.type;return ot===k?Be(me,de,Se.props.children,Pe,Se.key):de!==null&&(de.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===oe&&V0(ot)===de.type)?(de=p(de,Se.props),Mc(de,Se),de.return=me,de):(de=Js(Se.type,Se.key,Se.props,null,me.mode,Pe),Mc(de,Se),de.return=me,de)}function Ne(me,de,Se,Pe){return de===null||de.tag!==4||de.stateNode.containerInfo!==Se.containerInfo||de.stateNode.implementation!==Se.implementation?(de=kl(Se,me.mode,Pe),de.return=me,de):(de=p(de,Se.children||[]),de.return=me,de)}function Be(me,de,Se,Pe,ot){return de===null||de.tag!==7?(de=Ri(Se,me.mode,Pe,ot),de.return=me,de):(de=p(de,Se),de.return=me,de)}function Ue(me,de,Se){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return de=xu(""+de,me.mode,Se),de.return=me,de;if(typeof de=="object"&&de!==null){switch(de.$$typeof){case j:return Se=Js(de.type,de.key,de.props,null,me.mode,Se),Mc(Se,de),Se.return=me,Se;case w:return de=kl(de,me.mode,Se),de.return=me,de;case oe:var Pe=de._init;return de=Pe(de._payload),Ue(me,de,Se)}if(ve(de)||U(de))return de=Ri(de,me.mode,Se,null),de.return=me,de;if(typeof de.then=="function")return Ue(me,Qf(de),Se);if(de.$$typeof===H)return Ue(me,ms(me,de),Se);Xf(me,de)}return null}function Ee(me,de,Se,Pe){var ot=de!==null?de.key:null;if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ot!==null?null:B(me,de,""+Se,Pe);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case j:return Se.key===ot?ie(me,de,Se,Pe):null;case w:return Se.key===ot?Ne(me,de,Se,Pe):null;case oe:return ot=Se._init,Se=ot(Se._payload),Ee(me,de,Se,Pe)}if(ve(Se)||U(Se))return ot!==null?null:Be(me,de,Se,Pe,null);if(typeof Se.then=="function")return Ee(me,de,Qf(Se),Pe);if(Se.$$typeof===H)return Ee(me,de,ms(me,Se),Pe);Xf(me,Se)}return null}function Te(me,de,Se,Pe,ot){if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return me=me.get(Se)||null,B(de,me,""+Pe,ot);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case j:return me=me.get(Pe.key===null?Se:Pe.key)||null,ie(de,me,Pe,ot);case w:return me=me.get(Pe.key===null?Se:Pe.key)||null,Ne(de,me,Pe,ot);case oe:var Xt=Pe._init;return Pe=Xt(Pe._payload),Te(me,de,Se,Pe,ot)}if(ve(Pe)||U(Pe))return me=me.get(Se)||null,Be(de,me,Pe,ot,null);if(typeof Pe.then=="function")return Te(me,de,Se,Qf(Pe),ot);if(Pe.$$typeof===H)return Te(me,de,Se,ms(de,Pe),ot);Xf(de,Pe)}return null}function Ot(me,de,Se,Pe){for(var ot=null,Xt=null,vt=de,Tt=de=0,qr=null;vt!==null&&Tt<Se.length;Tt++){vt.index>Tt?(qr=vt,vt=null):qr=vt.sibling;var dn=Ee(me,vt,Se[Tt],Pe);if(dn===null){vt===null&&(vt=qr);break}e&&vt&&dn.alternate===null&&r(me,vt),de=b(dn,de,Tt),Xt===null?ot=dn:Xt.sibling=dn,Xt=dn,vt=qr}if(Tt===Se.length)return s(me,vt),un&&to(me,Tt),ot;if(vt===null){for(;Tt<Se.length;Tt++)vt=Ue(me,Se[Tt],Pe),vt!==null&&(de=b(vt,de,Tt),Xt===null?ot=vt:Xt.sibling=vt,Xt=vt);return un&&to(me,Tt),ot}for(vt=l(vt);Tt<Se.length;Tt++)qr=Te(vt,me,Tt,Se[Tt],Pe),qr!==null&&(e&&qr.alternate!==null&&vt.delete(qr.key===null?Tt:qr.key),de=b(qr,de,Tt),Xt===null?ot=qr:Xt.sibling=qr,Xt=qr);return e&&vt.forEach(function(cl){return r(me,cl)}),un&&to(me,Tt),ot}function Lt(me,de,Se,Pe){if(Se==null)throw Error(i(151));for(var ot=null,Xt=null,vt=de,Tt=de=0,qr=null,dn=Se.next();vt!==null&&!dn.done;Tt++,dn=Se.next()){vt.index>Tt?(qr=vt,vt=null):qr=vt.sibling;var cl=Ee(me,vt,dn.value,Pe);if(cl===null){vt===null&&(vt=qr);break}e&&vt&&cl.alternate===null&&r(me,vt),de=b(cl,de,Tt),Xt===null?ot=cl:Xt.sibling=cl,Xt=cl,vt=qr}if(dn.done)return s(me,vt),un&&to(me,Tt),ot;if(vt===null){for(;!dn.done;Tt++,dn=Se.next())dn=Ue(me,dn.value,Pe),dn!==null&&(de=b(dn,de,Tt),Xt===null?ot=dn:Xt.sibling=dn,Xt=dn);return un&&to(me,Tt),ot}for(vt=l(vt);!dn.done;Tt++,dn=Se.next())dn=Te(vt,me,Tt,dn.value,Pe),dn!==null&&(e&&dn.alternate!==null&&vt.delete(dn.key===null?Tt:dn.key),de=b(dn,de,Tt),Xt===null?ot=dn:Xt.sibling=dn,Xt=dn);return e&&vt.forEach(function(Lv){return r(me,Lv)}),un&&to(me,Tt),ot}function jn(me,de,Se,Pe){if(typeof Se=="object"&&Se!==null&&Se.type===k&&Se.key===null&&(Se=Se.props.children),typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case j:e:{for(var ot=Se.key;de!==null;){if(de.key===ot){if(ot=Se.type,ot===k){if(de.tag===7){s(me,de.sibling),Pe=p(de,Se.props.children),Pe.return=me,me=Pe;break e}}else if(de.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===oe&&V0(ot)===de.type){s(me,de.sibling),Pe=p(de,Se.props),Mc(Pe,Se),Pe.return=me,me=Pe;break e}s(me,de);break}else r(me,de);de=de.sibling}Se.type===k?(Pe=Ri(Se.props.children,me.mode,Pe,Se.key),Pe.return=me,me=Pe):(Pe=Js(Se.type,Se.key,Se.props,null,me.mode,Pe),Mc(Pe,Se),Pe.return=me,me=Pe)}return N(me);case w:e:{for(ot=Se.key;de!==null;){if(de.key===ot)if(de.tag===4&&de.stateNode.containerInfo===Se.containerInfo&&de.stateNode.implementation===Se.implementation){s(me,de.sibling),Pe=p(de,Se.children||[]),Pe.return=me,me=Pe;break e}else{s(me,de);break}else r(me,de);de=de.sibling}Pe=kl(Se,me.mode,Pe),Pe.return=me,me=Pe}return N(me);case oe:return ot=Se._init,Se=ot(Se._payload),jn(me,de,Se,Pe)}if(ve(Se))return Ot(me,de,Se,Pe);if(U(Se)){if(ot=U(Se),typeof ot!="function")throw Error(i(150));return Se=ot.call(Se),Lt(me,de,Se,Pe)}if(typeof Se.then=="function")return jn(me,de,Qf(Se),Pe);if(Se.$$typeof===H)return jn(me,de,ms(me,Se),Pe);Xf(me,Se)}return typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint"?(Se=""+Se,de!==null&&de.tag===6?(s(me,de.sibling),Pe=p(de,Se),Pe.return=me,me=Pe):(s(me,de),Pe=xu(Se,me.mode,Pe),Pe.return=me,me=Pe),N(me)):s(me,de)}return function(me,de,Se,Pe){try{Cc=0;var ot=jn(me,de,Se,Pe);return Tu=null,ot}catch(vt){if(vt===D||vt===P)throw vt;var Xt=Dr(29,vt,null,me.mode);return Xt.lanes=Pe,Xt.return=me,Xt}}}var Cu=Q0(!0),X0=Q0(!1),pi=ce(null),ys=null;function Xo(e){var r=e.alternate;q(kr,kr.current&1),q(pi,e),ys===null&&(r===null||Rt.current!==null||r.memoizedState!==null)&&(ys=e)}function K0(e){if(e.tag===22){if(q(kr,kr.current),q(pi,e),ys===null){var r=e.alternate;r!==null&&r.memoizedState!==null&&(ys=e)}}else Ko()}function Ko(){q(kr,kr.current),q(pi,pi.current)}function so(e){T(pi),ys===e&&(ys=null),T(kr)}var kr=ce(0);function Kf(e){for(var r=e;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||a1(s)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function gh(e,r,s,l){r=e.memoizedState,s=s(l,r),s=s==null?r:v({},r,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var mh={enqueueSetState:function(e,r,s){e=e._reactInternals;var l=$a(),p=Oe(l);p.payload=r,s!=null&&(p.callback=s),r=He(e,p,l),r!==null&&(Za(r,e,l),qe(r,e,l))},enqueueReplaceState:function(e,r,s){e=e._reactInternals;var l=$a(),p=Oe(l);p.tag=1,p.payload=r,s!=null&&(p.callback=s),r=He(e,p,l),r!==null&&(Za(r,e,l),qe(r,e,l))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var s=$a(),l=Oe(s);l.tag=2,r!=null&&(l.callback=r),r=He(e,l,s),r!==null&&(Za(r,e,s),qe(r,e,s))}};function $0(e,r,s,l,p,b,N){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,b,N):r.prototype&&r.prototype.isPureReactComponent?!Qs(s,l)||!Qs(p,b):!0}function Z0(e,r,s,l){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,l),r.state!==e&&mh.enqueueReplaceState(r,r.state,null)}function ql(e,r){var s=r;if("ref"in r){s={};for(var l in r)l!=="ref"&&(s[l]=r[l])}if(e=e.defaultProps){s===r&&(s=v({},s));for(var p in e)s[p]===void 0&&(s[p]=e[p])}return s}var $f=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function J0(e){$f(e)}function ep(e){console.error(e)}function tp(e){$f(e)}function Zf(e,r){try{var s=e.onUncaughtError;s(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function np(e,r,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function yh(e,r,s){return s=Oe(s),s.tag=3,s.payload={element:null},s.callback=function(){Zf(e,r)},s}function rp(e){return e=Oe(e),e.tag=3,e}function ap(e,r,s,l){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var b=l.value;e.payload=function(){return p(b)},e.callback=function(){np(r,s,l)}}var N=s.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(e.callback=function(){np(r,s,l),typeof p!="function"&&(nl===null?nl=new Set([this]):nl.add(this));var B=l.stack;this.componentDidCatch(l.value,{componentStack:B!==null?B:""})})}function Ly(e,r,s,l,p){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=s.alternate,r!==null&&Wo(r,s,p,!0),s=pi.current,s!==null){switch(s.tag){case 13:return ys===null?Fh():s.alternate===null&&ar===0&&(ar=3),s.flags&=-257,s.flags|=65536,s.lanes=p,l===I?s.flags|=16384:(r=s.updateQueue,r===null?s.updateQueue=new Set([l]):r.add(l),Hh(e,l,p)),!1;case 22:return s.flags|=65536,l===I?s.flags|=16384:(r=s.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=r):(s=r.retryQueue,s===null?r.retryQueue=new Set([l]):s.add(l)),Hh(e,l,p)),!1}throw Error(i(435,s.tag))}return Hh(e,l,p),Fh(),!1}if(un)return r=pi.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,l!==mc&&(e=Error(i(422),{cause:l}),Ho(da(e,s)))):(l!==mc&&(r=Error(i(423),{cause:l}),Ho(da(r,s))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,l=da(l,s),p=yh(e.stateNode,l,p),ft(e,p),ar!==4&&(ar=2)),!1;var b=Error(i(520),{cause:l});if(b=da(b,s),qc===null?qc=[b]:qc.push(b),ar!==4&&(ar=2),r===null)return!0;l=da(l,s),s=r;do{switch(s.tag){case 3:return s.flags|=65536,e=p&-p,s.lanes|=e,e=yh(s.stateNode,l,e),ft(s,e),!1;case 1:if(r=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(nl===null||!nl.has(b))))return s.flags|=65536,p&=-p,s.lanes|=p,p=rp(p),ap(p,e,s,l),ft(s,p),!1}s=s.return}while(s!==null);return!1}var ip=Error(i(461)),Br=!1;function Zr(e,r,s,l){r.child=e===null?X0(r,null,s,l):Cu(r,e.child,s,l)}function sp(e,r,s,l,p){s=s.render;var b=r.ref;if("ref"in l){var N={};for(var B in l)B!=="ref"&&(N[B]=l[B])}else N=l;return fi(r),l=ma(e,r,s,N,b,p),B=Zn(),e!==null&&!Br?(Kr(e,r,p),oo(e,r,p)):(un&&B&&Nl(r),r.flags|=1,Zr(e,r,l,p),r.child)}function op(e,r,s,l,p){if(e===null){var b=s.type;return typeof b=="function"&&!Fo(b)&&b.defaultProps===void 0&&s.compare===null?(r.tag=15,r.type=b,lp(e,r,b,l,p)):(e=Js(s.type,null,l,r,r.mode,p),e.ref=r.ref,e.return=r,r.child=e)}if(b=e.child,!jh(e,p)){var N=b.memoizedProps;if(s=s.compare,s=s!==null?s:Qs,s(N,l)&&e.ref===r.ref)return oo(e,r,p)}return r.flags|=1,e=oi(b,l),e.ref=r.ref,e.return=r,r.child=e}function lp(e,r,s,l,p){if(e!==null){var b=e.memoizedProps;if(Qs(b,l)&&e.ref===r.ref)if(Br=!1,r.pendingProps=l=b,jh(e,p))(e.flags&131072)!==0&&(Br=!0);else return r.lanes=e.lanes,oo(e,r,p)}return vh(e,r,s,l,p)}function up(e,r,s){var l=r.pendingProps,p=l.children,b=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((r.flags&128)!==0){if(l=b!==null?b.baseLanes|s:s,e!==null){for(p=r.child=e.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;r.childLanes=b&~l}else r.childLanes=0,r.child=null;return cp(e,r,l,s)}if((s&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},e!==null&&A(r,b!==null?b.cachePool:null),b!==null?Ge(r,b):Pn(),K0(r);else return r.lanes=r.childLanes=536870912,cp(e,r,b!==null?b.baseLanes|s:s,s)}else b!==null?(A(r,b.cachePool),Ge(r,b),Ko(),r.memoizedState=null):(e!==null&&A(r,null),Pn(),Ko());return Zr(e,r,p,s),r.child}function cp(e,r,s,l){var p=S();return p=p===null?null:{parent:lr._currentValue,pool:p},r.memoizedState={baseLanes:s,cachePool:p},e!==null&&A(r,null),Pn(),K0(r),e!==null&&Wo(e,r,l,!0),null}function Jf(e,r){var s=r.ref;if(s===null)e!==null&&e.ref!==null&&(r.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(i(284));(e===null||e.ref!==s)&&(r.flags|=4194816)}}function vh(e,r,s,l,p){return fi(r),s=ma(e,r,s,l,void 0,p),l=Zn(),e!==null&&!Br?(Kr(e,r,p),oo(e,r,p)):(un&&l&&Nl(r),r.flags|=1,Zr(e,r,s,p),r.child)}function fp(e,r,s,l,p,b){return fi(r),r.updateQueue=null,s=Xr(r,l,s,p),Wn(e),l=Zn(),e!==null&&!Br?(Kr(e,r,b),oo(e,r,b)):(un&&l&&Nl(r),r.flags|=1,Zr(e,r,s,b),r.child)}function dp(e,r,s,l,p){if(fi(r),r.stateNode===null){var b=vr,N=s.contextType;typeof N=="object"&&N!==null&&(b=or(N)),b=new s(l,b),r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=mh,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=l,b.state=r.memoizedState,b.refs={},Ae(r),N=s.contextType,b.context=typeof N=="object"&&N!==null?or(N):vr,b.state=r.memoizedState,N=s.getDerivedStateFromProps,typeof N=="function"&&(gh(r,s,N,l),b.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(N=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),N!==b.state&&mh.enqueueReplaceState(b,b.state,null),tt(r,l,b,p),zt(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(e===null){b=r.stateNode;var B=r.memoizedProps,ie=ql(s,B);b.props=ie;var Ne=b.context,Be=s.contextType;N=vr,typeof Be=="object"&&Be!==null&&(N=or(Be));var Ue=s.getDerivedStateFromProps;Be=typeof Ue=="function"||typeof b.getSnapshotBeforeUpdate=="function",B=r.pendingProps!==B,Be||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(B||Ne!==N)&&Z0(r,b,l,N),Me=!1;var Ee=r.memoizedState;b.state=Ee,tt(r,l,b,p),zt(),Ne=r.memoizedState,B||Ee!==Ne||Me?(typeof Ue=="function"&&(gh(r,s,Ue,l),Ne=r.memoizedState),(ie=Me||$0(r,s,ie,l,Ee,Ne,N))?(Be||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=Ne),b.props=l,b.state=Ne,b.context=N,l=ie):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{b=r.stateNode,De(e,r),N=r.memoizedProps,Be=ql(s,N),b.props=Be,Ue=r.pendingProps,Ee=b.context,Ne=s.contextType,ie=vr,typeof Ne=="object"&&Ne!==null&&(ie=or(Ne)),B=s.getDerivedStateFromProps,(Ne=typeof B=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==Ue||Ee!==ie)&&Z0(r,b,l,ie),Me=!1,Ee=r.memoizedState,b.state=Ee,tt(r,l,b,p),zt();var Te=r.memoizedState;N!==Ue||Ee!==Te||Me||e!==null&&e.dependencies!==null&&Au(e.dependencies)?(typeof B=="function"&&(gh(r,s,B,l),Te=r.memoizedState),(Be=Me||$0(r,s,Be,l,Ee,Te,ie)||e!==null&&e.dependencies!==null&&Au(e.dependencies))?(Ne||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(l,Te,ie),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(l,Te,ie)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===e.memoizedProps&&Ee===e.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&Ee===e.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=Te),b.props=l,b.state=Te,b.context=ie,l=Be):(typeof b.componentDidUpdate!="function"||N===e.memoizedProps&&Ee===e.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&Ee===e.memoizedState||(r.flags|=1024),l=!1)}return b=l,Jf(e,r),l=(r.flags&128)!==0,b||l?(b=r.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,e!==null&&l?(r.child=Cu(r,e.child,null,p),r.child=Cu(r,null,s,p)):Zr(e,r,s,p),r.memoizedState=b.state,e=r.child):e=oo(e,r,p),e}function hp(e,r,s,l){return ga(),r.flags|=256,Zr(e,r,s,l),r.child}var bh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xh(e){return{baseLanes:e,cachePool:M()}}function wh(e,r,s){return e=e!==null?e.childLanes&~s:0,r&&(e|=gi),e}function pp(e,r,s){var l=r.pendingProps,p=!1,b=(r.flags&128)!==0,N;if((N=b)||(N=e!==null&&e.memoizedState===null?!1:(kr.current&2)!==0),N&&(p=!0,r.flags&=-129),N=(r.flags&32)!==0,r.flags&=-33,e===null){if(un){if(p?Xo(r):Ko(),un){var B=Fn,ie;if(ie=B){e:{for(ie=B,B=li;ie.nodeType!==8;){if(!B){B=null;break e}if(ie=Yi(ie.nextSibling),ie===null){B=null;break e}}B=ie}B!==null?(r.memoizedState={dehydrated:B,treeContext:eo!==null?{id:Di,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},ie=Dr(18,null,null,0),ie.stateNode=B,ie.return=r,r.child=ie,sr=r,Fn=null,ie=!0):ie=!1}ie||no(r)}if(B=r.memoizedState,B!==null&&(B=B.dehydrated,B!==null))return a1(B)?r.lanes=32:r.lanes=536870912,null;so(r)}return B=l.children,l=l.fallback,p?(Ko(),p=r.mode,B=ed({mode:"hidden",children:B},p),l=Ri(l,p,s,null),B.return=r,l.return=r,B.sibling=l,r.child=B,p=r.child,p.memoizedState=xh(s),p.childLanes=wh(e,N,s),r.memoizedState=bh,l):(Xo(r),Sh(r,B))}if(ie=e.memoizedState,ie!==null&&(B=ie.dehydrated,B!==null)){if(b)r.flags&256?(Xo(r),r.flags&=-257,r=_h(e,r,s)):r.memoizedState!==null?(Ko(),r.child=e.child,r.flags|=128,r=null):(Ko(),p=l.fallback,B=r.mode,l=ed({mode:"visible",children:l.children},B),p=Ri(p,B,s,null),p.flags|=2,l.return=r,p.return=r,l.sibling=p,r.child=l,Cu(r,e.child,null,s),l=r.child,l.memoizedState=xh(s),l.childLanes=wh(e,N,s),r.memoizedState=bh,r=p);else if(Xo(r),a1(B)){if(N=B.nextSibling&&B.nextSibling.dataset,N)var Ne=N.dgst;N=Ne,l=Error(i(419)),l.stack="",l.digest=N,Ho({value:l,source:null,stack:null}),r=_h(e,r,s)}else if(Br||Wo(e,r,s,!1),N=(s&e.childLanes)!==0,Br||N){if(N=On,N!==null&&(l=s&-s,l=(l&42)!==0?1:pn(l),l=(l&(N.suspendedLanes|s))!==0?0:l,l!==0&&l!==ie.retryLane))throw ie.retryLane=l,$s(e,l),Za(N,e,l),ip;B.data==="$?"||Fh(),r=_h(e,r,s)}else B.data==="$?"?(r.flags|=192,r.child=e.child,r=null):(e=ie.treeContext,Fn=Yi(B.nextSibling),sr=r,un=!0,ps=null,li=!1,e!==null&&(Ea[pa++]=Di,Ea[pa++]=zi,Ea[pa++]=eo,Di=e.id,zi=e.overflow,eo=r),r=Sh(r,l.children),r.flags|=4096);return r}return p?(Ko(),p=l.fallback,B=r.mode,ie=e.child,Ne=ie.sibling,l=oi(ie,{mode:"hidden",children:l.children}),l.subtreeFlags=ie.subtreeFlags&65011712,Ne!==null?p=oi(Ne,p):(p=Ri(p,B,s,null),p.flags|=2),p.return=r,l.return=r,l.sibling=p,r.child=l,l=p,p=r.child,B=e.child.memoizedState,B===null?B=xh(s):(ie=B.cachePool,ie!==null?(Ne=lr._currentValue,ie=ie.parent!==Ne?{parent:Ne,pool:Ne}:ie):ie=M(),B={baseLanes:B.baseLanes|s,cachePool:ie}),p.memoizedState=B,p.childLanes=wh(e,N,s),r.memoizedState=bh,l):(Xo(r),s=e.child,e=s.sibling,s=oi(s,{mode:"visible",children:l.children}),s.return=r,s.sibling=null,e!==null&&(N=r.deletions,N===null?(r.deletions=[e],r.flags|=16):N.push(e)),r.child=s,r.memoizedState=null,s)}function Sh(e,r){return r=ed({mode:"visible",children:r},e.mode),r.return=e,e.child=r}function ed(e,r){return e=Dr(22,e,null,r),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function _h(e,r,s){return Cu(r,e.child,null,s),e=Sh(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function gp(e,r,s){e.lanes|=r;var l=e.alternate;l!==null&&(l.lanes|=r),Su(e.return,r,s)}function Ah(e,r,s,l,p){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:p}:(b.isBackwards=r,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=s,b.tailMode=p)}function mp(e,r,s){var l=r.pendingProps,p=l.revealOrder,b=l.tail;if(Zr(e,r,l.children,s),l=kr.current,(l&2)!==0)l=l&1|2,r.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gp(e,s,r);else if(e.tag===19)gp(e,s,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break e;for(;e.sibling===null;){if(e.return===null||e.return===r)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(q(kr,l),p){case"forwards":for(s=r.child,p=null;s!==null;)e=s.alternate,e!==null&&Kf(e)===null&&(p=s),s=s.sibling;s=p,s===null?(p=r.child,r.child=null):(p=s.sibling,s.sibling=null),Ah(r,!1,p,s,b);break;case"backwards":for(s=null,p=r.child,r.child=null;p!==null;){if(e=p.alternate,e!==null&&Kf(e)===null){r.child=p;break}e=p.sibling,p.sibling=s,s=p,p=e}Ah(r,!0,s,null,b);break;case"together":Ah(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function oo(e,r,s){if(e!==null&&(r.dependencies=e.dependencies),tl|=r.lanes,(s&r.childLanes)===0)if(e!==null){if(Wo(e,r,s,!1),(s&r.childLanes)===0)return null}else return null;if(e!==null&&r.child!==e.child)throw Error(i(153));if(r.child!==null){for(e=r.child,s=oi(e,e.pendingProps),r.child=s,s.return=r;e.sibling!==null;)e=e.sibling,s=s.sibling=oi(e,e.pendingProps),s.return=r;s.sibling=null}return r.child}function jh(e,r){return(e.lanes&r)!==0?!0:(e=e.dependencies,!!(e!==null&&Au(e)))}function Ey(e,r,s){switch(r.tag){case 3:je(r,r.stateNode.containerInfo),gs(r,lr,e.memoizedState.cache),ga();break;case 27:case 5:ze(r);break;case 4:je(r,r.stateNode.containerInfo);break;case 10:gs(r,r.type,r.memoizedProps.value);break;case 13:var l=r.memoizedState;if(l!==null)return l.dehydrated!==null?(Xo(r),r.flags|=128,null):(s&r.child.childLanes)!==0?pp(e,r,s):(Xo(r),e=oo(e,r,s),e!==null?e.sibling:null);Xo(r);break;case 19:var p=(e.flags&128)!==0;if(l=(s&r.childLanes)!==0,l||(Wo(e,r,s,!1),l=(s&r.childLanes)!==0),p){if(l)return mp(e,r,s);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),q(kr,kr.current),l)break;return null;case 22:case 23:return r.lanes=0,up(e,r,s);case 24:gs(r,lr,e.memoizedState.cache)}return oo(e,r,s)}function yp(e,r,s){if(e!==null)if(e.memoizedProps!==r.pendingProps)Br=!0;else{if(!jh(e,s)&&(r.flags&128)===0)return Br=!1,Ey(e,r,s);Br=(e.flags&131072)!==0}else Br=!1,un&&(r.flags&1048576)!==0&&Tf(r,wu,r.index);switch(r.lanes=0,r.tag){case 16:e:{e=r.pendingProps;var l=r.elementType,p=l._init;if(l=p(l._payload),r.type=l,typeof l=="function")Fo(l)?(e=ql(l,e),r.tag=1,r=dp(null,r,l,e,s)):(r.tag=0,r=vh(null,r,l,e,s));else{if(l!=null){if(p=l.$$typeof,p===F){r.tag=11,r=sp(null,r,l,e,s);break e}else if(p===xe){r.tag=14,r=op(null,r,l,e,s);break e}}throw r=re(l)||l,Error(i(306,r,""))}}return r;case 0:return vh(e,r,r.type,r.pendingProps,s);case 1:return l=r.type,p=ql(l,r.pendingProps),dp(e,r,l,p,s);case 3:e:{if(je(r,r.stateNode.containerInfo),e===null)throw Error(i(387));l=r.pendingProps;var b=r.memoizedState;p=b.element,De(e,r),tt(r,l,null,s);var N=r.memoizedState;if(l=N.cache,gs(r,lr,l),l!==b.cache&&_u(r,[lr],s,!0),zt(),l=N.element,b.isDehydrated)if(b={element:l,isDehydrated:!1,cache:N.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=hp(e,r,l,s);break e}else if(l!==p){p=da(Error(i(424)),r),Ho(p),r=hp(e,r,l,s);break e}else for(e=r.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Fn=Yi(e.firstChild),sr=r,un=!0,ps=null,li=!0,s=X0(r,null,l,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ga(),l===p){r=oo(e,r,s);break e}Zr(e,r,l,s)}r=r.child}return r;case 26:return Jf(e,r),e===null?(s=w2(r.type,null,r.pendingProps,null))?r.memoizedState=s:un||(s=r.type,e=r.pendingProps,l=pd(se.current).createElement(s),l[Cn]=r,l[kn]=e,ea(l,s,e),Rn(l),r.stateNode=l):r.memoizedState=w2(r.type,e.memoizedProps,r.pendingProps,e.memoizedState),null;case 27:return ze(r),e===null&&un&&(l=r.stateNode=v2(r.type,r.pendingProps,se.current),sr=r,li=!0,p=Fn,il(r.type)?(i1=p,Fn=Yi(l.firstChild)):Fn=p),Zr(e,r,r.pendingProps.children,s),Jf(e,r),e===null&&(r.flags|=4194304),r.child;case 5:return e===null&&un&&((p=l=Fn)&&(l=rv(l,r.type,r.pendingProps,li),l!==null?(r.stateNode=l,sr=r,Fn=Yi(l.firstChild),li=!1,p=!0):p=!1),p||no(r)),ze(r),p=r.type,b=r.pendingProps,N=e!==null?e.memoizedProps:null,l=b.children,t1(p,b)?l=null:N!==null&&t1(p,N)&&(r.flags|=32),r.memoizedState!==null&&(p=ma(e,r,vn,null,null,s),Qc._currentValue=p),Jf(e,r),Zr(e,r,l,s),r.child;case 6:return e===null&&un&&((e=s=Fn)&&(s=av(s,r.pendingProps,li),s!==null?(r.stateNode=s,sr=r,Fn=null,e=!0):e=!1),e||no(r)),null;case 13:return pp(e,r,s);case 4:return je(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=Cu(r,null,l,s):Zr(e,r,l,s),r.child;case 11:return sp(e,r,r.type,r.pendingProps,s);case 7:return Zr(e,r,r.pendingProps,s),r.child;case 8:return Zr(e,r,r.pendingProps.children,s),r.child;case 12:return Zr(e,r,r.pendingProps.children,s),r.child;case 10:return l=r.pendingProps,gs(r,r.type,l.value),Zr(e,r,l.children,s),r.child;case 9:return p=r.type._context,l=r.pendingProps.children,fi(r),p=or(p),l=l(p),r.flags|=1,Zr(e,r,l,s),r.child;case 14:return op(e,r,r.type,r.pendingProps,s);case 15:return lp(e,r,r.type,r.pendingProps,s);case 19:return mp(e,r,s);case 31:return l=r.pendingProps,s=r.mode,l={mode:l.mode,children:l.children},e===null?(s=ed(l,s),s.ref=r.ref,r.child=s,s.return=r,r=s):(s=oi(e.child,l),s.ref=r.ref,r.child=s,s.return=r,r=s),r;case 22:return up(e,r,s);case 24:return fi(r),l=or(lr),e===null?(p=S(),p===null&&(p=On,b=yc(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=s),p=b),r.memoizedState={parent:l,cache:p},Ae(r),gs(r,lr,p)):((e.lanes&s)!==0&&(De(e,r),tt(r,null,null,s),zt()),p=e.memoizedState,b=r.memoizedState,p.parent!==l?(p={parent:l,cache:l},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),gs(r,lr,l)):(l=b.cache,gs(r,lr,l),l!==p.cache&&_u(r,[lr],s,!0))),Zr(e,r,r.pendingProps.children,s),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function lo(e){e.flags|=4}function vp(e,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!k2(r)){if(r=pi.current,r!==null&&((on&4194048)===on?ys!==null:(on&62914560)!==on&&(on&536870912)===0||r!==ys))throw K=I,z;e.flags|=8192}}function td(e,r){r!==null&&(e.flags|=4),e.flags&16384&&(r=e.tag!==22?At():536870912,e.lanes|=r,Du|=r)}function Rc(e,r){if(!un)switch(e.tailMode){case"hidden":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Jn(e){var r=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(r)for(var p=e.child;p!==null;)s|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)s|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=l,e.childLanes=s,r}function Ty(e,r,s){var l=r.pendingProps;switch(Ll(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jn(r),null;case 1:return Jn(r),null;case 3:return s=r.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ci(lr),Ce(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Qr(r)?lo(r):e===null||e.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Mf())),Jn(r),null;case 26:return s=r.memoizedState,e===null?(lo(r),s!==null?(Jn(r),vp(r,s)):(Jn(r),r.flags&=-16777217)):s?s!==e.memoizedState?(lo(r),Jn(r),vp(r,s)):(Jn(r),r.flags&=-16777217):(e.memoizedProps!==l&&lo(r),Jn(r),r.flags&=-16777217),null;case 27:We(r),s=se.current;var p=r.type;if(e!==null&&r.stateNode!=null)e.memoizedProps!==l&&lo(r);else{if(!l){if(r.stateNode===null)throw Error(i(166));return Jn(r),null}e=V.current,Qr(r)?Cf(r):(e=v2(p,l,s),r.stateNode=e,lo(r))}return Jn(r),null;case 5:if(We(r),s=r.type,e!==null&&r.stateNode!=null)e.memoizedProps!==l&&lo(r);else{if(!l){if(r.stateNode===null)throw Error(i(166));return Jn(r),null}if(e=V.current,Qr(r))Cf(r);else{switch(p=pd(se.current),e){case 1:e=p.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:e=p.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":e=p.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":e=p.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?p.createElement(s,{is:l.is}):p.createElement(s)}}e[Cn]=r,e[kn]=l;e:for(p=r.child;p!==null;){if(p.tag===5||p.tag===6)e.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===r)break e;for(;p.sibling===null;){if(p.return===null||p.return===r)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}r.stateNode=e;e:switch(ea(e,s,l),s){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&lo(r)}}return Jn(r),r.flags&=-16777217,null;case 6:if(e&&r.stateNode!=null)e.memoizedProps!==l&&lo(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(i(166));if(e=se.current,Qr(r)){if(e=r.stateNode,s=r.memoizedProps,l=null,p=sr,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}e[Cn]=r,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||f2(e.nodeValue,s)),e||no(r)}else e=pd(e).createTextNode(l),e[Cn]=r,r.stateNode=e}return Jn(r),null;case 13:if(l=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=Qr(r),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(i(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Cn]=r}else ga(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Jn(r),p=!1}else p=Mf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(so(r),r):(so(r),null)}if(so(r),(r.flags&128)!==0)return r.lanes=s,r;if(s=l!==null,e=e!==null&&e.memoizedState!==null,s){l=r.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool);var b=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(b=l.memoizedState.cachePool.pool),b!==p&&(l.flags|=2048)}return s!==e&&s&&(r.child.flags|=8192),td(r,r.updateQueue),Jn(r),null;case 4:return Ce(),e===null&&Kh(r.stateNode.containerInfo),Jn(r),null;case 10:return ci(r.type),Jn(r),null;case 19:if(T(kr),p=r.memoizedState,p===null)return Jn(r),null;if(l=(r.flags&128)!==0,b=p.rendering,b===null)if(l)Rc(p,!1);else{if(ar!==0||e!==null&&(e.flags&128)!==0)for(e=r.child;e!==null;){if(b=Kf(e),b!==null){for(r.flags|=128,Rc(p,!1),e=b.updateQueue,r.updateQueue=e,td(r,e),r.subtreeFlags=0,e=s,s=r.child;s!==null;)jl(s,e),s=s.sibling;return q(kr,kr.current&1|2),r.child}e=e.sibling}p.tail!==null&&xt()>ad&&(r.flags|=128,l=!0,Rc(p,!1),r.lanes=4194304)}else{if(!l)if(e=Kf(b),e!==null){if(r.flags|=128,l=!0,e=e.updateQueue,r.updateQueue=e,td(r,e),Rc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!un)return Jn(r),null}else 2*xt()-p.renderingStartTime>ad&&s!==536870912&&(r.flags|=128,l=!0,Rc(p,!1),r.lanes=4194304);p.isBackwards?(b.sibling=r.child,r.child=b):(e=p.last,e!==null?e.sibling=b:r.child=b,p.last=b)}return p.tail!==null?(r=p.tail,p.rendering=r,p.tail=r.sibling,p.renderingStartTime=xt(),r.sibling=null,e=kr.current,q(kr,l?e&1|2:e&1),r):(Jn(r),null);case 22:case 23:return so(r),Bt(),l=r.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(s&536870912)!==0&&(r.flags&128)===0&&(Jn(r),r.subtreeFlags&6&&(r.flags|=8192)):Jn(r),s=r.updateQueue,s!==null&&td(r,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==s&&(r.flags|=2048),e!==null&&T(y),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),ci(lr),Jn(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function Cy(e,r){switch(Ll(r),r.tag){case 1:return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return ci(lr),Ce(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 26:case 27:case 5:return We(r),null;case 13:if(so(r),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(i(340));ga()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return T(kr),null;case 4:return Ce(),null;case 10:return ci(r.type),null;case 22:case 23:return so(r),Bt(),e!==null&&T(y),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 24:return ci(lr),null;case 25:return null;default:return null}}function bp(e,r){switch(Ll(r),r.tag){case 3:ci(lr),Ce();break;case 26:case 27:case 5:We(r);break;case 4:Ce();break;case 13:so(r);break;case 19:T(kr);break;case 10:ci(r.type);break;case 22:case 23:so(r),Bt(),e!==null&&T(y);break;case 24:ci(lr)}}function Oc(e,r){try{var s=r.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var p=l.next;s=p;do{if((s.tag&e)===e){l=void 0;var b=s.create,N=s.inst;l=b(),N.destroy=l}s=s.next}while(s!==p)}}catch(B){En(r,r.return,B)}}function $o(e,r,s){try{var l=r.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var b=p.next;l=b;do{if((l.tag&e)===e){var N=l.inst,B=N.destroy;if(B!==void 0){N.destroy=void 0,p=r;var ie=s,Ne=B;try{Ne()}catch(Be){En(p,ie,Be)}}}l=l.next}while(l!==b)}}catch(Be){En(r,r.return,Be)}}function xp(e){var r=e.updateQueue;if(r!==null){var s=e.stateNode;try{rr(r,s)}catch(l){En(e,e.return,l)}}}function wp(e,r,s){s.props=ql(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){En(e,r,l)}}function Dc(e,r){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(p){En(e,r,p)}}function vs(e,r){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(p){En(e,r,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){En(e,r,p)}else s.current=null}function Sp(e){var r=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(p){En(e,e.return,p)}}function kh(e,r,s){try{var l=e.stateNode;Zy(l,e.type,s,r),l[kn]=r}catch(p){En(e,e.return,p)}}function _p(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&il(e.type)||e.tag===4}function Nh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_p(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.tag===27&&il(e.type)||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 Lh(e,r,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(e),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=hd));else if(l!==4&&(l===27&&il(e.type)&&(s=e.stateNode,r=null),e=e.child,e!==null))for(Lh(e,r,s),e=e.sibling;e!==null;)Lh(e,r,s),e=e.sibling}function nd(e,r,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?s.insertBefore(e,r):s.appendChild(e);else if(l!==4&&(l===27&&il(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(nd(e,r,s),e=e.sibling;e!==null;)nd(e,r,s),e=e.sibling}function Ap(e){var r=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);ea(r,l,s),r[Cn]=e,r[kn]=s}catch(b){En(e,e.return,b)}}var uo=!1,dr=!1,Eh=!1,jp=typeof WeakSet=="function"?WeakSet:Set,Pr=null;function My(e,r){if(e=e.containerInfo,Jh=xd,e=Bo(e),Xs(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var p=l.anchorOffset,b=l.focusNode;l=l.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break e}var N=0,B=-1,ie=-1,Ne=0,Be=0,Ue=e,Ee=null;t:for(;;){for(var Te;Ue!==s||p!==0&&Ue.nodeType!==3||(B=N+p),Ue!==b||l!==0&&Ue.nodeType!==3||(ie=N+l),Ue.nodeType===3&&(N+=Ue.nodeValue.length),(Te=Ue.firstChild)!==null;)Ee=Ue,Ue=Te;for(;;){if(Ue===e)break t;if(Ee===s&&++Ne===p&&(B=N),Ee===b&&++Be===l&&(ie=N),(Te=Ue.nextSibling)!==null)break;Ue=Ee,Ee=Ue.parentNode}Ue=Te}s=B===-1||ie===-1?null:{start:B,end:ie}}else s=null}s=s||{start:0,end:0}}else s=null;for(e1={focusedElem:e,selectionRange:s},xd=!1,Pr=r;Pr!==null;)if(r=Pr,e=r.child,(r.subtreeFlags&1024)!==0&&e!==null)e.return=r,Pr=e;else for(;Pr!==null;){switch(r=Pr,b=r.alternate,e=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&b!==null){e=void 0,s=r,p=b.memoizedProps,b=b.memoizedState,l=s.stateNode;try{var Ot=ql(s.type,p,s.elementType===s.type);e=l.getSnapshotBeforeUpdate(Ot,b),l.__reactInternalSnapshotBeforeUpdate=e}catch(Lt){En(s,s.return,Lt)}}break;case 3:if((e&1024)!==0){if(e=r.stateNode.containerInfo,s=e.nodeType,s===9)r1(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":r1(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=r.sibling,e!==null){e.return=r.return,Pr=e;break}Pr=r.return}}function kp(e,r,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:Zo(e,s),l&4&&Oc(5,s);break;case 1:if(Zo(e,s),l&4)if(e=s.stateNode,r===null)try{e.componentDidMount()}catch(N){En(s,s.return,N)}else{var p=ql(s.type,r.memoizedProps);r=r.memoizedState;try{e.componentDidUpdate(p,r,e.__reactInternalSnapshotBeforeUpdate)}catch(N){En(s,s.return,N)}}l&64&&xp(s),l&512&&Dc(s,s.return);break;case 3:if(Zo(e,s),l&64&&(e=s.updateQueue,e!==null)){if(r=null,s.child!==null)switch(s.child.tag){case 27:case 5:r=s.child.stateNode;break;case 1:r=s.child.stateNode}try{rr(e,r)}catch(N){En(s,s.return,N)}}break;case 27:r===null&&l&4&&Ap(s);case 26:case 5:Zo(e,s),r===null&&l&4&&Sp(s),l&512&&Dc(s,s.return);break;case 12:Zo(e,s);break;case 13:Zo(e,s),l&4&&Ep(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=Fy.bind(null,s),iv(e,s))));break;case 22:if(l=s.memoizedState!==null||uo,!l){r=r!==null&&r.memoizedState!==null||dr,p=uo;var b=dr;uo=l,(dr=r)&&!b?Jo(e,s,(s.subtreeFlags&8772)!==0):Zo(e,s),uo=p,dr=b}break;case 30:break;default:Zo(e,s)}}function Np(e){var r=e.alternate;r!==null&&(e.alternate=null,Np(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&oa(r)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Yn=null,Ta=!1;function co(e,r,s){for(s=s.child;s!==null;)Lp(e,r,s),s=s.sibling}function Lp(e,r,s){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(wt,s)}catch{}switch(s.tag){case 26:dr||vs(s,r),co(e,r,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:dr||vs(s,r);var l=Yn,p=Ta;il(s.type)&&(Yn=s.stateNode,Ta=!1),co(e,r,s),Wc(s.stateNode),Yn=l,Ta=p;break;case 5:dr||vs(s,r);case 6:if(l=Yn,p=Ta,Yn=null,co(e,r,s),Yn=l,Ta=p,Yn!==null)if(Ta)try{(Yn.nodeType===9?Yn.body:Yn.nodeName==="HTML"?Yn.ownerDocument.body:Yn).removeChild(s.stateNode)}catch(b){En(s,r,b)}else try{Yn.removeChild(s.stateNode)}catch(b){En(s,r,b)}break;case 18:Yn!==null&&(Ta?(e=Yn,m2(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Zc(e)):m2(Yn,s.stateNode));break;case 4:l=Yn,p=Ta,Yn=s.stateNode.containerInfo,Ta=!0,co(e,r,s),Yn=l,Ta=p;break;case 0:case 11:case 14:case 15:dr||$o(2,s,r),dr||$o(4,s,r),co(e,r,s);break;case 1:dr||(vs(s,r),l=s.stateNode,typeof l.componentWillUnmount=="function"&&wp(s,r,l)),co(e,r,s);break;case 21:co(e,r,s);break;case 22:dr=(l=dr)||s.memoizedState!==null,co(e,r,s),dr=l;break;default:co(e,r,s)}}function Ep(e,r){if(r.memoizedState===null&&(e=r.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zc(e)}catch(s){En(r,r.return,s)}}function Ry(e){switch(e.tag){case 13:case 19:var r=e.stateNode;return r===null&&(r=e.stateNode=new jp),r;case 22:return e=e.stateNode,r=e._retryCache,r===null&&(r=e._retryCache=new jp),r;default:throw Error(i(435,e.tag))}}function Th(e,r){var s=Ry(e);r.forEach(function(l){var p=Iy.bind(null,e,l);s.has(l)||(s.add(l),l.then(p,p))})}function Qa(e,r){var s=r.deletions;if(s!==null)for(var l=0;l<s.length;l++){var p=s[l],b=e,N=r,B=N;e:for(;B!==null;){switch(B.tag){case 27:if(il(B.type)){Yn=B.stateNode,Ta=!1;break e}break;case 5:Yn=B.stateNode,Ta=!1;break e;case 3:case 4:Yn=B.stateNode.containerInfo,Ta=!0;break e}B=B.return}if(Yn===null)throw Error(i(160));Lp(b,N,p),Yn=null,Ta=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)Tp(r,e),r=r.sibling}var Wi=null;function Tp(e,r){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qa(r,e),Xa(e),l&4&&($o(3,e,e.return),Oc(3,e),$o(5,e,e.return));break;case 1:Qa(r,e),Xa(e),l&512&&(dr||s===null||vs(s,s.return)),l&64&&uo&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var p=Wi;if(Qa(r,e),Xa(e),l&512&&(dr||s===null||vs(s,s.return)),l&4){var b=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,p=p.ownerDocument||p;t:switch(l){case"title":b=p.getElementsByTagName("title")[0],(!b||b[ba]||b[Cn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(l),p.head.insertBefore(b,p.querySelector("head > title"))),ea(b,l,s),b[Cn]=e,Rn(b),l=b;break e;case"link":var N=A2("link","href",p).get(l+(s.href||""));if(N){for(var B=0;B<N.length;B++)if(b=N[B],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){N.splice(B,1);break t}}b=p.createElement(l),ea(b,l,s),p.head.appendChild(b);break;case"meta":if(N=A2("meta","content",p).get(l+(s.content||""))){for(B=0;B<N.length;B++)if(b=N[B],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){N.splice(B,1);break t}}b=p.createElement(l),ea(b,l,s),p.head.appendChild(b);break;default:throw Error(i(468,l))}b[Cn]=e,Rn(b),l=b}e.stateNode=l}else j2(p,e.type,e.stateNode);else e.stateNode=_2(p,l,e.memoizedProps);else b!==l?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,l===null?j2(p,e.type,e.stateNode):_2(p,l,e.memoizedProps)):l===null&&e.stateNode!==null&&kh(e,e.memoizedProps,s.memoizedProps)}break;case 27:Qa(r,e),Xa(e),l&512&&(dr||s===null||vs(s,s.return)),s!==null&&l&4&&kh(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Qa(r,e),Xa(e),l&512&&(dr||s===null||vs(s,s.return)),e.flags&32){p=e.stateNode;try{Yr(p,"")}catch(Te){En(e,e.return,Te)}}l&4&&e.stateNode!=null&&(p=e.memoizedProps,kh(e,p,s!==null?s.memoizedProps:p)),l&1024&&(Eh=!0);break;case 6:if(Qa(r,e),Xa(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(Te){En(e,e.return,Te)}}break;case 3:if(yd=null,p=Wi,Wi=gd(r.containerInfo),Qa(r,e),Wi=p,Xa(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{Zc(r.containerInfo)}catch(Te){En(e,e.return,Te)}Eh&&(Eh=!1,Cp(e));break;case 4:l=Wi,Wi=gd(e.stateNode.containerInfo),Qa(r,e),Xa(e),Wi=l;break;case 12:Qa(r,e),Xa(e);break;case 13:Qa(r,e),Xa(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(zh=xt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Th(e,l)));break;case 22:p=e.memoizedState!==null;var ie=s!==null&&s.memoizedState!==null,Ne=uo,Be=dr;if(uo=Ne||p,dr=Be||ie,Qa(r,e),dr=Be,uo=Ne,Xa(e),l&8192)e:for(r=e.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(s===null||ie||uo||dr||Ul(e)),s=null,r=e;;){if(r.tag===5||r.tag===26){if(s===null){ie=s=r;try{if(b=ie.stateNode,p)N=b.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{B=ie.stateNode;var Ue=ie.memoizedProps.style,Ee=Ue!=null&&Ue.hasOwnProperty("display")?Ue.display:null;B.style.display=Ee==null||typeof Ee=="boolean"?"":(""+Ee).trim()}}catch(Te){En(ie,ie.return,Te)}}}else if(r.tag===6){if(s===null){ie=r;try{ie.stateNode.nodeValue=p?"":ie.memoizedProps}catch(Te){En(ie,ie.return,Te)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;s===r&&(s=null),r=r.return}s===r&&(s=null),r.sibling.return=r.return,r=r.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Th(e,s))));break;case 19:Qa(r,e),Xa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Th(e,l)));break;case 30:break;case 21:break;default:Qa(r,e),Xa(e)}}function Xa(e){var r=e.flags;if(r&2){try{for(var s,l=e.return;l!==null;){if(_p(l)){s=l;break}l=l.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var p=s.stateNode,b=Nh(e);nd(e,b,p);break;case 5:var N=s.stateNode;s.flags&32&&(Yr(N,""),s.flags&=-33);var B=Nh(e);nd(e,B,N);break;case 3:case 4:var ie=s.stateNode.containerInfo,Ne=Nh(e);Lh(e,Ne,ie);break;default:throw Error(i(161))}}catch(Be){En(e,e.return,Be)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function Cp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var r=e;Cp(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),e=e.sibling}}function Zo(e,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)kp(e,r.alternate,r),r=r.sibling}function Ul(e){for(e=e.child;e!==null;){var r=e;switch(r.tag){case 0:case 11:case 14:case 15:$o(4,r,r.return),Ul(r);break;case 1:vs(r,r.return);var s=r.stateNode;typeof s.componentWillUnmount=="function"&&wp(r,r.return,s),Ul(r);break;case 27:Wc(r.stateNode);case 26:case 5:vs(r,r.return),Ul(r);break;case 22:r.memoizedState===null&&Ul(r);break;case 30:Ul(r);break;default:Ul(r)}e=e.sibling}}function Jo(e,r,s){for(s=s&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var l=r.alternate,p=e,b=r,N=b.flags;switch(b.tag){case 0:case 11:case 15:Jo(p,b,s),Oc(4,b);break;case 1:if(Jo(p,b,s),l=b,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Ne){En(l,l.return,Ne)}if(l=b,p=l.updateQueue,p!==null){var B=l.stateNode;try{var ie=p.shared.hiddenCallbacks;if(ie!==null)for(p.shared.hiddenCallbacks=null,p=0;p<ie.length;p++)Qt(ie[p],B)}catch(Ne){En(l,l.return,Ne)}}s&&N&64&&xp(b),Dc(b,b.return);break;case 27:Ap(b);case 26:case 5:Jo(p,b,s),s&&l===null&&N&4&&Sp(b),Dc(b,b.return);break;case 12:Jo(p,b,s);break;case 13:Jo(p,b,s),s&&N&4&&Ep(p,b);break;case 22:b.memoizedState===null&&Jo(p,b,s),Dc(b,b.return);break;case 30:break;default:Jo(p,b,s)}r=r.sibling}}function Ch(e,r){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(e=r.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&El(s))}function Mh(e,r){e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&El(e))}function bs(e,r,s,l){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Mp(e,r,s,l),r=r.sibling}function Mp(e,r,s,l){var p=r.flags;switch(r.tag){case 0:case 11:case 15:bs(e,r,s,l),p&2048&&Oc(9,r);break;case 1:bs(e,r,s,l);break;case 3:bs(e,r,s,l),p&2048&&(e=null,r.alternate!==null&&(e=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==e&&(r.refCount++,e!=null&&El(e)));break;case 12:if(p&2048){bs(e,r,s,l),e=r.stateNode;try{var b=r.memoizedProps,N=b.id,B=b.onPostCommit;typeof B=="function"&&B(N,r.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(ie){En(r,r.return,ie)}}else bs(e,r,s,l);break;case 13:bs(e,r,s,l);break;case 23:break;case 22:b=r.stateNode,N=r.alternate,r.memoizedState!==null?b._visibility&2?bs(e,r,s,l):zc(e,r):b._visibility&2?bs(e,r,s,l):(b._visibility|=2,Mu(e,r,s,l,(r.subtreeFlags&10256)!==0)),p&2048&&Ch(N,r);break;case 24:bs(e,r,s,l),p&2048&&Mh(r.alternate,r);break;default:bs(e,r,s,l)}}function Mu(e,r,s,l,p){for(p=p&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var b=e,N=r,B=s,ie=l,Ne=N.flags;switch(N.tag){case 0:case 11:case 15:Mu(b,N,B,ie,p),Oc(8,N);break;case 23:break;case 22:var Be=N.stateNode;N.memoizedState!==null?Be._visibility&2?Mu(b,N,B,ie,p):zc(b,N):(Be._visibility|=2,Mu(b,N,B,ie,p)),p&&Ne&2048&&Ch(N.alternate,N);break;case 24:Mu(b,N,B,ie,p),p&&Ne&2048&&Mh(N.alternate,N);break;default:Mu(b,N,B,ie,p)}r=r.sibling}}function zc(e,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var s=e,l=r,p=l.flags;switch(l.tag){case 22:zc(s,l),p&2048&&Ch(l.alternate,l);break;case 24:zc(s,l),p&2048&&Mh(l.alternate,l);break;default:zc(s,l)}r=r.sibling}}var Bc=8192;function Ru(e){if(e.subtreeFlags&Bc)for(e=e.child;e!==null;)Rp(e),e=e.sibling}function Rp(e){switch(e.tag){case 26:Ru(e),e.flags&Bc&&e.memoizedState!==null&&vv(Wi,e.memoizedState,e.memoizedProps);break;case 5:Ru(e);break;case 3:case 4:var r=Wi;Wi=gd(e.stateNode.containerInfo),Ru(e),Wi=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bc,Bc=16777216,Ru(e),Bc=r):Ru(e));break;default:Ru(e)}}function Op(e){var r=e.alternate;if(r!==null&&(e=r.child,e!==null)){r.child=null;do r=e.sibling,e.sibling=null,e=r;while(e!==null)}}function Pc(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var l=r[s];Pr=l,zp(l,e)}Op(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dp(e),e=e.sibling}function Dp(e){switch(e.tag){case 0:case 11:case 15:Pc(e),e.flags&2048&&$o(9,e,e.return);break;case 3:Pc(e);break;case 12:Pc(e);break;case 22:var r=e.stateNode;e.memoizedState!==null&&r._visibility&2&&(e.return===null||e.return.tag!==13)?(r._visibility&=-3,rd(e)):Pc(e);break;default:Pc(e)}}function rd(e){var r=e.deletions;if((e.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var l=r[s];Pr=l,zp(l,e)}Op(e)}for(e=e.child;e!==null;){switch(r=e,r.tag){case 0:case 11:case 15:$o(8,r,r.return),rd(r);break;case 22:s=r.stateNode,s._visibility&2&&(s._visibility&=-3,rd(r));break;default:rd(r)}e=e.sibling}}function zp(e,r){for(;Pr!==null;){var s=Pr;switch(s.tag){case 0:case 11:case 15:$o(8,s,r);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:El(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Pr=l;else e:for(s=e;Pr!==null;){l=Pr;var p=l.sibling,b=l.return;if(Np(l),l===s){Pr=null;break e}if(p!==null){p.return=b,Pr=p;break e}Pr=b}}}var Oy={getCacheForType:function(e){var r=or(lr),s=r.data.get(e);return s===void 0&&(s=e(),r.data.set(e,s)),s}},Dy=typeof WeakMap=="function"?WeakMap:Map,bn=0,On=null,$t=null,on=0,xn=0,Ka=null,el=!1,Ou=!1,Rh=!1,fo=0,ar=0,tl=0,Fl=0,Oh=0,gi=0,Du=0,qc=null,Ca=null,Dh=!1,zh=0,ad=1/0,id=null,nl=null,Jr=0,rl=null,zu=null,Bu=0,Bh=0,Ph=null,Bp=null,Uc=0,qh=null;function $a(){if((bn&2)!==0&&on!==0)return on&-on;if(ee.T!==null){var e=ro;return e!==0?e:Gh()}return Oa()}function Pp(){gi===0&&(gi=(on&536870912)===0||un?yt():536870912);var e=pi.current;return e!==null&&(e.flags|=32),gi}function Za(e,r,s){(e===On&&(xn===2||xn===9)||e.cancelPendingCommit!==null)&&(Pu(e,0),al(e,on,gi,!1)),Ct(e,s),((bn&2)===0||e!==On)&&(e===On&&((bn&2)===0&&(Fl|=s),ar===4&&al(e,on,gi,!1)),xs(e))}function qp(e,r,s){if((bn&6)!==0)throw Error(i(327));var l=!s&&(r&124)===0&&(r&e.expiredLanes)===0||rt(e,r),p=l?Py(e,r):Ih(e,r,!0),b=l;do{if(p===0){Ou&&!l&&al(e,r,0,!1);break}else{if(s=e.current.alternate,b&&!zy(s)){p=Ih(e,r,!1),b=!1;continue}if(p===2){if(b=r,e.errorRecoveryDisabledLanes&b)var N=0;else N=e.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){r=N;e:{var B=e;p=qc;var ie=B.current.memoizedState.isDehydrated;if(ie&&(Pu(B,N).flags|=256),N=Ih(B,N,!1),N!==2){if(Rh&&!ie){B.errorRecoveryDisabledLanes|=b,Fl|=b,p=4;break e}b=Ca,Ca=p,b!==null&&(Ca===null?Ca=b:Ca.push.apply(Ca,b))}p=N}if(b=!1,p!==2)continue}}if(p===1){Pu(e,0),al(e,r,0,!0);break}e:{switch(l=e,b=p,b){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:al(l,r,gi,!el);break e;case 2:Ca=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(p=zh+300-xt(),10<p)){if(al(l,r,gi,!el),Kt(l,0,!0)!==0)break e;l.timeoutHandle=p2(Up.bind(null,l,s,Ca,id,Dh,r,gi,Fl,Du,el,b,2,-0,0),p);break e}Up(l,s,Ca,id,Dh,r,gi,Fl,Du,el,b,0,-0,0)}}break}while(!0);xs(e)}function Up(e,r,s,l,p,b,N,B,ie,Ne,Be,Ue,Ee,Te){if(e.timeoutHandle=-1,Ue=r.subtreeFlags,(Ue&8192||(Ue&16785408)===16785408)&&(Vc={stylesheets:null,count:0,unsuspend:yv},Rp(r),Ue=bv(),Ue!==null)){e.cancelPendingCommit=Ue(Vp.bind(null,e,r,b,s,l,p,N,B,ie,Be,1,Ee,Te)),al(e,b,N,!Ne);return}Vp(e,r,b,s,l,p,N,B,ie)}function zy(e){for(var r=e;;){var s=r.tag;if((s===0||s===11||s===15)&&r.flags&16384&&(s=r.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var p=s[l],b=p.getSnapshot;p=p.value;try{if(!rn(b(),p))return!1}catch{return!1}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function al(e,r,s,l){r&=~Oh,r&=~Fl,e.suspendedLanes|=r,e.pingedLanes&=~r,l&&(e.warmLanes|=r),l=e.expirationTimes;for(var p=r;0<p;){var b=31-$e(p),N=1<<b;l[b]=-1,p&=~N}s!==0&&nn(e,s,r)}function sd(){return(bn&6)===0?(Fc(0),!1):!0}function Uh(){if($t!==null){if(xn===0)var e=$t.return;else e=$t,Pi=br=null,Ar(e),Tu=null,Cc=0,e=$t;for(;e!==null;)bp(e.alternate,e),e=e.return;$t=null}}function Pu(e,r){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,ev(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Uh(),On=e,$t=s=oi(e.current,null),on=r,xn=0,Ka=null,el=!1,Ou=rt(e,r),Rh=!1,Du=gi=Oh=Fl=tl=ar=0,Ca=qc=null,Dh=!1,(r&8)!==0&&(r|=r&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=r;0<l;){var p=31-$e(l),b=1<<p;r|=e[p],l&=~b}return fo=r,_l(),s}function Fp(e,r){it=null,ee.H=Vf,r===D||r===P?(r=he(),xn=3):r===z?(r=he(),xn=4):xn=r===ip?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ka=r,$t===null&&(ar=1,Zf(e,da(r,e.current)))}function Ip(){var e=ee.H;return ee.H=Vf,e===null?Vf:e}function Hp(){var e=ee.A;return ee.A=Oy,e}function Fh(){ar=4,el||(on&4194048)!==on&&pi.current!==null||(Ou=!0),(tl&134217727)===0&&(Fl&134217727)===0||On===null||al(On,on,gi,!1)}function Ih(e,r,s){var l=bn;bn|=2;var p=Ip(),b=Hp();(On!==e||on!==r)&&(id=null,Pu(e,r)),r=!1;var N=ar;e:do try{if(xn!==0&&$t!==null){var B=$t,ie=Ka;switch(xn){case 8:Uh(),N=6;break e;case 3:case 2:case 9:case 6:pi.current===null&&(r=!0);var Ne=xn;if(xn=0,Ka=null,qu(e,B,ie,Ne),s&&Ou){N=0;break e}break;default:Ne=xn,xn=0,Ka=null,qu(e,B,ie,Ne)}}By(),N=ar;break}catch(Be){Fp(e,Be)}while(!0);return r&&e.shellSuspendCounter++,Pi=br=null,bn=l,ee.H=p,ee.A=b,$t===null&&(On=null,on=0,_l()),N}function By(){for(;$t!==null;)Wp($t)}function Py(e,r){var s=bn;bn|=2;var l=Ip(),p=Hp();On!==e||on!==r?(id=null,ad=xt()+500,Pu(e,r)):Ou=rt(e,r);e:do try{if(xn!==0&&$t!==null){r=$t;var b=Ka;t:switch(xn){case 1:xn=0,Ka=null,qu(e,r,b,1);break;case 2:case 9:if($(b)){xn=0,Ka=null,Yp(r);break}r=function(){xn!==2&&xn!==9||On!==e||(xn=7),xs(e)},b.then(r,r);break e;case 3:xn=7;break e;case 4:xn=5;break e;case 7:$(b)?(xn=0,Ka=null,Yp(r)):(xn=0,Ka=null,qu(e,r,b,7));break;case 5:var N=null;switch($t.tag){case 26:N=$t.memoizedState;case 5:case 27:var B=$t;if(!N||k2(N)){xn=0,Ka=null;var ie=B.sibling;if(ie!==null)$t=ie;else{var Ne=B.return;Ne!==null?($t=Ne,od(Ne)):$t=null}break t}}xn=0,Ka=null,qu(e,r,b,5);break;case 6:xn=0,Ka=null,qu(e,r,b,6);break;case 8:Uh(),ar=6;break e;default:throw Error(i(462))}}qy();break}catch(Be){Fp(e,Be)}while(!0);return Pi=br=null,ee.H=l,ee.A=p,bn=s,$t!==null?0:(On=null,on=0,_l(),ar)}function qy(){for(;$t!==null&&!G();)Wp($t)}function Wp(e){var r=yp(e.alternate,e,fo);e.memoizedProps=e.pendingProps,r===null?od(e):$t=r}function Yp(e){var r=e,s=r.alternate;switch(r.tag){case 15:case 0:r=fp(s,r,r.pendingProps,r.type,void 0,on);break;case 11:r=fp(s,r,r.pendingProps,r.type.render,r.ref,on);break;case 5:Ar(r);default:bp(s,r),r=$t=jl(r,fo),r=yp(s,r,fo)}e.memoizedProps=e.pendingProps,r===null?od(e):$t=r}function qu(e,r,s,l){Pi=br=null,Ar(r),Tu=null,Cc=0;var p=r.return;try{if(Ly(e,p,r,s,on)){ar=1,Zf(e,da(s,e.current)),$t=null;return}}catch(b){if(p!==null)throw $t=p,b;ar=1,Zf(e,da(s,e.current)),$t=null;return}r.flags&32768?(un||l===1?e=!0:Ou||(on&536870912)!==0?e=!1:(el=e=!0,(l===2||l===9||l===3||l===6)&&(l=pi.current,l!==null&&l.tag===13&&(l.flags|=16384))),Gp(r,e)):od(r)}function od(e){var r=e;do{if((r.flags&32768)!==0){Gp(r,el);return}e=r.return;var s=Ty(r.alternate,r,fo);if(s!==null){$t=s;return}if(r=r.sibling,r!==null){$t=r;return}$t=r=e}while(r!==null);ar===0&&(ar=5)}function Gp(e,r){do{var s=Cy(e.alternate,e);if(s!==null){s.flags&=32767,$t=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!r&&(e=e.sibling,e!==null)){$t=e;return}$t=e=s}while(e!==null);ar=6,$t=null}function Vp(e,r,s,l,p,b,N,B,ie){e.cancelPendingCommit=null;do ld();while(Jr!==0);if((bn&6)!==0)throw Error(i(327));if(r!==null){if(r===e.current)throw Error(i(177));if(b=r.lanes|r.childLanes,b|=yu,St(e,s,b,N,B,ie),e===On&&($t=On=null,on=0),zu=r,rl=e,Bu=s,Bh=b,Ph=p,Bp=l,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Hy(Ze,function(){return Zp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ee.T,ee.T=null,p=J.p,J.p=2,N=bn,bn|=4;try{My(e,r,s)}finally{bn=N,J.p=p,ee.T=l}}Jr=1,Qp(),Xp(),Kp()}}function Qp(){if(Jr===1){Jr=0;var e=rl,r=zu,s=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||s){s=ee.T,ee.T=null;var l=J.p;J.p=2;var p=bn;bn|=4;try{Tp(r,e);var b=e1,N=Bo(e.containerInfo),B=b.focusedElem,ie=b.selectionRange;if(N!==B&&B&&B.ownerDocument&&ds(B.ownerDocument.documentElement,B)){if(ie!==null&&Xs(B)){var Ne=ie.start,Be=ie.end;if(Be===void 0&&(Be=Ne),"selectionStart"in B)B.selectionStart=Ne,B.selectionEnd=Math.min(Be,B.value.length);else{var Ue=B.ownerDocument||document,Ee=Ue&&Ue.defaultView||window;if(Ee.getSelection){var Te=Ee.getSelection(),Ot=B.textContent.length,Lt=Math.min(ie.start,Ot),jn=ie.end===void 0?Lt:Math.min(ie.end,Ot);!Te.extend&&Lt>jn&&(N=jn,jn=Lt,Lt=N);var me=Sa(B,Lt),de=Sa(B,jn);if(me&&de&&(Te.rangeCount!==1||Te.anchorNode!==me.node||Te.anchorOffset!==me.offset||Te.focusNode!==de.node||Te.focusOffset!==de.offset)){var Se=Ue.createRange();Se.setStart(me.node,me.offset),Te.removeAllRanges(),Lt>jn?(Te.addRange(Se),Te.extend(de.node,de.offset)):(Se.setEnd(de.node,de.offset),Te.addRange(Se))}}}}for(Ue=[],Te=B;Te=Te.parentNode;)Te.nodeType===1&&Ue.push({element:Te,left:Te.scrollLeft,top:Te.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<Ue.length;B++){var Pe=Ue[B];Pe.element.scrollLeft=Pe.left,Pe.element.scrollTop=Pe.top}}xd=!!Jh,e1=Jh=null}finally{bn=p,J.p=l,ee.T=s}}e.current=r,Jr=2}}function Xp(){if(Jr===2){Jr=0;var e=rl,r=zu,s=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||s){s=ee.T,ee.T=null;var l=J.p;J.p=2;var p=bn;bn|=4;try{kp(e,r.alternate,r)}finally{bn=p,J.p=l,ee.T=s}}Jr=3}}function Kp(){if(Jr===4||Jr===3){Jr=0,Qe();var e=rl,r=zu,s=Bu,l=Bp;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Jr=5:(Jr=0,zu=rl=null,$p(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(nl=null),Ra(s),r=r.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(wt,r,void 0,(r.current.flags&128)===128)}catch{}if(l!==null){r=ee.T,p=J.p,J.p=2,ee.T=null;try{for(var b=e.onRecoverableError,N=0;N<l.length;N++){var B=l[N];b(B.value,{componentStack:B.stack})}}finally{ee.T=r,J.p=p}}(Bu&3)!==0&&ld(),xs(e),p=e.pendingLanes,(s&4194090)!==0&&(p&42)!==0?e===qh?Uc++:(Uc=0,qh=e):Uc=0,Fc(0)}}function $p(e,r){(e.pooledCacheLanes&=r)===0&&(r=e.pooledCache,r!=null&&(e.pooledCache=null,El(r)))}function ld(e){return Qp(),Xp(),Kp(),Zp()}function Zp(){if(Jr!==5)return!1;var e=rl,r=Bh;Bh=0;var s=Ra(Bu),l=ee.T,p=J.p;try{J.p=32>s?32:s,ee.T=null,s=Ph,Ph=null;var b=rl,N=Bu;if(Jr=0,zu=rl=null,Bu=0,(bn&6)!==0)throw Error(i(331));var B=bn;if(bn|=4,Dp(b.current),Mp(b,b.current,N,s),bn=B,Fc(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(wt,b)}catch{}return!0}finally{J.p=p,ee.T=l,$p(e,r)}}function Jp(e,r,s){r=da(s,r),r=yh(e.stateNode,r,2),e=He(e,r,2),e!==null&&(Ct(e,2),xs(e))}function En(e,r,s){if(e.tag===3)Jp(e,e,s);else for(;r!==null;){if(r.tag===3){Jp(r,e,s);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(nl===null||!nl.has(l))){e=da(s,e),s=rp(2),l=He(r,s,2),l!==null&&(ap(s,l,r,e),Ct(l,2),xs(l));break}}r=r.return}}function Hh(e,r,s){var l=e.pingCache;if(l===null){l=e.pingCache=new Dy;var p=new Set;l.set(r,p)}else p=l.get(r),p===void 0&&(p=new Set,l.set(r,p));p.has(s)||(Rh=!0,p.add(s),e=Uy.bind(null,e,r,s),r.then(e,e))}function Uy(e,r,s){var l=e.pingCache;l!==null&&l.delete(r),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,On===e&&(on&s)===s&&(ar===4||ar===3&&(on&62914560)===on&&300>xt()-zh?(bn&2)===0&&Pu(e,0):Oh|=s,Du===on&&(Du=0)),xs(e)}function e2(e,r){r===0&&(r=At()),e=$s(e,r),e!==null&&(Ct(e,r),xs(e))}function Fy(e){var r=e.memoizedState,s=0;r!==null&&(s=r.retryLane),e2(e,s)}function Iy(e,r){var s=0;switch(e.tag){case 13:var l=e.stateNode,p=e.memoizedState;p!==null&&(s=p.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(r),e2(e,s)}function Hy(e,r){return Ve(e,r)}var ud=null,Uu=null,Wh=!1,cd=!1,Yh=!1,Il=0;function xs(e){e!==Uu&&e.next===null&&(Uu===null?ud=Uu=e:Uu=Uu.next=e),cd=!0,Wh||(Wh=!0,Yy())}function Fc(e,r){if(!Yh&&cd){Yh=!0;do for(var s=!1,l=ud;l!==null;){if(e!==0){var p=l.pendingLanes;if(p===0)var b=0;else{var N=l.suspendedLanes,B=l.pingedLanes;b=(1<<31-$e(42|e)+1)-1,b&=p&~(N&~B),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,a2(l,b))}else b=on,b=Kt(l,l===On?b:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(b&3)===0||rt(l,b)||(s=!0,a2(l,b));l=l.next}while(s);Yh=!1}}function Wy(){t2()}function t2(){cd=Wh=!1;var e=0;Il!==0&&(Jy()&&(e=Il),Il=0);for(var r=xt(),s=null,l=ud;l!==null;){var p=l.next,b=n2(l,r);b===0?(l.next=null,s===null?ud=p:s.next=p,p===null&&(Uu=s)):(s=l,(e!==0||(b&3)!==0)&&(cd=!0)),l=p}Fc(e)}function n2(e,r){for(var s=e.suspendedLanes,l=e.pingedLanes,p=e.expirationTimes,b=e.pendingLanes&-62914561;0<b;){var N=31-$e(b),B=1<<N,ie=p[N];ie===-1?((B&s)===0||(B&l)!==0)&&(p[N]=fn(B,r)):ie<=r&&(e.expiredLanes|=B),b&=~B}if(r=On,s=on,s=Kt(e,e===r?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===r&&(xn===2||xn===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&dt(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||rt(e,s)){if(r=s&-s,r===e.callbackPriority)return r;switch(l!==null&&dt(l),Ra(s)){case 2:case 8:s=mt;break;case 32:s=Ze;break;case 268435456:s=ht;break;default:s=Ze}return l=r2.bind(null,e),s=Ve(s,l),e.callbackPriority=r,e.callbackNode=s,r}return l!==null&&l!==null&&dt(l),e.callbackPriority=2,e.callbackNode=null,2}function r2(e,r){if(Jr!==0&&Jr!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(ld()&&e.callbackNode!==s)return null;var l=on;return l=Kt(e,e===On?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(qp(e,l,r),n2(e,xt()),e.callbackNode!=null&&e.callbackNode===s?r2.bind(null,e):null)}function a2(e,r){if(ld())return null;qp(e,r,!0)}function Yy(){tv(function(){(bn&6)!==0?Ve(Ie,Wy):t2()})}function Gh(){return Il===0&&(Il=yt()),Il}function i2(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:No(""+e)}function s2(e,r){var s=r.ownerDocument.createElement("input");return s.name=r.name,s.value=r.value,e.id&&s.setAttribute("form",e.id),r.parentNode.insertBefore(s,r),e=new FormData(e),s.parentNode.removeChild(s),e}function Gy(e,r,s,l,p){if(r==="submit"&&s&&s.stateNode===p){var b=i2((p[kn]||null).action),N=l.submitter;N&&(r=(r=N[kn]||null)?i2(r.formAction):N.getAttribute("formAction"),r!==null&&(b=r,N=null));var B=new To("action","action",null,l,p);e.push({event:B,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Il!==0){var ie=N?s2(p,N):new FormData(p);hi(s,{pending:!0,data:ie,method:p.method,action:b},null,ie)}}else typeof b=="function"&&(B.preventDefault(),ie=N?s2(p,N):new FormData(p),hi(s,{pending:!0,data:ie,method:p.method,action:b},b,ie))},currentTarget:p}]})}}for(var Vh=0;Vh<mu.length;Vh++){var Qh=mu[Vh],Vy=Qh.toLowerCase(),Qy=Qh[0].toUpperCase()+Qh.slice(1);Na(Vy,"on"+Qy)}Na(Un,"onAnimationEnd"),Na(nr,"onAnimationIteration"),Na(si,"onAnimationStart"),Na("dblclick","onDoubleClick"),Na("focusin","onFocus"),Na("focusout","onBlur"),Na(Sl,"onTransitionRun"),Na(qo,"onTransitionStart"),Na(gu,"onTransitionCancel"),Na(pc,"onTransitionEnd"),za("onMouseEnter",["mouseout","mouseover"]),za("onMouseLeave",["mouseout","mouseover"]),za("onPointerEnter",["pointerout","pointerover"]),za("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ic="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(" "),Xy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ic));function o2(e,r){r=(r&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],p=l.event;l=l.listeners;e:{var b=void 0;if(r)for(var N=l.length-1;0<=N;N--){var B=l[N],ie=B.instance,Ne=B.currentTarget;if(B=B.listener,ie!==b&&p.isPropagationStopped())break e;b=B,p.currentTarget=Ne;try{b(p)}catch(Be){$f(Be)}p.currentTarget=null,b=ie}else for(N=0;N<l.length;N++){if(B=l[N],ie=B.instance,Ne=B.currentTarget,B=B.listener,ie!==b&&p.isPropagationStopped())break e;b=B,p.currentTarget=Ne;try{b(p)}catch(Be){$f(Be)}p.currentTarget=null,b=ie}}}}function Zt(e,r){var s=r[Mn];s===void 0&&(s=r[Mn]=new Set);var l=e+"__bubble";s.has(l)||(l2(r,e,2,!1),s.add(l))}function Xh(e,r,s){var l=0;r&&(l|=4),l2(s,e,l,r)}var fd="_reactListening"+Math.random().toString(36).slice(2);function Kh(e){if(!e[fd]){e[fd]=!0,Da.forEach(function(s){s!=="selectionchange"&&(Xy.has(s)||Xh(s,!1,e),Xh(s,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[fd]||(r[fd]=!0,Xh("selectionchange",!1,r))}}function l2(e,r,s,l){switch(M2(r)){case 2:var p=Sv;break;case 8:p=_v;break;default:p=c1}s=p.bind(null,r,s,e),p=void 0,!xl||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),l?p!==void 0?e.addEventListener(r,s,{capture:!0,passive:p}):e.addEventListener(r,s,!0):p!==void 0?e.addEventListener(r,s,{passive:p}):e.addEventListener(r,s,!1)}function $h(e,r,s,l,p){var b=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var N=l.tag;if(N===3||N===4){var B=l.stateNode.containerInfo;if(B===p)break;if(N===4)for(N=l.return;N!==null;){var ie=N.tag;if((ie===3||ie===4)&&N.stateNode.containerInfo===p)return;N=N.return}for(;B!==null;){if(N=Ir(B),N===null)return;if(ie=N.tag,ie===5||ie===6||ie===26||ie===27){l=b=N;continue e}B=B.parentNode}}l=l.return}ou(function(){var Ne=b,Be=Lo(s),Ue=[];e:{var Ee=gc.get(e);if(Ee!==void 0){var Te=To,Ot=e;switch(e){case"keypress":if(Si(s)===0)break e;case"keydown":case"keyup":Te=st;break;case"focusin":Ot="focus",Te=Fa;break;case"focusout":Ot="blur",Te=Fa;break;case"beforeblur":case"afterblur":Te=Fa;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=Co;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=uu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=Jt;break;case Un:case nr:case si:Te=fu;break;case pc:Te=mn;break;case"scroll":case"scrollend":Te=as;break;case"wheel":Te=Nn;break;case"copy":case"cut":case"paste":Te=Fs;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=Mt;break;case"toggle":case"beforetoggle":Te=Bn}var Lt=(r&4)!==0,jn=!Lt&&(e==="scroll"||e==="scrollend"),me=Lt?Ee!==null?Ee+"Capture":null:Ee;Lt=[];for(var de=Ne,Se;de!==null;){var Pe=de;if(Se=Pe.stateNode,Pe=Pe.tag,Pe!==5&&Pe!==26&&Pe!==27||Se===null||me===null||(Pe=Ps(de,me),Pe!=null&&Lt.push(Hc(de,Pe,Se))),jn)break;de=de.return}0<Lt.length&&(Ee=new Te(Ee,Ot,null,s,Be),Ue.push({event:Ee,listeners:Lt}))}}if((r&7)===0){e:{if(Ee=e==="mouseover"||e==="pointerover",Te=e==="mouseout"||e==="pointerout",Ee&&s!==ai&&(Ot=s.relatedTarget||s.fromElement)&&(Ir(Ot)||Ot[xr]))break e;if((Te||Ee)&&(Ee=Be.window===Be?Be:(Ee=Be.ownerDocument)?Ee.defaultView||Ee.parentWindow:window,Te?(Ot=s.relatedTarget||s.toElement,Te=Ne,Ot=Ot?Ir(Ot):null,Ot!==null&&(jn=u(Ot),Lt=Ot.tag,Ot!==jn||Lt!==5&&Lt!==27&&Lt!==6)&&(Ot=null)):(Te=null,Ot=Ne),Te!==Ot)){if(Lt=Co,Pe="onMouseLeave",me="onMouseEnter",de="mouse",(e==="pointerout"||e==="pointerover")&&(Lt=Mt,Pe="onPointerLeave",me="onPointerEnter",de="pointer"),jn=Te==null?Ee:Hr(Te),Se=Ot==null?Ee:Hr(Ot),Ee=new Lt(Pe,de+"leave",Te,s,Be),Ee.target=jn,Ee.relatedTarget=Se,Pe=null,Ir(Be)===Ne&&(Lt=new Lt(me,de+"enter",Ot,s,Be),Lt.target=Se,Lt.relatedTarget=jn,Pe=Lt),jn=Pe,Te&&Ot)t:{for(Lt=Te,me=Ot,de=0,Se=Lt;Se;Se=Fu(Se))de++;for(Se=0,Pe=me;Pe;Pe=Fu(Pe))Se++;for(;0<de-Se;)Lt=Fu(Lt),de--;for(;0<Se-de;)me=Fu(me),Se--;for(;de--;){if(Lt===me||me!==null&&Lt===me.alternate)break t;Lt=Fu(Lt),me=Fu(me)}Lt=null}else Lt=null;Te!==null&&u2(Ue,Ee,Te,Lt,!1),Ot!==null&&jn!==null&&u2(Ue,jn,Ot,Lt,!0)}}e:{if(Ee=Ne?Hr(Ne):window,Te=Ee.nodeName&&Ee.nodeName.toLowerCase(),Te==="select"||Te==="input"&&Ee.type==="file")var ot=ls;else if(Ha(Ee))if(Ro)ot=zo;else{ot=cs;var Xt=Do}else Te=Ee.nodeName,!Te||Te.toLowerCase()!=="input"||Ee.type!=="checkbox"&&Ee.type!=="radio"?Ne&&Bs(Ne.elementType)&&(ot=ls):ot=fs;if(ot&&(ot=ot(e,Ne))){Rr(Ue,ot,s,Be);break e}Xt&&Xt(e,Ee,Ne),e==="focusout"&&Ne&&Ee.type==="number"&&Ne.memoizedProps.value!=null&&ko(Ee,"number",Ee.value)}switch(Xt=Ne?Hr(Ne):window,e){case"focusin":(Ha(Xt)||Xt.contentEditable==="true")&&(_a=Xt,Ci=Ne,Aa=null);break;case"focusout":Aa=Ci=_a=null;break;case"mousedown":Ya=!0;break;case"contextmenu":case"mouseup":case"dragend":Ya=!1,Mi(Ue,s,Be);break;case"selectionchange":if(Po)break;case"keydown":case"keyup":Mi(Ue,s,Be)}var vt;if(Ia)e:{switch(e){case"compositionstart":var Tt="onCompositionStart";break e;case"compositionend":Tt="onCompositionEnd";break e;case"compositionupdate":Tt="onCompositionUpdate";break e}Tt=void 0}else Qn?Hs(e,s)&&(Tt="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Tt="onCompositionStart");Tt&&(is&&s.locale!=="ko"&&(Qn||Tt!=="onCompositionStart"?Tt==="onCompositionEnd"&&Qn&&(vt=lu()):(Tr=Be,qa="value"in Tr?Tr.value:Tr.textContent,Qn=!0)),Xt=dd(Ne,Tt),0<Xt.length&&(Tt=new x(Tt,e,null,s,Be),Ue.push({event:Tt,listeners:Xt}),vt?Tt.data=vt:(vt=Ws(s),vt!==null&&(Tt.data=vt)))),(vt=Is?Ys(e,s):Gs(e,s))&&(Tt=dd(Ne,"onBeforeInput"),0<Tt.length&&(Xt=new x("onBeforeInput","beforeinput",null,s,Be),Ue.push({event:Xt,listeners:Tt}),Xt.data=vt)),Gy(Ue,e,Ne,s,Be)}o2(Ue,r)})}function Hc(e,r,s){return{instance:e,listener:r,currentTarget:s}}function dd(e,r){for(var s=r+"Capture",l=[];e!==null;){var p=e,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=Ps(e,s),p!=null&&l.unshift(Hc(e,p,b)),p=Ps(e,r),p!=null&&l.push(Hc(e,p,b))),e.tag===3)return l;e=e.return}return[]}function Fu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function u2(e,r,s,l,p){for(var b=r._reactName,N=[];s!==null&&s!==l;){var B=s,ie=B.alternate,Ne=B.stateNode;if(B=B.tag,ie!==null&&ie===l)break;B!==5&&B!==26&&B!==27||Ne===null||(ie=Ne,p?(Ne=Ps(s,b),Ne!=null&&N.unshift(Hc(s,Ne,ie))):p||(Ne=Ps(s,b),Ne!=null&&N.push(Hc(s,Ne,ie)))),s=s.return}N.length!==0&&e.push({event:r,listeners:N})}var Ky=/\r\n?/g,$y=/\u0000|\uFFFD/g;function c2(e){return(typeof e=="string"?e:""+e).replace(Ky,`
|
|
49
|
+
`).replace($y,"")}function f2(e,r){return r=c2(r),c2(e)===r}function hd(){}function An(e,r,s,l,p,b){switch(s){case"children":typeof l=="string"?r==="body"||r==="textarea"&&l===""||Yr(e,l):(typeof l=="number"||typeof l=="bigint")&&r!=="body"&&Yr(e,""+l);break;case"className":Wr(e,"class",l);break;case"tabIndex":Wr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,s,l);break;case"style":zs(e,l,b);break;case"data":if(r!=="object"){Wr(e,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=No(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(s==="formAction"?(r!=="input"&&An(e,r,"name",p.name,p,null),An(e,r,"formEncType",p.formEncType,p,null),An(e,r,"formMethod",p.formMethod,p,null),An(e,r,"formTarget",p.formTarget,p,null)):(An(e,r,"encType",p.encType,p,null),An(e,r,"method",p.method,p,null),An(e,r,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=No(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=hd);break;case"onScroll":l!=null&&Zt("scroll",e);break;case"onScrollEnd":l!=null&&Zt("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(s=l.__html,s!=null){if(p.children!=null)throw Error(i(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=No(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":Zt("beforetoggle",e),Zt("toggle",e),Ms(e,"popover",l);break;case"xlinkActuate":la(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":la(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":la(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":la(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":la(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":la(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":la(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":la(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":la(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ms(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=dc.get(s)||s,Ms(e,s,l))}}function Zh(e,r,s,l,p,b){switch(s){case"style":zs(e,l,b);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(s=l.__html,s!=null){if(p.children!=null)throw Error(i(60));e.innerHTML=s}}break;case"children":typeof l=="string"?Yr(e,l):(typeof l=="number"||typeof l=="bigint")&&Yr(e,""+l);break;case"onScroll":l!=null&&Zt("scroll",e);break;case"onScrollEnd":l!=null&&Zt("scrollend",e);break;case"onClick":l!=null&&(e.onclick=hd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zi.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),r=s.slice(2,p?s.length-7:void 0),b=e[kn]||null,b=b!=null?b[s]:null,typeof b=="function"&&e.removeEventListener(r,b,p),typeof l=="function")){typeof b!="function"&&b!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(r,l,p);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):Ms(e,s,l)}}}function ea(e,r,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Zt("error",e),Zt("load",e);var l=!1,p=!1,b;for(b in s)if(s.hasOwnProperty(b)){var N=s[b];if(N!=null)switch(b){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:An(e,r,b,N,s,null)}}p&&An(e,r,"srcSet",s.srcSet,s,null),l&&An(e,r,"src",s.src,s,null);return;case"input":Zt("invalid",e);var B=b=N=p=null,ie=null,Ne=null;for(l in s)if(s.hasOwnProperty(l)){var Be=s[l];if(Be!=null)switch(l){case"name":p=Be;break;case"type":N=Be;break;case"checked":ie=Be;break;case"defaultChecked":Ne=Be;break;case"value":b=Be;break;case"defaultValue":B=Be;break;case"children":case"dangerouslySetInnerHTML":if(Be!=null)throw Error(i(137,r));break;default:An(e,r,l,Be,s,null)}}yr(e,b,B,ie,Ne,N,p,!1),ua(e);return;case"select":Zt("invalid",e),l=N=b=null;for(p in s)if(s.hasOwnProperty(p)&&(B=s[p],B!=null))switch(p){case"value":b=B;break;case"defaultValue":N=B;break;case"multiple":l=B;default:An(e,r,p,B,s,null)}r=b,s=N,e.multiple=!!l,r!=null?es(e,!!l,r,!1):s!=null&&es(e,!!l,s,!0);return;case"textarea":Zt("invalid",e),b=p=l=null;for(N in s)if(s.hasOwnProperty(N)&&(B=s[N],B!=null))switch(N){case"value":l=B;break;case"defaultValue":p=B;break;case"children":b=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(i(91));break;default:An(e,r,N,B,s,null)}iu(e,l,p,b),ua(e);return;case"option":for(ie in s)s.hasOwnProperty(ie)&&(l=s[ie],l!=null)&&(ie==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":An(e,r,ie,l,s,null));return;case"dialog":Zt("beforetoggle",e),Zt("toggle",e),Zt("cancel",e),Zt("close",e);break;case"iframe":case"object":Zt("load",e);break;case"video":case"audio":for(l=0;l<Ic.length;l++)Zt(Ic[l],e);break;case"image":Zt("error",e),Zt("load",e);break;case"details":Zt("toggle",e);break;case"embed":case"source":case"link":Zt("error",e),Zt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ne in s)if(s.hasOwnProperty(Ne)&&(l=s[Ne],l!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:An(e,r,Ne,l,s,null)}return;default:if(Bs(r)){for(Be in s)s.hasOwnProperty(Be)&&(l=s[Be],l!==void 0&&Zh(e,r,Be,l,s,void 0));return}}for(B in s)s.hasOwnProperty(B)&&(l=s[B],l!=null&&An(e,r,B,l,s,null))}function Zy(e,r,s,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,N=null,B=null,ie=null,Ne=null,Be=null;for(Te in s){var Ue=s[Te];if(s.hasOwnProperty(Te)&&Ue!=null)switch(Te){case"checked":break;case"value":break;case"defaultValue":ie=Ue;default:l.hasOwnProperty(Te)||An(e,r,Te,null,l,Ue)}}for(var Ee in l){var Te=l[Ee];if(Ue=s[Ee],l.hasOwnProperty(Ee)&&(Te!=null||Ue!=null))switch(Ee){case"type":b=Te;break;case"name":p=Te;break;case"checked":Ne=Te;break;case"defaultChecked":Be=Te;break;case"value":N=Te;break;case"defaultValue":B=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(i(137,r));break;default:Te!==Ue&&An(e,r,Ee,Te,l,Ue)}}Ba(e,N,B,ie,Ne,Be,b,p);return;case"select":Te=N=B=Ee=null;for(b in s)if(ie=s[b],s.hasOwnProperty(b)&&ie!=null)switch(b){case"value":break;case"multiple":Te=ie;default:l.hasOwnProperty(b)||An(e,r,b,null,l,ie)}for(p in l)if(b=l[p],ie=s[p],l.hasOwnProperty(p)&&(b!=null||ie!=null))switch(p){case"value":Ee=b;break;case"defaultValue":B=b;break;case"multiple":N=b;default:b!==ie&&An(e,r,p,b,l,ie)}r=B,s=N,l=Te,Ee!=null?es(e,!!s,Ee,!1):!!l!=!!s&&(r!=null?es(e,!!s,r,!0):es(e,!!s,s?[]:"",!1));return;case"textarea":Te=Ee=null;for(B in s)if(p=s[B],s.hasOwnProperty(B)&&p!=null&&!l.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:An(e,r,B,null,l,p)}for(N in l)if(p=l[N],b=s[N],l.hasOwnProperty(N)&&(p!=null||b!=null))switch(N){case"value":Ee=p;break;case"defaultValue":Te=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==b&&An(e,r,N,p,l,b)}au(e,Ee,Te);return;case"option":for(var Ot in s)Ee=s[Ot],s.hasOwnProperty(Ot)&&Ee!=null&&!l.hasOwnProperty(Ot)&&(Ot==="selected"?e.selected=!1:An(e,r,Ot,null,l,Ee));for(ie in l)Ee=l[ie],Te=s[ie],l.hasOwnProperty(ie)&&Ee!==Te&&(Ee!=null||Te!=null)&&(ie==="selected"?e.selected=Ee&&typeof Ee!="function"&&typeof Ee!="symbol":An(e,r,ie,Ee,l,Te));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Lt in s)Ee=s[Lt],s.hasOwnProperty(Lt)&&Ee!=null&&!l.hasOwnProperty(Lt)&&An(e,r,Lt,null,l,Ee);for(Ne in l)if(Ee=l[Ne],Te=s[Ne],l.hasOwnProperty(Ne)&&Ee!==Te&&(Ee!=null||Te!=null))switch(Ne){case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(i(137,r));break;default:An(e,r,Ne,Ee,l,Te)}return;default:if(Bs(r)){for(var jn in s)Ee=s[jn],s.hasOwnProperty(jn)&&Ee!==void 0&&!l.hasOwnProperty(jn)&&Zh(e,r,jn,void 0,l,Ee);for(Be in l)Ee=l[Be],Te=s[Be],!l.hasOwnProperty(Be)||Ee===Te||Ee===void 0&&Te===void 0||Zh(e,r,Be,Ee,l,Te);return}}for(var me in s)Ee=s[me],s.hasOwnProperty(me)&&Ee!=null&&!l.hasOwnProperty(me)&&An(e,r,me,null,l,Ee);for(Ue in l)Ee=l[Ue],Te=s[Ue],!l.hasOwnProperty(Ue)||Ee===Te||Ee==null&&Te==null||An(e,r,Ue,Ee,l,Te)}var Jh=null,e1=null;function pd(e){return e.nodeType===9?e:e.ownerDocument}function d2(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function h2(e,r){if(e===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&r==="foreignObject"?0:e}function t1(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var n1=null;function Jy(){var e=window.event;return e&&e.type==="popstate"?e===n1?!1:(n1=e,!0):(n1=null,!1)}var p2=typeof setTimeout=="function"?setTimeout:void 0,ev=typeof clearTimeout=="function"?clearTimeout:void 0,g2=typeof Promise=="function"?Promise:void 0,tv=typeof queueMicrotask=="function"?queueMicrotask:typeof g2<"u"?function(e){return g2.resolve(null).then(e).catch(nv)}:p2;function nv(e){setTimeout(function(){throw e})}function il(e){return e==="head"}function m2(e,r){var s=r,l=0,p=0;do{var b=s.nextSibling;if(e.removeChild(s),b&&b.nodeType===8)if(s=b.data,s==="/$"){if(0<l&&8>l){s=l;var N=e.ownerDocument;if(s&1&&Wc(N.documentElement),s&2&&Wc(N.body),s&4)for(s=N.head,Wc(s),N=s.firstChild;N;){var B=N.nextSibling,ie=N.nodeName;N[ba]||ie==="SCRIPT"||ie==="STYLE"||ie==="LINK"&&N.rel.toLowerCase()==="stylesheet"||s.removeChild(N),N=B}}if(p===0){e.removeChild(b),Zc(r);return}p--}else s==="$"||s==="$?"||s==="$!"?p++:l=s.charCodeAt(0)-48;else l=0;s=b}while(s);Zc(r)}function r1(e){var r=e.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var s=r;switch(r=r.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":r1(s),oa(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function rv(e,r,s,l){for(;e.nodeType===1;){var p=s;if(e.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ba])switch(r){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(b=e.getAttribute("rel"),b==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(b!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(b=e.getAttribute("src"),(b!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(r==="input"&&e.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===b)return e}else return e;if(e=Yi(e.nextSibling),e===null)break}return null}function av(e,r,s){if(r==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Yi(e.nextSibling),e===null))return null;return e}function a1(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function iv(e,r){var s=e.ownerDocument;if(e.data!=="$?"||s.readyState==="complete")r();else{var l=function(){r(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Yi(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return e}var i1=null;function y2(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(r===0)return e;r--}else s==="/$"&&r++}e=e.previousSibling}return null}function v2(e,r,s){switch(r=pd(s),e){case"html":if(e=r.documentElement,!e)throw Error(i(452));return e;case"head":if(e=r.head,!e)throw Error(i(453));return e;case"body":if(e=r.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Wc(e){for(var r=e.attributes;r.length;)e.removeAttributeNode(r[0]);oa(e)}var mi=new Map,b2=new Set;function gd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ho=J.d;J.d={f:sv,r:ov,D:lv,C:uv,L:cv,m:fv,X:hv,S:dv,M:pv};function sv(){var e=ho.f(),r=sd();return e||r}function ov(e){var r=Er(e);r!==null&&r.tag===5&&r.type==="form"?Bl(r):ho.r(e)}var Iu=typeof document>"u"?null:document;function x2(e,r,s){var l=Iu;if(l&&typeof r=="string"&&r){var p=_r(r);p='link[rel="'+e+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),b2.has(p)||(b2.add(p),e={rel:e,crossOrigin:s,href:r},l.querySelector(p)===null&&(r=l.createElement("link"),ea(r,"link",e),Rn(r),l.head.appendChild(r)))}}function lv(e){ho.D(e),x2("dns-prefetch",e,null)}function uv(e,r){ho.C(e,r),x2("preconnect",e,r)}function cv(e,r,s){ho.L(e,r,s);var l=Iu;if(l&&e&&r){var p='link[rel="preload"][as="'+_r(r)+'"]';r==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+_r(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+_r(s.imageSizes)+'"]')):p+='[href="'+_r(e)+'"]';var b=p;switch(r){case"style":b=Hu(e);break;case"script":b=Wu(e)}mi.has(b)||(e=v({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:e,as:r},s),mi.set(b,e),l.querySelector(p)!==null||r==="style"&&l.querySelector(Yc(b))||r==="script"&&l.querySelector(Gc(b))||(r=l.createElement("link"),ea(r,"link",e),Rn(r),l.head.appendChild(r)))}}function fv(e,r){ho.m(e,r);var s=Iu;if(s&&e){var l=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+_r(l)+'"][href="'+_r(e)+'"]',b=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Wu(e)}if(!mi.has(b)&&(e=v({rel:"modulepreload",href:e},r),mi.set(b,e),s.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Gc(b)))return}l=s.createElement("link"),ea(l,"link",e),Rn(l),s.head.appendChild(l)}}}function dv(e,r,s){ho.S(e,r,s);var l=Iu;if(l&&e){var p=Sr(l).hoistableStyles,b=Hu(e);r=r||"default";var N=p.get(b);if(!N){var B={loading:0,preload:null};if(N=l.querySelector(Yc(b)))B.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":r},s),(s=mi.get(b))&&s1(e,s);var ie=N=l.createElement("link");Rn(ie),ea(ie,"link",e),ie._p=new Promise(function(Ne,Be){ie.onload=Ne,ie.onerror=Be}),ie.addEventListener("load",function(){B.loading|=1}),ie.addEventListener("error",function(){B.loading|=2}),B.loading|=4,md(N,r,l)}N={type:"stylesheet",instance:N,count:1,state:B},p.set(b,N)}}}function hv(e,r){ho.X(e,r);var s=Iu;if(s&&e){var l=Sr(s).hoistableScripts,p=Wu(e),b=l.get(p);b||(b=s.querySelector(Gc(p)),b||(e=v({src:e,async:!0},r),(r=mi.get(p))&&o1(e,r),b=s.createElement("script"),Rn(b),ea(b,"link",e),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},l.set(p,b))}}function pv(e,r){ho.M(e,r);var s=Iu;if(s&&e){var l=Sr(s).hoistableScripts,p=Wu(e),b=l.get(p);b||(b=s.querySelector(Gc(p)),b||(e=v({src:e,async:!0,type:"module"},r),(r=mi.get(p))&&o1(e,r),b=s.createElement("script"),Rn(b),ea(b,"link",e),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},l.set(p,b))}}function w2(e,r,s,l){var p=(p=se.current)?gd(p):null;if(!p)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=Hu(s.href),s=Sr(p).hoistableStyles,l=s.get(r),l||(l={type:"style",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Hu(s.href);var b=Sr(p).hoistableStyles,N=b.get(e);if(N||(p=p.ownerDocument||p,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(e,N),(b=p.querySelector(Yc(e)))&&!b._p&&(N.instance=b,N.state.loading=5),mi.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},mi.set(e,s),b||gv(p,e,s,N.state))),r&&l===null)throw Error(i(528,""));return N}if(r&&l!==null)throw Error(i(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Wu(s),s=Sr(p).hoistableScripts,l=s.get(r),l||(l={type:"script",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hu(e){return'href="'+_r(e)+'"'}function Yc(e){return'link[rel="stylesheet"]['+e+"]"}function S2(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function gv(e,r,s,l){e.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=e.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),ea(r,"link",s),Rn(r),e.head.appendChild(r))}function Wu(e){return'[src="'+_r(e)+'"]'}function Gc(e){return"script[async]"+e}function _2(e,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var l=e.querySelector('style[data-href~="'+_r(s.href)+'"]');if(l)return r.instance=l,Rn(l),l;var p=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Rn(l),ea(l,"style",p),md(l,s.precedence,e),r.instance=l;case"stylesheet":p=Hu(s.href);var b=e.querySelector(Yc(p));if(b)return r.state.loading|=4,r.instance=b,Rn(b),b;l=S2(s),(p=mi.get(p))&&s1(l,p),b=(e.ownerDocument||e).createElement("link"),Rn(b);var N=b;return N._p=new Promise(function(B,ie){N.onload=B,N.onerror=ie}),ea(b,"link",l),r.state.loading|=4,md(b,s.precedence,e),r.instance=b;case"script":return b=Wu(s.src),(p=e.querySelector(Gc(b)))?(r.instance=p,Rn(p),p):(l=s,(p=mi.get(b))&&(l=v({},s),o1(l,p)),e=e.ownerDocument||e,p=e.createElement("script"),Rn(p),ea(p,"link",l),e.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,md(l,s.precedence,e));return r.instance}function md(e,r,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,b=p,N=0;N<l.length;N++){var B=l[N];if(B.dataset.precedence===r)b=B;else if(b!==p)break}b?b.parentNode.insertBefore(e,b.nextSibling):(r=s.nodeType===9?s.head:s,r.insertBefore(e,r.firstChild))}function s1(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.title==null&&(e.title=r.title)}function o1(e,r){e.crossOrigin==null&&(e.crossOrigin=r.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=r.referrerPolicy),e.integrity==null&&(e.integrity=r.integrity)}var yd=null;function A2(e,r,s){if(yd===null){var l=new Map,p=yd=new Map;p.set(s,l)}else p=yd,l=p.get(s),l||(l=new Map,p.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),p=0;p<s.length;p++){var b=s[p];if(!(b[ba]||b[Cn]||e==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var N=b.getAttribute(r)||"";N=e+N;var B=l.get(N);B?B.push(b):l.set(N,[b])}}return l}function j2(e,r,s){e=e.ownerDocument||e,e.head.insertBefore(s,r==="title"?e.querySelector("head > title"):null)}function mv(e,r,s){if(s===1||r.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(e=r.disabled,typeof r.precedence=="string"&&e==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function k2(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Vc=null;function yv(){}function vv(e,r,s){if(Vc===null)throw Error(i(475));var l=Vc;if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var p=Hu(s.href),b=e.querySelector(Yc(p));if(b){e=b._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=vd.bind(l),e.then(l,l)),r.state.loading|=4,r.instance=b,Rn(b);return}b=e.ownerDocument||e,s=S2(s),(p=mi.get(p))&&s1(s,p),b=b.createElement("link"),Rn(b);var N=b;N._p=new Promise(function(B,ie){N.onload=B,N.onerror=ie}),ea(b,"link",s),r.instance=b}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(r,e),(e=r.state.preload)&&(r.state.loading&3)===0&&(l.count++,r=vd.bind(l),e.addEventListener("load",r),e.addEventListener("error",r))}}function bv(){if(Vc===null)throw Error(i(475));var e=Vc;return e.stylesheets&&e.count===0&&l1(e,e.stylesheets),0<e.count?function(r){var s=setTimeout(function(){if(e.stylesheets&&l1(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(s)}}:null}function vd(){if(this.count--,this.count===0){if(this.stylesheets)l1(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var bd=null;function l1(e,r){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bd=new Map,r.forEach(xv,e),bd=null,vd.call(e))}function xv(e,r){if(!(r.state.loading&4)){var s=bd.get(e);if(s)var l=s.get(null);else{s=new Map,bd.set(e,s);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var N=p[b];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(s.set(N.dataset.precedence,N),l=N)}l&&s.set(null,l)}p=r.instance,N=p.getAttribute("data-precedence"),b=s.get(N)||l,b===l&&s.set(null,p),s.set(N,p),this.count++,l=vd.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),b?b.parentNode.insertBefore(p,b.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),r.state.loading|=4}}var Qc={$$typeof:H,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function wv(e,r,s,l,p,b,N,B){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Et(0),this.hiddenUpdates=Et(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function N2(e,r,s,l,p,b,N,B,ie,Ne,Be,Ue){return e=new wv(e,r,s,N,B,ie,Ne,Ue),r=1,b===!0&&(r|=24),b=Dr(3,null,null,r),e.current=b,b.stateNode=e,r=yc(),r.refCount++,e.pooledCache=r,r.refCount++,b.memoizedState={element:l,isDehydrated:s,cache:r},Ae(b),e}function L2(e){return e?(e=vr,e):vr}function E2(e,r,s,l,p,b){p=L2(p),l.context===null?l.context=p:l.pendingContext=p,l=Oe(r),l.payload={element:s},b=b===void 0?null:b,b!==null&&(l.callback=b),s=He(e,l,r),s!==null&&(Za(s,e,r),qe(s,e,r))}function T2(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<r?s:r}}function u1(e,r){T2(e,r),(e=e.alternate)&&T2(e,r)}function C2(e){if(e.tag===13){var r=$s(e,67108864);r!==null&&Za(r,e,67108864),u1(e,67108864)}}var xd=!0;function Sv(e,r,s,l){var p=ee.T;ee.T=null;var b=J.p;try{J.p=2,c1(e,r,s,l)}finally{J.p=b,ee.T=p}}function _v(e,r,s,l){var p=ee.T;ee.T=null;var b=J.p;try{J.p=8,c1(e,r,s,l)}finally{J.p=b,ee.T=p}}function c1(e,r,s,l){if(xd){var p=f1(l);if(p===null)$h(e,r,l,wd,s),R2(e,l);else if(jv(p,e,r,s,l))l.stopPropagation();else if(R2(e,l),r&4&&-1<Av.indexOf(e)){for(;p!==null;){var b=Er(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var N=Je(b.pendingLanes);if(N!==0){var B=b;for(B.pendingLanes|=2,B.entangledLanes|=2;N;){var ie=1<<31-$e(N);B.entanglements[1]|=ie,N&=~ie}xs(b),(bn&6)===0&&(ad=xt()+500,Fc(0))}}break;case 13:B=$s(b,2),B!==null&&Za(B,b,2),sd(),u1(b,2)}if(b=f1(l),b===null&&$h(e,r,l,wd,s),b===p)break;p=b}p!==null&&l.stopPropagation()}else $h(e,r,l,null,s)}}function f1(e){return e=Lo(e),d1(e)}var wd=null;function d1(e){if(wd=null,e=Ir(e),e!==null){var r=u(e);if(r===null)e=null;else{var s=r.tag;if(s===13){if(e=h(r),e!==null)return e;e=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null)}}return wd=e,null}function M2(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ut()){case Ie:return 2;case mt:return 8;case Ze:case bt:return 32;case ht:return 268435456;default:return 32}default:return 32}}var h1=!1,sl=null,ol=null,ll=null,Xc=new Map,Kc=new Map,ul=[],Av="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".split(" ");function R2(e,r){switch(e){case"focusin":case"focusout":sl=null;break;case"dragenter":case"dragleave":ol=null;break;case"mouseover":case"mouseout":ll=null;break;case"pointerover":case"pointerout":Xc.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kc.delete(r.pointerId)}}function $c(e,r,s,l,p,b){return e===null||e.nativeEvent!==b?(e={blockedOn:r,domEventName:s,eventSystemFlags:l,nativeEvent:b,targetContainers:[p]},r!==null&&(r=Er(r),r!==null&&C2(r)),e):(e.eventSystemFlags|=l,r=e.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),e)}function jv(e,r,s,l,p){switch(r){case"focusin":return sl=$c(sl,e,r,s,l,p),!0;case"dragenter":return ol=$c(ol,e,r,s,l,p),!0;case"mouseover":return ll=$c(ll,e,r,s,l,p),!0;case"pointerover":var b=p.pointerId;return Xc.set(b,$c(Xc.get(b)||null,e,r,s,l,p)),!0;case"gotpointercapture":return b=p.pointerId,Kc.set(b,$c(Kc.get(b)||null,e,r,s,l,p)),!0}return!1}function O2(e){var r=Ir(e.target);if(r!==null){var s=u(r);if(s!==null){if(r=s.tag,r===13){if(r=h(s),r!==null){e.blockedOn=r,jt(e.priority,function(){if(s.tag===13){var l=$a();l=pn(l);var p=$s(s,l);p!==null&&Za(p,s,l),u1(s,l)}});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Sd(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var s=f1(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);ai=l,s.target.dispatchEvent(l),ai=null}else return r=Er(s),r!==null&&C2(r),e.blockedOn=s,!1;r.shift()}return!0}function D2(e,r,s){Sd(e)&&s.delete(r)}function kv(){h1=!1,sl!==null&&Sd(sl)&&(sl=null),ol!==null&&Sd(ol)&&(ol=null),ll!==null&&Sd(ll)&&(ll=null),Xc.forEach(D2),Kc.forEach(D2)}function _d(e,r){e.blockedOn===r&&(e.blockedOn=null,h1||(h1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kv)))}var Ad=null;function z2(e){Ad!==e&&(Ad=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ad===e&&(Ad=null);for(var r=0;r<e.length;r+=3){var s=e[r],l=e[r+1],p=e[r+2];if(typeof l!="function"){if(d1(l||s)===null)continue;break}var b=Er(s);b!==null&&(e.splice(r,3),r-=3,hi(b,{pending:!0,data:p,method:s.method,action:l},l,p))}}))}function Zc(e){function r(ie){return _d(ie,e)}sl!==null&&_d(sl,e),ol!==null&&_d(ol,e),ll!==null&&_d(ll,e),Xc.forEach(r),Kc.forEach(r);for(var s=0;s<ul.length;s++){var l=ul[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ul.length&&(s=ul[0],s.blockedOn===null);)O2(s),s.blockedOn===null&&ul.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var p=s[l],b=s[l+1],N=p[kn]||null;if(typeof b=="function")N||z2(s);else if(N){var B=null;if(b&&b.hasAttribute("formAction")){if(p=b,N=b[kn]||null)B=N.formAction;else if(d1(p)!==null)continue}else B=N.action;typeof B=="function"?s[l+1]=B:(s.splice(l,3),l-=3),z2(s)}}}function p1(e){this._internalRoot=e}jd.prototype.render=p1.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(i(409));var s=r.current,l=$a();E2(s,l,e,r,null,null)},jd.prototype.unmount=p1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;E2(e.current,2,null,e,null,null),sd(),r[xr]=null}};function jd(e){this._internalRoot=e}jd.prototype.unstable_scheduleHydration=function(e){if(e){var r=Oa();e={blockedOn:null,target:e,priority:r};for(var s=0;s<ul.length&&r!==0&&r<ul[s].priority;s++);ul.splice(s,0,e),s===0&&O2(e)}};var B2=n.version;if(B2!=="19.1.0")throw Error(i(527,B2,"19.1.0"));J.findDOMNode=function(e){var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=f(r),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Nv={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:ee,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kd.isDisabled&&kd.supportsFiber)try{wt=kd.inject(Nv),_t=kd}catch{}}return ef.createRoot=function(e,r){if(!o(e))throw Error(i(299));var s=!1,l="",p=J0,b=ep,N=tp,B=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(N=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(B=r.unstable_transitionCallbacks)),r=N2(e,1,!1,null,null,s,l,p,b,N,B,null),e[xr]=r.current,Kh(e),new p1(r)},ef.hydrateRoot=function(e,r,s){if(!o(e))throw Error(i(299));var l=!1,p="",b=J0,N=ep,B=tp,ie=null,Ne=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(N=s.onCaughtError),s.onRecoverableError!==void 0&&(B=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(ie=s.unstable_transitionCallbacks),s.formState!==void 0&&(Ne=s.formState)),r=N2(e,1,!0,r,s??null,l,p,b,N,B,ie,Ne),r.context=L2(null),s=r.current,l=$a(),l=pn(l),p=Oe(l),p.callback=null,He(s,p,l),s=l,r.current.lanes=s,Ct(r,s),xs(r),e[xr]=r.current,Kh(e),new jd(r)},ef.version="19.1.0",ef}var V2;function Pv(){if(V2)return y1.exports;V2=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),y1.exports=Bv(),y1.exports}var qv=Pv();const Uv=Pm(qv);var sc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Fv={setTimeout:(t,n)=>setTimeout(t,n),clearTimeout:t=>clearTimeout(t),setInterval:(t,n)=>setInterval(t,n),clearInterval:t=>clearInterval(t)},Iv=class{#e=Fv;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,n){return this.#e.setTimeout(t,n)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,n){return this.#e.setInterval(t,n)}clearInterval(t){this.#e.clearInterval(t)}},Gl=new Iv;function Hv(t){setTimeout(t,0)}var Ql=typeof window>"u"||"Deno"in globalThis;function ya(){}function Wv(t,n){return typeof t=="function"?t(n):t}function X1(t){return typeof t=="number"&&t>=0&&t!==1/0}function qm(t,n){return Math.max(t+(n||0)-Date.now(),0)}function gl(t,n){return typeof t=="function"?t(n):t}function yi(t,n){return typeof t=="function"?t(n):t}function Q2(t,n){const{type:a="all",exact:i,fetchStatus:o,predicate:u,queryKey:h,stale:d}=t;if(h){if(i){if(n.queryHash!==v0(h,n.options))return!1}else if(!mf(n.queryKey,h))return!1}if(a!=="all"){const f=n.isActive();if(a==="active"&&!f||a==="inactive"&&f)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||o&&o!==n.state.fetchStatus||u&&!u(n))}function X2(t,n){const{exact:a,status:i,predicate:o,mutationKey:u}=t;if(u){if(!n.options.mutationKey)return!1;if(a){if(Xl(n.options.mutationKey)!==Xl(u))return!1}else if(!mf(n.options.mutationKey,u))return!1}return!(i&&n.state.status!==i||o&&!o(n))}function v0(t,n){return(n?.queryKeyHashFn||Xl)(t)}function Xl(t){return JSON.stringify(t,(n,a)=>K1(a)?Object.keys(a).sort().reduce((i,o)=>(i[o]=a[o],i),{}):a)}function mf(t,n){return t===n?!0:typeof t!=typeof n?!1:t&&n&&typeof t=="object"&&typeof n=="object"?Object.keys(n).every(a=>mf(t[a],n[a])):!1}var Yv=Object.prototype.hasOwnProperty;function Um(t,n,a=0){if(t===n)return t;if(a>500)return n;const i=K2(t)&&K2(n);if(!i&&!(K1(t)&&K1(n)))return n;const u=(i?t:Object.keys(t)).length,h=i?n:Object.keys(n),d=h.length,f=i?new Array(d):{};let g=0;for(let v=0;v<d;v++){const _=i?v:h[v],j=t[_],w=n[_];if(j===w){f[_]=j,(i?v<u:Yv.call(t,_))&&g++;continue}if(j===null||w===null||typeof j!="object"||typeof w!="object"){f[_]=w;continue}const k=Um(j,w,a+1);f[_]=k,k===j&&g++}return u===d&&g===u?t:f}function Vd(t,n){if(!n||Object.keys(t).length!==Object.keys(n).length)return!1;for(const a in t)if(t[a]!==n[a])return!1;return!0}function K2(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function K1(t){if(!$2(t))return!1;const n=t.constructor;if(n===void 0)return!0;const a=n.prototype;return!(!$2(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function $2(t){return Object.prototype.toString.call(t)==="[object Object]"}function Gv(t){return new Promise(n=>{Gl.setTimeout(n,t)})}function $1(t,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(t,n):a.structuralSharing!==!1?Um(t,n):n}function Vv(t,n,a=0){const i=[...t,n];return a&&i.length>a?i.slice(1):i}function Qv(t,n,a=0){const i=[n,...t];return a&&i.length>a?i.slice(0,-1):i}var b0=Symbol();function Fm(t,n){return!t.queryFn&&n?.initialPromise?()=>n.initialPromise:!t.queryFn||t.queryFn===b0?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function x0(t,n){return typeof t=="function"?t(...n):!!t}function Xv(t,n,a){let i=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=n(),i||(i=!0,o.aborted?a():o.addEventListener("abort",a,{once:!0})),o)}),t}var Kv=class extends sc{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!Ql&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},w0=new Kv;function Z1(){let t,n;const a=new Promise((o,u)=>{t=o,n=u});a.status="pending",a.catch(()=>{});function i(o){Object.assign(a,o),delete a.resolve,delete a.reject}return a.resolve=o=>{i({status:"fulfilled",value:o}),t(o)},a.reject=o=>{i({status:"rejected",reason:o}),n(o)},a}var $v=Hv;function Zv(){let t=[],n=0,a=d=>{d()},i=d=>{d()},o=$v;const u=d=>{n?t.push(d):o(()=>{a(d)})},h=()=>{const d=t;t=[],d.length&&o(()=>{i(()=>{d.forEach(f=>{a(f)})})})};return{batch:d=>{let f;n++;try{f=d()}finally{n--,n||h()}return f},batchCalls:d=>(...f)=>{u(()=>{d(...f)})},schedule:u,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{o=d}}}var Nr=Zv(),Jv=class extends sc{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!Ql&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(a=>{a(t)}))}isOnline(){return this.#e}},Qd=new Jv;function eb(t){return Math.min(1e3*2**t,3e4)}function Im(t){return(t??"online")==="online"?Qd.isOnline():!0}var J1=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Hm(t){let n=!1,a=0,i;const o=Z1(),u=()=>o.status!=="pending",h=L=>{if(!u()){const R=new J1(L);j(R),t.onCancel?.(R)}},d=()=>{n=!0},f=()=>{n=!1},g=()=>w0.isFocused()&&(t.networkMode==="always"||Qd.isOnline())&&t.canRun(),v=()=>Im(t.networkMode)&&t.canRun(),_=L=>{u()||(i?.(),o.resolve(L))},j=L=>{u()||(i?.(),o.reject(L))},w=()=>new Promise(L=>{i=R=>{(u()||g())&&L(R)},t.onPause?.()}).then(()=>{i=void 0,u()||t.onContinue?.()}),k=()=>{if(u())return;let L;const R=a===0?t.initialPromise:void 0;try{L=R??t.fn()}catch(E){L=Promise.reject(E)}Promise.resolve(L).then(_).catch(E=>{if(u())return;const Y=t.retry??(Ql?0:3),H=t.retryDelay??eb,F=typeof H=="function"?H(a,E):H,X=Y===!0||typeof Y=="number"&&a<Y||typeof Y=="function"&&Y(a,E);if(n||!X){j(E);return}a++,t.onFail?.(a,E),Gv(F).then(()=>g()?void 0:w()).then(()=>{n?j(E):k()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(i?.(),o),cancelRetry:d,continueRetry:f,canStart:v,start:()=>(v()?k():w().then(k),o)}}var Wm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),X1(this.gcTime)&&(this.#e=Gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ql?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Gl.clearTimeout(this.#e),this.#e=void 0)}},tb=class extends Wm{#e;#t;#n;#a;#r;#s;#o;constructor(t){super(),this.#o=!1,this.#s=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#a=t.client,this.#n=this.#a.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=J2(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#s,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=J2(this.options);n.data!==void 0&&(this.setState(Z2(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,n){const a=$1(this.state.data,t,this.options);return this.#i({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(t,n){this.#i({type:"setState",state:t,setStateOptions:n})}cancel(t){const n=this.#r?.promise;return this.#r?.cancel(t),n?n.then(ya).catch(ya):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>yi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===b0||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gl(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:!qm(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(t,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const a=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#o=!0,a.signal)})},o=()=>{const d=Fm(this.options,n),g=(()=>{const v={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(v),v})();return this.#o=!1,this.options.persister?this.options.persister(d,g,this):d(g)},h=(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return i(d),d})();this.options.behavior?.onFetch(h,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==h.fetchOptions?.meta)&&this.#i({type:"fetch",meta:h.fetchOptions?.meta}),this.#r=Hm({initialPromise:n?.initialPromise,fn:h.fetchFn,onCancel:d=>{d instanceof J1&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),a.abort()},onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof J1){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Ym(a.data,this.options),fetchMeta:t.meta??null};case"success":const i={...a,...Z2(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?i:void 0,i;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),Nr.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Ym(t,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Im(n.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Z2(t,n){return{data:t,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function J2(t){const n=typeof t.initialData=="function"?t.initialData():t.initialData,a=n!==void 0,i=a?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var nb=class extends sc{constructor(t,n){super(),this.options=n,this.#e=t,this.#i=null,this.#o=Z1(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#g;#d;#h;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),eg(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return e0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return e0(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(t){const n=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),n._defaulted&&!Vd(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&tg(this.#t,a,this.options,n)&&this.#f(),this.updateResult(),i&&(this.#t!==a||yi(this.options.enabled,this.#t)!==yi(n.enabled,this.#t)||gl(this.options.staleTime,this.#t)!==gl(n.staleTime,this.#t))&&this.#m();const o=this.#y();i&&(this.#t!==a||yi(this.options.enabled,this.#t)!==yi(n.enabled,this.#t)||o!==this.#l)&&this.#v(o)}getOptimisticResult(t){const n=this.#e.getQueryCache().build(this.#e,t),a=this.createResult(n,t);return ab(this,a)&&(this.#a=a,this.#s=this.options,this.#r=this.#t.state),a}getCurrentResult(){return this.#a}trackResult(t,n){return new Proxy(t,{get:(a,i)=>(this.trackProp(i),n?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,i))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=this.#e.defaultQueryOptions(t),a=this.#e.getQueryCache().build(this.#e,n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(t){this.#S();let n=this.#t.fetch(this.options,t);return t?.throwOnError||(n=n.catch(ya)),n}#m(){this.#x();const t=gl(this.options.staleTime,this.#t);if(Ql||this.#a.isStale||!X1(t))return;const a=qm(this.#a.dataUpdatedAt,t)+1;this.#u=Gl.setTimeout(()=>{this.#a.isStale||this.updateResult()},a)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#w(),this.#l=t,!(Ql||yi(this.options.enabled,this.#t)===!1||!X1(this.#l)||this.#l===0)&&(this.#c=Gl.setInterval(()=>{(this.options.refetchIntervalInBackground||w0.isFocused())&&this.#f()},this.#l))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#u&&(Gl.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Gl.clearInterval(this.#c),this.#c=void 0)}createResult(t,n){const a=this.#t,i=this.options,o=this.#a,u=this.#r,h=this.#s,f=t!==a?t.state:this.#n,{state:g}=t;let v={...g},_=!1,j;if(n._optimisticResults){const oe=this.hasListeners(),Z=!oe&&eg(t,n),ge=oe&&tg(t,a,n,i);(Z||ge)&&(v={...v,...Ym(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:w,errorUpdatedAt:k,status:L}=v;j=v.data;let R=!1;if(n.placeholderData!==void 0&&j===void 0&&L==="pending"){let oe;o?.isPlaceholderData&&n.placeholderData===h?.placeholderData?(oe=o.data,R=!0):oe=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,oe!==void 0&&(L="success",j=$1(o?.data,oe,n),_=!0)}if(n.select&&j!==void 0&&!R)if(o&&j===u?.data&&n.select===this.#g)j=this.#d;else try{this.#g=n.select,j=n.select(j),j=$1(o?.data,j,n),this.#d=j,this.#i=null}catch(oe){this.#i=oe}this.#i&&(w=this.#i,j=this.#d,k=Date.now(),L="error");const E=v.fetchStatus==="fetching",Y=L==="pending",H=L==="error",F=Y&&E,X=j!==void 0,xe={status:L,fetchStatus:v.fetchStatus,isPending:Y,isSuccess:L==="success",isError:H,isInitialLoading:F,isLoading:F,data:j,dataUpdatedAt:v.dataUpdatedAt,error:w,errorUpdatedAt:k,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!Y,isLoadingError:H&&!X,isPaused:v.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:H&&X,isStale:S0(t,n),refetch:this.refetch,promise:this.#o,isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const oe=xe.data!==void 0,Z=xe.status==="error"&&!oe,ge=ne=>{Z?ne.reject(xe.error):oe&&ne.resolve(xe.data)},O=()=>{const ne=this.#o=xe.promise=Z1();ge(ne)},U=this.#o;switch(U.status){case"pending":t.queryHash===a.queryHash&&ge(U);break;case"fulfilled":(Z||xe.data!==U.value)&&O();break;case"rejected":(!Z||xe.error!==U.reason)&&O();break}}return xe}updateResult(){const t=this.#a,n=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Vd(n,t))return;this.#a=n;const a=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!this.#p.size)return!0;const u=new Set(o??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#a).some(h=>{const d=h;return this.#a[d]!==t[d]&&u.has(d)})};this.#_({listeners:a()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const n=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(n?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#_(t){Nr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function rb(t,n){return yi(n.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&n.retryOnMount===!1)}function eg(t,n){return rb(t,n)||t.state.data!==void 0&&e0(t,n,n.refetchOnMount)}function e0(t,n,a){if(yi(n.enabled,t)!==!1&&gl(n.staleTime,t)!=="static"){const i=typeof a=="function"?a(t):a;return i==="always"||i!==!1&&S0(t,n)}return!1}function tg(t,n,a,i){return(t!==n||yi(i.enabled,t)===!1)&&(!a.suspense||t.state.status!=="error")&&S0(t,a)}function S0(t,n){return yi(n.enabled,t)!==!1&&t.isStaleByTime(gl(n.staleTime,t))}function ab(t,n){return!Vd(t.getCurrentResult(),n)}function ng(t){return{onFetch:(n,a)=>{const i=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],h=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const g=async()=>{let v=!1;const _=k=>{Xv(k,()=>n.signal,()=>v=!0)},j=Fm(n.options,n.fetchOptions),w=async(k,L,R)=>{if(v)return Promise.reject();if(L==null&&k.pages.length)return Promise.resolve(k);const Y=(()=>{const _e={client:n.client,queryKey:n.queryKey,pageParam:L,direction:R?"backward":"forward",meta:n.options.meta};return _(_e),_e})(),H=await j(Y),{maxPages:F}=n.options,X=R?Qv:Vv;return{pages:X(k.pages,H,F),pageParams:X(k.pageParams,L,F)}};if(o&&u.length){const k=o==="backward",L=k?ib:rg,R={pages:u,pageParams:h},E=L(i,R);d=await w(R,E,k)}else{const k=t??u.length;do{const L=f===0?h[0]??i.initialPageParam:rg(i,d);if(f>0&&L==null)break;d=await w(d,L),f++}while(f<k)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=g}}}function rg(t,{pages:n,pageParams:a}){const i=n.length-1;return n.length>0?t.getNextPageParam(n[i],n,a[i],a):void 0}function ib(t,{pages:n,pageParams:a}){return n.length>0?t.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var sb=class extends Wm{#e;#t;#n;#a;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Gm(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(n=>n!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(t){const n=()=>{this.#r({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=Hm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(u,h)=>{this.#r({type:"failed",failureCount:u,error:h})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",o=!this.#a.canStart();try{if(i)n();else{this.#r({type:"pending",variables:t,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,a);const h=await this.options.onMutate?.(t,a);h!==this.state.context&&this.#r({type:"pending",context:h,variables:t,isPaused:o})}const u=await this.#a.start();return await this.#n.config.onSuccess?.(u,t,this.state.context,this,a),await this.options.onSuccess?.(u,t,this.state.context,a),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(u,null,t,this.state.context,a),this.#r({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,t,this.state.context,this,a)}catch(h){Promise.reject(h)}try{await this.options.onError?.(u,t,this.state.context,a)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,a)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,a)}catch(h){Promise.reject(h)}throw this.#r({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#r(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Nr.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Gm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ob=class extends sc{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,n,a){const i=new sb({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(n),state:a});return this.add(i),i}add(t){this.#e.add(t);const n=Nd(t);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(t):this.#t.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const n=Nd(t);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const i=a.indexOf(t);i!==-1&&a.splice(i,1)}else a[0]===t&&this.#t.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Nd(t);if(typeof n=="string"){const i=this.#t.get(n)?.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){const n=Nd(t);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Nr.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const n={exact:!0,...t};return this.getAll().find(a=>X2(n,a))}findAll(t={}){return this.getAll().filter(n=>X2(t,n))}notify(t){Nr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Nr.batch(()=>Promise.all(t.map(n=>n.continue().catch(ya))))}};function Nd(t){return t.options.scope?.id}var lb=class extends sc{#e;#t=void 0;#n;#a;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),Vd(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),a?.mutationKey&&this.options.mutationKey&&Xl(a.mutationKey)!==Xl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#s(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(n,a){return this.#a=a,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??Gm();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#s(n){Nr.batch(()=>{if(this.#a&&this.hasListeners()){const a=this.#t.variables,i=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#a.onSuccess?.(n.data,a,i,o)}catch(u){Promise.reject(u)}try{this.#a.onSettled?.(n.data,null,a,i,o)}catch(u){Promise.reject(u)}}else if(n?.type==="error"){try{this.#a.onError?.(n.error,a,i,o)}catch(u){Promise.reject(u)}try{this.#a.onSettled?.(void 0,n.error,a,i,o)}catch(u){Promise.reject(u)}}}this.listeners.forEach(a=>{a(this.#t)})})}},ub=class extends sc{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,n,a){const i=n.queryKey,o=n.queryHash??v0(i,n);let u=this.get(o);return u||(u=new tb({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#e.get(t.queryHash);n&&(t.destroy(),n===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Nr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Q2(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>Q2(t,a)):n}notify(t){Nr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Nr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Nr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},cb=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(t={}){this.#e=t.queryCache||new ub,this.#t=t.mutationCache||new ob,this.#n=t.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=w0.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Qd.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),a=this.#e.build(this,n),i=a.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&a.isStaleByTime(gl(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:n,state:a})=>{const i=a.data;return[n,i]})}setQueryData(t,n,a){const i=this.defaultQueryOptions({queryKey:t}),u=this.#e.get(i.queryHash)?.state.data,h=Wv(n,u);if(h!==void 0)return this.#e.build(this,i).setData(h,{...a,manual:!0})}setQueriesData(t,n,a){return Nr.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,a)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state}removeQueries(t){const n=this.#e;Nr.batch(()=>{n.findAll(t).forEach(a=>{n.remove(a)})})}resetQueries(t,n){const a=this.#e;return Nr.batch(()=>(a.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const a={revert:!0,...n},i=Nr.batch(()=>this.#e.findAll(t).map(o=>o.cancel(a)));return Promise.all(i).then(ya).catch(ya)}invalidateQueries(t,n={}){return Nr.batch(()=>(this.#e.findAll(t).forEach(a=>{a.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},i=Nr.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let u=o.fetch(void 0,a);return a.throwOnError||(u=u.catch(ya)),o.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(ya)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(gl(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ya).catch(ya)}fetchInfiniteQuery(t){return t.behavior=ng(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ya).catch(ya)}ensureInfiniteQueryData(t){return t.behavior=ng(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Qd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,n){this.#a.set(Xl(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#a.values()],a={};return n.forEach(i=>{mf(t,i.queryKey)&&Object.assign(a,i.defaultOptions)}),a}setMutationDefaults(t,n){this.#r.set(Xl(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#r.values()],a={};return n.forEach(i=>{mf(t,i.mutationKey)&&Object.assign(a,i.defaultOptions)}),a}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=v0(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===b0&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Vm=ae.createContext(void 0),Af=t=>{const n=ae.useContext(Vm);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},fb=({client:t,children:n})=>(ae.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),m.jsx(Vm.Provider,{value:t,children:n})),Qm=ae.createContext(!1),db=()=>ae.useContext(Qm);Qm.Provider;function hb(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var pb=ae.createContext(hb()),gb=()=>ae.useContext(pb),mb=(t,n,a)=>{const i=a?.state.error&&typeof t.throwOnError=="function"?x0(t.throwOnError,[a.state.error,a]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(n.isReset()||(t.retryOnMount=!1))},yb=t=>{ae.useEffect(()=>{t.clearReset()},[t])},vb=({result:t,errorResetBoundary:n,throwOnError:a,query:i,suspense:o})=>t.isError&&!n.isReset()&&!t.isFetching&&i&&(o&&t.data===void 0||x0(a,[t.error,i])),bb=t=>{if(t.suspense){const a=o=>o==="static"?o:Math.max(o??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...o)=>a(i(...o)):a(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},xb=(t,n)=>t.isLoading&&t.isFetching&&!n,wb=(t,n)=>t?.suspense&&n.isPending,ag=(t,n,a)=>n.fetchOptimistic(t).catch(()=>{a.clearReset()});function Sb(t,n,a){const i=db(),o=gb(),u=Af(),h=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const d=u.getQueryCache().get(h.queryHash);h._optimisticResults=i?"isRestoring":"optimistic",bb(h),mb(h,o,d),yb(o);const f=!u.getQueryCache().get(h.queryHash),[g]=ae.useState(()=>new n(u,h)),v=g.getOptimisticResult(h),_=!i&&t.subscribed!==!1;if(ae.useSyncExternalStore(ae.useCallback(j=>{const w=_?g.subscribe(Nr.batchCalls(j)):ya;return g.updateResult(),w},[g,_]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),ae.useEffect(()=>{g.setOptions(h)},[h,g]),wb(h,v))throw ag(h,g,o);if(vb({result:v,errorResetBoundary:o,throwOnError:h.throwOnError,query:d,suspense:h.suspense}))throw v.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(h,v),h.experimental_prefetchInRender&&!Ql&&xb(v,i)&&(f?ag(h,g,o):d?.promise)?.catch(ya).finally(()=>{g.updateResult()}),h.notifyOnChangeProps?v:g.trackResult(v)}function va(t,n){return Sb(t,nb)}function ff(t,n){const a=Af(),[i]=ae.useState(()=>new lb(a,t));ae.useEffect(()=>{i.setOptions(t)},[i,t]);const o=ae.useSyncExternalStore(ae.useCallback(h=>i.subscribe(Nr.batchCalls(h)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=ae.useCallback((h,d)=>{i.mutate(h,d).catch(ya)},[i]);if(o.error&&x0(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}/**
|
|
50
|
+
* react-router v7.14.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var ig="popstate";function sg(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function _b(t={}){function n(i,o){let u=o.state?.masked,{pathname:h,search:d,hash:f}=u||i.location;return t0("",{pathname:h,search:d,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default",u?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function a(i,o){return typeof o=="string"?o:yf(o)}return jb(n,a,null,t)}function er(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function ks(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Ab(){return Math.random().toString(36).substring(2,10)}function og(t,n){return{usr:t.state,key:t.key,idx:n,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function t0(t,n,a=null,i,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?oc(n):n,state:a,key:n&&n.key||i||Ab(),unstable_mask:o}}function yf({pathname:t="/",search:n="",hash:a=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function oc(t){let n={};if(t){let a=t.indexOf("#");a>=0&&(n.hash=t.substring(a),t=t.substring(0,a));let i=t.indexOf("?");i>=0&&(n.search=t.substring(i),t=t.substring(0,i)),t&&(n.pathname=t)}return n}function jb(t,n,a,i={}){let{window:o=document.defaultView,v5Compat:u=!1}=i,h=o.history,d="POP",f=null,g=v();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function v(){return(h.state||{idx:null}).idx}function _(){d="POP";let R=v(),E=R==null?null:R-g;g=R,f&&f({action:d,location:L.location,delta:E})}function j(R,E){d="PUSH";let Y=sg(R)?R:t0(L.location,R,E);g=v()+1;let H=og(Y,g),F=L.createHref(Y.unstable_mask||Y);try{h.pushState(H,"",F)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;o.location.assign(F)}u&&f&&f({action:d,location:L.location,delta:1})}function w(R,E){d="REPLACE";let Y=sg(R)?R:t0(L.location,R,E);g=v();let H=og(Y,g),F=L.createHref(Y.unstable_mask||Y);h.replaceState(H,"",F),u&&f&&f({action:d,location:L.location,delta:0})}function k(R){return kb(R)}let L={get action(){return d},get location(){return t(o,h)},listen(R){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(ig,_),f=R,()=>{o.removeEventListener(ig,_),f=null}},createHref(R){return n(o,R)},createURL:k,encodeLocation(R){let E=k(R);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:j,replace:w,go(R){return h.go(R)}};return L}function kb(t,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),er(a,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:yf(t);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=a+i),new URL(i,a)}function Xm(t,n,a="/"){return Nb(t,n,a,!1)}function Nb(t,n,a,i){let o=typeof n=="string"?oc(n):n,u=vo(o.pathname||"/",a);if(u==null)return null;let h=Km(t);Lb(h);let d=null;for(let f=0;d==null&&f<h.length;++f){let g=qb(u);d=Bb(h[f],g,i)}return d}function Km(t,n=[],a=[],i="",o=!1){let u=(h,d,f=o,g)=>{let v={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:d,route:h};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(i)&&f)return;er(v.relativePath.startsWith(i),`Absolute route path "${v.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(i.length)}let _=js([i,v.relativePath]),j=a.concat(v);h.children&&h.children.length>0&&(er(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),Km(h.children,n,j,_,f)),!(h.path==null&&!h.index)&&n.push({path:_,score:Db(_,h.index),routesMeta:j})};return t.forEach((h,d)=>{if(h.path===""||!h.path?.includes("?"))u(h,d);else for(let f of $m(h.path))u(h,d,!0,f)}),n}function $m(t){let n=t.split("/");if(n.length===0)return[];let[a,...i]=n,o=a.endsWith("?"),u=a.replace(/\?$/,"");if(i.length===0)return o?[u,""]:[u];let h=$m(i.join("/")),d=[];return d.push(...h.map(f=>f===""?u:[u,f].join("/"))),o&&d.push(...h),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function Lb(t){t.sort((n,a)=>n.score!==a.score?a.score-n.score:zb(n.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}var Eb=/^:[\w-]+$/,Tb=3,Cb=2,Mb=1,Rb=10,Ob=-2,lg=t=>t==="*";function Db(t,n){let a=t.split("/"),i=a.length;return a.some(lg)&&(i+=Ob),n&&(i+=Cb),a.filter(o=>!lg(o)).reduce((o,u)=>o+(Eb.test(u)?Tb:u===""?Mb:Rb),i)}function zb(t,n){return t.length===n.length&&t.slice(0,-1).every((i,o)=>i===n[o])?t[t.length-1]-n[n.length-1]:0}function Bb(t,n,a=!1){let{routesMeta:i}=t,o={},u="/",h=[];for(let d=0;d<i.length;++d){let f=i[d],g=d===i.length-1,v=u==="/"?n:n.slice(u.length)||"/",_=Xd({path:f.relativePath,caseSensitive:f.caseSensitive,end:g},v),j=f.route;if(!_&&g&&a&&!i[i.length-1].route.index&&(_=Xd({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},v)),!_)return null;Object.assign(o,_.params),h.push({params:o,pathname:js([u,_.pathname]),pathnameBase:Hb(js([u,_.pathnameBase])),route:j}),_.pathnameBase!=="/"&&(u=js([u,_.pathnameBase]))}return h}function Xd(t,n){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,i]=Pb(t.path,t.caseSensitive,t.end),o=n.match(a);if(!o)return null;let u=o[0],h=u.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:i.reduce((g,{paramName:v,isOptional:_},j)=>{if(v==="*"){let k=d[j]||"";h=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const w=d[j];return _&&!w?g[v]=void 0:g[v]=(w||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:h,pattern:t}}function Pb(t,n=!1,a=!0){ks(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,d,f,g,v)=>{if(i.push({paramName:d,isOptional:f!=null}),f){let _=v.charAt(g+h.length);return _&&_!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),i]}function qb(t){try{return t.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return ks(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),t}}function vo(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,i=t.charAt(a);return i&&i!=="/"?null:t.slice(a)||"/"}var Ub=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Fb(t,n="/"){let{pathname:a,search:i="",hash:o=""}=typeof t=="string"?oc(t):t,u;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?u=ug(a.substring(1),"/"):u=ug(a,n)):u=n,{pathname:u,search:Wb(i),hash:Yb(o)}}function ug(t,n){let a=n.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function w1(t,n,a,i){return`Cannot include a '${t}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ib(t){return t.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function Zm(t){let n=Ib(t);return n.map((a,i)=>i===n.length-1?a.pathname:a.pathnameBase)}function _0(t,n,a,i=!1){let o;typeof t=="string"?o=oc(t):(o={...t},er(!o.pathname||!o.pathname.includes("?"),w1("?","pathname","search",o)),er(!o.pathname||!o.pathname.includes("#"),w1("#","pathname","hash",o)),er(!o.search||!o.search.includes("#"),w1("#","search","hash",o)));let u=t===""||o.pathname==="",h=u?"/":o.pathname,d;if(h==null)d=a;else{let _=n.length-1;if(!i&&h.startsWith("..")){let j=h.split("/");for(;j[0]==="..";)j.shift(),_-=1;o.pathname=j.join("/")}d=_>=0?n[_]:"/"}let f=Fb(o,d),g=h&&h!=="/"&&h.endsWith("/"),v=(u||h===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(g||v)&&(f.pathname+="/"),f}var js=t=>t.join("/").replace(/\/\/+/g,"/"),Hb=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Wb=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Yb=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Gb=class{constructor(t,n,a,i=!1){this.status=t,this.statusText=n||"",this.internal=i,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Vb(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Qb(t){return t.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Jm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function e5(t,n){let a=t;if(typeof a!="string"||!Ub.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let i=a,o=!1;if(Jm)try{let u=new URL(window.location.href),h=a.startsWith("//")?new URL(u.protocol+a):new URL(a),d=vo(h.pathname,n);h.origin===u.origin&&d!=null?a=d+h.search+h.hash:o=!0}catch{ks(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var t5=["POST","PUT","PATCH","DELETE"];new Set(t5);var Xb=["GET",...t5];new Set(Xb);var lc=ae.createContext(null);lc.displayName="DataRouter";var ih=ae.createContext(null);ih.displayName="DataRouterState";var n5=ae.createContext(!1);function Kb(){return ae.useContext(n5)}var r5=ae.createContext({isTransitioning:!1});r5.displayName="ViewTransition";var $b=ae.createContext(new Map);$b.displayName="Fetchers";var Zb=ae.createContext(null);Zb.displayName="Await";var xi=ae.createContext(null);xi.displayName="Navigation";var jf=ae.createContext(null);jf.displayName="Location";var Es=ae.createContext({outlet:null,matches:[],isDataRoute:!1});Es.displayName="Route";var A0=ae.createContext(null);A0.displayName="RouteError";var a5="REACT_ROUTER_ERROR",Jb="REDIRECT",ex="ROUTE_ERROR_RESPONSE";function tx(t){if(t.startsWith(`${a5}:${Jb}:{`))try{let n=JSON.parse(t.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function nx(t){if(t.startsWith(`${a5}:${ex}:{`))try{let n=JSON.parse(t.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new Gb(n.status,n.statusText,n.data)}catch{}}function rx(t,{relative:n}={}){er(kf(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:i}=ae.useContext(xi),{hash:o,pathname:u,search:h}=Nf(t,{relative:n}),d=u;return a!=="/"&&(d=u==="/"?a:js([a,u])),i.createHref({pathname:d,search:h,hash:o})}function kf(){return ae.useContext(jf)!=null}function Qi(){return er(kf(),"useLocation() may be used only in the context of a <Router> component."),ae.useContext(jf).location}var i5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function s5(t){ae.useContext(xi).static||ae.useLayoutEffect(t)}function uc(){let{isDataRoute:t}=ae.useContext(Es);return t?mx():ax()}function ax(){er(kf(),"useNavigate() may be used only in the context of a <Router> component.");let t=ae.useContext(lc),{basename:n,navigator:a}=ae.useContext(xi),{matches:i}=ae.useContext(Es),{pathname:o}=Qi(),u=JSON.stringify(Zm(i)),h=ae.useRef(!1);return s5(()=>{h.current=!0}),ae.useCallback((f,g={})=>{if(ks(h.current,i5),!h.current)return;if(typeof f=="number"){a.go(f);return}let v=_0(f,JSON.parse(u),o,g.relative==="path");t==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:js([n,v.pathname])),(g.replace?a.replace:a.push)(v,g.state,g)},[n,a,u,o,t])}ae.createContext(null);function j0(){let{matches:t}=ae.useContext(Es),n=t[t.length-1];return n?n.params:{}}function Nf(t,{relative:n}={}){let{matches:a}=ae.useContext(Es),{pathname:i}=Qi(),o=JSON.stringify(Zm(a));return ae.useMemo(()=>_0(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function ix(t,n){return o5(t,n)}function o5(t,n,a){er(kf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=ae.useContext(xi),{matches:o}=ae.useContext(Es),u=o[o.length-1],h=u?u.params:{},d=u?u.pathname:"/",f=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";u5(d,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let v=Qi(),_;if(n){let R=typeof n=="string"?oc(n):n;er(f==="/"||R.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${R.pathname}" was given in the \`location\` prop.`),_=R}else _=v;let j=_.pathname||"/",w=j;if(f!=="/"){let R=f.replace(/^\//,"").split("/");w="/"+j.replace(/^\//,"").split("/").slice(R.length).join("/")}let k=Xm(t,{pathname:w});ks(g||k!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),ks(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let L=cx(k&&k.map(R=>Object.assign({},R,{params:Object.assign({},h,R.params),pathname:js([f,i.encodeLocation?i.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?f:js([f,i.encodeLocation?i.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),o,a);return n&&L?ae.createElement(jf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,..._},navigationType:"POP"}},L):L}function sx(){let t=gx(),n=Vb(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},h=null;return console.error("Error handled by React Router default ErrorBoundary:",t),h=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"💿 Hey developer 👋"),ae.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",ae.createElement("code",{style:u},"ErrorBoundary")," or"," ",ae.createElement("code",{style:u},"errorElement")," prop on your route.")),ae.createElement(ae.Fragment,null,ae.createElement("h2",null,"Unexpected Application Error!"),ae.createElement("h3",{style:{fontStyle:"italic"}},n),a?ae.createElement("pre",{style:o},a):null,h)}var ox=ae.createElement(sx,null),l5=class extends ae.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){this.props.onError?this.props.onError(t,n):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const a=nx(t.digest);a&&(t=a)}let n=t!==void 0?ae.createElement(Es.Provider,{value:this.props.routeContext},ae.createElement(A0.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?ae.createElement(lx,{error:t},n):n}};l5.contextType=n5;var S1=new WeakMap;function lx({children:t,error:n}){let{basename:a}=ae.useContext(xi);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let i=tx(n.digest);if(i){let o=S1.get(n);if(o)throw o;let u=e5(i.location,a);if(Jm&&!S1.get(n))if(u.isExternal||i.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw S1.set(n,h),h}return ae.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return t}function ux({routeContext:t,match:n,children:a}){let i=ae.useContext(lc);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),ae.createElement(Es.Provider,{value:t},a)}function cx(t,n=[],a){let i=a?.state;if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let o=t,u=i?.errors;if(u!=null){let v=o.findIndex(_=>_.route.id&&u?.[_.route.id]!==void 0);er(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,v+1))}let h=!1,d=-1;if(a&&i){h=i.renderFallback;for(let v=0;v<o.length;v++){let _=o[v];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(d=v),_.route.id){let{loaderData:j,errors:w}=i,k=_.route.loader&&!j.hasOwnProperty(_.route.id)&&(!w||w[_.route.id]===void 0);if(_.route.lazy||k){a.isStatic&&(h=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let f=a?.onError,g=i&&f?(v,_)=>{f(v,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:Qb(i.matches),errorInfo:_})}:void 0;return o.reduceRight((v,_,j)=>{let w,k=!1,L=null,R=null;i&&(w=u&&_.route.id?u[_.route.id]:void 0,L=_.route.errorElement||ox,h&&(d<0&&j===0?(u5("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,R=null):d===j&&(k=!0,R=_.route.hydrateFallbackElement||null)));let E=n.concat(o.slice(0,j+1)),Y=()=>{let H;return w?H=L:k?H=R:_.route.Component?H=ae.createElement(_.route.Component,null):_.route.element?H=_.route.element:H=v,ae.createElement(ux,{match:_,routeContext:{outlet:v,matches:E,isDataRoute:i!=null},children:H})};return i&&(_.route.ErrorBoundary||_.route.errorElement||j===0)?ae.createElement(l5,{location:i.location,revalidation:i.revalidation,component:L,error:w,children:Y(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:g}):Y()},null)}function k0(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fx(t){let n=ae.useContext(lc);return er(n,k0(t)),n}function dx(t){let n=ae.useContext(ih);return er(n,k0(t)),n}function hx(t){let n=ae.useContext(Es);return er(n,k0(t)),n}function N0(t){let n=hx(t),a=n.matches[n.matches.length-1];return er(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}function px(){return N0("useRouteId")}function gx(){let t=ae.useContext(A0),n=dx("useRouteError"),a=N0("useRouteError");return t!==void 0?t:n.errors?.[a]}function mx(){let{router:t}=fx("useNavigate"),n=N0("useNavigate"),a=ae.useRef(!1);return s5(()=>{a.current=!0}),ae.useCallback(async(o,u={})=>{ks(a.current,i5),a.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:n,...u}))},[t,n])}var cg={};function u5(t,n,a){!n&&!cg[t]&&(cg[t]=!0,ks(!1,a))}ae.memo(yx);function yx({routes:t,future:n,state:a,isStatic:i,onError:o}){return o5(t,void 0,{state:a,isStatic:i,onError:o})}function Ss(t){er(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function vx({basename:t="/",children:n=null,location:a,navigationType:i="POP",navigator:o,static:u=!1,unstable_useTransitions:h}){er(!kf(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),f=ae.useMemo(()=>({basename:d,navigator:o,static:u,unstable_useTransitions:h,future:{}}),[d,o,u,h]);typeof a=="string"&&(a=oc(a));let{pathname:g="/",search:v="",hash:_="",state:j=null,key:w="default",unstable_mask:k}=a,L=ae.useMemo(()=>{let R=vo(g,d);return R==null?null:{location:{pathname:R,search:v,hash:_,state:j,key:w,unstable_mask:k},navigationType:i}},[d,g,v,_,j,w,i,k]);return ks(L!=null,`<Router basename="${d}"> is not able to match the URL "${g}${v}${_}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:ae.createElement(xi.Provider,{value:f},ae.createElement(jf.Provider,{children:n,value:L}))}function bx({children:t,location:n}){return ix(n0(t),n)}function n0(t,n=[]){let a=[];return ae.Children.forEach(t,(i,o)=>{if(!ae.isValidElement(i))return;let u=[...n,o];if(i.type===ae.Fragment){a.push.apply(a,n0(i.props.children,u));return}er(i.type===Ss,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),er(!i.props.index||!i.props.children,"An index route cannot have child routes.");let h={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(h.children=n0(i.props.children,u)),a.push(h)}),a}var Pd="get",qd="application/x-www-form-urlencoded";function sh(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function xx(t){return sh(t)&&t.tagName.toLowerCase()==="button"}function wx(t){return sh(t)&&t.tagName.toLowerCase()==="form"}function Sx(t){return sh(t)&&t.tagName.toLowerCase()==="input"}function _x(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Ax(t,n){return t.button===0&&(!n||n==="_self")&&!_x(t)}var Ld=null;function jx(){if(Ld===null)try{new FormData(document.createElement("form"),0),Ld=!1}catch{Ld=!0}return Ld}var kx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _1(t){return t!=null&&!kx.has(t)?(ks(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qd}"`),null):t}function Nx(t,n){let a,i,o,u,h;if(wx(t)){let d=t.getAttribute("action");i=d?vo(d,n):null,a=t.getAttribute("method")||Pd,o=_1(t.getAttribute("enctype"))||qd,u=new FormData(t)}else if(xx(t)||Sx(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=t.getAttribute("formaction")||d.getAttribute("action");if(i=f?vo(f,n):null,a=t.getAttribute("formmethod")||d.getAttribute("method")||Pd,o=_1(t.getAttribute("formenctype"))||_1(d.getAttribute("enctype"))||qd,u=new FormData(d,t),!jx()){let{name:g,type:v,value:_}=t;if(v==="image"){let j=g?`${g}.`:"";u.append(`${j}x`,"0"),u.append(`${j}y`,"0")}else g&&u.append(g,_)}}else{if(sh(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Pd,i=null,o=qd,h=t}return u&&o==="text/plain"&&(h=u,u=void 0),{action:i,method:a.toLowerCase(),encType:o,formData:u,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function L0(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function c5(t,n,a,i){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:n&&vo(o.pathname,n)==="/"?o.pathname=`${n.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function Lx(t,n){if(t.id in n)return n[t.id];try{let a=await import(t.module);return n[t.id]=a,a}catch(a){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ex(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Tx(t,n,a){let i=await Promise.all(t.map(async o=>{let u=n.routes[o.route.id];if(u){let h=await Lx(u,a);return h.links?h.links():[]}return[]}));return Ox(i.flat(1).filter(Ex).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function fg(t,n,a,i,o,u){let h=(f,g)=>a[g]?f.route.id!==a[g].route.id:!0,d=(f,g)=>a[g].pathname!==f.pathname||a[g].route.path?.endsWith("*")&&a[g].params["*"]!==f.params["*"];return u==="assets"?n.filter((f,g)=>h(f,g)||d(f,g)):u==="data"?n.filter((f,g)=>{let v=i.routes[f.route.id];if(!v||!v.hasLoader)return!1;if(h(f,g)||d(f,g))return!0;if(f.route.shouldRevalidate){let _=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function Cx(t,n,{includeHydrateFallback:a}={}){return Mx(t.map(i=>{let o=n.routes[i.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function Mx(t){return[...new Set(t)]}function Rx(t){let n={},a=Object.keys(t).sort();for(let i of a)n[i]=t[i];return n}function Ox(t,n){let a=new Set;return new Set(n),t.reduce((i,o)=>{let u=JSON.stringify(Rx(o));return a.has(u)||(a.add(u),i.push({key:u,link:o})),i},[])}function E0(){let t=ae.useContext(lc);return L0(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Dx(){let t=ae.useContext(ih);return L0(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var T0=ae.createContext(void 0);T0.displayName="FrameworkContext";function C0(){let t=ae.useContext(T0);return L0(t,"You must render this element inside a <HydratedRouter> element"),t}function zx(t,n){let a=ae.useContext(T0),[i,o]=ae.useState(!1),[u,h]=ae.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:g,onMouseLeave:v,onTouchStart:_}=n,j=ae.useRef(null);ae.useEffect(()=>{if(t==="render"&&h(!0),t==="viewport"){let L=E=>{E.forEach(Y=>{h(Y.isIntersecting)})},R=new IntersectionObserver(L,{threshold:.5});return j.current&&R.observe(j.current),()=>{R.disconnect()}}},[t]),ae.useEffect(()=>{if(i){let L=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(L)}}},[i]);let w=()=>{o(!0)},k=()=>{o(!1),h(!1)};return a?t!=="intent"?[u,j,{}]:[u,j,{onFocus:tf(d,w),onBlur:tf(f,k),onMouseEnter:tf(g,w),onMouseLeave:tf(v,k),onTouchStart:tf(_,w)}]:[!1,j,{}]}function tf(t,n){return a=>{t&&t(a),a.defaultPrevented||n(a)}}function Bx({page:t,...n}){let a=Kb(),{router:i}=E0(),o=ae.useMemo(()=>Xm(i.routes,t,i.basename),[i.routes,t,i.basename]);return o?a?ae.createElement(qx,{page:t,matches:o,...n}):ae.createElement(Ux,{page:t,matches:o,...n}):null}function Px(t){let{manifest:n,routeModules:a}=C0(),[i,o]=ae.useState([]);return ae.useEffect(()=>{let u=!1;return Tx(t,n,a).then(h=>{u||o(h)}),()=>{u=!0}},[t,n,a]),i}function qx({page:t,matches:n,...a}){let i=Qi(),{future:o}=C0(),{basename:u}=E0(),h=ae.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let d=c5(t,u,o.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,g=[];for(let v of n)typeof v.route.shouldRevalidate=="function"?f=!0:g.push(v.route.id);return f&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[u,o.unstable_trailingSlashAwareDataRequests,t,i,n]);return ae.createElement(ae.Fragment,null,h.map(d=>ae.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...a})))}function Ux({page:t,matches:n,...a}){let i=Qi(),{future:o,manifest:u,routeModules:h}=C0(),{basename:d}=E0(),{loaderData:f,matches:g}=Dx(),v=ae.useMemo(()=>fg(t,n,g,u,i,"data"),[t,n,g,u,i]),_=ae.useMemo(()=>fg(t,n,g,u,i,"assets"),[t,n,g,u,i]),j=ae.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let L=new Set,R=!1;if(n.forEach(Y=>{let H=u.routes[Y.route.id];!H||!H.hasLoader||(!v.some(F=>F.route.id===Y.route.id)&&Y.route.id in f&&h[Y.route.id]?.shouldRevalidate||H.hasClientLoader?R=!0:L.add(Y.route.id))}),L.size===0)return[];let E=c5(t,d,o.unstable_trailingSlashAwareDataRequests,"data");return R&&L.size>0&&E.searchParams.set("_routes",n.filter(Y=>L.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[E.pathname+E.search]},[d,o.unstable_trailingSlashAwareDataRequests,f,i,u,v,n,t,h]),w=ae.useMemo(()=>Cx(_,u),[_,u]),k=Px(_);return ae.createElement(ae.Fragment,null,j.map(L=>ae.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...a})),w.map(L=>ae.createElement("link",{key:L,rel:"modulepreload",href:L,...a})),k.map(({key:L,link:R})=>ae.createElement("link",{key:L,nonce:a.nonce,...R,crossOrigin:R.crossOrigin??a.crossOrigin})))}function Fx(...t){return n=>{t.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var Ix=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ix&&(window.__reactRouterVersion="7.14.0")}catch{}function Hx({basename:t,children:n,unstable_useTransitions:a,window:i}){let o=ae.useRef();o.current==null&&(o.current=_b({window:i,v5Compat:!0}));let u=o.current,[h,d]=ae.useState({action:u.action,location:u.location}),f=ae.useCallback(g=>{a===!1?d(g):ae.startTransition(()=>d(g))},[a]);return ae.useLayoutEffect(()=>u.listen(f),[u,f]),ae.createElement(vx,{basename:t,children:n,location:h.location,navigationType:h.action,navigator:u,unstable_useTransitions:a})}var f5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ns=ae.forwardRef(function({onClick:n,discover:a="render",prefetch:i="none",relative:o,reloadDocument:u,replace:h,unstable_mask:d,state:f,target:g,to:v,preventScrollReset:_,viewTransition:j,unstable_defaultShouldRevalidate:w,...k},L){let{basename:R,navigator:E,unstable_useTransitions:Y}=ae.useContext(xi),H=typeof v=="string"&&f5.test(v),F=e5(v,R);v=F.to;let X=rx(v,{relative:o}),_e=Qi(),xe=null;if(d){let ve=_0(d,[],_e.unstable_mask?_e.unstable_mask.pathname:"/",!0);R!=="/"&&(ve.pathname=ve.pathname==="/"?R:js([R,ve.pathname])),xe=E.createHref(ve)}let[oe,Z,ge]=zx(i,k),O=Vx(v,{replace:h,unstable_mask:d,state:f,target:g,preventScrollReset:_,relative:o,viewTransition:j,unstable_defaultShouldRevalidate:w,unstable_useTransitions:Y});function U(ve){n&&n(ve),ve.defaultPrevented||O(ve)}let ne=!(F.isExternal||u),re=ae.createElement("a",{...k,...ge,href:(ne?xe:void 0)||F.absoluteURL||X,onClick:ne?U:n,ref:Fx(L,Z),target:g,"data-discover":!H&&a==="render"?"true":void 0});return oe&&!H?ae.createElement(ae.Fragment,null,re,ae.createElement(Bx,{page:X})):re});Ns.displayName="Link";var Wx=ae.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:u,to:h,viewTransition:d,children:f,...g},v){let _=Nf(h,{relative:g.relative}),j=Qi(),w=ae.useContext(ih),{navigator:k,basename:L}=ae.useContext(xi),R=w!=null&&Zx(_)&&d===!0,E=k.encodeLocation?k.encodeLocation(_).pathname:_.pathname,Y=j.pathname,H=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;a||(Y=Y.toLowerCase(),H=H?H.toLowerCase():null,E=E.toLowerCase()),H&&L&&(H=vo(H,L)||H);const F=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let X=Y===E||!o&&Y.startsWith(E)&&Y.charAt(F)==="/",_e=H!=null&&(H===E||!o&&H.startsWith(E)&&H.charAt(E.length)==="/"),xe={isActive:X,isPending:_e,isTransitioning:R},oe=X?n:void 0,Z;typeof i=="function"?Z=i(xe):Z=[i,X?"active":null,_e?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ge=typeof u=="function"?u(xe):u;return ae.createElement(Ns,{...g,"aria-current":oe,className:Z,ref:v,style:ge,to:h,viewTransition:d},typeof f=="function"?f(xe):f)});Wx.displayName="NavLink";var Yx=ae.forwardRef(({discover:t="render",fetcherKey:n,navigate:a,reloadDocument:i,replace:o,state:u,method:h=Pd,action:d,onSubmit:f,relative:g,preventScrollReset:v,viewTransition:_,unstable_defaultShouldRevalidate:j,...w},k)=>{let{unstable_useTransitions:L}=ae.useContext(xi),R=Kx(),E=$x(d,{relative:g}),Y=h.toLowerCase()==="get"?"get":"post",H=typeof d=="string"&&f5.test(d),F=X=>{if(f&&f(X),X.defaultPrevented)return;X.preventDefault();let _e=X.nativeEvent.submitter,xe=_e?.getAttribute("formmethod")||h,oe=()=>R(_e||X.currentTarget,{fetcherKey:n,method:xe,navigate:a,replace:o,state:u,relative:g,preventScrollReset:v,viewTransition:_,unstable_defaultShouldRevalidate:j});L&&a!==!1?ae.startTransition(()=>oe()):oe()};return ae.createElement("form",{ref:k,method:Y,action:E,onSubmit:i?f:F,...w,"data-discover":!H&&t==="render"?"true":void 0})});Yx.displayName="Form";function Gx(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function d5(t){let n=ae.useContext(lc);return er(n,Gx(t)),n}function Vx(t,{target:n,replace:a,unstable_mask:i,state:o,preventScrollReset:u,relative:h,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:g}={}){let v=uc(),_=Qi(),j=Nf(t,{relative:h});return ae.useCallback(w=>{if(Ax(w,n)){w.preventDefault();let k=a!==void 0?a:yf(_)===yf(j),L=()=>v(t,{replace:k,unstable_mask:i,state:o,preventScrollReset:u,relative:h,viewTransition:d,unstable_defaultShouldRevalidate:f});g?ae.startTransition(()=>L()):L()}},[_,v,j,a,i,o,n,t,u,h,d,f,g])}var Qx=0,Xx=()=>`__${String(++Qx)}__`;function Kx(){let{router:t}=d5("useSubmit"),{basename:n}=ae.useContext(xi),a=px(),i=t.fetch,o=t.navigate;return ae.useCallback(async(u,h={})=>{let{action:d,method:f,encType:g,formData:v,body:_}=Nx(u,n);if(h.navigate===!1){let j=h.fetcherKey||Xx();await i(j,a,h.action||d,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:v,body:_,formMethod:h.method||f,formEncType:h.encType||g,flushSync:h.flushSync})}else await o(h.action||d,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:v,body:_,formMethod:h.method||f,formEncType:h.encType||g,replace:h.replace,state:h.state,fromRouteId:a,flushSync:h.flushSync,viewTransition:h.viewTransition})},[i,o,n,a])}function $x(t,{relative:n}={}){let{basename:a}=ae.useContext(xi),i=ae.useContext(Es);er(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={...Nf(t||".",{relative:n})},h=Qi();if(t==null){u.search=h.search;let d=new URLSearchParams(u.search),f=d.getAll("index");if(f.some(v=>v==="")){d.delete("index"),f.filter(_=>_).forEach(_=>d.append("index",_));let v=d.toString();u.search=v?`?${v}`:""}}return(!t||t===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:js([a,u.pathname])),yf(u)}function Zx(t,{relative:n}={}){let a=ae.useContext(r5);er(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=d5("useViewTransitionState"),o=Nf(t,{relative:n});if(!a.isTransitioning)return!1;let u=vo(a.currentLocation.pathname,i)||a.currentLocation.pathname,h=vo(a.nextLocation.pathname,i)||a.nextLocation.pathname;return Xd(o.pathname,h)!=null||Xd(o.pathname,u)!=null}const Jx="";async function ln(t,n){const a=await fetch(Jx+t,{...n,headers:{"Content-Type":"application/json",...n?.headers}});if(!a.ok)throw new Error(`API error ${a.status}: ${await a.text()}`);return a.json()}const cn={getProjects:()=>ln("/api/projects"),getProject:t=>ln(`/api/projects/${t}`),getSessions:(t={})=>{const n=new URLSearchParams(Object.entries(t).map(([a,i])=>[a,String(i)]));return ln(`/api/sessions?${n}`)},getSession:t=>ln(`/api/sessions/${t}`),getHealth:()=>ln("/api/health"),getContext:(t,n=3)=>ln(`/api/context?cwd=${encodeURIComponent(t)}&n=${n}`),search:(t,n)=>ln("/api/search",{method:"POST",body:JSON.stringify({query:t,project_id:n})}),getObservations:t=>ln(`/api/observations?session_id=${t}`),getMemory:t=>ln(`/api/memory?project_id=${t}`),getPreferences:t=>ln(`/api/memory/preferences?project_id=${t}`),getKnowledge:(t,n)=>ln(`/api/memory/knowledge?project_id=${t}${n?`&category=${n}`:""}`),getPatterns:(t,n)=>ln(`/api/memory/patterns?project_id=${t}${n?`&type=${n}`:""}`),getTasks:(t,n)=>ln(`/api/memory/tasks?project_id=${t}${n?`&status=${n}`:""}`),getContacts:t=>ln(`/api/memory/contacts?project_id=${t}`),getMetrics:async()=>(await ln("/api/metrics")).metrics,consolidateMemory:t=>ln(`/api/consolidate/${t}`,{method:"POST"}),resyncProject:(t,n)=>ln(`/api/resync/${t}${n?"?force=true":""}`,{method:"POST"}),resyncSession:t=>ln(`/api/resync/session/${t}`,{method:"POST"}),syncSession:t=>ln(`/api/sessions/${t}/sync`,{method:"POST"}),updateSessionActivity:t=>ln(`/api/sessions/${t}/activity`,{method:"POST"}),resyncAll:t=>ln(`/api/resync/all${t?"?force=true":""}`,{method:"POST"}),forceEndSession:t=>ln(`/api/force-end-session/${t}`,{method:"POST"}),deleteSession:t=>ln(`/api/sessions/${t}`,{method:"DELETE"}),toggleBookmark:(t,n)=>ln(`/api/sessions/${t}/bookmark`,{method:"POST",body:JSON.stringify({bookmarked:n})}),getTags:t=>ln(`/api/tags?project_id=${t}`),createTag:(t,n,a)=>ln("/api/tags",{method:"POST",body:JSON.stringify({project_id:t,name:n,color:a})}),deleteTag:t=>ln(`/api/tags/${t}`,{method:"DELETE"}),getSessionTags:t=>ln(`/api/tags/session/${t}`),addSessionTag:(t,n)=>ln(`/api/tags/session/${t}`,{method:"POST",body:JSON.stringify({tag_id:n})}),removeSessionTag:(t,n)=>ln(`/api/tags/session/${t}/${n}`,{method:"DELETE"}),updateSessionNotes:(t,n)=>ln(`/api/sessions/${t}/notes`,{method:"POST",body:JSON.stringify({notes:n})}),toggleArchive:(t,n)=>ln(`/api/sessions/${t}/archive`,{method:"POST",body:JSON.stringify({archived:n})}),getSettings:()=>ln("/api/settings"),updateSettings:t=>ln("/api/settings",{method:"POST",body:JSON.stringify(t)})};function M0(){const t=location.protocol==="https:"?"wss:":"ws:";return new WebSocket(`${t}//${location.host}`)}/**
|
|
61
|
+
* @license lucide-react v1.7.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 h5=(...t)=>t.filter((n,a,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===a).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v1.7.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 e3=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
+
* @license lucide-react v1.7.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 t3=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,i)=>i?i.toUpperCase():a.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v1.7.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 dg=t=>{const n=t3(t);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
81
|
+
* @license lucide-react v1.7.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
|
+
*/var A1={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"};/**
|
|
86
|
+
* @license lucide-react v1.7.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 n3=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},r3=ae.createContext({}),a3=()=>ae.useContext(r3),i3=ae.forwardRef(({color:t,size:n,strokeWidth:a,absoluteStrokeWidth:i,className:o="",children:u,iconNode:h,...d},f)=>{const{size:g=24,strokeWidth:v=2,absoluteStrokeWidth:_=!1,color:j="currentColor",className:w=""}=a3()??{},k=i??_?Number(a??v)*24/Number(n??g):a??v;return ae.createElement("svg",{ref:f,...A1,width:n??g??A1.width,height:n??g??A1.height,stroke:t??j,strokeWidth:k,className:h5("lucide",w,o),...!u&&!n3(d)&&{"aria-hidden":"true"},...d},[...h.map(([L,R])=>ae.createElement(L,R)),...Array.isArray(u)?u:[u]])});/**
|
|
91
|
+
* @license lucide-react v1.7.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 ct=(t,n)=>{const a=ae.forwardRef(({className:i,...o},u)=>ae.createElement(i3,{ref:u,iconNode:n,className:h5(`lucide-${e3(dg(t))}`,`lucide-${t}`,i),...o}));return a.displayName=dg(t),a};/**
|
|
96
|
+
* @license lucide-react v1.7.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 s3=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],o3=ct("activity",s3);/**
|
|
101
|
+
* @license lucide-react v1.7.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 l3=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],u3=ct("archive-restore",l3);/**
|
|
106
|
+
* @license lucide-react v1.7.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 c3=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],f3=ct("archive",c3);/**
|
|
111
|
+
* @license lucide-react v1.7.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 d3=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],h3=ct("arrow-down",d3);/**
|
|
116
|
+
* @license lucide-react v1.7.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 p3=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],R0=ct("arrow-left",p3);/**
|
|
121
|
+
* @license lucide-react v1.7.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 g3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],m3=ct("arrow-right",g3);/**
|
|
126
|
+
* @license lucide-react v1.7.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 y3=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],v3=ct("arrow-up",y3);/**
|
|
131
|
+
* @license lucide-react v1.7.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 b3=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],hg=ct("book-open",b3);/**
|
|
136
|
+
* @license lucide-react v1.7.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 x3=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],vf=ct("brain",x3);/**
|
|
141
|
+
* @license lucide-react v1.7.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 w3=[["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"}]],Kd=ct("calendar",w3);/**
|
|
146
|
+
* @license lucide-react v1.7.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 S3=[["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"}]],O0=ct("chart-column",S3);/**
|
|
151
|
+
* @license lucide-react v1.7.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 _3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],p5=ct("check",_3);/**
|
|
156
|
+
* @license lucide-react v1.7.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 A3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],j3=ct("chevron-down",A3);/**
|
|
161
|
+
* @license lucide-react v1.7.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 k3=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],N3=ct("chevron-left",k3);/**
|
|
166
|
+
* @license lucide-react v1.7.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 L3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],E3=ct("chevron-right",L3);/**
|
|
171
|
+
* @license lucide-react v1.7.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 T3=[["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"}]],ac=ct("circle-alert",T3);/**
|
|
176
|
+
* @license lucide-react v1.7.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 C3=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],bl=ct("circle-check-big",C3);/**
|
|
181
|
+
* @license lucide-react v1.7.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 M3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],r0=ct("circle-check",M3);/**
|
|
186
|
+
* @license lucide-react v1.7.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 R3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],g5=ct("circle",R3);/**
|
|
191
|
+
* @license lucide-react v1.7.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 O3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Ts=ct("clock",O3);/**
|
|
196
|
+
* @license lucide-react v1.7.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 D3=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],z3=ct("code-xml",D3);/**
|
|
201
|
+
* @license lucide-react v1.7.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 B3=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],m5=ct("copy",B3);/**
|
|
206
|
+
* @license lucide-react v1.7.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 P3=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],oh=ct("download",P3);/**
|
|
211
|
+
* @license lucide-react v1.7.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 q3=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],U3=ct("file-pen",q3);/**
|
|
216
|
+
* @license lucide-react v1.7.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 F3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],I3=ct("file-search",F3);/**
|
|
221
|
+
* @license lucide-react v1.7.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 H3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],vi=ct("file-text",H3);/**
|
|
226
|
+
* @license lucide-react v1.7.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 W3=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],y5=ct("flame",W3);/**
|
|
231
|
+
* @license lucide-react v1.7.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 Y3=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],v5=ct("folder-git-2",Y3);/**
|
|
236
|
+
* @license lucide-react v1.7.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 G3=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],b5=ct("folder-open",G3);/**
|
|
241
|
+
* @license lucide-react v1.7.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 V3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],Q3=ct("frown",V3);/**
|
|
246
|
+
* @license lucide-react v1.7.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 X3=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],x5=ct("git-branch",X3);/**
|
|
251
|
+
* @license lucide-react v1.7.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 K3=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],$3=ct("layers",K3);/**
|
|
256
|
+
* @license lucide-react v1.7.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 Z3=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],J3=ct("layout-grid",Z3);/**
|
|
261
|
+
* @license lucide-react v1.7.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 e4=[["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"}]],a0=ct("lightbulb",e4);/**
|
|
266
|
+
* @license lucide-react v1.7.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 t4=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],n4=ct("link-2",t4);/**
|
|
271
|
+
* @license lucide-react v1.7.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 r4=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],a4=ct("list",r4);/**
|
|
276
|
+
* @license lucide-react v1.7.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const i4=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],s4=ct("loader",i4);/**
|
|
281
|
+
* @license lucide-react v1.7.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 o4=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],l4=ct("menu",o4);/**
|
|
286
|
+
* @license lucide-react v1.7.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 u4=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],w5=ct("message-square",u4);/**
|
|
291
|
+
* @license lucide-react v1.7.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 c4=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],f4=ct("monitor",c4);/**
|
|
296
|
+
* @license lucide-react v1.7.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 d4=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],h4=ct("moon",d4);/**
|
|
301
|
+
* @license lucide-react v1.7.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 p4=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],g4=ct("pause",p4);/**
|
|
306
|
+
* @license lucide-react v1.7.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 m4=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],y4=ct("play",m4);/**
|
|
311
|
+
* @license lucide-react v1.7.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 v4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],pg=ct("plus",v4);/**
|
|
316
|
+
* @license lucide-react v1.7.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 b4=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],bf=ct("radio",b4);/**
|
|
321
|
+
* @license lucide-react v1.7.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 x4=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ml=ct("refresh-cw",x4);/**
|
|
326
|
+
* @license lucide-react v1.7.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 w4=[["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"}]],S4=ct("save",w4);/**
|
|
331
|
+
* @license lucide-react v1.7.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 _4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],D0=ct("search",_4);/**
|
|
336
|
+
* @license lucide-react v1.7.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 A4=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],S5=ct("settings",A4);/**
|
|
341
|
+
* @license lucide-react v1.7.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 j4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],k4=ct("smile",j4);/**
|
|
346
|
+
* @license lucide-react v1.7.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 N4=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],$d=ct("square-check-big",N4);/**
|
|
351
|
+
* @license lucide-react v1.7.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 L4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],_5=ct("square",L4);/**
|
|
356
|
+
* @license lucide-react v1.7.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 E4=[["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"}]],A5=ct("star",E4);/**
|
|
361
|
+
* @license lucide-react v1.7.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 T4=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],C4=ct("sun",T4);/**
|
|
366
|
+
* @license lucide-react v1.7.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 M4=[["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"}]],j5=ct("tag",M4);/**
|
|
371
|
+
* @license lucide-react v1.7.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 R4=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],O4=ct("terminal",R4);/**
|
|
376
|
+
* @license lucide-react v1.7.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 D4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],k5=ct("trash-2",D4);/**
|
|
381
|
+
* @license lucide-react v1.7.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 z4=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],yl=ct("trending-up",z4);/**
|
|
386
|
+
* @license lucide-react v1.7.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 B4=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],P4=ct("triangle-alert",B4);/**
|
|
391
|
+
* @license lucide-react v1.7.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 q4=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],gg=ct("users",q4);/**
|
|
396
|
+
* @license lucide-react v1.7.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 U4=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ls=ct("wrench",U4);/**
|
|
401
|
+
* @license lucide-react v1.7.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 F4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ti=ct("x",F4);/**
|
|
406
|
+
* @license lucide-react v1.7.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 I4=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],xf=ct("zap",I4);function H4(){const[t,n]=ae.useState(()=>localStorage.getItem("theme")||"system");return ae.useEffect(()=>{const a=document.documentElement,i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(t==="system"?i:t)==="dark"?a.classList.add("dark"):a.classList.remove("dark"),localStorage.setItem("theme",t)},[t]),ae.useEffect(()=>{if(t!=="system")return;const a=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const o=document.documentElement;a.matches?o.classList.add("dark"):o.classList.remove("dark")};return a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[t]),{theme:t,setTheme:n}}function W4(){const{theme:t,setTheme:n}=H4(),a=[{value:"light",icon:C4,label:"Light"},{value:"dark",icon:h4,label:"Dark"},{value:"system",icon:f4,label:"System"}];return m.jsx("div",{style:{display:"flex",gap:4,padding:"8px",background:"var(--surface2)",borderRadius:8},children:a.map(({value:i,icon:o,label:u})=>m.jsx("button",{onClick:()=>n(i),title:u,style:{padding:"6px 8px",background:t===i?"var(--accent)":"transparent",color:t===i?"white":"var(--text-muted)",border:"none",borderRadius:6,cursor:"pointer",display:"flex",alignItems:"center",transition:"all 0.15s"},children:m.jsx(o,{size:16})},i))})}function Y4({children:t}){const n=Qi(),[a,i]=ae.useState(!1),{data:o}=va({queryKey:["health"],queryFn:cn.getHealth,refetchInterval:1e4}),u=[{path:"/",icon:b5,label:"Projects"},{path:"/search",icon:D0,label:"Search"},{path:"/live",icon:bf,label:"Live"},{path:"/metrics",icon:O0,label:"Metrics"},{path:"/logs",icon:vi,label:"Logs"},{path:"/settings",icon:S5,label:"Settings"}];return m.jsxs("div",{style:{display:"flex",minHeight:"100vh",position:"relative"},children:[m.jsx("button",{onClick:()=>i(!a),style:{position:"fixed",top:16,left:16,zIndex:1001,display:"none",padding:8,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",cursor:"pointer"},className:"mobile-only",children:a?m.jsx(ti,{size:20}):m.jsx(l4,{size:20})}),a&&m.jsx("div",{onClick:()=>i(!1),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:999,display:"none"},className:"mobile-only"}),m.jsxs("aside",{style:{width:240,background:"var(--surface)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",flexShrink:0,position:"fixed",height:"100vh",left:0,top:0,zIndex:1e3,transition:"left 0.3s ease"},className:"sidebar",children:[m.jsxs("div",{style:{padding:"24px 20px 20px",borderBottom:"1px solid var(--border)"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[m.jsx(xf,{size:22,color:"var(--accent)"}),m.jsx("span",{style:{fontWeight:700,fontSize:17,color:"var(--text)"},children:"MemCTX"})]}),m.jsxs("div",{style:{marginTop:10,fontSize:12,color:o?.status==="ok"?"var(--green)":"var(--red)",display:"flex",alignItems:"center",gap:6},children:[m.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:o?.status==="ok"?"var(--green)":"var(--red)",display:"inline-block"}}),o?.status==="ok"?"Worker online":"Connecting..."]})]}),m.jsx("nav",{style:{padding:"12px 10px",flex:1},children:u.map(({path:h,icon:d,label:f})=>{const g=n.pathname===h||h!=="/"&&n.pathname.startsWith(h);return m.jsxs(Ns,{to:h,onClick:()=>i(!1),style:{display:"flex",alignItems:"center",gap:12,padding:"10px 12px",borderRadius:8,marginBottom:4,color:g?"var(--text)":"var(--text-muted)",background:g?"var(--surface2)":"transparent",transition:"all 0.15s",fontSize:14,fontWeight:g?600:500},children:[m.jsx(d,{size:17}),f]},h)})}),m.jsxs("div",{style:{padding:"16px 20px",borderTop:"1px solid var(--border)"},children:[m.jsx(W4,{}),o&&m.jsxs("div",{style:{marginTop:16,fontSize:12,color:"var(--text-muted)",lineHeight:1.8},children:[m.jsxs("div",{children:["DB: ",o.db]}),m.jsxs("div",{children:["AI: ",o.api_key?"enabled":"no key"]}),m.jsxs("div",{children:["Queue: ",o.queue_size??0," pending"]}),m.jsxs("div",{children:["v",o.version]})]})]})]}),m.jsx("main",{style:{flex:1,overflow:"auto",minWidth:0,marginLeft:240,paddingBottom:60,transition:"margin-left 0.3s ease"},className:"main-content",children:t}),m.jsx("style",{children:`
|
|
411
|
+
@media (max-width: 768px) {
|
|
412
|
+
.mobile-only {
|
|
413
|
+
display: block !important;
|
|
414
|
+
}
|
|
415
|
+
.sidebar {
|
|
416
|
+
left: ${a?"0":"-240px"} !important;
|
|
417
|
+
}
|
|
418
|
+
.main-content {
|
|
419
|
+
margin-left: 0 !important;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
`})]})}const N5=6048e5,G4=864e5,mg=6e4,yg=525600,Zu=43200,Zd=1440,vg=Symbol.for("constructDateFrom");function bo(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&vg in t?t[vg](n):t instanceof Date?new t.constructor(n):new Date(n)}function Fr(t,n){return bo(n||t,t)}let V4={};function cc(){return V4}function wf(t,n){const a=cc(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,o=Fr(t,n?.in),u=o.getDay(),h=(u<i?7:0)+u-i;return o.setDate(o.getDate()-h),o.setHours(0,0,0,0),o}function Jd(t,n){return wf(t,{...n,weekStartsOn:1})}function L5(t,n){const a=Fr(t,n?.in),i=a.getFullYear(),o=bo(a,0);o.setFullYear(i+1,0,4),o.setHours(0,0,0,0);const u=Jd(o),h=bo(a,0);h.setFullYear(i,0,4),h.setHours(0,0,0,0);const d=Jd(h);return a.getTime()>=u.getTime()?i+1:a.getTime()>=d.getTime()?i:i-1}function ic(t){const n=Fr(t),a=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return a.setUTCFullYear(n.getFullYear()),+t-+a}function Lf(t,...n){const a=bo.bind(null,t||n.find(i=>typeof i=="object"));return n.map(a)}function i0(t,n){const a=Fr(t,n?.in);return a.setHours(0,0,0,0),a}function Q4(t,n,a){const[i,o]=Lf(a?.in,t,n),u=i0(i),h=i0(o),d=+u-ic(u),f=+h-ic(h);return Math.round((d-f)/G4)}function X4(t,n){const a=L5(t,n),i=bo(t,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),Jd(i)}function df(t,n){const a=+Fr(t)-+Fr(n);return a<0?-1:a>0?1:a}function K4(t){return bo(t,Date.now())}function $4(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Z4(t){return!(!$4(t)&&typeof t!="number"||isNaN(+Fr(t)))}function J4(t,n,a){const[i,o]=Lf(a?.in,t,n),u=i.getFullYear()-o.getFullYear(),h=i.getMonth()-o.getMonth();return u*12+h}function E5(t){return n=>{const i=(t?Math[t]:Math.trunc)(n);return i===0?0:i}}function e6(t,n){return+Fr(t)-+Fr(n)}function t6(t,n){const a=Fr(t,n?.in);return a.setHours(23,59,59,999),a}function n6(t,n){const a=Fr(t,n?.in),i=a.getMonth();return a.setFullYear(a.getFullYear(),i+1,0),a.setHours(23,59,59,999),a}function r6(t,n){const a=Fr(t,n?.in);return+t6(a,n)==+n6(a,n)}function a6(t,n,a){const[i,o,u]=Lf(a?.in,t,t,n),h=df(o,u),d=Math.abs(J4(o,u));if(d<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-h*d);let f=df(o,u)===-h;r6(i)&&d===1&&df(i,u)===1&&(f=!1);const g=h*(d-+f);return g===0?0:g}function i6(t,n,a){const i=e6(t,n)/1e3;return E5(a?.roundingMethod)(i)}function s6(t,n){const a=Fr(t,n?.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const o6={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"}},l6=(t,n,a)=>{let i;const o=o6[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+i:i+" ago":i};function j1(t){return(n={})=>{const a=n.width?String(n.width):t.defaultWidth;return t.formats[a]||t.formats[t.defaultWidth]}}const u6={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},c6={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},f6={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d6={date:j1({formats:u6,defaultWidth:"full"}),time:j1({formats:c6,defaultWidth:"full"}),dateTime:j1({formats:f6,defaultWidth:"full"})},h6={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},p6=(t,n,a,i)=>h6[t];function nf(t){return(n,a)=>{const i=a?.context?String(a.context):"standalone";let o;if(i==="formatting"&&t.formattingValues){const h=t.defaultFormattingWidth||t.defaultWidth,d=a?.width?String(a.width):h;o=t.formattingValues[d]||t.formattingValues[h]}else{const h=t.defaultWidth,d=a?.width?String(a.width):t.defaultWidth;o=t.values[d]||t.values[h]}const u=t.argumentCallback?t.argumentCallback(n):n;return o[u]}}const g6={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},m6={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},y6={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"]},v6={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},b6={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"}},x6={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"}},w6=(t,n)=>{const a=Number(t),i=a%100;if(i>20||i<10)switch(i%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},S6={ordinalNumber:w6,era:nf({values:g6,defaultWidth:"wide"}),quarter:nf({values:m6,defaultWidth:"wide",argumentCallback:t=>t-1}),month:nf({values:y6,defaultWidth:"wide"}),day:nf({values:v6,defaultWidth:"wide"}),dayPeriod:nf({values:b6,defaultWidth:"wide",formattingValues:x6,defaultFormattingWidth:"wide"})};function rf(t){return(n,a={})=>{const i=a.width,o=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],u=n.match(o);if(!u)return null;const h=u[0],d=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(d)?A6(d,_=>_.test(h)):_6(d,_=>_.test(h));let g;g=t.valueCallback?t.valueCallback(f):f,g=a.valueCallback?a.valueCallback(g):g;const v=n.slice(h.length);return{value:g,rest:v}}}function _6(t,n){for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&n(t[a]))return a}function A6(t,n){for(let a=0;a<t.length;a++)if(n(t[a]))return a}function j6(t){return(n,a={})=>{const i=n.match(t.matchPattern);if(!i)return null;const o=i[0],u=n.match(t.parsePattern);if(!u)return null;let h=t.valueCallback?t.valueCallback(u[0]):u[0];h=a.valueCallback?a.valueCallback(h):h;const d=n.slice(o.length);return{value:h,rest:d}}}const k6=/^(\d+)(th|st|nd|rd)?/i,N6=/\d+/i,L6={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},E6={any:[/^b/i,/^(a|c)/i]},T6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},C6={any:[/1/i,/2/i,/3/i,/4/i]},M6={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},R6={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]},O6={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},D6={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]},z6={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},B6={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}},P6={ordinalNumber:j6({matchPattern:k6,parsePattern:N6,valueCallback:t=>parseInt(t,10)}),era:rf({matchPatterns:L6,defaultMatchWidth:"wide",parsePatterns:E6,defaultParseWidth:"any"}),quarter:rf({matchPatterns:T6,defaultMatchWidth:"wide",parsePatterns:C6,defaultParseWidth:"any",valueCallback:t=>t+1}),month:rf({matchPatterns:M6,defaultMatchWidth:"wide",parsePatterns:R6,defaultParseWidth:"any"}),day:rf({matchPatterns:O6,defaultMatchWidth:"wide",parsePatterns:D6,defaultParseWidth:"any"}),dayPeriod:rf({matchPatterns:z6,defaultMatchWidth:"any",parsePatterns:B6,defaultParseWidth:"any"})},z0={code:"en-US",formatDistance:l6,formatLong:d6,formatRelative:p6,localize:S6,match:P6,options:{weekStartsOn:0,firstWeekContainsDate:1}};function q6(t,n){const a=Fr(t,n?.in);return Q4(a,s6(a))+1}function U6(t,n){const a=Fr(t,n?.in),i=+Jd(a)-+X4(a);return Math.round(i/N5)+1}function T5(t,n){const a=Fr(t,n?.in),i=a.getFullYear(),o=cc(),u=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,h=bo(n?.in||t,0);h.setFullYear(i+1,0,u),h.setHours(0,0,0,0);const d=wf(h,n),f=bo(n?.in||t,0);f.setFullYear(i,0,u),f.setHours(0,0,0,0);const g=wf(f,n);return+a>=+d?i+1:+a>=+g?i:i-1}function F6(t,n){const a=cc(),i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=T5(t,n),u=bo(n?.in||t,0);return u.setFullYear(o,0,i),u.setHours(0,0,0,0),wf(u,n)}function I6(t,n){const a=Fr(t,n?.in),i=+wf(a,n)-+F6(a,n);return Math.round(i/N5)+1}function wn(t,n){const a=t<0?"-":"",i=Math.abs(t).toString().padStart(n,"0");return a+i}const fl={y(t,n){const a=t.getFullYear(),i=a>0?a:1-a;return wn(n==="yy"?i%100:i,n.length)},M(t,n){const a=t.getMonth();return n==="M"?String(a+1):wn(a+1,2)},d(t,n){return wn(t.getDate(),n.length)},a(t,n){const a=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];default:return a==="am"?"a.m.":"p.m."}},h(t,n){return wn(t.getHours()%12||12,n.length)},H(t,n){return wn(t.getHours(),n.length)},m(t,n){return wn(t.getMinutes(),n.length)},s(t,n){return wn(t.getSeconds(),n.length)},S(t,n){const a=n.length,i=t.getMilliseconds(),o=Math.trunc(i*Math.pow(10,a-3));return wn(o,n.length)}},Yu={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bg={G:function(t,n,a){const i=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return a.era(i,{width:"abbreviated"});case"GGGGG":return a.era(i,{width:"narrow"});default:return a.era(i,{width:"wide"})}},y:function(t,n,a){if(n==="yo"){const i=t.getFullYear(),o=i>0?i:1-i;return a.ordinalNumber(o,{unit:"year"})}return fl.y(t,n)},Y:function(t,n,a,i){const o=T5(t,i),u=o>0?o:1-o;if(n==="YY"){const h=u%100;return wn(h,2)}return n==="Yo"?a.ordinalNumber(u,{unit:"year"}):wn(u,n.length)},R:function(t,n){const a=L5(t);return wn(a,n.length)},u:function(t,n){const a=t.getFullYear();return wn(a,n.length)},Q:function(t,n,a){const i=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return wn(i,2);case"Qo":return a.ordinalNumber(i,{unit:"quarter"});case"QQQ":return a.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(i,{width:"narrow",context:"formatting"});default:return a.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,a){const i=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return wn(i,2);case"qo":return a.ordinalNumber(i,{unit:"quarter"});case"qqq":return a.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(i,{width:"narrow",context:"standalone"});default:return a.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,a){const i=t.getMonth();switch(n){case"M":case"MM":return fl.M(t,n);case"Mo":return a.ordinalNumber(i+1,{unit:"month"});case"MMM":return a.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(i,{width:"narrow",context:"formatting"});default:return a.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,a){const i=t.getMonth();switch(n){case"L":return String(i+1);case"LL":return wn(i+1,2);case"Lo":return a.ordinalNumber(i+1,{unit:"month"});case"LLL":return a.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(i,{width:"narrow",context:"standalone"});default:return a.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,a,i){const o=I6(t,i);return n==="wo"?a.ordinalNumber(o,{unit:"week"}):wn(o,n.length)},I:function(t,n,a){const i=U6(t);return n==="Io"?a.ordinalNumber(i,{unit:"week"}):wn(i,n.length)},d:function(t,n,a){return n==="do"?a.ordinalNumber(t.getDate(),{unit:"date"}):fl.d(t,n)},D:function(t,n,a){const i=q6(t);return n==="Do"?a.ordinalNumber(i,{unit:"dayOfYear"}):wn(i,n.length)},E:function(t,n,a){const i=t.getDay();switch(n){case"E":case"EE":case"EEE":return a.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(i,{width:"short",context:"formatting"});default:return a.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,a,i){const o=t.getDay(),u=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(u);case"ee":return wn(u,2);case"eo":return a.ordinalNumber(u,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});default:return a.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,a,i){const o=t.getDay(),u=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(u);case"cc":return wn(u,n.length);case"co":return a.ordinalNumber(u,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});default:return a.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,a){const i=t.getDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return wn(o,n.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(i,{width:"short",context:"formatting"});default:return a.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,a){const o=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,a){const i=t.getHours();let o;switch(i===12?o=Yu.noon:i===0?o=Yu.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,a){const i=t.getHours();let o;switch(i>=17?o=Yu.evening:i>=12?o=Yu.afternoon:i>=4?o=Yu.morning:o=Yu.night,n){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,a){if(n==="ho"){let i=t.getHours()%12;return i===0&&(i=12),a.ordinalNumber(i,{unit:"hour"})}return fl.h(t,n)},H:function(t,n,a){return n==="Ho"?a.ordinalNumber(t.getHours(),{unit:"hour"}):fl.H(t,n)},K:function(t,n,a){const i=t.getHours()%12;return n==="Ko"?a.ordinalNumber(i,{unit:"hour"}):wn(i,n.length)},k:function(t,n,a){let i=t.getHours();return i===0&&(i=24),n==="ko"?a.ordinalNumber(i,{unit:"hour"}):wn(i,n.length)},m:function(t,n,a){return n==="mo"?a.ordinalNumber(t.getMinutes(),{unit:"minute"}):fl.m(t,n)},s:function(t,n,a){return n==="so"?a.ordinalNumber(t.getSeconds(),{unit:"second"}):fl.s(t,n)},S:function(t,n){return fl.S(t,n)},X:function(t,n,a){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(n){case"X":return wg(i);case"XXXX":case"XX":return Hl(i);default:return Hl(i,":")}},x:function(t,n,a){const i=t.getTimezoneOffset();switch(n){case"x":return wg(i);case"xxxx":case"xx":return Hl(i);default:return Hl(i,":")}},O:function(t,n,a){const i=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+xg(i,":");default:return"GMT"+Hl(i,":")}},z:function(t,n,a){const i=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+xg(i,":");default:return"GMT"+Hl(i,":")}},t:function(t,n,a){const i=Math.trunc(+t/1e3);return wn(i,n.length)},T:function(t,n,a){return wn(+t,n.length)}};function xg(t,n=""){const a=t>0?"-":"+",i=Math.abs(t),o=Math.trunc(i/60),u=i%60;return u===0?a+String(o):a+String(o)+n+wn(u,2)}function wg(t,n){return t%60===0?(t>0?"-":"+")+wn(Math.abs(t)/60,2):Hl(t,n)}function Hl(t,n=""){const a=t>0?"-":"+",i=Math.abs(t),o=wn(Math.trunc(i/60),2),u=wn(i%60,2);return a+o+n+u}const Sg=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},C5=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},H6=(t,n)=>{const a=t.match(/(P+)(p+)?/)||[],i=a[1],o=a[2];if(!o)return Sg(t,n);let u;switch(i){case"P":u=n.dateTime({width:"short"});break;case"PP":u=n.dateTime({width:"medium"});break;case"PPP":u=n.dateTime({width:"long"});break;default:u=n.dateTime({width:"full"});break}return u.replace("{{date}}",Sg(i,n)).replace("{{time}}",C5(o,n))},W6={p:C5,P:H6},Y6=/^D+$/,G6=/^Y+$/,V6=["D","DD","YY","YYYY"];function Q6(t){return Y6.test(t)}function X6(t){return G6.test(t)}function K6(t,n,a){const i=$6(t,n,a);if(console.warn(i),V6.includes(t))throw new RangeError(i)}function $6(t,n,a){const i=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${i} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Z6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,J6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ew=/^'([^]*?)'?$/,tw=/''/g,nw=/[a-zA-Z]/;function yo(t,n,a){const i=cc(),o=i.locale??z0,u=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,h=i.weekStartsOn??i.locale?.options?.weekStartsOn??0,d=Fr(t,a?.in);if(!Z4(d))throw new RangeError("Invalid time value");let f=n.match(J6).map(v=>{const _=v[0];if(_==="p"||_==="P"){const j=W6[_];return j(v,o.formatLong)}return v}).join("").match(Z6).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const _=v[0];if(_==="'")return{isToken:!1,value:rw(v)};if(bg[_])return{isToken:!0,value:v};if(_.match(nw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:v}});o.localize.preprocessor&&(f=o.localize.preprocessor(d,f));const g={firstWeekContainsDate:u,weekStartsOn:h,locale:o};return f.map(v=>{if(!v.isToken)return v.value;const _=v.value;(X6(_)||Q6(_))&&K6(_,n,String(t));const j=bg[_[0]];return j(d,_,o.localize,g)}).join("")}function rw(t){const n=t.match(ew);return n?n[1].replace(tw,"'"):t}function aw(t,n,a){const i=cc(),o=a?.locale??i.locale??z0,u=2520,h=df(t,n);if(isNaN(h))throw new RangeError("Invalid time value");const d=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:h}),[f,g]=Lf(a?.in,...h>0?[n,t]:[t,n]),v=i6(g,f),_=(ic(g)-ic(f))/1e3,j=Math.round((v-_)/60);let w;if(j<2)return a?.includeSeconds?v<5?o.formatDistance("lessThanXSeconds",5,d):v<10?o.formatDistance("lessThanXSeconds",10,d):v<20?o.formatDistance("lessThanXSeconds",20,d):v<40?o.formatDistance("halfAMinute",0,d):v<60?o.formatDistance("lessThanXMinutes",1,d):o.formatDistance("xMinutes",1,d):j===0?o.formatDistance("lessThanXMinutes",1,d):o.formatDistance("xMinutes",j,d);if(j<45)return o.formatDistance("xMinutes",j,d);if(j<90)return o.formatDistance("aboutXHours",1,d);if(j<Zd){const k=Math.round(j/60);return o.formatDistance("aboutXHours",k,d)}else{if(j<u)return o.formatDistance("xDays",1,d);if(j<Zu){const k=Math.round(j/Zd);return o.formatDistance("xDays",k,d)}else if(j<Zu*2)return w=Math.round(j/Zu),o.formatDistance("aboutXMonths",w,d)}if(w=a6(g,f),w<12){const k=Math.round(j/Zu);return o.formatDistance("xMonths",k,d)}else{const k=w%12,L=Math.trunc(w/12);return k<3?o.formatDistance("aboutXYears",L,d):k<9?o.formatDistance("overXYears",L,d):o.formatDistance("almostXYears",L+1,d)}}function iw(t,n,a){const o=cc().locale??z0,u=df(t,n);if(isNaN(u))throw new RangeError("Invalid time value");const h=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:u}),[d,f]=Lf(a?.in,...u>0?[n,t]:[t,n]),g=E5("round"),v=f.getTime()-d.getTime(),_=v/mg,j=ic(f)-ic(d),w=(v-j)/mg,k=a?.unit;let L;if(_<1?L="second":_<60?L="minute":_<Zd?L="hour":w<Zu?L="day":w<yg?L="month":L="year",L==="second"){const R=g(v/1e3);return o.formatDistance("xSeconds",R,h)}else if(L==="minute"){const R=g(_);return o.formatDistance("xMinutes",R,h)}else if(L==="hour"){const R=g(_/60);return o.formatDistance("xHours",R,h)}else if(L==="day"){const R=g(w/Zd);return o.formatDistance("xDays",R,h)}else if(L==="month"){const R=g(w/Zu);return R===12&&k!=="month"?o.formatDistance("xYears",1,h):o.formatDistance("xMonths",R,h)}else{const R=g(w/yg);return o.formatDistance("xYears",R,h)}}function M5(t,n){return aw(t,K4(t),n)}function eh({isOpen:t,title:n,message:a,confirmText:i="Confirm",cancelText:o="Cancel",confirmColor:u="var(--accent)",onConfirm:h,onCancel:d}){return t?m.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(4px)",zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",padding:20,animation:"fadeIn 0.2s ease-out"},onClick:d,children:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:16,maxWidth:480,width:"100%",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",animation:"scaleIn 0.2s ease-out"},onClick:f=>f.stopPropagation(),children:[m.jsxs("div",{style:{padding:"20px 24px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[m.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"var(--text)"},children:n}),m.jsx("button",{onClick:d,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4,display:"flex",alignItems:"center",borderRadius:6,transition:"background 0.15s"},onMouseEnter:f=>f.currentTarget.style.background="var(--surface2)",onMouseLeave:f=>f.currentTarget.style.background="transparent",children:m.jsx(ti,{size:20})})]}),m.jsx("div",{style:{padding:"24px",fontSize:14,lineHeight:1.6,color:"var(--text)"},children:a}),m.jsxs("div",{style:{padding:"16px 24px",borderTop:"1px solid var(--border)",display:"flex",gap:12,justifyContent:"flex-end"},children:[m.jsx("button",{onClick:d,style:{padding:"10px 20px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,fontWeight:600,color:"var(--text)",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:f=>f.currentTarget.style.background="var(--border)",onMouseLeave:f=>f.currentTarget.style.background="var(--surface2)",children:o}),m.jsx("button",{onClick:h,style:{padding:"10px 20px",background:u,border:"none",borderRadius:8,fontSize:14,fontWeight:600,color:"white",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:f=>f.currentTarget.style.opacity="0.9",onMouseLeave:f=>f.currentTarget.style.opacity="1",children:i})]})]})}):null}function sw({projects:t,onOpenProject:n}){const{data:a}=va({queryKey:["all-sessions"],queryFn:async()=>{const O=t.map(ne=>cn.getSessions({project_id:ne.id,limit:1e3}));return(await Promise.all(O)).flat()},enabled:t.length>0}),i=a||[],o=i.length,u=i.filter(O=>O.status==="completed").length,h=o>0?Math.round(u/o*100):0,d=i.reduce((O,U)=>U.ended_at?O+(U.ended_at-U.started_at):O,0),f=o>0?Math.round(d/o/60):0,g=Math.round(d/3600),_=new Set(i.flatMap(O=>{try{const U=typeof O.summary_files_changed=="string"?JSON.parse(O.summary_files_changed):O.summary_files_changed;return Array.isArray(U)?U:[]}catch{return[]}})).size,j=i.reduce((O,U)=>O+(U.tool_use_count||0),0),w=new Set(i.map(O=>{const U=new Date(O.started_at*1e3);return U.setHours(0,0,0,0),U.getTime()})),k=Array.from(w).sort((O,U)=>U-O);let L=0;const R=new Date;R.setHours(0,0,0,0);const E=R.getTime(),Y=E-864e5;if(k.includes(E)||k.includes(Y)){let O=k.includes(E)?E:Y;for(;k.includes(O);)L++,O-=864e5}const F=Date.now()/1e3-10080*60,X=i.filter(O=>O.started_at>=F),_e={};X.forEach(O=>{const U=new Date(O.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});_e[U]=(_e[U]||0)+1});const xe=[];for(let O=6;O>=0;O--){const ne=new Date(Date.now()-O*24*60*60*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});xe.push({date:ne,count:_e[ne]||0})}const oe=Math.max(...xe.map(O=>O.count),1),Z=t.map(O=>({name:O.name,sessions:(O.sessions||[]).length})).sort((O,U)=>U.sessions-O.sessions),ge=Z[0];return m.jsxs("div",{style:{marginBottom:32},children:[m.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:20,display:"flex",alignItems:"center",gap:8},children:[m.jsx(yl,{size:20}),"Overview Dashboard"]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16,marginBottom:24},children:[m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(bl,{size:16,style:{color:"var(--green)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Total Sessions"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:o}),m.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[h,"% completed"]})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(Ts,{size:16,style:{color:"var(--blue)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Total Time"})]}),m.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[g,"h"]}),m.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[f,"m avg per session"]})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(vi,{size:16,style:{color:"var(--purple)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Files Changed"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:_}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"across all projects"})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(Ls,{size:16,style:{color:"var(--orange)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Tool Uses"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:j}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"total actions"})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(y5,{size:16,style:{color:L>0?"var(--orange)":"var(--text-muted)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Current Streak"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:L>0?"var(--orange)":"var(--text)"},children:L}),m.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[L===1?"day":"days"," in a row"]})]})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(400px, 1fr))",gap:16},children:[m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[m.jsx(yl,{size:16}),"Last 7 Days Activity"]}),m.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:8,height:120},children:xe.map((O,U)=>m.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:4},children:[m.jsx("div",{style:{width:"100%",height:Math.max(O.count/oe*100,4),background:O.count>0?"var(--accent)":"var(--surface2)",borderRadius:4,transition:"all 0.3s",position:"relative"},children:O.count>0&&m.jsx("div",{style:{position:"absolute",top:-20,left:"50%",transform:"translateX(-50%)",fontSize:11,fontWeight:600,color:"var(--text)"},children:O.count})}),m.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",textAlign:"center"},children:O.date.split(" ")[1]})]},U))})]}),ge&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[m.jsx(yl,{size:16}),"Most Active Projects"]}),m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:Z.slice(0,5).map((O,U)=>m.jsxs("div",{children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[m.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--accent)",cursor:"pointer",textDecoration:"none"},onClick:()=>{n(O.id,O.name),window.location.href=`/project/${O.id}`},onMouseEnter:ne=>ne.currentTarget.style.textDecoration="underline",onMouseLeave:ne=>ne.currentTarget.style.textDecoration="none",children:O.name}),m.jsx("span",{style:{fontSize:13,color:"var(--text-muted)"},children:O.sessions})]}),m.jsx("div",{style:{width:"100%",height:6,background:"var(--surface2)",borderRadius:3,overflow:"hidden"},children:m.jsx("div",{style:{width:`${O.sessions/ge.sessions*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})})]},U))})]})]})]})}let ow=0;const hf=new Set;let cf=[];function k1(t){t.forEach(n=>n([...cf]))}const Ke={show:(t,n="info",a)=>{const i=`toast-${ow++}`;return cf.push({id:i,type:n,message:t,progress:a}),k1(hf),n!=="loading"&&setTimeout(()=>Ke.dismiss(i),5e3),i},loading:(t,n)=>Ke.show(t,"loading",n),success:t=>Ke.show(t,"success"),error:t=>Ke.show(t,"error"),update:(t,n,a)=>{const i=cf.find(o=>o.id===t);i&&(i.message=n,a!==void 0&&(i.progress=a),k1(hf))},dismiss:t=>{cf=cf.filter(n=>n.id!==t),k1(hf)}};function lw(){const[t,n]=ae.useState([]);return ae.useEffect(()=>(hf.add(n),()=>{hf.delete(n)}),[]),t.length===0?null:m.jsx("div",{style:{position:"fixed",bottom:20,right:20,zIndex:9999,display:"flex",flexDirection:"column",gap:10,maxWidth:400},children:t.map(a=>m.jsx(uw,{toast:a,onDismiss:()=>Ke.dismiss(a.id)},a.id))})}function uw({toast:t,onDismiss:n}){const i={success:{bg:"var(--green)15",border:"var(--green)",icon:"var(--green)"},error:{bg:"var(--red)15",border:"var(--red)",icon:"var(--red)"},info:{bg:"var(--blue)15",border:"var(--blue)",icon:"var(--blue)"},loading:{bg:"var(--accent)15",border:"var(--accent)",icon:"var(--accent)"}}[t.type],o=t.type==="success"?bl:t.type==="error"?ac:s4;return m.jsxs("div",{style:{background:"var(--surface)",border:`1px solid ${i.border}`,borderRadius:12,padding:"14px 16px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",display:"flex",alignItems:"flex-start",gap:12,minWidth:300,animation:"slideIn 0.3s ease-out"},children:[m.jsx(o,{size:20,style:{color:i.icon,flexShrink:0,animation:t.type==="loading"?"spin 1s linear infinite":"none"}}),m.jsxs("div",{style:{flex:1,minWidth:0},children:[m.jsx("div",{style:{fontSize:13,color:"var(--text)",marginBottom:t.progress!==void 0?8:0},children:t.message}),t.progress!==void 0&&m.jsx("div",{style:{height:4,background:"var(--border)",borderRadius:2,overflow:"hidden"},children:m.jsx("div",{style:{height:"100%",background:i.icon,width:`${t.progress}%`,transition:"width 0.3s ease"}})})]}),t.type!=="loading"&&m.jsx("button",{onClick:n,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:0,display:"flex",alignItems:"center"},children:m.jsx(ti,{size:16})})]})}function N1(){return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,animation:"fadeIn 0.3s"},children:[m.jsx("div",{style:{height:20,width:"60%",background:"var(--surface2)",borderRadius:4,marginBottom:12,animation:"pulse 1.5s ease-in-out infinite"}}),m.jsx("div",{style:{height:14,width:"40%",background:"var(--surface2)",borderRadius:4,marginBottom:16,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.1s"}}),m.jsx("div",{style:{height:14,width:"80%",background:"var(--surface2)",borderRadius:4,marginBottom:8,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.2s"}}),m.jsx("div",{style:{height:14,width:"70%",background:"var(--surface2)",borderRadius:4,animation:"pulse 1.5s ease-in-out infinite",animationDelay:"0.3s"}})]})}function cw({onOpenProject:t}){const[n,a]=ae.useState(!1),[i,o]=ae.useState({isOpen:!1,title:"",message:"",onConfirm:()=>{},confirmText:"Confirm",confirmColor:"var(--accent)"}),{data:u,isLoading:h,error:d,refetch:f}=va({queryKey:["projects"],queryFn:cn.getProjects,refetchInterval:15e3}),g=async(v=!1)=>{o({isOpen:!0,title:v?"Force Resync All Projects":"Resync All Projects",message:v?"This will regenerate ALL summaries across ALL projects with v2.0 fields. This may take a very long time. Continue?":'This will only process sessions without summaries across all projects. To regenerate existing summaries with v2.0 fields, use "Force Resync All". Continue?',confirmText:v?"Force Resync":"Resync",confirmColor:v?"var(--orange)":"var(--blue)",onConfirm:async()=>{o({...i,isOpen:!1}),a(!0);const _=Ke.loading("Queueing sessions across all projects...",0);try{const j=await cn.resyncAll(v);Ke.update(_,`Queued ${j.result.queued} sessions. Processing...`,50),setTimeout(()=>{Ke.dismiss(_),Ke.success(j.result.message)},2e3),f()}catch(j){Ke.dismiss(_),Ke.error("Resync failed: "+j)}finally{a(!1)}}})};return h?m.jsx(fw,{}):d?m.jsx(dw,{message:String(d)}):m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsx("div",{style:{marginBottom:24},children:m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:4},children:[m.jsxs("div",{children:[m.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Projects"}),m.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13},children:["All tracked workspaces — ",u?.length??0," total"]})]}),m.jsxs("div",{style:{display:"flex",gap:8},children:[m.jsxs("button",{onClick:()=>g(!1),disabled:n,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:n?"var(--surface)":"var(--blue)15",color:n?"var(--text-muted)":"var(--blue)",border:"1px solid",borderColor:n?"var(--border)":"var(--blue)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:n?"not-allowed":"pointer",transition:"all 0.15s"},children:[m.jsx(ml,{size:16,style:{animation:n?"spin 1s linear infinite":"none"}}),n?"Resyncing...":"Resync New"]}),m.jsxs("button",{onClick:()=>g(!0),disabled:n,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:n?"var(--surface)":"var(--orange)15",color:n?"var(--text-muted)":"var(--orange)",border:"1px solid",borderColor:n?"var(--border)":"var(--orange)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:n?"not-allowed":"pointer",transition:"all 0.15s"},children:[m.jsx(ml,{size:16,style:{animation:n?"spin 1s linear infinite":"none"}}),n?"Resyncing...":"Force Resync All"]})]})]})}),!u||u.length===0?m.jsx(hw,{}):m.jsxs(m.Fragment,{children:[m.jsx(sw,{projects:u,onOpenProject:t}),m.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:16,marginTop:32},children:"All Projects"}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:14},className:"projects-grid",children:u.map(v=>m.jsx(Ns,{to:`/project/${v.id}`,style:{display:"block"},children:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"18px 20px",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:_=>{_.currentTarget.style.borderColor="var(--accent)",_.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:_=>{_.currentTarget.style.borderColor="var(--border)",_.currentTarget.style.transform="none"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10,marginBottom:10},children:[m.jsx(v5,{size:18,color:"var(--accent)",style:{flexShrink:0,marginTop:2}}),m.jsxs("div",{style:{minWidth:0},children:[m.jsx("div",{style:{fontWeight:700,fontSize:15,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.name}),v.git_remote&&m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.git_remote.replace(/^https?:\/\//,"").replace(/\.git$/,"")})]})]}),m.jsxs("div",{style:{display:"flex",gap:16,marginTop:12},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[m.jsx($3,{size:12,color:"var(--text-muted)"}),m.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)"},children:[v.session_count??0," sessions"]})]}),v.last_session_at&&m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[m.jsx(Ts,{size:12,color:"var(--text-muted)"}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)"},children:M5(new Date(v.last_session_at*1e3),{addSuffix:!0})})]})]})]})},v.id))})]}),m.jsx(eh,{isOpen:i.isOpen,title:i.title,message:i.message,confirmText:i.confirmText,cancelText:"Cancel",confirmColor:i.confirmColor,onConfirm:i.onConfirm,onCancel:()=>o({...i,isOpen:!1})})]})}function fw(){return m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsxs("div",{style:{marginBottom:24},children:[m.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Projects"}),m.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Loading..."})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:16},children:[m.jsx(N1,{}),m.jsx(N1,{}),m.jsx(N1,{})]})]})}function dw({message:t}){return m.jsxs("div",{style:{padding:32},children:[m.jsxs("div",{style:{color:"var(--red)",fontSize:13},children:["Error: ",t]}),m.jsx("div",{style:{color:"var(--text-muted)",fontSize:12,marginTop:8},children:"Make sure the ClaudeContext worker is running on port 9999."})]})}function hw(){return m.jsxs("div",{style:{textAlign:"center",padding:"60px 32px",color:"var(--text-muted)"},children:[m.jsx(v5,{size:40,color:"var(--border)",style:{marginBottom:16}}),m.jsx("div",{style:{fontSize:16,fontWeight:600,marginBottom:8,color:"var(--text)"},children:"No projects yet"}),m.jsx("div",{style:{fontSize:13,maxWidth:360,margin:"0 auto",lineHeight:1.6},children:"Start a Claude Code session in any project to begin tracking. ClaudeContext will automatically capture sessions when hooks fire."}),m.jsx("div",{style:{marginTop:20,padding:"12px 16px",background:"var(--surface2)",borderRadius:8,display:"inline-block",fontFamily:"monospace",fontSize:12},children:"claudectx install"})]})}const pw="modulepreload",gw=function(t){return"/"+t},_g={},Ud=function(n,a,i){let o=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),d=h?.nonce||h?.getAttribute("nonce");o=Promise.allSettled(a.map(f=>{if(f=gw(f),f in _g)return;_g[f]=!0;const g=f.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${v}`))return;const _=document.createElement("link");if(_.rel=g?"stylesheet":pw,g||(_.as="script"),_.crossOrigin="",_.href=f,d&&_.setAttribute("nonce",d),document.head.appendChild(_),g)return new Promise((j,w)=>{_.addEventListener("load",j),_.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function u(h){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=h,window.dispatchEvent(d),!d.defaultPrevented)throw h}return o.then(h=>{for(const d of h||[])d.status==="rejected"&&u(d.reason);return n().catch(u)})},mw={completed:{bg:"#16301e",color:"#22c55e",label:"Completed"},in_progress:{bg:"#2d2505",color:"#eab308",label:"In Progress"},blocked:{bg:"#2d0808",color:"#ef4444",label:"Blocked"},active:{bg:"#0f1f3d",color:"#60a5fa",label:"Active"},compacted:{bg:"#1e1e24",color:"#7a7a99",label:"Compacted"},error:{bg:"#2d0808",color:"#ef4444",label:"Error"}};function R5({status:t}){const n=mw[t]||{bg:"#1e1e24",color:"#7a7a99",label:t},a=t==="active";return m.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:20,background:n.bg,color:n.color,fontSize:11,fontWeight:600,letterSpacing:"0.02em",textTransform:"uppercase"},children:[a&&m.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:n.color,display:"inline-block",animation:"pulse 1.5s infinite"}}),n.label,m.jsx("style",{children:`
|
|
423
|
+
@keyframes pulse {
|
|
424
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
425
|
+
50% { opacity: 0.5; transform: scale(0.8); }
|
|
426
|
+
}
|
|
427
|
+
`})]})}function yw({checked:t,onChange:n,disabled:a}){return m.jsx("button",{onClick:i=>{i.preventDefault(),i.stopPropagation(),a||n(!t)},disabled:a,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,background:"transparent",color:t?"var(--accent)":"var(--text-muted)",border:"none",cursor:a?"not-allowed":"pointer",transition:"color 0.15s"},onMouseEnter:i=>{a||(i.currentTarget.style.color="var(--accent)")},onMouseLeave:i=>{a||(i.currentTarget.style.color=t?"var(--accent)":"var(--text-muted)")},children:t?m.jsx($d,{size:18}):m.jsx(_5,{size:18})})}const vw={productive:k4,frustrated:Q3,exploratory:a0,debugging:Ls,blocked:ac},bw={trivial:"var(--green)",simple:"var(--green)",moderate:"var(--yellow)",complex:"var(--orange)",very_complex:"var(--red)"};function xw({session:t,onSessionUpdated:n,selectionMode:a,selected:i,onSelectionChange:o}){const[u,h]=ae.useState(!1),[d,f]=ae.useState(!1),[g,v]=ae.useState(!1),[_,j]=ae.useState(!1),[w,k]=ae.useState(!1),[L,R]=ae.useState(!1),[E,Y]=ae.useState(!1),H=new Date(t.started_at*1e3),F=t.duration_seconds?Math.floor(t.duration_seconds/60):t.ended_at?Math.floor((t.ended_at-t.started_at)/60):null,X=Array.isArray(t.summary_files_changed)?t.summary_files_changed:[],_e=t.summary_mood?vw[t.summary_mood]:null,xe=t.summary_complexity?bw[t.summary_complexity]:"var(--text-muted)",oe=t.status==="active"||!t.status||t.summary_status&&t.summary_status.toLowerCase()==="in_progress",Z=!!t.summary_title,ge=async J=>{J.preventDefault(),J.stopPropagation(),v(!0);try{await cn.toggleBookmark(t.id,!t.is_bookmarked),n&&n()}catch(le){Ke.error("Failed to update bookmark: "+le)}finally{v(!1)}},O=async J=>{J.preventDefault(),J.stopPropagation(),Y(!0)},U=async()=>{Y(!1),h(!0);const J=Ke.loading("Ending session...");try{await cn.forceEndSession(t.id),Ke.dismiss(J),Ke.success("Session ended successfully"),n&&setTimeout(()=>n(),1e3)}catch(le){Ke.dismiss(J),Ke.error("Failed to end session: "+le)}finally{h(!1)}},ne=async J=>{J.preventDefault(),J.stopPropagation(),R(!0)},re=async J=>{J.preventDefault(),J.stopPropagation(),j(!0);try{await cn.toggleArchive(t.id,!t.is_archived),Ke.success(t.is_archived?"Session unarchived":"Session archived"),n&&n()}catch(le){Ke.error("Failed to update archive status: "+le)}finally{j(!1)}},ve=async J=>{J.preventDefault(),J.stopPropagation(),k(!0);const le=Ke.loading(Z?"Resyncing summary...":"Syncing summary...");try{Z?await cn.resyncSession(t.id):await cn.syncSession(t.id),Ke.dismiss(le),Ke.success("Session queued for summarization"),n&&setTimeout(()=>n(),2e3)}catch(Le){Ke.dismiss(le),Ke.error("Failed to sync: "+Le)}finally{k(!1)}},ee=async()=>{R(!1),f(!0);const J=Ke.loading("Deleting session...");try{await cn.deleteSession(t.id),Ke.dismiss(J),Ke.success("Session deleted successfully"),n&&setTimeout(()=>n(),500)}catch(le){Ke.dismiss(J),Ke.error("Failed to delete session: "+le)}finally{f(!1)}};return m.jsxs(m.Fragment,{children:[m.jsx(Ns,{to:`/session/${t.id}`,style:{display:"block"},children:m.jsx("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s, background 0.15s"},onMouseEnter:J=>{J.currentTarget.style.borderColor="var(--accent)",J.currentTarget.style.background="var(--surface2)"},onMouseLeave:J=>{J.currentTarget.style.borderColor="var(--border)",J.currentTarget.style.background="var(--surface)"},children:m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8},children:[a&&m.jsx("div",{style:{paddingTop:2,marginRight:8},children:m.jsx(yw,{checked:i||!1,onChange:J=>o?.(J)})}),m.jsxs("div",{style:{flex:1,minWidth:0},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[m.jsx("div",{style:{fontWeight:600,fontSize:14,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:t.summary_title||"Session "+t.id.slice(0,8)}),_e&&m.jsx(_e,{size:14,style:{color:"var(--text-muted)",flexShrink:0}})]}),t.summary_what_we_did&&Array.isArray(t.summary_what_we_did)&&m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8},children:t.summary_what_we_did[0]}),t.summary_key_insight&&m.jsxs("div",{style:{fontSize:11,color:"var(--accent)",marginBottom:8,display:"flex",alignItems:"center",gap:4},children:[m.jsx(xf,{size:11}),t.summary_key_insight]}),m.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",flexWrap:"wrap"},children:[m.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[m.jsx(Ts,{size:11}),M5(H,{addSuffix:!0})]}),F!==null&&m.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:[F,"m"]}),t.summary_complexity&&m.jsx("span",{style:{fontSize:10,color:xe,padding:"2px 6px",background:`${xe}15`,borderRadius:4,fontWeight:600},children:t.summary_complexity.replace("_"," ")}),t.total_tool_calls>0&&m.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[m.jsx(Ls,{size:11}),t.total_tool_calls," calls"]}),X.length>0&&m.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",display:"flex",alignItems:"center",gap:4},children:[m.jsx(vi,{size:11}),X.length," files"]})]})]}),m.jsxs("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:8},children:[m.jsx("button",{onClick:ge,disabled:g,title:t.is_bookmarked?"Remove bookmark":"Bookmark session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:t.is_bookmarked?"var(--yellow)":"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:g?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{g||(J.currentTarget.style.background="var(--yellow)15",J.currentTarget.style.color="var(--yellow)",J.currentTarget.style.borderColor="var(--yellow)30")},onMouseLeave:J=>{g||(J.currentTarget.style.background="transparent",J.currentTarget.style.color=t.is_bookmarked?"var(--yellow)":"var(--text-muted)",J.currentTarget.style.borderColor="var(--border)")},children:m.jsx(A5,{size:14,fill:t.is_bookmarked?"var(--yellow)":"none"})}),m.jsx("button",{onClick:re,disabled:_,title:t.is_archived?"Unarchive session":"Archive session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:t.is_archived?"var(--blue)":"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:_?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{_||(J.currentTarget.style.background="var(--blue)15",J.currentTarget.style.color="var(--blue)",J.currentTarget.style.borderColor="var(--blue)30")},onMouseLeave:J=>{_||(J.currentTarget.style.background="transparent",J.currentTarget.style.color=t.is_archived?"var(--blue)":"var(--text-muted)",J.currentTarget.style.borderColor="var(--border)")},children:t.is_archived?m.jsx(u3,{size:14}):m.jsx(f3,{size:14})}),oe&&m.jsxs("button",{onClick:O,disabled:u,style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:u?"var(--surface)":"var(--green)15",color:u?"var(--text-muted)":"var(--green)",border:"1px solid",borderColor:u?"var(--border)":"var(--green)30",borderRadius:6,fontSize:11,fontWeight:600,cursor:u?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{u||(J.currentTarget.style.background="var(--green)25")},onMouseLeave:J=>{u||(J.currentTarget.style.background="var(--green)15")},children:[m.jsx(bl,{size:12}),u?"Ending...":"Force End"]}),m.jsxs("button",{onClick:ve,disabled:w||!t.transcript_path,title:Z?"Resync summary":"Sync summary",style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:w?"var(--surface)":"var(--blue)15",color:w?"var(--text-muted)":"var(--blue)",border:"1px solid",borderColor:w?"var(--border)":"var(--blue)30",borderRadius:6,fontSize:11,fontWeight:600,cursor:w||!t.transcript_path?"not-allowed":"pointer",transition:"all 0.15s",opacity:t.transcript_path?1:.5},onMouseEnter:J=>{!w&&t.transcript_path&&(J.currentTarget.style.background="var(--blue)25")},onMouseLeave:J=>{w||(J.currentTarget.style.background="var(--blue)15")},children:[m.jsx(ml,{size:12}),w?"Syncing...":Z?"Resync":"Sync"]}),m.jsx("button",{onClick:ne,disabled:d,title:"Delete session",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:d?"var(--surface)":"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:d?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:J=>{d||(J.currentTarget.style.background="var(--red)15",J.currentTarget.style.color="var(--red)",J.currentTarget.style.borderColor="var(--red)30")},onMouseLeave:J=>{d||(J.currentTarget.style.background="transparent",J.currentTarget.style.color="var(--text-muted)",J.currentTarget.style.borderColor="var(--border)")},children:m.jsx(k5,{size:14})}),m.jsx(R5,{status:t.summary_status||t.status})]})]})})}),m.jsx(eh,{isOpen:E,title:"Force End Session",message:"This will mark the session as completed and trigger AI summarization. The session will be processed and added to your project history.",confirmText:"Force End",cancelText:"Cancel",confirmColor:"var(--green)",onConfirm:U,onCancel:()=>Y(!1)}),m.jsx(eh,{isOpen:L,title:"Delete Session",message:"This will permanently remove the session and all its data including observations, preferences, knowledge, and tasks. This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",confirmColor:"var(--red)",onConfirm:ee,onCancel:()=>R(!1)})]})}function ww({selectedCount:t,onBulkDelete:n,onBulkBookmark:a,onBulkTag:i,onBulkExport:o,onClearSelection:u}){return t===0?null:m.jsxs("div",{style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"12px 20px",display:"flex",alignItems:"center",gap:16,boxShadow:"0 8px 24px rgba(0, 0, 0, 0.3)",zIndex:1e3},children:[m.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"var(--text)"},children:[t," selected"]}),m.jsxs("div",{style:{display:"flex",gap:8},children:[m.jsxs("button",{onClick:a,title:"Bookmark selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--yellow)15",color:"var(--yellow)",border:"1px solid var(--yellow)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--yellow)25",onMouseLeave:h=>h.currentTarget.style.background="var(--yellow)15",children:[m.jsx(A5,{size:14}),"Bookmark"]}),m.jsxs("button",{onClick:i,title:"Tag selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--accent)15",color:"var(--accent)",border:"1px solid var(--accent)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--accent)25",onMouseLeave:h=>h.currentTarget.style.background="var(--accent)15",children:[m.jsx(j5,{size:14}),"Tag"]}),m.jsxs("button",{onClick:o,title:"Export as ZIP",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--blue)15",color:"var(--blue)",border:"1px solid var(--blue)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--blue)25",onMouseLeave:h=>h.currentTarget.style.background="var(--blue)15",children:[m.jsx(oh,{size:14}),"Export ZIP"]}),m.jsxs("button",{onClick:n,title:"Delete selected",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"var(--red)15",color:"var(--red)",border:"1px solid var(--red)30",borderRadius:8,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>h.currentTarget.style.background="var(--red)25",onMouseLeave:h=>h.currentTarget.style.background="var(--red)15",children:[m.jsx(k5,{size:14}),"Delete"]})]}),m.jsx("button",{onClick:u,title:"Clear selection",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px",background:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:h=>{h.currentTarget.style.background="var(--surface2)",h.currentTarget.style.color="var(--text)"},onMouseLeave:h=>{h.currentTarget.style.background="transparent",h.currentTarget.style.color="var(--text-muted)"},children:m.jsx(ti,{size:16})})]})}const Ag=["#7c6cfc","#3b82f6","#22c55e","#eab308","#f97316","#ef4444","#ec4899","#8b5cf6"];function O5({sessionId:t,projectId:n,sessionTags:a,onUpdate:i}){const[o,u]=ae.useState(!1),[h,d]=ae.useState(""),[f,g]=ae.useState(!1),[v,_]=ae.useState(Ag[0]),j=ae.useRef(null),w=Af(),{data:k=[]}=va({queryKey:["tags",n],queryFn:()=>cn.getTags(n),enabled:!!n}),L=ff({mutationFn:({tagId:X})=>cn.addSessionTag(t,X),onSuccess:()=>{w.invalidateQueries({queryKey:["session",t]}),i&&i(),d("")},onError:X=>Ke.error("Failed to add tag: "+X)}),R=ff({mutationFn:({tagId:X})=>cn.removeSessionTag(t,X),onSuccess:()=>{w.invalidateQueries({queryKey:["session",t]}),i&&i()},onError:X=>Ke.error("Failed to remove tag: "+X)}),E=ff({mutationFn:({name:X,color:_e})=>cn.createTag(n,X,_e),onSuccess:X=>{w.invalidateQueries({queryKey:["tags",n]}),L.mutate({tagId:X.id}),d(""),g(!1)},onError:X=>Ke.error("Failed to create tag: "+X)}),Y=k.filter(X=>X.name.toLowerCase().includes(h.toLowerCase())&&!a.some(_e=>_e.id===X.id)),H=()=>{h.trim()&&E.mutate({name:h.trim(),color:v})},F=k.find(X=>X.name.toLowerCase()===h.toLowerCase());return ae.useEffect(()=>{o&&j.current&&j.current.focus()},[o]),m.jsxs("div",{style:{position:"relative"},children:[m.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,alignItems:"center"},children:[a.map(X=>m.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:X.color?`${X.color}15`:"var(--surface2)",border:"1px solid",borderColor:X.color?`${X.color}30`:"var(--border)",borderRadius:6,fontSize:12,color:X.color||"var(--text)"},children:[m.jsx(j5,{size:11}),X.name,m.jsx("button",{onClick:()=>R.mutate({tagId:X.id}),style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"flex",color:"inherit",opacity:.6},children:m.jsx(ti,{size:12})})]},X.id)),m.jsxs("button",{onClick:()=>u(!o),style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:12,color:"var(--text-muted)",cursor:"pointer"},children:[m.jsx(pg,{size:12}),"Add tag"]})]}),o&&m.jsxs("div",{style:{position:"absolute",top:"100%",left:0,marginTop:8,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:12,minWidth:280,maxWidth:400,zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.15)"},children:[m.jsx("input",{ref:j,type:"text",value:h,onChange:X=>d(X.target.value),placeholder:"Search or create tag...",style:{width:"100%",padding:"8px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,color:"var(--text)",marginBottom:8},onKeyDown:X=>{X.key==="Enter"&&h&&!F&&H(),X.key==="Escape"&&u(!1)}}),m.jsx("div",{style:{maxHeight:200,overflowY:"auto"},children:Y.length>0?Y.map(X=>m.jsxs("button",{onClick:()=>L.mutate({tagId:X.id}),style:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"transparent",border:"none",borderRadius:6,fontSize:13,color:"var(--text)",cursor:"pointer",textAlign:"left"},onMouseEnter:_e=>_e.currentTarget.style.background="var(--surface2)",onMouseLeave:_e=>_e.currentTarget.style.background="transparent",children:[m.jsx("div",{style:{width:12,height:12,borderRadius:3,background:X.color||"var(--border)"}}),X.name]},X.id)):h&&!F?m.jsxs("div",{children:[m.jsxs("button",{onClick:()=>g(!f),style:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"var(--accent)15",border:"1px solid var(--accent)30",borderRadius:6,fontSize:13,color:"var(--accent)",cursor:"pointer",marginBottom:f?8:0},children:[m.jsx(pg,{size:14}),'Create "',h,'"']}),f&&m.jsxs("div",{style:{padding:"8px 0"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:6},children:"Choose color:"}),m.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:Ag.map(X=>m.jsx("button",{onClick:()=>{_(X),H()},style:{width:24,height:24,borderRadius:4,background:X,border:v===X?"2px solid var(--text)":"none",cursor:"pointer"}},X))})]})]}):m.jsx("div",{style:{padding:"8px 10px",fontSize:12,color:"var(--text-muted)"},children:h?"No matching tags":"Start typing to search or create"})})]})]})}function Sw({isOpen:t,sessionIds:n,onClose:a,onComplete:i}){const[o,u]=ae.useState([]),[h,d]=ae.useState(!1);if(!t)return null;const f=async()=>{if(o.length===0){Ke.error("Please select at least one tag");return}d(!0);const g=Ke.loading(`Tagging ${n.length} sessions...`);try{await Promise.all(n.map(v=>Promise.all(o.map(_=>fetch(`/api/sessions/${v}/tags`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tag_id:_.id})}))))),Ke.dismiss(g),Ke.success(`Tagged ${n.length} sessions`),i(),a()}catch(v){Ke.dismiss(g),Ke.error("Failed to tag sessions: "+v)}finally{d(!1)}};return m.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e3},children:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,width:"90%",maxWidth:500},children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[m.jsxs("h3",{style:{fontSize:18,fontWeight:700,color:"var(--text)"},children:["Tag ",n.length," Sessions"]}),m.jsx("button",{onClick:a,style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4},children:m.jsx(ti,{size:20})})]}),m.jsxs("div",{style:{marginBottom:20},children:[m.jsx("label",{style:{display:"block",fontSize:13,fontWeight:600,color:"var(--text)",marginBottom:8},children:"Select Tags"}),m.jsx(O5,{selectedTags:o,onChange:u})]}),m.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[m.jsx("button",{onClick:a,disabled:h,style:{padding:"8px 16px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:h?"not-allowed":"pointer"},children:"Cancel"}),m.jsx("button",{onClick:f,disabled:h||o.length===0,style:{padding:"8px 16px",background:h||o.length===0?"var(--surface2)":"var(--accent)",color:h||o.length===0?"var(--text-muted)":"white",border:"none",borderRadius:8,fontSize:13,fontWeight:600,cursor:h||o.length===0?"not-allowed":"pointer"},children:h?"Tagging...":"Apply Tags"})]})]})})}function _w({projectId:t}){const{data:n}=va({queryKey:["sessions",t],queryFn:async()=>{const g=await fetch(`/api/sessions?project_id=${t}&limit=100`);if(!g.ok)throw new Error("Failed to fetch sessions");return g.json()}}),a=i0(new Date).getTime()/1e3,i=(n||[]).filter(g=>g.started_at>=a),o=i.reduce((g,v)=>g+(v.total_tool_calls||0),0),u=new Set(i.flatMap(g=>{try{const v=g.summary_files_changed;return Array.isArray(v)?v:typeof v=="string"?JSON.parse(v):[]}catch{return[]}})).size,h=i.reduce((g,v)=>{const _=v.duration_seconds?Math.floor(v.duration_seconds/60):v.ended_at?Math.floor((v.ended_at-v.started_at)/60):0;return g+_},0),d=Math.floor(h/60),f=h%60;return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginBottom:24},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:16},children:[m.jsx(Kd,{size:18,style:{color:"var(--accent)"}}),m.jsx("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:"Today's Productivity"})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:16},children:[m.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[m.jsx(Kd,{size:14,style:{color:"var(--accent)"}}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Sessions"})]}),m.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--accent)"},children:i.length})]}),m.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[m.jsx(Ls,{size:14,style:{color:"var(--blue)"}}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Tool Calls"})]}),m.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--blue)"},children:o})]}),m.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[m.jsx(vi,{size:14,style:{color:"var(--green)"}}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Files Touched"})]}),m.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--green)"},children:u})]}),m.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:16},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[m.jsx(Ts,{size:14,style:{color:"var(--orange)"}}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase"},children:"Time Spent"})]}),m.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--orange)"},children:d>0?`${d}h ${f}m`:`${f}m`})]})]})]})}function D5({onSearch:t,placeholder:n="Search sessions...",autoFocus:a}){const[i,o]=ae.useState(""),u=ae.useRef(),h=f=>{const g=f.target.value;o(g),clearTimeout(u.current),g.length>=2?u.current=setTimeout(()=>t(g),300):g.length===0&&t("")},d=()=>{o(""),t("")};return m.jsxs("div",{style:{position:"relative",width:"100%",maxWidth:400},children:[m.jsx(D0,{size:16,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",pointerEvents:"none"}}),m.jsx("input",{type:"text",value:i,onChange:h,placeholder:n,autoFocus:a,style:{width:"100%",padding:"8px 36px 8px 36px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,fontWeight:500,outline:"none",transition:"all 0.15s"},onFocus:f=>{f.target.style.borderColor="var(--accent)",f.target.style.background="var(--surface)"},onBlur:f=>{f.target.style.borderColor="var(--border)",f.target.style.background="var(--surface2)"}}),i&&m.jsx("button",{onClick:d,style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",padding:4,background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:f=>{f.currentTarget.style.background="var(--surface)",f.currentTarget.style.color="var(--text)"},onMouseLeave:f=>{f.currentTarget.style.background="transparent",f.currentTarget.style.color="var(--text-muted)"},children:m.jsx(ti,{size:14})})]})}function Aw({onDateRangeChange:t}){const[n,a]=ae.useState(""),[i,o]=ae.useState(""),u=g=>{a(g),g&&i?t(new Date(g),new Date(i)):!g&&!i&&t(null,null)},h=g=>{o(g),n&&g?t(new Date(n),new Date(g)):!n&&!g&&t(null,null)},d=()=>{a(""),o(""),t(null,null)},f=n||i;return m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:"6px 10px",maxWidth:400},children:[m.jsx(Kd,{size:16,style:{color:"var(--text-muted)",flexShrink:0}}),m.jsx("input",{type:"date",value:n,onChange:g=>u(g.target.value),placeholder:"Start date",style:{flex:1,background:"transparent",border:"none",color:"var(--text)",fontSize:13,fontWeight:500,outline:"none"}}),m.jsx("span",{style:{color:"var(--text-muted)",fontSize:13},children:"to"}),m.jsx("input",{type:"date",value:i,onChange:g=>h(g.target.value),placeholder:"End date",style:{flex:1,background:"transparent",border:"none",color:"var(--text)",fontSize:13,fontWeight:500,outline:"none"}}),f&&m.jsx("button",{onClick:d,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:4,background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,cursor:"pointer",transition:"all 0.15s",flexShrink:0},onMouseEnter:g=>{g.currentTarget.style.background="var(--surface)",g.currentTarget.style.color="var(--text)"},onMouseLeave:g=>{g.currentTarget.style.background="transparent",g.currentTarget.style.color="var(--text-muted)"},children:m.jsx(ti,{size:14})})]})}function jw({viewMode:t,onToggle:n}){return m.jsxs("div",{style:{display:"flex",gap:4,background:"var(--surface2)",padding:4,borderRadius:8,border:"1px solid var(--border)"},children:[m.jsxs("button",{onClick:()=>n("card"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:t==="card"?"var(--surface)":"transparent",color:t==="card"?"var(--text)":"var(--text-muted)",border:t==="card"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{t!=="card"&&(a.currentTarget.style.background="var(--surface)")},onMouseLeave:a=>{t!=="card"&&(a.currentTarget.style.background="transparent")},children:[m.jsx(J3,{size:16}),"Cards"]}),m.jsxs("button",{onClick:()=>n("table"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:t==="table"?"var(--surface)":"transparent",color:t==="table"?"var(--text)":"var(--text-muted)",border:t==="table"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{t!=="table"&&(a.currentTarget.style.background="var(--surface)")},onMouseLeave:a=>{t!=="table"&&(a.currentTarget.style.background="transparent")},children:[m.jsx(a4,{size:16}),"Table"]}),m.jsxs("button",{onClick:()=>n("timeline"),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:t==="timeline"?"var(--surface)":"transparent",color:t==="timeline"?"var(--text)":"var(--text-muted)",border:t==="timeline"?"1px solid var(--border)":"1px solid transparent",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{t!=="timeline"&&(a.currentTarget.style.background="var(--surface)")},onMouseLeave:a=>{t!=="timeline"&&(a.currentTarget.style.background="transparent")},children:[m.jsx(Ts,{size:16}),"Timeline"]})]})}function kw({sessions:t,selectionMode:n,selectedSessions:a,onSelectionChange:i}){const o=uc(),[u,h]=ae.useState("date"),[d,f]=ae.useState("desc"),g=w=>{u===w?f(d==="asc"?"desc":"asc"):(h(w),f("desc"))},v=[...t].sort((w,k)=>{let L=0;if(u==="date")L=w.started_at-k.started_at;else if(u==="title"){const R=(w.summary_title||"").toLowerCase(),E=(k.summary_title||"").toLowerCase();L=R.localeCompare(E)}else if(u==="duration"){const R=w.ended_at?w.ended_at-w.started_at:0,E=k.ended_at?k.ended_at-k.started_at:0;L=R-E}return d==="asc"?L:-L}),_=w=>{const k=Math.floor(w/3600),L=Math.floor(w%3600/60);return k>0?`${k}h ${L}m`:`${L}m`},j=({field:w})=>u!==w?null:d==="asc"?m.jsx(v3,{size:12}):m.jsx(h3,{size:12});return m.jsx("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,overflow:"hidden"},children:m.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[m.jsx("thead",{children:m.jsxs("tr",{style:{background:"var(--surface2)",borderBottom:"1px solid var(--border)"},children:[n&&m.jsx("th",{style:{padding:"12px 16px",textAlign:"left",width:40},children:m.jsx("input",{type:"checkbox",checked:a.size===t.length&&t.length>0,onChange:w=>{t.forEach(k=>i(k.id,w.target.checked))},style:{cursor:"pointer"}})}),m.jsx("th",{onClick:()=>g("date"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none",width:140},children:m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Date ",m.jsx(j,{field:"date"})]})}),m.jsx("th",{onClick:()=>g("title"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none"},children:m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Title ",m.jsx(j,{field:"title"})]})}),m.jsx("th",{onClick:()=>g("duration"),style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",cursor:"pointer",userSelect:"none",width:100},children:m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:["Duration ",m.jsx(j,{field:"duration"})]})}),m.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:80},children:"Files"}),m.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:80},children:"Tools"}),m.jsx("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",width:100},children:"Status"})]})}),m.jsx("tbody",{children:v.map((w,k)=>{const L=w.ended_at?w.ended_at-w.started_at:0,R=Array.isArray(w.summary_files_changed)?w.summary_files_changed.length:0,E=w.tool_use_count||0,Y=w.status==="completed";return m.jsxs("tr",{onClick:H=>{n?i(w.id,!a.has(w.id)):o(`/session/${w.id}`)},style:{borderBottom:k<v.length-1?"1px solid var(--border)":"none",cursor:"pointer",transition:"background 0.15s"},onMouseEnter:H=>{H.currentTarget.style.background="var(--surface2)"},onMouseLeave:H=>{H.currentTarget.style.background="transparent"},children:[n&&m.jsx("td",{style:{padding:"12px 16px"},children:m.jsx("input",{type:"checkbox",checked:a.has(w.id),onChange:H=>{H.stopPropagation(),i(w.id,H.target.checked)},onClick:H=>H.stopPropagation(),style:{cursor:"pointer"}})}),m.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:new Date(w.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),m.jsx("td",{style:{padding:"12px 16px",fontSize:13,fontWeight:500,color:"var(--text)"},children:w.summary_title||"Untitled Session"}),m.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m.jsx(Ts,{size:14}),L>0?_(L):"-"]})}),m.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m.jsx(vi,{size:14}),R]})}),m.jsx("td",{style:{padding:"12px 16px",fontSize:13,color:"var(--text-muted)"},children:m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m.jsx(Ls,{size:14}),E]})}),m.jsx("td",{style:{padding:"12px 16px",fontSize:13},children:m.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 10px",background:Y?"var(--green)15":"var(--orange)15",color:Y?"var(--green)":"var(--orange)",borderRadius:6,fontSize:12,fontWeight:600},children:[Y?m.jsx(bl,{size:12}):m.jsx(g5,{size:12}),Y?"Done":"Active"]})})]},w.id)})})]})})}function Nw({sessions:t,onDateClick:n,selectedDate:a}){const[i,o]=ae.useState(new Date),u=H=>{const F=H.getFullYear(),X=H.getMonth(),_e=new Date(F,X,1),oe=new Date(F,X+1,0).getDate(),Z=_e.getDay();return{daysInMonth:oe,startingDayOfWeek:Z,year:F,month:X}},h=H=>{const F=H.toDateString();return t.filter(X=>new Date(X.started_at*1e3).toDateString()===F)},{daysInMonth:d,startingDayOfWeek:f,year:g,month:v}=u(i),_=()=>{o(new Date(g,v-1,1))},j=()=>{o(new Date(g,v+1,1))},w=new Date,k=H=>w.getDate()===H&&w.getMonth()===v&&w.getFullYear()===g,L=(H,F)=>H?H.toDateString()===F.toDateString():!1,R=["January","February","March","April","May","June","July","August","September","October","November","December"],E=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Y=[];for(let H=0;H<f;H++)Y.push(m.jsx("div",{style:{padding:8}},`empty-${H}`));for(let H=1;H<=d;H++){const F=new Date(g,v,H),X=h(F),_e=X.length>0,xe=L(a,F),oe=k(H);Y.push(m.jsxs("div",{onClick:()=>n(F),style:{padding:8,minHeight:60,background:xe?"var(--accent)15":"transparent",border:"1px solid",borderColor:oe?"var(--accent)":"var(--border)",borderRadius:8,cursor:_e?"pointer":"default",transition:"all 0.15s",display:"flex",flexDirection:"column",gap:4},onMouseEnter:Z=>{_e&&(Z.currentTarget.style.background=xe?"var(--accent)20":"var(--surface2)")},onMouseLeave:Z=>{Z.currentTarget.style.background=xe?"var(--accent)15":"transparent"},children:[m.jsx("div",{style:{fontSize:13,fontWeight:oe?700:500,color:oe?"var(--accent)":"var(--text)"},children:H}),_e&&m.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,marginTop:"auto"},children:m.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--accent)",background:"var(--accent)15",padding:"2px 6px",borderRadius:4},children:X.length})})]},H))}return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginBottom:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[m.jsx("button",{onClick:_,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:H=>{H.currentTarget.style.background="var(--surface)"},onMouseLeave:H=>{H.currentTarget.style.background="var(--surface2)"},children:m.jsx(N3,{size:16})}),m.jsxs("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:[R[v]," ",g]}),m.jsx("button",{onClick:j,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:8,background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:H=>{H.currentTarget.style.background="var(--surface)"},onMouseLeave:H=>{H.currentTarget.style.background="var(--surface2)"},children:m.jsx(E3,{size:16})})]}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:8,marginBottom:8},children:E.map(H=>m.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",textAlign:"center",padding:"4px 0",textTransform:"uppercase",letterSpacing:"0.05em"},children:H},H))}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:8},children:Y}),a&&m.jsxs("div",{style:{marginTop:16,padding:"8px 12px",background:"var(--accent)10",border:"1px solid var(--accent)30",borderRadius:8,fontSize:12,color:"var(--text)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[m.jsxs("span",{children:["Showing sessions from ",m.jsx("strong",{children:a.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]}),m.jsx("button",{onClick:()=>n(a),style:{padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:11,fontWeight:600,color:"var(--text)",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:H=>{H.currentTarget.style.background="var(--surface)"},onMouseLeave:H=>{H.currentTarget.style.background="var(--surface2)"},children:"Clear"})]})]})}function Lw({sessions:t}){const n=t.length,a=t.filter(F=>F.status==="completed").length,i=n>0?Math.round(a/n*100):0,o=t.reduce((F,X)=>X.ended_at?F+(X.ended_at-X.started_at):F,0),u=n>0?Math.round(o/n/60):0,h=new Set(t.flatMap(F=>Array.isArray(F.summary_files_changed)?F.summary_files_changed:[])).size,d=t.reduce((F,X)=>F+(X.tool_use_count||0),0),f={};t.forEach(F=>{F.tool_use_count>0&&(f.Read=(f.Read||0)+Math.floor(F.tool_use_count*.3),f.Edit=(f.Edit||0)+Math.floor(F.tool_use_count*.25),f.Bash=(f.Bash||0)+Math.floor(F.tool_use_count*.2),f.Write=(f.Write||0)+Math.floor(F.tool_use_count*.15),f.Grep=(f.Grep||0)+Math.floor(F.tool_use_count*.1))});const g=Object.entries(f).sort((F,X)=>X[1]-F[1]).slice(0,5),v=g.length>0?g[0][1]:1,_={};t.forEach(F=>{Array.isArray(F.summary_files_changed)&&F.summary_files_changed.forEach(X=>{_[X]=(_[X]||0)+1})});const j=Object.entries(_).sort((F,X)=>X[1]-F[1]).slice(0,10),w=j.length>0?j[0][1]:1,L=Date.now()/1e3-10080*60,R=t.filter(F=>F.started_at>=L),E={};R.forEach(F=>{const X=new Date(F.started_at*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});E[X]=(E[X]||0)+1});const Y=[];for(let F=6;F>=0;F--){const _e=new Date(Date.now()-F*24*60*60*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"});Y.push({date:_e,count:E[_e]||0})}const H=Math.max(...Y.map(F=>F.count),1);return m.jsxs("div",{style:{marginBottom:24},children:[m.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:20,display:"flex",alignItems:"center",gap:8},children:[m.jsx(O0,{size:20}),"Analytics Dashboard"]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16,marginBottom:24},children:[m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(bl,{size:16,style:{color:"var(--green)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Completion Rate"})]}),m.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[i,"%"]}),m.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[a," of ",n," sessions"]})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(Ts,{size:16,style:{color:"var(--blue)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Avg Duration"})]}),m.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:[u,"m"]}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"per session"})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(vi,{size:16,style:{color:"var(--purple)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Files Changed"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:h}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"unique files"})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(Ls,{size:16,style:{color:"var(--orange)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Tool Uses"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:d}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"total actions"})]})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(400px, 1fr))",gap:16},children:[m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[m.jsx(yl,{size:16}),"Last 7 Days Activity"]}),m.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:8,height:120},children:Y.map((F,X)=>m.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:4},children:[m.jsx("div",{style:{width:"100%",height:Math.max(F.count/H*100,4),background:F.count>0?"var(--accent)":"var(--surface2)",borderRadius:4,transition:"all 0.3s",position:"relative"},children:F.count>0&&m.jsx("div",{style:{position:"absolute",top:-20,left:"50%",transform:"translateX(-50%)",fontSize:11,fontWeight:600,color:"var(--text)"},children:F.count})}),m.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",textAlign:"center"},children:F.date.split(" ")[1]})]},X))})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[m.jsx(Ls,{size:16}),"Top Tools Used"]}),m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:g.map(([F,X])=>m.jsxs("div",{children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[m.jsx("span",{style:{fontSize:13,fontWeight:500},children:F}),m.jsx("span",{style:{fontSize:13,color:"var(--text-muted)"},children:X})]}),m.jsx("div",{style:{width:"100%",height:6,background:"var(--surface2)",borderRadius:3,overflow:"hidden"},children:m.jsx("div",{style:{width:`${X/v*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})})]},F))})]})]}),j.length>0&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20,marginTop:16},children:[m.jsxs("h3",{style:{fontSize:14,fontWeight:600,marginBottom:16,display:"flex",alignItems:"center",gap:8},children:[m.jsx(vi,{size:16}),"Most Edited Files"]}),m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:j.map(([F,X])=>m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",background:"var(--surface2)",borderRadius:8},children:[m.jsx("div",{style:{flex:1,fontSize:12,fontFamily:"monospace",color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F}),m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[m.jsx("div",{style:{width:100,height:6,background:"var(--surface)",borderRadius:3,overflow:"hidden"},children:m.jsx("div",{style:{width:`${X/w*100}%`,height:"100%",background:"var(--purple)",transition:"width 0.3s"}})}),m.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-muted)",minWidth:30,textAlign:"right"},children:X})]})]},F))})]})]})}function Ew({sessions:t}){const n=[...t].filter(k=>k.started_at).sort((k,L)=>L.started_at-k.started_at);if(n.length===0)return null;let a=0,i=0,o=0;const u=new Date;u.setHours(0,0,0,0);const h=new Set(n.map(k=>{const L=new Date(k.started_at*1e3);return L.setHours(0,0,0,0),L.getTime()})),d=Array.from(h).sort((k,L)=>L-k),f=u.getTime(),g=f-864e5;if(d.includes(f)||d.includes(g)){let k=d.includes(f)?f:g;for(;d.includes(k);)a++,k-=864e5}if(d.length>0){o=1,i=1;for(let k=1;k<d.length;k++)(d[k-1]-d[k])/864e5===1?(o++,i=Math.max(i,o)):o=1}let v={duration:0,title:"",date:0};t.forEach(k=>{if(k.ended_at){const L=k.ended_at-k.started_at;L>v.duration&&(v={duration:L,title:k.summary_title||"Untitled",date:k.started_at})}});let _={count:0,title:"",date:0};t.forEach(k=>{const L=Array.isArray(k.summary_files_changed)?k.summary_files_changed.length:0;L>_.count&&(_={count:L,title:k.summary_title||"Untitled",date:k.started_at})});const j=k=>{const L=Math.floor(k/3600),R=Math.floor(k%3600/60);return L>0?`${L}h ${R}m`:`${R}m`},w=k=>new Date(k*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:16,marginBottom:24},children:[m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(y5,{size:16,style:{color:a>0?"var(--orange)":"var(--text-muted)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Current Streak"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:a>0?"var(--orange)":"var(--text)"},children:a}),m.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[a===1?"day":"days"," in a row"]})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(yl,{size:16,style:{color:"var(--accent)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Longest Streak"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)"},children:i}),m.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[i===1?"day":"days"," record"]})]}),v.duration>0&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(Ts,{size:16,style:{color:"var(--blue)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Longest Session"})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)",marginBottom:4},children:j(v.duration)}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.title}),m.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:w(v.date)})]}),_.count>0&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(vi,{size:16,style:{color:"var(--purple)"}}),m.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:"Most Files Changed"})]}),m.jsxs("div",{style:{fontSize:28,fontWeight:700,color:"var(--text)",marginBottom:4},children:[_.count," files"]}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_.title}),m.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:w(_.date)})]})]})}function Ed({label:t,options:n,selected:a,onChange:i,placeholder:o}){const[u,h]=ae.useState(!1),d=ae.useRef(null);ae.useEffect(()=>{const v=_=>{d.current&&!d.current.contains(_.target)&&h(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const f=v=>{a.includes(v)?i(a.filter(_=>_!==v)):i([...a,v])},g=()=>{i([])};return m.jsxs("div",{ref:d,style:{position:"relative",minWidth:200},children:[m.jsxs("button",{onClick:()=>h(!u),style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"8px 12px",background:a.length>0?"var(--accent)15":"var(--surface2)",color:a.length>0?"var(--accent)":"var(--text)",border:"1px solid",borderColor:a.length>0?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s",width:"100%"},onMouseEnter:v=>{a.length===0&&(v.currentTarget.style.background="var(--surface)")},onMouseLeave:v=>{a.length===0&&(v.currentTarget.style.background="var(--surface2)")},children:[m.jsx("span",{children:a.length>0?`${t} (${a.length})`:o||t}),m.jsx(j3,{size:14,style:{transform:u?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})]}),u&&m.jsxs("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",zIndex:1e3,maxHeight:300,overflowY:"auto"},children:[a.length>0&&m.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)"},children:[a.length," selected"]}),m.jsxs("button",{onClick:g,style:{display:"flex",alignItems:"center",gap:4,padding:"4px 8px",background:"transparent",color:"var(--text-muted)",border:"none",borderRadius:4,fontSize:11,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:v=>{v.currentTarget.style.background="var(--surface2)",v.currentTarget.style.color="var(--text)"},onMouseLeave:v=>{v.currentTarget.style.background="transparent",v.currentTarget.style.color="var(--text-muted)"},children:[m.jsx(ti,{size:12}),"Clear"]})]}),n.map(v=>m.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",cursor:"pointer",transition:"background 0.15s",fontSize:13},onMouseEnter:_=>{_.currentTarget.style.background="var(--surface2)"},onMouseLeave:_=>{_.currentTarget.style.background="transparent"},children:[m.jsx("input",{type:"checkbox",checked:a.includes(v),onChange:()=>f(v),style:{cursor:"pointer"}}),m.jsx("span",{style:{color:"var(--text)"},children:v})]},v))]})]})}function Tw({sessions:t,selectionMode:n,selectedSessions:a,onSelectionChange:i}){const o=uc(),u=[...t].sort((g,v)=>v.started_at-g.started_at),h={};u.forEach(g=>{const v=new Date(g.started_at*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});h[v]||(h[v]=[]),h[v].push(g)});const d=g=>new Date(g*1e3).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),f=g=>{const v=Math.floor(g/3600),_=Math.floor(g%3600/60);return v>0?`${v}h ${_}m`:`${_}m`};return m.jsx("div",{style:{position:"relative"},children:Object.entries(h).map(([g,v],_)=>m.jsxs("div",{style:{marginBottom:40},children:[m.jsx("div",{style:{position:"sticky",top:0,background:"var(--background)",zIndex:10,paddingBottom:12,marginBottom:20},children:m.jsxs("h3",{style:{fontSize:16,fontWeight:700,color:"var(--text)",display:"flex",alignItems:"center",gap:12},children:[m.jsx("div",{style:{width:12,height:12,borderRadius:"50%",background:"var(--accent)"}}),g,m.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"var(--text-muted)",marginLeft:8},children:[v.length," ",v.length===1?"session":"sessions"]})]})}),m.jsxs("div",{style:{position:"relative",paddingLeft:40},children:[m.jsx("div",{style:{position:"absolute",left:5,top:0,bottom:_===Object.keys(h).length-1?"50%":0,width:2,background:"var(--border)"}}),v.map((j,w)=>{const k=j.ended_at?j.ended_at-j.started_at:0,L=Array.isArray(j.summary_files_changed)?j.summary_files_changed.length:0,R=j.tool_use_count||0,E=j.status==="completed";return m.jsxs("div",{style:{position:"relative",marginBottom:w<v.length-1?24:0},children:[m.jsx("div",{style:{position:"absolute",left:-34,top:20,width:12,height:12,borderRadius:"50%",background:E?"var(--green)":"var(--orange)",border:"3px solid var(--background)",zIndex:1}}),m.jsx("div",{onClick:Y=>{n?i(j.id,!a.has(j.id)):o(`/session/${j.id}`)},style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:16,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:Y=>{Y.currentTarget.style.background="var(--surface2)",Y.currentTarget.style.borderColor="var(--accent)30"},onMouseLeave:Y=>{Y.currentTarget.style.background="var(--surface)",Y.currentTarget.style.borderColor="var(--border)"},children:m.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[n&&m.jsx("input",{type:"checkbox",checked:a.has(j.id),onChange:Y=>{Y.stopPropagation(),i(j.id,Y.target.checked)},onClick:Y=>Y.stopPropagation(),style:{marginTop:4,cursor:"pointer"}}),m.jsxs("div",{style:{flex:1},children:[m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8,fontWeight:600},children:d(j.started_at)}),m.jsx("h4",{style:{fontSize:15,fontWeight:600,color:"var(--text)",marginBottom:8},children:j.summary_title||"Untitled Session"}),m.jsxs("div",{style:{display:"flex",gap:16,fontSize:12,color:"var(--text-muted)",marginBottom:8},children:[k>0&&m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[m.jsx(Ts,{size:12}),f(k)]}),L>0&&m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[m.jsx(vi,{size:12}),L," files"]}),R>0&&m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[m.jsx(Ls,{size:12}),R," tools"]})]}),m.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",background:E?"var(--green)15":"var(--orange)15",color:E?"var(--green)":"var(--orange)",borderRadius:6,fontSize:11,fontWeight:600},children:[E?m.jsx(bl,{size:10}):m.jsx(g5,{size:10}),E?"Completed":"Active"]})]})]})})]},j.id)})]})]},g))})}function Cw({onOpenProject:t}){const{id:n}=j0(),[a,i]=ae.useState(!1),[o,u]=ae.useState(!1),[h,d]=ae.useState(!1),[f,g]=ae.useState(new Set),[v,_]=ae.useState(!1),[j,w]=ae.useState(!1),[k,L]=ae.useState(!1),[R,E]=ae.useState(""),[Y,H]=ae.useState({start:null,end:null}),[F,X]=ae.useState([]),[_e,xe]=ae.useState([]),[oe,Z]=ae.useState([]),[ge,O]=ae.useState([]),[U,ne]=ae.useState(()=>{const we=localStorage.getItem("sessionViewMode");return we==="card"||we==="table"||we==="timeline"?we:"card"}),[re,ve]=ae.useState(()=>localStorage.getItem("showCalendar")==="true"),[ee,J]=ae.useState(()=>localStorage.getItem("showAnalytics")==="true"),[le,Le]=ae.useState(null),[W,ce]=ae.useState({isOpen:!1,title:"",message:"",onConfirm:()=>{},confirmText:"Confirm",confirmColor:"var(--accent)"}),{data:T,isLoading:q}=va({queryKey:["project",n],queryFn:()=>cn.getProject(n),enabled:!!n}),{data:V,refetch:te}=va({queryKey:["sessions",n],queryFn:()=>cn.getSessions({project_id:n,limit:50}),enabled:!!n,refetchInterval:15e3}),{data:se}=va({queryKey:["health"],queryFn:cn.getHealth});ae.useEffect(()=>{T&&n&&t(n,T.name)},[T,n,t]),ae.useEffect(()=>{if(!n)return;let we;try{we=M0(),we.onmessage=Ye=>{try{const Je=JSON.parse(Ye.data);(Je.type==="session_start"||Je.type==="session_end"||Je.type==="summary_ready")&&te()}catch{}},we.onerror=()=>{console.log("[ProjectDetail] WebSocket error, falling back to polling")}}catch(Ye){console.log("[ProjectDetail] WebSocket connection failed:",Ye)}return()=>{we?.close()}},[n,te]);const ye=async()=>{if(!n)return;i(!0);const we=Ke.loading("Consolidating memory...");try{await cn.consolidateMemory(n),Ke.dismiss(we),Ke.success("Memory consolidation complete!")}catch(Ye){Ke.dismiss(we),Ke.error("Consolidation failed: "+Ye)}finally{i(!1)}},je=async(we=!1)=>{n&&ce({isOpen:!0,title:we?"Force Resync All Sessions":"Resync New Sessions",message:we?"This will regenerate ALL summaries with v2.0 fields (mood, complexity, blockers, resolved, key insights). This may take several minutes. Continue?":'This will only process sessions without summaries. To regenerate existing summaries with v2.0 fields, use "Force Resync All". Continue?',confirmText:we?"Force Resync":"Resync",confirmColor:we?"var(--orange)":"var(--blue)",onConfirm:async()=>{ce({...W,isOpen:!1}),u(!0);const Ye=Ke.loading("Queueing sessions for resync...",0);try{const Je=await cn.resyncProject(n,we);Ke.update(Ye,`Queued ${Je.result.queued} sessions. Processing...`,50),setTimeout(()=>{Ke.dismiss(Ye),Ke.success(Je.result.message)},2e3),te()}catch(Je){Ke.dismiss(Ye),Ke.error("Resync failed: "+Je)}finally{u(!1)}}})},Ce=()=>{d(!h),g(new Set)},ze=()=>{f.size===Wt.length?g(new Set):g(new Set(Wt.map(we=>we.id)))},We=(we,Ye)=>{const Je=new Set(f);Ye?Je.add(we):Je.delete(we),g(Je)},Xe=()=>{ce({isOpen:!0,title:"Delete Sessions",message:`This will permanently delete ${f.size} sessions and all their data. This action cannot be undone.`,confirmText:"Delete",confirmColor:"var(--red)",onConfirm:async()=>{ce({...W,isOpen:!1});const we=Ke.loading(`Deleting ${f.size} sessions...`);try{await Promise.all(Array.from(f).map(Ye=>cn.deleteSession(Ye))),Ke.dismiss(we),Ke.success(`Deleted ${f.size} sessions`),g(new Set),d(!1),te()}catch(Ye){Ke.dismiss(we),Ke.error("Failed to delete sessions: "+Ye)}}})},Ve=async()=>{const we=Ke.loading(`Bookmarking ${f.size} sessions...`);try{await Promise.all(Array.from(f).map(Ye=>cn.toggleBookmark(Ye,!0))),Ke.dismiss(we),Ke.success(`Bookmarked ${f.size} sessions`),g(new Set),d(!1),te()}catch(Ye){Ke.dismiss(we),Ke.error("Failed to bookmark sessions: "+Ye)}},dt=()=>{_(!0)},G=async()=>{const we=Ke.loading(`Exporting ${f.size} sessions...`);try{const Ye=(await Ud(async()=>{const{default:Et}=await import("./jszip.min-CSBY1G_D.js").then(Ct=>Ct.j);return{default:Et}},[])).default,Je=new Ye,Kt=Array.from(f).map(Et=>cn.getSession(Et));(await Promise.all(Kt)).forEach(Et=>{const Ct=Et.summary_title||"Untitled Session",nn=`${new Date(Et.started_at*1e3).toISOString().split("T")[0]}_${Ct.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.md`,ni=`# ${Ct}
|
|
428
|
+
|
|
429
|
+
**Date:** ${new Date(Et.started_at*1e3).toLocaleString()}
|
|
430
|
+
**Status:** ${Et.status}
|
|
431
|
+
**Duration:** ${Et.ended_at?Math.round((Et.ended_at-Et.started_at)/60):0} minutes
|
|
432
|
+
|
|
433
|
+
## What We Did
|
|
434
|
+
${Array.isArray(Et.summary_what_we_did)?Et.summary_what_we_did.map(pn=>`- ${pn}`).join(`
|
|
435
|
+
`):"N/A"}
|
|
436
|
+
|
|
437
|
+
## Decisions Made
|
|
438
|
+
${Array.isArray(Et.summary_decisions)?Et.summary_decisions.map(pn=>`- ${pn}`).join(`
|
|
439
|
+
`):"N/A"}
|
|
440
|
+
|
|
441
|
+
## Files Changed
|
|
442
|
+
${Array.isArray(Et.summary_files_changed)?Et.summary_files_changed.map(pn=>`- ${pn}`).join(`
|
|
443
|
+
`):"N/A"}
|
|
444
|
+
|
|
445
|
+
## Next Steps
|
|
446
|
+
${Array.isArray(Et.summary_next_steps)?Et.summary_next_steps.map(pn=>`- ${pn}`).join(`
|
|
447
|
+
`):"N/A"}
|
|
448
|
+
|
|
449
|
+
## Gotchas
|
|
450
|
+
${Array.isArray(Et.summary_gotchas)?Et.summary_gotchas.map(pn=>`- ${pn}`).join(`
|
|
451
|
+
`):"N/A"}
|
|
452
|
+
`;Je.file(nn,ni)});const fn=await Je.generateAsync({type:"blob"}),yt=URL.createObjectURL(fn),At=document.createElement("a");At.href=yt,At.download=`sessions_export_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(At),At.click(),document.body.removeChild(At),URL.revokeObjectURL(yt),Ke.dismiss(we),Ke.success(`Exported ${f.size} sessions as ZIP`),g(new Set),d(!1)}catch(Ye){Ke.dismiss(we),Ke.error("Failed to export sessions: "+Ye)}},Qe=()=>{g(new Set),d(!1),te()};if(se?.uptime,q)return m.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading..."});if(!T)return m.jsx("div",{style:{padding:32,color:"var(--red)",fontSize:13},children:"Project not found"});const xt=V||T.sessions||[],ut=xt.map(we=>({...we,summary_what_we_did:af(we.summary_what_we_did),summary_decisions:af(we.summary_decisions),summary_files_changed:af(we.summary_files_changed),summary_next_steps:af(we.summary_next_steps),summary_gotchas:af(we.summary_gotchas)})),Ie=j?ut:ut.filter(we=>!we.is_archived),mt=k?Ie.filter(we=>we.is_bookmarked):Ie,Ze=R?mt.filter(we=>{const Ye=R.toLowerCase(),Je=(we.summary_title||"").toLowerCase(),Kt=Array.isArray(we.summary_what_we_did)?we.summary_what_we_did.join(" ").toLowerCase():"",rt=Array.isArray(we.summary_files_changed)?we.summary_files_changed.join(" ").toLowerCase():"";return Je.includes(Ye)||Kt.includes(Ye)||rt.includes(Ye)}):mt,bt=Ze.filter(we=>{const Ye=F.length===0||we.summary_mood&&F.includes(we.summary_mood),Je=_e.length===0||we.summary_complexity&&_e.includes(we.summary_complexity),Kt=oe.length===0||oe.includes(we.status);let rt=!0;return ge.length>0&&Array.isArray(we.summary_files_changed)&&(rt=we.summary_files_changed.some(fn=>ge.some(yt=>fn.endsWith(yt)))),Ye&&Je&&Kt&&rt}),ht=Y.start||Y.end?bt.filter(we=>{const Ye=new Date(we.started_at*1e3),Je=!Y.start||Ye>=Y.start,Kt=!Y.end||Ye<=new Date(Y.end.getTime()+864e5);return Je&&Kt}):Ze,Wt=le?ht.filter(we=>new Date(we.started_at*1e3).toDateString()===le.toDateString()):ht,Gt=new Set(ut.flatMap(we=>Array.isArray(we.summary_files_changed)?we.summary_files_changed:[])).size,wt=ut.filter(we=>we.is_archived).length,_t=ut.filter(we=>we.is_bookmarked).length,Dt=(we,Ye)=>{H({start:we,end:Ye})},$e=we=>{ne(we),localStorage.setItem("sessionViewMode",we)},qt=()=>{const we=!re;ve(we),localStorage.setItem("showCalendar",String(we))},pt=()=>{const we=!ee;J(we),localStorage.setItem("showAnalytics",String(we))},Dn=we=>{le&&le.toDateString()===we.toDateString()?Le(null):Le(we)};return m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsxs(Ns,{to:"/",style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:20},children:[m.jsx(R0,{size:13})," Back to Projects"]}),m.jsxs("div",{style:{marginBottom:24},children:[m.jsx("h1",{style:{fontSize:24,fontWeight:700,marginBottom:6},children:T.name}),T.git_remote&&m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:12},children:[m.jsx(x5,{size:12}),T.git_remote.replace(/^https?:\/\//,"").replace(/\.git$/,"")]}),m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:16},children:[m.jsx(b5,{size:12}),T.root_path]}),m.jsx("div",{style:{display:"flex",gap:20,marginBottom:16},children:[{label:"Sessions",value:xt.length},{label:"Files Changed",value:Gt},{label:"Completed",value:xt.filter(we=>we.status==="completed").length}].map(we=>m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"10px 16px"},children:[m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:we.value}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:we.label})]},we.label))}),m.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[m.jsxs("button",{onClick:Ce,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:h?"var(--accent)":"var(--surface2)",color:h?"white":"var(--text)",border:"1px solid",borderColor:h?"var(--accent)":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:we=>{h||(we.currentTarget.style.background="var(--surface)")},onMouseLeave:we=>{h||(we.currentTarget.style.background="var(--surface2)")},children:[h?m.jsx($d,{size:16}):m.jsx(_5,{size:16}),h?"Exit Selection":"Select Sessions"]}),h&&ut.length>0&&m.jsx("button",{onClick:ze,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:we=>we.currentTarget.style.background="var(--surface)",onMouseLeave:we=>we.currentTarget.style.background="var(--surface2)",children:f.size===Ie.length?"Deselect All":"Select All"}),m.jsxs(Ns,{to:`/project/${n}/memory`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,textDecoration:"none",transition:"all 0.15s"},onMouseEnter:we=>we.currentTarget.style.background="var(--surface)",onMouseLeave:we=>we.currentTarget.style.background="var(--surface2)",children:[m.jsx(vf,{size:16}),"View Memory"]}),m.jsxs("button",{onClick:()=>je(!1),disabled:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:o?"var(--surface)":"var(--surface2)",color:o?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:o?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:we=>{o||(we.currentTarget.style.background="var(--surface)")},onMouseLeave:we=>{o||(we.currentTarget.style.background="var(--surface2)")},children:[m.jsx(ml,{size:16,style:{animation:o?"spin 1s linear infinite":"none"}}),o?"Resyncing...":"Resync New"]}),m.jsxs("button",{onClick:()=>je(!0),disabled:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:o?"var(--surface)":"var(--surface2)",color:o?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:o?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:we=>{o||(we.currentTarget.style.background="var(--surface)")},onMouseLeave:we=>{o||(we.currentTarget.style.background="var(--surface2)")},children:[m.jsx(ml,{size:16,style:{animation:o?"spin 1s linear infinite":"none"}}),o?"Resyncing...":"Force Resync All"]}),m.jsxs("button",{onClick:ye,disabled:a,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:a?"var(--surface)":"var(--surface2)",color:a?"var(--text-muted)":"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:a?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:we=>{a||(we.currentTarget.style.background="var(--surface)")},onMouseLeave:we=>{a||(we.currentTarget.style.background="var(--surface2)")},children:[m.jsx(ml,{size:16,style:{animation:a?"spin 1s linear infinite":"none"}}),a?"Consolidating...":"Consolidate Memory"]}),wt>0&&m.jsx("button",{onClick:()=>w(!j),style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:j?"var(--accent)15":"var(--surface2)",color:j?"var(--accent)":"var(--text)",border:"1px solid",borderColor:j?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:j?"Hide Archived":`Show Archived (${wt})`}),_t>0&&m.jsx("button",{onClick:()=>L(!k),style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:k?"var(--accent)15":"var(--surface2)",color:k?"var(--accent)":"var(--text)",border:"1px solid",borderColor:k?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:k?"Show All":`Show Bookmarked (${_t})`}),m.jsxs("button",{onClick:qt,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:re?"var(--accent)15":"var(--surface2)",color:re?"var(--accent)":"var(--text)",border:"1px solid",borderColor:re?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:we=>{re||(we.currentTarget.style.background="var(--surface)")},onMouseLeave:we=>{re||(we.currentTarget.style.background="var(--surface2)")},children:[m.jsx(Kd,{size:16}),re?"Hide Calendar":"Show Calendar"]}),m.jsxs("button",{onClick:pt,style:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 14px",background:ee?"var(--accent)15":"var(--surface2)",color:ee?"var(--accent)":"var(--text)",border:"1px solid",borderColor:ee?"var(--accent)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:we=>{ee||(we.currentTarget.style.background="var(--surface)")},onMouseLeave:we=>{ee||(we.currentTarget.style.background="var(--surface2)")},children:[m.jsx(O0,{size:16}),ee?"Hide Analytics":"Show Analytics"]})]})]}),ut.length===0?m.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No sessions recorded yet"}):m.jsxs(m.Fragment,{children:[m.jsx(_w,{projectId:n}),m.jsx(Ew,{sessions:ut}),ee&&m.jsx(Lw,{sessions:ut}),re&&m.jsx(Nw,{sessions:ht,onDateClick:Dn,selectedDate:le}),m.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16,flexWrap:"wrap",alignItems:"center"},children:[m.jsx(D5,{onSearch:E,placeholder:"Search by title, content, or files..."}),m.jsx(Aw,{onDateRangeChange:Dt}),m.jsx(Ed,{label:"Mood",options:["productive","struggling","learning","blocked","flow"],selected:F,onChange:X,placeholder:"Filter by mood"}),m.jsx(Ed,{label:"Complexity",options:["simple","moderate","complex","very-complex"],selected:_e,onChange:xe,placeholder:"Filter by complexity"}),m.jsx(Ed,{label:"Status",options:["active","completed"],selected:oe,onChange:Z,placeholder:"Filter by status"}),m.jsx(Ed,{label:"Technology",options:[".ts",".tsx",".js",".jsx",".py",".go",".java",".rs",".md",".json"],selected:ge,onChange:O,placeholder:"Filter by file type"}),m.jsx("div",{style:{marginLeft:"auto"},children:m.jsx(jw,{viewMode:U,onToggle:$e})})]}),m.jsxs("h2",{style:{fontSize:14,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:12},children:["Sessions (",Wt.length,!j&&wt>0?` • ${wt} archived`:"",")",R&&` • Filtered by "${R}"`,(Y.start||Y.end)&&" • Date filtered",le&&` • ${Wt.length} on ${le.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`,k&&" • Bookmarked only"]}),Wt.length===0?m.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No sessions match your filters"}):U==="table"?m.jsx(kw,{sessions:Wt,selectionMode:h,selectedSessions:f,onSelectionChange:We}):U==="timeline"?m.jsx(Tw,{sessions:Wt,selectionMode:h,selectedSessions:f,onSelectionChange:We}):Wt.map(we=>m.jsx(xw,{session:we,onSessionUpdated:te,selectionMode:h,selected:f.has(we.id),onSelectionChange:Ye=>We(we.id,Ye)},we.id))]}),m.jsx(eh,{isOpen:W.isOpen,title:W.title,message:W.message,confirmText:W.confirmText,cancelText:"Cancel",confirmColor:W.confirmColor,onConfirm:W.onConfirm,onCancel:()=>ce({...W,isOpen:!1})}),m.jsx(ww,{selectedCount:f.size,onBulkDelete:Xe,onBulkBookmark:Ve,onBulkTag:dt,onBulkExport:G,onClearSelection:()=>{g(new Set),d(!1)}}),m.jsx(Sw,{isOpen:v,sessionIds:Array.from(f),onClose:()=>_(!1),onComplete:Qe})]})}function af(t){if(!t||Array.isArray(t))return t;try{return JSON.parse(t)}catch{return null}}function Gu({icon:t,title:n,items:a,color:i}){return!a||a.length===0?null:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[m.jsx(t,{size:14,color:i}),m.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em"},children:n})]}),m.jsx("ul",{style:{paddingLeft:0,listStyle:"none"},children:a.map((o,u)=>m.jsxs("li",{style:{padding:"4px 0",fontSize:13,color:"var(--text)",display:"flex",gap:8,alignItems:"flex-start",borderBottom:u<a.length-1?"1px solid var(--border)":"none"},children:[m.jsx("span",{style:{color:i,marginTop:2,flexShrink:0},children:"•"}),m.jsx("span",{children:o})]},u))})]})}function Mw(t){return m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:12},children:[m.jsx(Gu,{icon:r0,title:"What We Did",items:t.summary_what_we_did,color:"var(--green)"}),m.jsx(Gu,{icon:x5,title:"Decisions Made",items:t.summary_decisions,color:"var(--accent)"}),m.jsx(Gu,{icon:vi,title:"Files Changed",items:t.summary_files_changed,color:"var(--blue)"}),m.jsx(Gu,{icon:m3,title:"Next Steps",items:t.summary_next_steps,color:"var(--yellow)"}),m.jsx(Gu,{icon:P4,title:"Gotchas",items:t.summary_gotchas,color:"var(--red)"}),m.jsx(Gu,{icon:z3,title:"Tech Notes",items:t.summary_tech_notes,color:"var(--text-muted)"})]})}const Rw={tool_call:Ls,file_edit:U3,user_message:w5,assistant_message:vf,decision:vf},Ow={tool_call:"var(--accent)",file_edit:"var(--blue)",user_message:"var(--green)",assistant_message:"var(--text-muted)",decision:"var(--yellow)"};function Dw({observations:t}){if(!t||t.length===0)return m.jsx("div",{style:{padding:"40px 0",textAlign:"center",color:"var(--text-muted)",fontSize:13},children:"No observations recorded"});const n=[...t].sort((a,i)=>i.created_at-a.created_at);return m.jsxs("div",{style:{position:"relative"},children:[m.jsx("div",{style:{position:"absolute",left:16,top:0,bottom:0,width:1,background:"var(--border)"}}),n.map((a,i)=>{const o=Rw[a.event_type]||O4,u=Ow[a.event_type]||"var(--text-muted)",h=yo(new Date(a.created_at*1e3),"HH:mm:ss");return m.jsxs("div",{style:{display:"flex",gap:14,paddingLeft:0,marginBottom:12},children:[m.jsx("div",{style:{width:32,height:32,borderRadius:"50%",background:"var(--surface2)",border:`1px solid ${u}22`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,zIndex:1},children:m.jsx(o,{size:13,color:u})}),m.jsxs("div",{style:{flex:1,paddingTop:6},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:2},children:[m.jsx("span",{style:{fontSize:12,fontWeight:600,color:u},children:a.tool_name||a.event_type}),m.jsx("span",{style:{fontSize:11,color:"var(--text-muted)"},children:h})]}),a.content&&m.jsx("div",{style:{fontSize:12,color:"var(--text)",fontFamily:a.event_type==="tool_call"?"monospace":"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:a.content}),a.file_path&&m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"monospace",marginTop:2},children:a.file_path})]})]},a.id)})]})}function zw({text:t,label:n="Copy"}){const[a,i]=ae.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch{}};return m.jsxs("button",{onClick:o,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:a?"var(--green)15":"var(--surface2)",color:a?"var(--green)":"var(--text)",border:"1px solid",borderColor:a?"var(--green)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:u=>{a||(u.currentTarget.style.background="var(--surface)")},onMouseLeave:u=>{a||(u.currentTarget.style.background="var(--surface2)")},children:[a?m.jsx(p5,{size:16}):m.jsx(m5,{size:16}),a?"Copied!":n]})}function Bw({text:t,filename:n,label:a="Download"}){const i=()=>{const o=new Blob([t],{type:"text/markdown"}),u=URL.createObjectURL(o),h=document.createElement("a");h.href=u,h.download=n,document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(u)};return m.jsxs("button",{onClick:i,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.background="var(--surface)"},onMouseLeave:o=>{o.currentTarget.style.background="var(--surface2)"},children:[m.jsx(oh,{size:16}),a]})}function Sn(t){"@babel/helpers - typeof";return Sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sn(t)}var Vi=Uint8Array,ei=Uint16Array,B0=Int32Array,P0=new Vi([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]),q0=new Vi([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]),jg=new Vi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),z5=function(t,n){for(var a=new ei(31),i=0;i<31;++i)a[i]=n+=1<<t[i-1];for(var o=new B0(a[30]),i=1;i<30;++i)for(var u=a[i];u<a[i+1];++u)o[u]=u-a[i]<<5|i;return{b:a,r:o}},B5=z5(P0,2),Pw=B5.b,s0=B5.r;Pw[28]=258,s0[258]=28;var qw=z5(q0,0),kg=qw.r,o0=new ei(32768);for(var qn=0;qn<32768;++qn){var dl=(qn&43690)>>1|(qn&21845)<<1;dl=(dl&52428)>>2|(dl&13107)<<2,dl=(dl&61680)>>4|(dl&3855)<<4,o0[qn]=((dl&65280)>>8|(dl&255)<<8)>>1}var pf=(function(t,n,a){for(var i=t.length,o=0,u=new ei(n);o<i;++o)t[o]&&++u[t[o]-1];var h=new ei(n);for(o=1;o<n;++o)h[o]=h[o-1]+u[o-1]<<1;var d;if(a){d=new ei(1<<n);var f=15-n;for(o=0;o<i;++o)if(t[o])for(var g=o<<4|t[o],v=n-t[o],_=h[t[o]-1]++<<v,j=_|(1<<v)-1;_<=j;++_)d[o0[_]>>f]=g}else for(d=new ei(i),o=0;o<i;++o)t[o]&&(d[o]=o0[h[t[o]-1]++]>>15-t[o]);return d}),Kl=new Vi(288);for(var qn=0;qn<144;++qn)Kl[qn]=8;for(var qn=144;qn<256;++qn)Kl[qn]=9;for(var qn=256;qn<280;++qn)Kl[qn]=7;for(var qn=280;qn<288;++qn)Kl[qn]=8;var th=new Vi(32);for(var qn=0;qn<32;++qn)th[qn]=5;var Uw=pf(Kl,9,0),Fw=pf(th,5,0),P5=function(t){return(t+7)/8|0},Iw=function(t,n,a){return(a==null||a>t.length)&&(a=t.length),new Vi(t.subarray(n,a))},po=function(t,n,a){a<<=n&7;var i=n/8|0;t[i]|=a,t[i+1]|=a>>8},sf=function(t,n,a){a<<=n&7;var i=n/8|0;t[i]|=a,t[i+1]|=a>>8,t[i+2]|=a>>16},L1=function(t,n){for(var a=[],i=0;i<t.length;++i)t[i]&&a.push({s:i,f:t[i]});var o=a.length,u=a.slice();if(!o)return{t:U5,l:0};if(o==1){var h=new Vi(a[0].s+1);return h[a[0].s]=1,{t:h,l:1}}a.sort(function(X,_e){return X.f-_e.f}),a.push({s:-1,f:25001});var d=a[0],f=a[1],g=0,v=1,_=2;for(a[0]={s:-1,f:d.f+f.f,l:d,r:f};v!=o-1;)d=a[a[g].f<a[_].f?g++:_++],f=a[g!=v&&a[g].f<a[_].f?g++:_++],a[v++]={s:-1,f:d.f+f.f,l:d,r:f};for(var j=u[0].s,i=1;i<o;++i)u[i].s>j&&(j=u[i].s);var w=new ei(j+1),k=l0(a[v-1],w,0);if(k>n){var i=0,L=0,R=k-n,E=1<<R;for(u.sort(function(_e,xe){return w[xe.s]-w[_e.s]||_e.f-xe.f});i<o;++i){var Y=u[i].s;if(w[Y]>n)L+=E-(1<<k-w[Y]),w[Y]=n;else break}for(L>>=R;L>0;){var H=u[i].s;w[H]<n?L-=1<<n-w[H]++-1:++i}for(;i>=0&&L;--i){var F=u[i].s;w[F]==n&&(--w[F],++L)}k=n}return{t:new Vi(w),l:k}},l0=function(t,n,a){return t.s==-1?Math.max(l0(t.l,n,a+1),l0(t.r,n,a+1)):n[t.s]=a},Ng=function(t){for(var n=t.length;n&&!t[--n];);for(var a=new ei(++n),i=0,o=t[0],u=1,h=function(f){a[i++]=f},d=1;d<=n;++d)if(t[d]==o&&d!=n)++u;else{if(!o&&u>2){for(;u>138;u-=138)h(32754);u>2&&(h(u>10?u-11<<5|28690:u-3<<5|12305),u=0)}else if(u>3){for(h(o),--u;u>6;u-=6)h(8304);u>2&&(h(u-3<<5|8208),u=0)}for(;u--;)h(o);u=1,o=t[d]}return{c:a.subarray(0,i),n}},of=function(t,n){for(var a=0,i=0;i<n.length;++i)a+=t[i]*n[i];return a},q5=function(t,n,a){var i=a.length,o=P5(n+2);t[o]=i&255,t[o+1]=i>>8,t[o+2]=t[o]^255,t[o+3]=t[o+1]^255;for(var u=0;u<i;++u)t[o+u+4]=a[u];return(o+4+i)*8},Lg=function(t,n,a,i,o,u,h,d,f,g,v){po(n,v++,a),++o[256];for(var _=L1(o,15),j=_.t,w=_.l,k=L1(u,15),L=k.t,R=k.l,E=Ng(j),Y=E.c,H=E.n,F=Ng(L),X=F.c,_e=F.n,xe=new ei(19),oe=0;oe<Y.length;++oe)++xe[Y[oe]&31];for(var oe=0;oe<X.length;++oe)++xe[X[oe]&31];for(var Z=L1(xe,7),ge=Z.t,O=Z.l,U=19;U>4&&!ge[jg[U-1]];--U);var ne=g+5<<3,re=of(o,Kl)+of(u,th)+h,ve=of(o,j)+of(u,L)+h+14+3*U+of(xe,ge)+2*xe[16]+3*xe[17]+7*xe[18];if(f>=0&&ne<=re&&ne<=ve)return q5(n,v,t.subarray(f,f+g));var ee,J,le,Le;if(po(n,v,1+(ve<re)),v+=2,ve<re){ee=pf(j,w,0),J=j,le=pf(L,R,0),Le=L;var W=pf(ge,O,0);po(n,v,H-257),po(n,v+5,_e-1),po(n,v+10,U-4),v+=14;for(var oe=0;oe<U;++oe)po(n,v+3*oe,ge[jg[oe]]);v+=3*U;for(var ce=[Y,X],T=0;T<2;++T)for(var q=ce[T],oe=0;oe<q.length;++oe){var V=q[oe]&31;po(n,v,W[V]),v+=ge[V],V>15&&(po(n,v,q[oe]>>5&127),v+=q[oe]>>12)}}else ee=Uw,J=Kl,le=Fw,Le=th;for(var oe=0;oe<d;++oe){var te=i[oe];if(te>255){var V=te>>18&31;sf(n,v,ee[V+257]),v+=J[V+257],V>7&&(po(n,v,te>>23&31),v+=P0[V]);var se=te&31;sf(n,v,le[se]),v+=Le[se],se>3&&(sf(n,v,te>>5&8191),v+=q0[se])}else sf(n,v,ee[te]),v+=J[te]}return sf(n,v,ee[256]),v+J[256]},Hw=new B0([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),U5=new Vi(0),Ww=function(t,n,a,i,o,u){var h=u.z||t.length,d=new Vi(i+h+5*(1+Math.ceil(h/7e3))+o),f=d.subarray(i,d.length-o),g=u.l,v=(u.r||0)&7;if(n){v&&(f[0]=u.r>>3);for(var _=Hw[n-1],j=_>>13,w=_&8191,k=(1<<a)-1,L=u.p||new ei(32768),R=u.h||new ei(k+1),E=Math.ceil(a/3),Y=2*E,H=function(dt){return(t[dt]^t[dt+1]<<E^t[dt+2]<<Y)&k},F=new B0(25e3),X=new ei(288),_e=new ei(32),xe=0,oe=0,Z=u.i||0,ge=0,O=u.w||0,U=0;Z+2<h;++Z){var ne=H(Z),re=Z&32767,ve=R[ne];if(L[re]=ve,R[ne]=re,O<=Z){var ee=h-Z;if((xe>7e3||ge>24576)&&(ee>423||!g)){v=Lg(t,f,0,F,X,_e,oe,ge,U,Z-U,v),ge=xe=oe=0,U=Z;for(var J=0;J<286;++J)X[J]=0;for(var J=0;J<30;++J)_e[J]=0}var le=2,Le=0,W=w,ce=re-ve&32767;if(ee>2&&ne==H(Z-ce))for(var T=Math.min(j,ee)-1,q=Math.min(32767,Z),V=Math.min(258,ee);ce<=q&&--W&&re!=ve;){if(t[Z+le]==t[Z+le-ce]){for(var te=0;te<V&&t[Z+te]==t[Z+te-ce];++te);if(te>le){if(le=te,Le=ce,te>T)break;for(var se=Math.min(ce,te-2),ye=0,J=0;J<se;++J){var je=Z-ce+J&32767,Ce=L[je],ze=je-Ce&32767;ze>ye&&(ye=ze,ve=je)}}}re=ve,ve=L[re],ce+=re-ve&32767}if(Le){F[ge++]=268435456|s0[le]<<18|kg[Le];var We=s0[le]&31,Xe=kg[Le]&31;oe+=P0[We]+q0[Xe],++X[257+We],++_e[Xe],O=Z+le,++xe}else F[ge++]=t[Z],++X[t[Z]]}}for(Z=Math.max(Z,O);Z<h;++Z)F[ge++]=t[Z],++X[t[Z]];v=Lg(t,f,g,F,X,_e,oe,ge,U,Z-U,v),g||(u.r=v&7|f[v/8|0]<<3,v-=7,u.h=R,u.p=L,u.i=Z,u.w=O)}else{for(var Z=u.w||0;Z<h+g;Z+=65535){var Ve=Z+65535;Ve>=h&&(f[v/8|0]=g,Ve=h),v=q5(f,v+1,t.subarray(Z,Ve))}u.i=h}return Iw(d,0,i+P5(v)+o)},F5=function(){var t=1,n=0;return{p:function(a){for(var i=t,o=n,u=a.length|0,h=0;h!=u;){for(var d=Math.min(h+2655,u);h<d;++h)o+=i+=a[h];i=(i&65535)+15*(i>>16),o=(o&65535)+15*(o>>16)}t=i,n=o},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},Yw=function(t,n,a,i,o){if(!o&&(o={l:1},n.dictionary)){var u=n.dictionary.subarray(-32768),h=new Vi(u.length+t.length);h.set(u),h.set(t,u.length),t=h,o.w=u.length}return Ww(t,n.level==null?6:n.level,n.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,a,i,o)},I5=function(t,n,a){for(;a;++n)t[n]=a,a>>>=8},Gw=function(t,n){var a=n.level,i=a==0?0:a<6?1:a==9?3:2;if(t[0]=120,t[1]=i<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var o=F5();o.p(n.dictionary),I5(t,2,o.d())}};function u0(t,n){n||(n={});var a=F5();a.p(t);var i=Yw(t,n,n.dictionary?6:2,4);return Gw(i,n),I5(i,i.length-4,a.d()),i}var Vw=typeof TextDecoder<"u"&&new TextDecoder,Qw=0;try{Vw.decode(U5,{stream:!0}),Qw=1}catch{}function Xw(t){if(Array.isArray(t))return t}function Kw(t,n){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var i,o,u,h,d=[],f=!0,g=!1;try{if(u=(a=a.call(t)).next,n!==0)for(;!(f=(i=u.call(a)).done)&&(d.push(i.value),d.length!==n);f=!0);}catch(v){g=!0,o=v}finally{try{if(!f&&a.return!=null&&(h=a.return(),Object(h)!==h))return}finally{if(g)throw o}}return d}}function Eg(t,n){(n==null||n>t.length)&&(n=t.length);for(var a=0,i=Array(n);a<n;a++)i[a]=t[a];return i}function $w(t,n){if(t){if(typeof t=="string")return Eg(t,n);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Eg(t,n):void 0}}function Zw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
453
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tg(t,n){return Xw(t)||Kw(t,n)||$w(t,n)||Zw()}function Cg(t,n="utf8"){return new TextDecoder(n).decode(t)}const Jw=new TextEncoder;function eS(t){return Jw.encode(t)}const tS=1024*8,nS=(()=>{const t=new Uint8Array(4),n=new Uint32Array(t.buffer);return!((n[0]=1)&t[0])})(),E1={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 U0{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(n=tS,a={}){let i=!1;typeof n=="number"?n=new ArrayBuffer(n):(i=!0,this.lastWrittenByte=n.byteLength);const o=a.offset?a.offset>>>0:0,u=n.byteLength-o;let h=o;(ArrayBuffer.isView(n)||n instanceof U0)&&(n.byteLength!==n.buffer.byteLength&&(h=n.byteOffset+o),n=n.buffer),i?this.lastWrittenByte=u:this.lastWrittenByte=0,this.buffer=n,this.length=u,this.byteLength=u,this.byteOffset=h,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,h,u),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,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 n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){const i=(this.offset+n)*2,o=new Uint8Array(i);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=i,this.byteLength=i,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(n=1){return this.readArray(n,"uint8")}readArray(n,a){const i=E1[a].BYTES_PER_ELEMENT*n,o=this.byteOffset+this.offset,u=this.buffer.slice(o,o+i);if(this.littleEndian===nS&&a!=="uint8"&&a!=="int8"){const d=new Uint8Array(this.buffer.slice(o,o+i));d.reverse();const f=new E1[a](d.buffer);return this.offset+=i,f.reverse(),f}const h=new E1[a](u);return this.offset+=i,h}readInt16(){const n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){const n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){const n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){const n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){const n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){const n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){const n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){const n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let a="";for(let i=0;i<n;i++)a+=this.readChar();return a}readUtf8(n=1){return Cg(this.readBytes(n))}decodeText(n=1,a="utf8"){return Cg(this.readBytes(n),a)}writeBoolean(n){return this.writeUint8(n?255:0),this}writeInt8(n){return this.ensureAvailable(1),this._data.setInt8(this.offset++,n),this._updateLastWrittenByte(),this}writeUint8(n){return this.ensureAvailable(1),this._data.setUint8(this.offset++,n),this._updateLastWrittenByte(),this}writeByte(n){return this.writeUint8(n)}writeBytes(n){this.ensureAvailable(n.length);for(let a=0;a<n.length;a++)this._data.setUint8(this.offset++,n[a]);return this._updateLastWrittenByte(),this}writeInt16(n){return this.ensureAvailable(2),this._data.setInt16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(n){return this.ensureAvailable(2),this._data.setUint16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(n){return this.ensureAvailable(4),this._data.setInt32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(n){return this.ensureAvailable(4),this._data.setUint32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(n){return this.ensureAvailable(4),this._data.setFloat32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(n){return this.ensureAvailable(8),this._data.setFloat64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(n){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(n){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(n){return this.writeUint8(n.charCodeAt(0))}writeChars(n){for(let a=0;a<n.length;a++)this.writeUint8(n.charCodeAt(a));return this}writeUtf8(n){return this.writeBytes(eS(n))}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)}}function fc(t){let n=t.length;for(;--n>=0;)t[n]=0}const rS=3,aS=258,H5=29,iS=256,sS=iS+1+H5,W5=30,oS=512,lS=new Array((sS+2)*2);fc(lS);const uS=new Array(W5*2);fc(uS);const cS=new Array(oS);fc(cS);const fS=new Array(aS-rS+1);fc(fS);const dS=new Array(H5);fc(dS);const hS=new Array(W5);fc(hS);const pS=(t,n,a,i)=>{let o=t&65535|0,u=t>>>16&65535|0,h=0;for(;a!==0;){h=a>2e3?2e3:a,a-=h;do o=o+n[i++]|0,u=u+o|0;while(--h);o%=65521,u%=65521}return o|u<<16|0};var c0=pS;const gS=()=>{let t,n=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;n[a]=t}return n},mS=new Uint32Array(gS()),yS=(t,n,a,i)=>{const o=mS,u=i+a;t^=-1;for(let h=i;h<u;h++)t=t>>>8^o[(t^n[h])&255];return t^-1};var ws=yS,f0={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"},Y5={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const vS=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);var bS=function(t){const n=Array.prototype.slice.call(arguments,1);for(;n.length;){const a=n.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(const i in a)vS(a,i)&&(t[i]=a[i])}}return t},xS=t=>{let n=0;for(let i=0,o=t.length;i<o;i++)n+=t[i].length;const a=new Uint8Array(n);for(let i=0,o=0,u=t.length;i<u;i++){let h=t[i];a.set(h,o),o+=h.length}return a},G5={assign:bS,flattenChunks:xS};let V5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{V5=!1}const Sf=new Uint8Array(256);for(let t=0;t<256;t++)Sf[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Sf[254]=Sf[254]=1;var wS=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let n,a,i,o,u,h=t.length,d=0;for(o=0;o<h;o++)a=t.charCodeAt(o),(a&64512)===55296&&o+1<h&&(i=t.charCodeAt(o+1),(i&64512)===56320&&(a=65536+(a-55296<<10)+(i-56320),o++)),d+=a<128?1:a<2048?2:a<65536?3:4;for(n=new Uint8Array(d),u=0,o=0;u<d;o++)a=t.charCodeAt(o),(a&64512)===55296&&o+1<h&&(i=t.charCodeAt(o+1),(i&64512)===56320&&(a=65536+(a-55296<<10)+(i-56320),o++)),a<128?n[u++]=a:a<2048?(n[u++]=192|a>>>6,n[u++]=128|a&63):a<65536?(n[u++]=224|a>>>12,n[u++]=128|a>>>6&63,n[u++]=128|a&63):(n[u++]=240|a>>>18,n[u++]=128|a>>>12&63,n[u++]=128|a>>>6&63,n[u++]=128|a&63);return n};const SS=(t,n)=>{if(n<65534&&t.subarray&&V5)return String.fromCharCode.apply(null,t.length===n?t:t.subarray(0,n));let a="";for(let i=0;i<n;i++)a+=String.fromCharCode(t[i]);return a};var _S=(t,n)=>{const a=n||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,n));let i,o;const u=new Array(a*2);for(o=0,i=0;i<a;){let h=t[i++];if(h<128){u[o++]=h;continue}let d=Sf[h];if(d>4){u[o++]=65533,i+=d-1;continue}for(h&=d===2?31:d===3?15:7;d>1&&i<a;)h=h<<6|t[i++]&63,d--;if(d>1){u[o++]=65533;continue}h<65536?u[o++]=h:(h-=65536,u[o++]=55296|h>>10&1023,u[o++]=56320|h&1023)}return SS(u,o)},AS=(t,n)=>{n=n||t.length,n>t.length&&(n=t.length);let a=n-1;for(;a>=0&&(t[a]&192)===128;)a--;return a<0||a===0?n:a+Sf[t[a]]>n?a:n},d0={string2buf:wS,buf2string:_S,utf8border:AS};function jS(){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 kS=jS;const Td=16209,NS=16191;var LS=function(n,a){let i,o,u,h,d,f,g,v,_,j,w,k,L,R,E,Y,H,F,X,_e,xe,oe,Z,ge;const O=n.state;i=n.next_in,Z=n.input,o=i+(n.avail_in-5),u=n.next_out,ge=n.output,h=u-(a-n.avail_out),d=u+(n.avail_out-257),f=O.dmax,g=O.wsize,v=O.whave,_=O.wnext,j=O.window,w=O.hold,k=O.bits,L=O.lencode,R=O.distcode,E=(1<<O.lenbits)-1,Y=(1<<O.distbits)-1;e:do{k<15&&(w+=Z[i++]<<k,k+=8,w+=Z[i++]<<k,k+=8),H=L[w&E];t:for(;;){if(F=H>>>24,w>>>=F,k-=F,F=H>>>16&255,F===0)ge[u++]=H&65535;else if(F&16){X=H&65535,F&=15,F&&(k<F&&(w+=Z[i++]<<k,k+=8),X+=w&(1<<F)-1,w>>>=F,k-=F),k<15&&(w+=Z[i++]<<k,k+=8,w+=Z[i++]<<k,k+=8),H=R[w&Y];n:for(;;){if(F=H>>>24,w>>>=F,k-=F,F=H>>>16&255,F&16){if(_e=H&65535,F&=15,k<F&&(w+=Z[i++]<<k,k+=8,k<F&&(w+=Z[i++]<<k,k+=8)),_e+=w&(1<<F)-1,_e>f){n.msg="invalid distance too far back",O.mode=Td;break e}if(w>>>=F,k-=F,F=u-h,_e>F){if(F=_e-F,F>v&&O.sane){n.msg="invalid distance too far back",O.mode=Td;break e}if(xe=0,oe=j,_===0){if(xe+=g-F,F<X){X-=F;do ge[u++]=j[xe++];while(--F);xe=u-_e,oe=ge}}else if(_<F){if(xe+=g+_-F,F-=_,F<X){X-=F;do ge[u++]=j[xe++];while(--F);if(xe=0,_<X){F=_,X-=F;do ge[u++]=j[xe++];while(--F);xe=u-_e,oe=ge}}}else if(xe+=_-F,F<X){X-=F;do ge[u++]=j[xe++];while(--F);xe=u-_e,oe=ge}for(;X>2;)ge[u++]=oe[xe++],ge[u++]=oe[xe++],ge[u++]=oe[xe++],X-=3;X&&(ge[u++]=oe[xe++],X>1&&(ge[u++]=oe[xe++]))}else{xe=u-_e;do ge[u++]=ge[xe++],ge[u++]=ge[xe++],ge[u++]=ge[xe++],X-=3;while(X>2);X&&(ge[u++]=ge[xe++],X>1&&(ge[u++]=ge[xe++]))}}else if((F&64)===0){H=R[(H&65535)+(w&(1<<F)-1)];continue n}else{n.msg="invalid distance code",O.mode=Td;break e}break}}else if((F&64)===0){H=L[(H&65535)+(w&(1<<F)-1)];continue t}else if(F&32){O.mode=NS;break e}else{n.msg="invalid literal/length code",O.mode=Td;break e}break}}while(i<o&&u<d);X=k>>3,i-=X,k-=X<<3,w&=(1<<k)-1,n.next_in=i,n.next_out=u,n.avail_in=i<o?5+(o-i):5-(i-o),n.avail_out=u<d?257+(d-u):257-(u-d),O.hold=w,O.bits=k};const Vu=15,Mg=852,Rg=592,Og=0,T1=1,Dg=2,ES=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]),TS=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]),CS=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]),MS=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]),RS=(t,n,a,i,o,u,h,d)=>{const f=d.bits;let g=0,v=0,_=0,j=0,w=0,k=0,L=0,R=0,E=0,Y=0,H,F,X,_e,xe,oe=null,Z;const ge=new Uint16Array(Vu+1),O=new Uint16Array(Vu+1);let U=null,ne,re,ve;for(g=0;g<=Vu;g++)ge[g]=0;for(v=0;v<i;v++)ge[n[a+v]]++;for(w=f,j=Vu;j>=1&&ge[j]===0;j--);if(w>j&&(w=j),j===0)return o[u++]=1<<24|64<<16|0,o[u++]=1<<24|64<<16|0,d.bits=1,0;for(_=1;_<j&&ge[_]===0;_++);for(w<_&&(w=_),R=1,g=1;g<=Vu;g++)if(R<<=1,R-=ge[g],R<0)return-1;if(R>0&&(t===Og||j!==1))return-1;for(O[1]=0,g=1;g<Vu;g++)O[g+1]=O[g]+ge[g];for(v=0;v<i;v++)n[a+v]!==0&&(h[O[n[a+v]]++]=v);if(t===Og?(oe=U=h,Z=20):t===T1?(oe=ES,U=TS,Z=257):(oe=CS,U=MS,Z=0),Y=0,v=0,g=_,xe=u,k=w,L=0,X=-1,E=1<<w,_e=E-1,t===T1&&E>Mg||t===Dg&&E>Rg)return 1;for(;;){ne=g-L,h[v]+1<Z?(re=0,ve=h[v]):h[v]>=Z?(re=U[h[v]-Z],ve=oe[h[v]-Z]):(re=96,ve=0),H=1<<g-L,F=1<<k,_=F;do F-=H,o[xe+(Y>>L)+F]=ne<<24|re<<16|ve|0;while(F!==0);for(H=1<<g-1;Y&H;)H>>=1;if(H!==0?(Y&=H-1,Y+=H):Y=0,v++,--ge[g]===0){if(g===j)break;g=n[a+h[v]]}if(g>w&&(Y&_e)!==X){for(L===0&&(L=w),xe+=_,k=g-L,R=1<<k;k+L<j&&(R-=ge[k+L],!(R<=0));)k++,R<<=1;if(E+=1<<k,t===T1&&E>Mg||t===Dg&&E>Rg)return 1;X=Y&_e,o[X]=w<<24|k<<16|xe-u|0}}return Y!==0&&(o[xe+Y]=g-L<<24|64<<16|0),d.bits=w,0};var gf=RS;const OS=0,Q5=1,X5=2,{Z_FINISH:zg,Z_BLOCK:DS,Z_TREES:Cd,Z_OK:$l,Z_STREAM_END:zS,Z_NEED_DICT:BS,Z_STREAM_ERROR:bi,Z_DATA_ERROR:K5,Z_MEM_ERROR:$5,Z_BUF_ERROR:PS,Z_DEFLATED:Bg}=Y5,lh=16180,Pg=16181,qg=16182,Ug=16183,Fg=16184,Ig=16185,Hg=16186,Wg=16187,Yg=16188,Gg=16189,nh=16190,go=16191,C1=16192,Vg=16193,M1=16194,Qg=16195,Xg=16196,Kg=16197,$g=16198,Md=16199,Rd=16200,Zg=16201,Jg=16202,em=16203,tm=16204,nm=16205,R1=16206,rm=16207,am=16208,Gn=16209,Z5=16210,J5=16211,qS=852,US=592,FS=15,IS=FS,im=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function HS(){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 Jl=t=>{if(!t)return 1;const n=t.state;return!n||n.strm!==t||n.mode<lh||n.mode>J5?1:0},ey=t=>{if(Jl(t))return bi;const n=t.state;return t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=n.wrap&1),n.mode=lh,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(qS),n.distcode=n.distdyn=new Int32Array(US),n.sane=1,n.back=-1,$l},ty=t=>{if(Jl(t))return bi;const n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,ey(t)},ny=(t,n)=>{let a;if(Jl(t))return bi;const i=t.state;return n<0?(a=0,n=-n):(a=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?bi:(i.window!==null&&i.wbits!==n&&(i.window=null),i.wrap=a,i.wbits=n,ty(t))},ry=(t,n)=>{if(!t)return bi;const a=new HS;t.state=a,a.strm=t,a.window=null,a.mode=lh;const i=ny(t,n);return i!==$l&&(t.state=null),i},WS=t=>ry(t,IS);let sm=!0,O1,D1;const YS=t=>{if(sm){O1=new Int32Array(512),D1=new Int32Array(32);let n=0;for(;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(gf(Q5,t.lens,0,288,O1,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;gf(X5,t.lens,0,32,D1,0,t.work,{bits:5}),sm=!1}t.lencode=O1,t.lenbits=9,t.distcode=D1,t.distbits=5},ay=(t,n,a,i)=>{let o;const u=t.state;return u.window===null&&(u.wsize=1<<u.wbits,u.wnext=0,u.whave=0,u.window=new Uint8Array(u.wsize)),i>=u.wsize?(u.window.set(n.subarray(a-u.wsize,a),0),u.wnext=0,u.whave=u.wsize):(o=u.wsize-u.wnext,o>i&&(o=i),u.window.set(n.subarray(a-i,a-i+o),u.wnext),i-=o,i?(u.window.set(n.subarray(a-i,a),0),u.wnext=i,u.whave=u.wsize):(u.wnext+=o,u.wnext===u.wsize&&(u.wnext=0),u.whave<u.wsize&&(u.whave+=o))),0},GS=(t,n)=>{let a,i,o,u,h,d,f,g,v,_,j,w,k,L,R=0,E,Y,H,F,X,_e,xe,oe;const Z=new Uint8Array(4);let ge,O;const U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Jl(t)||!t.output||!t.input&&t.avail_in!==0)return bi;a=t.state,a.mode===go&&(a.mode=C1),h=t.next_out,o=t.output,f=t.avail_out,u=t.next_in,i=t.input,d=t.avail_in,g=a.hold,v=a.bits,_=d,j=f,oe=$l;e:for(;;)switch(a.mode){case lh:if(a.wrap===0){a.mode=C1;break}for(;v<16;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(a.wrap&2&&g===35615){a.wbits===0&&(a.wbits=15),a.check=0,Z[0]=g&255,Z[1]=g>>>8&255,a.check=ws(a.check,Z,2,0),g=0,v=0,a.mode=Pg;break}if(a.head&&(a.head.done=!1),!(a.wrap&1)||(((g&255)<<8)+(g>>8))%31){t.msg="incorrect header check",a.mode=Gn;break}if((g&15)!==Bg){t.msg="unknown compression method",a.mode=Gn;break}if(g>>>=4,v-=4,xe=(g&15)+8,a.wbits===0&&(a.wbits=xe),xe>15||xe>a.wbits){t.msg="invalid window size",a.mode=Gn;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=g&512?Gg:go,g=0,v=0;break;case Pg:for(;v<16;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(a.flags=g,(a.flags&255)!==Bg){t.msg="unknown compression method",a.mode=Gn;break}if(a.flags&57344){t.msg="unknown header flags set",a.mode=Gn;break}a.head&&(a.head.text=g>>8&1),a.flags&512&&a.wrap&4&&(Z[0]=g&255,Z[1]=g>>>8&255,a.check=ws(a.check,Z,2,0)),g=0,v=0,a.mode=qg;case qg:for(;v<32;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}a.head&&(a.head.time=g),a.flags&512&&a.wrap&4&&(Z[0]=g&255,Z[1]=g>>>8&255,Z[2]=g>>>16&255,Z[3]=g>>>24&255,a.check=ws(a.check,Z,4,0)),g=0,v=0,a.mode=Ug;case Ug:for(;v<16;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}a.head&&(a.head.xflags=g&255,a.head.os=g>>8),a.flags&512&&a.wrap&4&&(Z[0]=g&255,Z[1]=g>>>8&255,a.check=ws(a.check,Z,2,0)),g=0,v=0,a.mode=Fg;case Fg:if(a.flags&1024){for(;v<16;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}a.length=g,a.head&&(a.head.extra_len=g),a.flags&512&&a.wrap&4&&(Z[0]=g&255,Z[1]=g>>>8&255,a.check=ws(a.check,Z,2,0)),g=0,v=0}else a.head&&(a.head.extra=null);a.mode=Ig;case Ig:if(a.flags&1024&&(w=a.length,w>d&&(w=d),w&&(a.head&&(xe=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(u,u+w),xe)),a.flags&512&&a.wrap&4&&(a.check=ws(a.check,i,w,u)),d-=w,u+=w,a.length-=w),a.length))break e;a.length=0,a.mode=Hg;case Hg:if(a.flags&2048){if(d===0)break e;w=0;do xe=i[u+w++],a.head&&xe&&a.length<65536&&(a.head.name+=String.fromCharCode(xe));while(xe&&w<d);if(a.flags&512&&a.wrap&4&&(a.check=ws(a.check,i,w,u)),d-=w,u+=w,xe)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=Wg;case Wg:if(a.flags&4096){if(d===0)break e;w=0;do xe=i[u+w++],a.head&&xe&&a.length<65536&&(a.head.comment+=String.fromCharCode(xe));while(xe&&w<d);if(a.flags&512&&a.wrap&4&&(a.check=ws(a.check,i,w,u)),d-=w,u+=w,xe)break e}else a.head&&(a.head.comment=null);a.mode=Yg;case Yg:if(a.flags&512){for(;v<16;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(a.wrap&4&&g!==(a.check&65535)){t.msg="header crc mismatch",a.mode=Gn;break}g=0,v=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=go;break;case Gg:for(;v<32;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}t.adler=a.check=im(g),g=0,v=0,a.mode=nh;case nh:if(a.havedict===0)return t.next_out=h,t.avail_out=f,t.next_in=u,t.avail_in=d,a.hold=g,a.bits=v,BS;t.adler=a.check=1,a.mode=go;case go:if(n===DS||n===Cd)break e;case C1:if(a.last){g>>>=v&7,v-=v&7,a.mode=R1;break}for(;v<3;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}switch(a.last=g&1,g>>>=1,v-=1,g&3){case 0:a.mode=Vg;break;case 1:if(YS(a),a.mode=Md,n===Cd){g>>>=2,v-=2;break e}break;case 2:a.mode=Xg;break;case 3:t.msg="invalid block type",a.mode=Gn}g>>>=2,v-=2;break;case Vg:for(g>>>=v&7,v-=v&7;v<32;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if((g&65535)!==(g>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Gn;break}if(a.length=g&65535,g=0,v=0,a.mode=M1,n===Cd)break e;case M1:a.mode=Qg;case Qg:if(w=a.length,w){if(w>d&&(w=d),w>f&&(w=f),w===0)break e;o.set(i.subarray(u,u+w),h),d-=w,u+=w,f-=w,h+=w,a.length-=w;break}a.mode=go;break;case Xg:for(;v<14;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(a.nlen=(g&31)+257,g>>>=5,v-=5,a.ndist=(g&31)+1,g>>>=5,v-=5,a.ncode=(g&15)+4,g>>>=4,v-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Gn;break}a.have=0,a.mode=Kg;case Kg:for(;a.have<a.ncode;){for(;v<3;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}a.lens[U[a.have++]]=g&7,g>>>=3,v-=3}for(;a.have<19;)a.lens[U[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,ge={bits:a.lenbits},oe=gf(OS,a.lens,0,19,a.lencode,0,a.work,ge),a.lenbits=ge.bits,oe){t.msg="invalid code lengths set",a.mode=Gn;break}a.have=0,a.mode=$g;case $g:for(;a.have<a.nlen+a.ndist;){for(;R=a.lencode[g&(1<<a.lenbits)-1],E=R>>>24,Y=R>>>16&255,H=R&65535,!(E<=v);){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(H<16)g>>>=E,v-=E,a.lens[a.have++]=H;else{if(H===16){for(O=E+2;v<O;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(g>>>=E,v-=E,a.have===0){t.msg="invalid bit length repeat",a.mode=Gn;break}xe=a.lens[a.have-1],w=3+(g&3),g>>>=2,v-=2}else if(H===17){for(O=E+3;v<O;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}g>>>=E,v-=E,xe=0,w=3+(g&7),g>>>=3,v-=3}else{for(O=E+7;v<O;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}g>>>=E,v-=E,xe=0,w=11+(g&127),g>>>=7,v-=7}if(a.have+w>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Gn;break}for(;w--;)a.lens[a.have++]=xe}}if(a.mode===Gn)break;if(a.lens[256]===0){t.msg="invalid code -- missing end-of-block",a.mode=Gn;break}if(a.lenbits=9,ge={bits:a.lenbits},oe=gf(Q5,a.lens,0,a.nlen,a.lencode,0,a.work,ge),a.lenbits=ge.bits,oe){t.msg="invalid literal/lengths set",a.mode=Gn;break}if(a.distbits=6,a.distcode=a.distdyn,ge={bits:a.distbits},oe=gf(X5,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,ge),a.distbits=ge.bits,oe){t.msg="invalid distances set",a.mode=Gn;break}if(a.mode=Md,n===Cd)break e;case Md:a.mode=Rd;case Rd:if(d>=6&&f>=258){t.next_out=h,t.avail_out=f,t.next_in=u,t.avail_in=d,a.hold=g,a.bits=v,LS(t,j),h=t.next_out,o=t.output,f=t.avail_out,u=t.next_in,i=t.input,d=t.avail_in,g=a.hold,v=a.bits,a.mode===go&&(a.back=-1);break}for(a.back=0;R=a.lencode[g&(1<<a.lenbits)-1],E=R>>>24,Y=R>>>16&255,H=R&65535,!(E<=v);){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(Y&&(Y&240)===0){for(F=E,X=Y,_e=H;R=a.lencode[_e+((g&(1<<F+X)-1)>>F)],E=R>>>24,Y=R>>>16&255,H=R&65535,!(F+E<=v);){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}g>>>=F,v-=F,a.back+=F}if(g>>>=E,v-=E,a.back+=E,a.length=H,Y===0){a.mode=nm;break}if(Y&32){a.back=-1,a.mode=go;break}if(Y&64){t.msg="invalid literal/length code",a.mode=Gn;break}a.extra=Y&15,a.mode=Zg;case Zg:if(a.extra){for(O=a.extra;v<O;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}a.length+=g&(1<<a.extra)-1,g>>>=a.extra,v-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=Jg;case Jg:for(;R=a.distcode[g&(1<<a.distbits)-1],E=R>>>24,Y=R>>>16&255,H=R&65535,!(E<=v);){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if((Y&240)===0){for(F=E,X=Y,_e=H;R=a.distcode[_e+((g&(1<<F+X)-1)>>F)],E=R>>>24,Y=R>>>16&255,H=R&65535,!(F+E<=v);){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}g>>>=F,v-=F,a.back+=F}if(g>>>=E,v-=E,a.back+=E,Y&64){t.msg="invalid distance code",a.mode=Gn;break}a.offset=H,a.extra=Y&15,a.mode=em;case em:if(a.extra){for(O=a.extra;v<O;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}a.offset+=g&(1<<a.extra)-1,g>>>=a.extra,v-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Gn;break}a.mode=tm;case tm:if(f===0)break e;if(w=j-f,a.offset>w){if(w=a.offset-w,w>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Gn;break}w>a.wnext?(w-=a.wnext,k=a.wsize-w):k=a.wnext-w,w>a.length&&(w=a.length),L=a.window}else L=o,k=h-a.offset,w=a.length;w>f&&(w=f),f-=w,a.length-=w;do o[h++]=L[k++];while(--w);a.length===0&&(a.mode=Rd);break;case nm:if(f===0)break e;o[h++]=a.length,f--,a.mode=Rd;break;case R1:if(a.wrap){for(;v<32;){if(d===0)break e;d--,g|=i[u++]<<v,v+=8}if(j-=f,t.total_out+=j,a.total+=j,a.wrap&4&&j&&(t.adler=a.check=a.flags?ws(a.check,o,j,h-j):c0(a.check,o,j,h-j)),j=f,a.wrap&4&&(a.flags?g:im(g))!==a.check){t.msg="incorrect data check",a.mode=Gn;break}g=0,v=0}a.mode=rm;case rm:if(a.wrap&&a.flags){for(;v<32;){if(d===0)break e;d--,g+=i[u++]<<v,v+=8}if(a.wrap&4&&g!==(a.total&4294967295)){t.msg="incorrect length check",a.mode=Gn;break}g=0,v=0}a.mode=am;case am:oe=zS;break e;case Gn:oe=K5;break e;case Z5:return $5;case J5:default:return bi}return t.next_out=h,t.avail_out=f,t.next_in=u,t.avail_in=d,a.hold=g,a.bits=v,(a.wsize||j!==t.avail_out&&a.mode<Gn&&(a.mode<R1||n!==zg))&&ay(t,t.output,t.next_out,j-t.avail_out),_-=t.avail_in,j-=t.avail_out,t.total_in+=_,t.total_out+=j,a.total+=j,a.wrap&4&&j&&(t.adler=a.check=a.flags?ws(a.check,o,j,t.next_out-j):c0(a.check,o,j,t.next_out-j)),t.data_type=a.bits+(a.last?64:0)+(a.mode===go?128:0)+(a.mode===Md||a.mode===M1?256:0),(_===0&&j===0||n===zg)&&oe===$l&&(oe=PS),oe},VS=t=>{if(Jl(t))return bi;let n=t.state;return n.window&&(n.window=null),t.state=null,$l},QS=(t,n)=>{if(Jl(t))return bi;const a=t.state;return(a.wrap&2)===0?bi:(a.head=n,n.done=!1,$l)},XS=(t,n)=>{const a=n.length;let i,o,u;return Jl(t)||(i=t.state,i.wrap!==0&&i.mode!==nh)?bi:i.mode===nh&&(o=1,o=c0(o,n,a,0),o!==i.check)?K5:(u=ay(t,n,a,a),u?(i.mode=Z5,$5):(i.havedict=1,$l))};var KS=ty,$S=ny,ZS=ey,JS=WS,e8=ry,t8=GS,n8=VS,r8=QS,a8=XS,i8="pako inflate (from Nodeca project)",mo={inflateReset:KS,inflateReset2:$S,inflateResetKeep:ZS,inflateInit:JS,inflateInit2:e8,inflate:t8,inflateEnd:n8,inflateGetHeader:r8,inflateSetDictionary:a8,inflateInfo:i8};function s8(){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 o8=s8;const iy=Object.prototype.toString,{Z_NO_FLUSH:l8,Z_FINISH:u8,Z_OK:_f,Z_STREAM_END:z1,Z_NEED_DICT:B1,Z_STREAM_ERROR:c8,Z_DATA_ERROR:om,Z_MEM_ERROR:f8}=Y5;function Ef(t){this.options=G5.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(t&&t.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new kS,this.strm.avail_out=0;let a=mo.inflateInit2(this.strm,n.windowBits);if(a!==_f)throw new Error(f0[a]);if(this.header=new o8,mo.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=d0.string2buf(n.dictionary):iy.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(a=mo.inflateSetDictionary(this.strm,n.dictionary),a!==_f)))throw new Error(f0[a])}Ef.prototype.push=function(t,n){const a=this.strm,i=this.options.chunkSize,o=this.options.dictionary;let u,h,d;if(this.ended)return!1;for(n===~~n?h=n:h=n===!0?u8:l8,iy.call(t)==="[object ArrayBuffer]"?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(a.avail_out===0&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),u=mo.inflate(a,h),u===B1&&o&&(u=mo.inflateSetDictionary(a,o),u===_f?u=mo.inflate(a,h):u===om&&(u=B1));a.avail_in>0&&u===z1&&a.state.wrap>0&&t[a.next_in]!==0;)mo.inflateReset(a),u=mo.inflate(a,h);switch(u){case c8:case om:case B1:case f8:return this.onEnd(u),this.ended=!0,!1}if(d=a.avail_out,a.next_out&&(a.avail_out===0||u===z1))if(this.options.to==="string"){let f=d0.utf8border(a.output,a.next_out),g=a.next_out-f,v=d0.buf2string(a.output,f);a.next_out=g,a.avail_out=i-g,g&&a.output.set(a.output.subarray(f,f+g),0),this.onData(v)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(!(u===_f&&d===0)){if(u===z1)return u=mo.inflateEnd(this.strm),this.onEnd(u),this.ended=!0,!0;if(a.avail_in===0)break}}return!0};Ef.prototype.onData=function(t){this.chunks.push(t)};Ef.prototype.onEnd=function(t){t===_f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=G5.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function d8(t,n){const a=new Ef(n);if(a.push(t),a.err)throw a.msg||f0[a.err];return a.result}var h8=Ef,p8=d8,g8={Inflate:h8,inflate:p8};const{Inflate:m8,inflate:y8}=g8;var lm=m8,v8=y8;const sy=[];for(let t=0;t<256;t++){let n=t;for(let a=0;a<8;a++)n&1?n=3988292384^n>>>1:n=n>>>1;sy[t]=n}const um=4294967295;function b8(t,n,a){let i=t;for(let o=0;o<a;o++)i=sy[(i^n[o])&255]^i>>>8;return i}function x8(t,n){return(b8(um,t,n)^um)>>>0}function cm(t,n,a){const i=t.readUint32(),o=x8(new Uint8Array(t.buffer,t.byteOffset+t.offset-n-4,n),n);if(o!==i)throw new Error(`CRC mismatch for chunk ${a}. Expected ${i}, found ${o}`)}function oy(t,n,a){for(let i=0;i<a;i++)n[i]=t[i]}function ly(t,n,a,i){let o=0;for(;o<i;o++)n[o]=t[o];for(;o<a;o++)n[o]=t[o]+n[o-i]&255}function uy(t,n,a,i){let o=0;if(a.length===0)for(;o<i;o++)n[o]=t[o];else for(;o<i;o++)n[o]=t[o]+a[o]&255}function cy(t,n,a,i,o){let u=0;if(a.length===0){for(;u<o;u++)n[u]=t[u];for(;u<i;u++)n[u]=t[u]+(n[u-o]>>1)&255}else{for(;u<o;u++)n[u]=t[u]+(a[u]>>1)&255;for(;u<i;u++)n[u]=t[u]+(n[u-o]+a[u]>>1)&255}}function fy(t,n,a,i,o){let u=0;if(a.length===0){for(;u<o;u++)n[u]=t[u];for(;u<i;u++)n[u]=t[u]+n[u-o]&255}else{for(;u<o;u++)n[u]=t[u]+a[u]&255;for(;u<i;u++)n[u]=t[u]+w8(n[u-o],a[u],a[u-o])&255}}function w8(t,n,a){const i=t+n-a,o=Math.abs(i-t),u=Math.abs(i-n),h=Math.abs(i-a);return o<=u&&o<=h?t:u<=h?n:a}function S8(t,n,a,i,o,u){switch(t){case 0:oy(n,a,o);break;case 1:ly(n,a,o,u);break;case 2:uy(n,a,i,o);break;case 3:cy(n,a,i,o,u);break;case 4:fy(n,a,i,o,u);break;default:throw new Error(`Unsupported filter: ${t}`)}}const _8=new Uint16Array([255]),A8=new Uint8Array(_8.buffer),j8=A8[0]===255;function k8(t){const{data:n,width:a,height:i,channels:o,depth:u}=t,h=[{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}],d=Math.ceil(u/8)*o,f=new Uint8Array(i*a*d);let g=0;for(let v=0;v<7;v++){const _=h[v],j=Math.ceil((a-_.x)/_.xStep),w=Math.ceil((i-_.y)/_.yStep);if(j<=0||w<=0)continue;const k=j*d,L=new Uint8Array(k);for(let R=0;R<w;R++){const E=n[g++],Y=n.subarray(g,g+k);g+=k;const H=new Uint8Array(k);S8(E,Y,H,L,k,d),L.set(H);for(let F=0;F<j;F++){const X=_.x+F*_.xStep,_e=_.y+R*_.yStep;if(!(X>=a||_e>=i))for(let xe=0;xe<d;xe++)f[(_e*a+X)*d+xe]=H[F*d+xe]}}}if(u===16){const v=new Uint16Array(f.buffer);if(j8)for(let _=0;_<v.length;_++)v[_]=N8(v[_]);return v}else return f}function N8(t){return(t&255)<<8|t>>8&255}const L8=new Uint16Array([255]),E8=new Uint8Array(L8.buffer),T8=E8[0]===255,C8=new Uint8Array(0);function fm(t){const{data:n,width:a,height:i,channels:o,depth:u}=t,h=Math.ceil(u/8)*o,d=Math.ceil(u/8*o*a),f=new Uint8Array(i*d);let g=C8,v=0,_,j;for(let w=0;w<i;w++){switch(_=n.subarray(v+1,v+1+d),j=f.subarray(w*d,(w+1)*d),n[v]){case 0:oy(_,j,d);break;case 1:ly(_,j,d,h);break;case 2:uy(_,j,g,d);break;case 3:cy(_,j,g,d,h);break;case 4:fy(_,j,g,d,h);break;default:throw new Error(`Unsupported filter: ${n[v]}`)}g=j,v+=d+1}if(u===16){const w=new Uint16Array(f.buffer);if(T8)for(let k=0;k<w.length;k++)w[k]=M8(w[k]);return w}else return f}function M8(t){return(t&255)<<8|t>>8&255}const Fd=Uint8Array.of(137,80,78,71,13,10,26,10);function dm(t){if(!R8(t.readBytes(Fd.length)))throw new Error("wrong PNG signature")}function R8(t){if(t.length<Fd.length)return!1;for(let n=0;n<Fd.length;n++)if(t[n]!==Fd[n])return!1;return!0}const O8="tEXt",D8=0,dy=new TextDecoder("latin1");function z8(t){if(P8(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}const B8=/^[\u0000-\u00FF]*$/;function P8(t){if(!B8.test(t))throw new Error("invalid latin1 text")}function q8(t,n,a){const i=hy(n);t[i]=U8(n,a-i.length-1)}function hy(t){for(t.mark();t.readByte()!==D8;);const n=t.offset;t.reset();const a=dy.decode(t.readBytes(n-t.offset-1));return t.skip(1),z8(a),a}function U8(t,n){return dy.decode(t.readBytes(n))}const Ja={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},P1={UNKNOWN:-1,DEFLATE:0},hm={UNKNOWN:-1,ADAPTIVE:0},q1={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Od={NONE:0,BACKGROUND:1,PREVIOUS:2},U1={SOURCE:0,OVER:1};class F8 extends U0{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(n,a={}){super(n);const{checkCrc:i=!1}=a;this._checkCrc=i,this._inflator=new lm,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=P1.UNKNOWN,this._filterMethod=hm.UNKNOWN,this._interlaceMethod=q1.UNKNOWN,this._colorType=Ja.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(dm(this);!this._end;){const n=this.readUint32(),a=this.readChars(4);this.decodeChunk(n,a)}return this.decodeImage(),this._png}decodeApng(){for(dm(this);!this._end;){const n=this.readUint32(),a=this.readChars(4);this.decodeApngChunk(n,a)}return this.decodeApngImage(),this._apng}decodeChunk(n,a){const i=this.offset;switch(a){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case O8:q8(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${a}`);this._checkCrc?cm(this,n+4,a):this.skip(4)}decodeApngChunk(n,a){const i=this.offset;switch(a!=="fdAT"&&a!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),a){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,a),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${a}`);this._checkCrc?cm(this,n+4,a):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=I8(this.readUint8());const a=this.readUint8();this._colorType=a;let i;switch(a){case Ja.GREYSCALE:i=1;break;case Ja.TRUECOLOUR:i=3;break;case Ja.INDEXED_COLOUR:i=1;break;case Ja.GREYSCALE_ALPHA:i=2;break;case Ja.TRUECOLOUR_ALPHA:i=4;break;case Ja.UNKNOWN:default:throw new Error(`Unknown color type: ${a}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==P1.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 n={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(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const a=n/3;this._hasPalette=!0;const i=[];this._palette=i;for(let o=0;o<a;o++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const a=n,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,a)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let a=n,i=this.offset+this.byteOffset;if(i+=4,a-=4,this._inflator.push(new Uint8Array(this.buffer,i,a)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case Ja.GREYSCALE:case Ja.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let a=0;a<n/2;a++)this._transparency[a]=this.readUint16();break}case Ja.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let a=0;for(;a<n;a++){const i=this.readByte();this._palette[a].push(i)}for(;a<this._palette.length;a++)this._palette[a].push(255);break}case Ja.UNKNOWN:case Ja.GREYSCALE_ALPHA:case Ja.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const a=hy(this),i=this.readUint8();if(i!==P1.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const o=this.readBytes(n-a.length-2);this._png.iccEmbeddedProfile={name:a,profile:v8(o)}}decodepHYs(){const n=this.readUint32(),a=this.readUint32(),i=this.readByte();this._png.resolution={x:n,y:a,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 n=0;n<this._numberOfFrames;n++){const a={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].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(n);if(i){if(i.data=fm({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),n===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)a.data=i.data;else{const o=this._apng.frames.at(n-1);this.disposeFrame(i,o,a),this.addFrameDataToCanvas(a,i)}this._apng.frames.push(a)}}return this._apng}disposeFrame(n,a,i){switch(n.disposeOp){case Od.NONE:break;case Od.BACKGROUND:for(let o=0;o<this._png.height;o++)for(let u=0;u<this._png.width;u++){const h=(o*n.width+u)*this._png.channels;for(let d=0;d<this._png.channels;d++)i.data[h+d]=0}break;case Od.PREVIOUS:i.data.set(a.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,a){const i=1<<this._png.depth,o=(u,h)=>{const d=((u+a.yOffset)*this._png.width+a.xOffset+h)*this._png.channels,f=(u*a.width+h)*this._png.channels;return{index:d,frameIndex:f}};switch(a.blendOp){case U1.SOURCE:for(let u=0;u<a.height;u++)for(let h=0;h<a.width;h++){const{index:d,frameIndex:f}=o(u,h);for(let g=0;g<this._png.channels;g++)n.data[d+g]=a.data[f+g]}break;case U1.OVER:for(let u=0;u<a.height;u++)for(let h=0;h<a.width;h++){const{index:d,frameIndex:f}=o(u,h);for(let g=0;g<this._png.channels;g++){const v=a.data[f+this._png.channels-1]/i,_=g%(this._png.channels-1)===0?1:a.data[f+g],j=Math.floor(v*_+(1-v)*n.data[d+g]);n.data[d+g]+=j}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==hm.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===q1.NO_INTERLACE)this._png.data=fm({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===q1.ADAM7)this._png.data=k8({data:n,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 n=this._inflator.result,a=this._frames.at(-1);a?a.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Od.NONE,blendOp:U1.SOURCE,data:n}),this._inflator=new lm,this._writingDataChunks=!1}}function I8(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var pm;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(pm||(pm={}));function H8(t,n){return new F8(t,n).decode()}var Pt=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function F1(){Pt.console&&typeof Pt.console.log=="function"&&Pt.console.log.apply(Pt.console,arguments)}var Tn={log:F1,warn:function(t){Pt.console&&(typeof Pt.console.warn=="function"?Pt.console.warn.apply(Pt.console,arguments):F1.call(null,arguments))},error:function(t){Pt.console&&(typeof Pt.console.error=="function"?Pt.console.error.apply(Pt.console,arguments):F1(t))}};function I1(t,n,a){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){Wl(i.response,n,a)},i.onerror=function(){Tn.error("could not download file")},i.send()}function gm(t){var n=new XMLHttpRequest;n.open("HEAD",t,!1);try{n.send()}catch{}return n.status>=200&&n.status<=299}function Dd(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var Wl=Pt.saveAs||((typeof window>"u"?"undefined":Sn(window))!=="object"||window!==Pt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,n,a){var i=Pt.URL||Pt.webkitURL,o=document.createElement("a");n=n||t.name||"download",o.download=n,o.rel="noopener",typeof t=="string"?(o.href=t,o.origin!==location.origin?gm(o.href)?I1(t,n,a):Dd(o,o.target="_blank"):Dd(o)):(o.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){Dd(o)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,a){if(n=n||t.name||"download",typeof t=="string")if(gm(t))I1(t,n,a);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){Dd(i)})}else navigator.msSaveOrOpenBlob((function(o,u){return u===void 0?u={autoBom:!1}:Sn(u)!=="object"&&(Tn.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o})(t,a),n)}:function(t,n,a,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof t=="string")return I1(t,n,a);var o=t.type==="application/octet-stream",u=/constructor/i.test(Pt.HTMLElement)||Pt.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||o&&u)&&(typeof FileReader>"u"?"undefined":Sn(FileReader))==="object"){var d=new FileReader;d.onloadend=function(){var v=d.result;v=h?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=v:location=v,i=null},d.readAsDataURL(t)}else{var f=Pt.URL||Pt.webkitURL,g=f.createObjectURL(t);i?i.location=g:location.href=g,i=null,setTimeout(function(){f.revokeObjectURL(g)},4e4)}});/**
|
|
454
|
+
* A class to parse color values
|
|
455
|
+
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
456
|
+
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
457
|
+
* @license Use it if you like it
|
|
458
|
+
*/function py(t){var n;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={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:"90ee90",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"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var a=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(d){return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(d){return[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(d){return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)]}}],i=0;i<a.length;i++){var o=a[i].re,u=a[i].process,h=o.exec(t);h&&(n=u(h),this.r=n[0],this.g=n[1],this.b=n[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 d=this.r.toString(16),f=this.g.toString(16),g=this.b.toString(16);return d.length==1&&(d="0"+d),f.length==1&&(f="0"+f),g.length==1&&(g="0"+g),"#"+d+f+g}}var Id=Pt.atob.bind(Pt),mm=Pt.btoa.bind(Pt);/**
|
|
459
|
+
* @license
|
|
460
|
+
* Joseph Myers does not specify a particular license for his work.
|
|
461
|
+
*
|
|
462
|
+
* Author: Joseph Myers
|
|
463
|
+
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
464
|
+
*
|
|
465
|
+
* Modified by: Owen Leong
|
|
466
|
+
*/function H1(t,n){var a=t[0],i=t[1],o=t[2],u=t[3];a=ra(a,i,o,u,n[0],7,-680876936),u=ra(u,a,i,o,n[1],12,-389564586),o=ra(o,u,a,i,n[2],17,606105819),i=ra(i,o,u,a,n[3],22,-1044525330),a=ra(a,i,o,u,n[4],7,-176418897),u=ra(u,a,i,o,n[5],12,1200080426),o=ra(o,u,a,i,n[6],17,-1473231341),i=ra(i,o,u,a,n[7],22,-45705983),a=ra(a,i,o,u,n[8],7,1770035416),u=ra(u,a,i,o,n[9],12,-1958414417),o=ra(o,u,a,i,n[10],17,-42063),i=ra(i,o,u,a,n[11],22,-1990404162),a=ra(a,i,o,u,n[12],7,1804603682),u=ra(u,a,i,o,n[13],12,-40341101),o=ra(o,u,a,i,n[14],17,-1502002290),a=aa(a,i=ra(i,o,u,a,n[15],22,1236535329),o,u,n[1],5,-165796510),u=aa(u,a,i,o,n[6],9,-1069501632),o=aa(o,u,a,i,n[11],14,643717713),i=aa(i,o,u,a,n[0],20,-373897302),a=aa(a,i,o,u,n[5],5,-701558691),u=aa(u,a,i,o,n[10],9,38016083),o=aa(o,u,a,i,n[15],14,-660478335),i=aa(i,o,u,a,n[4],20,-405537848),a=aa(a,i,o,u,n[9],5,568446438),u=aa(u,a,i,o,n[14],9,-1019803690),o=aa(o,u,a,i,n[3],14,-187363961),i=aa(i,o,u,a,n[8],20,1163531501),a=aa(a,i,o,u,n[13],5,-1444681467),u=aa(u,a,i,o,n[2],9,-51403784),o=aa(o,u,a,i,n[7],14,1735328473),a=ia(a,i=aa(i,o,u,a,n[12],20,-1926607734),o,u,n[5],4,-378558),u=ia(u,a,i,o,n[8],11,-2022574463),o=ia(o,u,a,i,n[11],16,1839030562),i=ia(i,o,u,a,n[14],23,-35309556),a=ia(a,i,o,u,n[1],4,-1530992060),u=ia(u,a,i,o,n[4],11,1272893353),o=ia(o,u,a,i,n[7],16,-155497632),i=ia(i,o,u,a,n[10],23,-1094730640),a=ia(a,i,o,u,n[13],4,681279174),u=ia(u,a,i,o,n[0],11,-358537222),o=ia(o,u,a,i,n[3],16,-722521979),i=ia(i,o,u,a,n[6],23,76029189),a=ia(a,i,o,u,n[9],4,-640364487),u=ia(u,a,i,o,n[12],11,-421815835),o=ia(o,u,a,i,n[15],16,530742520),a=sa(a,i=ia(i,o,u,a,n[2],23,-995338651),o,u,n[0],6,-198630844),u=sa(u,a,i,o,n[7],10,1126891415),o=sa(o,u,a,i,n[14],15,-1416354905),i=sa(i,o,u,a,n[5],21,-57434055),a=sa(a,i,o,u,n[12],6,1700485571),u=sa(u,a,i,o,n[3],10,-1894986606),o=sa(o,u,a,i,n[10],15,-1051523),i=sa(i,o,u,a,n[1],21,-2054922799),a=sa(a,i,o,u,n[8],6,1873313359),u=sa(u,a,i,o,n[15],10,-30611744),o=sa(o,u,a,i,n[6],15,-1560198380),i=sa(i,o,u,a,n[13],21,1309151649),a=sa(a,i,o,u,n[4],6,-145523070),u=sa(u,a,i,o,n[11],10,-1120210379),o=sa(o,u,a,i,n[2],15,718787259),i=sa(i,o,u,a,n[9],21,-343485551),t[0]=pl(a,t[0]),t[1]=pl(i,t[1]),t[2]=pl(o,t[2]),t[3]=pl(u,t[3])}function uh(t,n,a,i,o,u){return n=pl(pl(n,t),pl(i,u)),pl(n<<o|n>>>32-o,a)}function ra(t,n,a,i,o,u,h){return uh(n&a|~n&i,t,n,o,u,h)}function aa(t,n,a,i,o,u,h){return uh(n&i|a&~i,t,n,o,u,h)}function ia(t,n,a,i,o,u,h){return uh(n^a^i,t,n,o,u,h)}function sa(t,n,a,i,o,u,h){return uh(a^(n|~i),t,n,o,u,h)}function gy(t){var n,a=t.length,i=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)H1(i,W8(t.substring(n-64,n)));t=t.substring(n-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<t.length;n++)o[n>>2]|=t.charCodeAt(n)<<(n%4<<3);if(o[n>>2]|=128<<(n%4<<3),n>55)for(H1(i,o),n=0;n<16;n++)o[n]=0;return o[14]=8*a,H1(i,o),i}function W8(t){var n,a=[];for(n=0;n<64;n+=4)a[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return a}var ym="0123456789abcdef".split("");function Y8(t){for(var n="",a=0;a<4;a++)n+=ym[t>>8*a+4&15]+ym[t>>8*a&15];return n}function G8(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function h0(t){return gy(t).map(G8).join("")}var V8=(function(t){for(var n=0;n<t.length;n++)t[n]=Y8(t[n]);return t.join("")})(gy("hello"))!="5d41402abc4b2a76b9719d911017c592";function pl(t,n){if(V8){var a=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(a>>16)<<16|65535&a}return t+n&4294967295}/**
|
|
467
|
+
* @license
|
|
468
|
+
* FPDF is released under a permissive license: there is no usage restriction.
|
|
469
|
+
* You may embed it freely in your application (commercial or not), with or
|
|
470
|
+
* without modifications.
|
|
471
|
+
*
|
|
472
|
+
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
473
|
+
*/function p0(t,n){var a,i,o,u;if(t!==a){for(var h=(o=t,u=1+(256/t.length|0),new Array(u+1).join(o)),d=[],f=0;f<256;f++)d[f]=f;var g=0;for(f=0;f<256;f++){var v=d[f];g=(g+v+h.charCodeAt(f))%256,d[f]=d[g],d[g]=v}a=t,i=d}else d=i;var _=n.length,j=0,w=0,k="";for(f=0;f<_;f++)w=(w+(v=d[j=(j+1)%256]))%256,d[j]=d[w],d[w]=v,h=d[(d[j]+d[w])%256],k+=String.fromCharCode(n.charCodeAt(f)^h);return k}/**
|
|
474
|
+
* @license
|
|
475
|
+
* Licensed under the MIT License.
|
|
476
|
+
* http://opensource.org/licenses/mit-license
|
|
477
|
+
* Author: Owen Leong (@owenl131)
|
|
478
|
+
* Date: 15 Oct 2020
|
|
479
|
+
* References:
|
|
480
|
+
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
481
|
+
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
482
|
+
* http://www.fpdf.org/en/script/script37.php
|
|
483
|
+
*/var vm={print:4,modify:8,copy:16,"annot-forms":32};function Ku(t,n,a,i){this.v=1,this.r=2;var o=192;t.forEach(function(d){if(vm.perm!==void 0)throw new Error("Invalid permission: "+d);o+=vm[d]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var u=(n+this.padding).substr(0,32),h=(a+this.padding).substr(0,32);this.O=this.processOwnerPassword(u,h),this.P=-(1+(255^o)),this.encryptionKey=h0(u+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=p0(this.encryptionKey,this.padding)}function $u(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var n="",a=t.length,i=0;i<a;i++){var o=t.charCodeAt(i);n+=o<33||o===35||o===37||o===40||o===41||o===47||o===60||o===62||o===91||o===93||o===123||o===125||o>126?"#"+("0"+o.toString(16)).slice(-2):t[i]}return n}function bm(t){if(Sn(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(a,i,o){if(o=o||!1,typeof a!="string"||typeof i!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(a)||(n[a]={});var u=Math.random().toString(35);return n[a][u]=[i,!!o],u},this.unsubscribe=function(a){for(var i in n)if(n[i][a])return delete n[i][a],Object.keys(n[i]).length===0&&delete n[i],!0;return!1},this.publish=function(a){if(n.hasOwnProperty(a)){var i=Array.prototype.slice.call(arguments,1),o=[];for(var u in n[a]){var h=n[a][u];try{h[0].apply(t,i)}catch(d){Pt.console&&Tn.error("jsPDF PubSub Error",d.message,d)}h[1]&&o.push(u)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function rh(t){if(!(this instanceof rh))return new rh(t);var n="opacity,stroke-opacity".split(",");for(var a in t)t.hasOwnProperty(a)&&n.indexOf(a)>=0&&(this[a]=t[a]);this.id="",this.objectNumber=-1}function my(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function Yl(t,n,a,i,o){if(!(this instanceof Yl))return new Yl(t,n,a,i,o);this.type=t==="axial"?2:3,this.coords=n,this.colors=a,my.call(this,i,o)}function Ju(t,n,a,i,o){if(!(this instanceof Ju))return new Ju(t,n,a,i,o);this.boundingBox=t,this.xStep=n,this.yStep=a,this.stream="",this.cloneIndex=0,my.call(this,i,o)}function gt(t){var n,a=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],o=arguments[2],u=arguments[3],h=[],d=1,f=16,g="S",v=null;Sn(t=t||{})==="object"&&(a=t.orientation,i=t.unit||i,o=t.format||o,u=t.compress||t.compressPdf||u,(v=t.encryption||null)!==null&&(v.userPassword=v.userPassword||"",v.ownerPassword=v.ownerPassword||"",v.userPermissions=v.userPermissions||[]),d=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(n=t.precision),t.floatPrecision!==void 0&&(f=t.floatPrecision),g=t.defaultPathOperation||"S"),h=t.filters||(u===!0?["FlateEncode"]:h),i=i||"mm",a=(""+(a||"P")).toLowerCase();var _=t.putOnlyUsedFonts||!1,j={},w={internal:{},__private__:{}};w.__private__.PubSub=bm;var k="1.3",L=w.__private__.getPdfVersion=function(){return k};w.__private__.setPdfVersion=function(x){k=x};var R={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]};w.__private__.getPageFormats=function(){return R};var E=w.__private__.getPageFormat=function(x){return R[x]};o=o||"a4";var Y="compat",H="advanced",F=Y;function X(){this.saveGraphicsState(),G(new jt(qt,0,0,-qt,0,Fs()*qt).toString()+" cm"),this.setFontSize(this.getFontSize()/qt),g="n",F=H}function _e(){this.restoreGraphicsState(),g="S",F=Y}var xe=w.__private__.combineFontStyleAndFontWeight=function(x,C){if(x=="bold"&&C=="normal"||x=="bold"&&C==400||x=="normal"&&C=="italic"||x=="bold"&&C=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return C&&(x=C==400||C==="normal"?x==="italic"?"italic":"normal":C!=700&&C!=="bold"||x!=="normal"?(C==700?"bold":C)+""+x:"bold"),x};w.advancedAPI=function(x){var C=F===Y;return C&&X.call(this),typeof x!="function"||(x(this),C&&_e.call(this)),this},w.compatAPI=function(x){var C=F===H;return C&&_e.call(this),typeof x!="function"||(x(this),C&&X.call(this)),this},w.isAdvancedAPI=function(){return F===H};var oe,Z=function(x){if(F!==H)throw new Error(x+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},ge=w.roundToPrecision=w.__private__.roundToPrecision=function(x,C){var Q=n||C;if(isNaN(x)||isNaN(Q))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return x.toFixed(Q).replace(/0+$/,"")};oe=w.hpf=w.__private__.hpf=typeof f=="number"?function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.hpf");return ge(x,f)}:f==="smart"?function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.hpf");return ge(x,x>-1&&x<1?16:5)}:function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.hpf");return ge(x,16)};var O=w.f2=w.__private__.f2=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.f2");return ge(x,2)},U=w.__private__.f3=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.f3");return ge(x,3)},ne=w.scale=w.__private__.scale=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.scale");return F===Y?x*qt:F===H?x:void 0},re=function(x){return ne((function(C){return F===Y?Fs()-C:F===H?C:void 0})(x))};w.__private__.setPrecision=w.setPrecision=function(x){typeof parseInt(x,10)=="number"&&(n=parseInt(x,10))};var ve,ee="00000000000000000000000000000000",J=w.__private__.getFileId=function(){return ee},le=w.__private__.setFileId=function(x){return ee=x!==void 0&&/^[a-fA-F0-9]{32}$/.test(x)?x.toUpperCase():ee.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),v!==null&&(yr=new Ku(v.userPermissions,v.userPassword,v.ownerPassword,ee)),ee};w.setFileId=function(x){return le(x),this},w.getFileId=function(){return J()};var Le=w.__private__.convertDateToPDFDate=function(x){var C=x.getTimezoneOffset(),Q=C<0?"+":"-",ue=Math.floor(Math.abs(C/60)),pe=Math.abs(C%60),Re=[Q,V(ue),"'",V(pe),"'"].join("");return["D:",x.getFullYear(),V(x.getMonth()+1),V(x.getDate()),V(x.getHours()),V(x.getMinutes()),V(x.getSeconds()),Re].join("")},W=w.__private__.convertPDFDateToDate=function(x){var C=parseInt(x.substr(2,4),10),Q=parseInt(x.substr(6,2),10)-1,ue=parseInt(x.substr(8,2),10),pe=parseInt(x.substr(10,2),10),Re=parseInt(x.substr(12,2),10),Fe=parseInt(x.substr(14,2),10);return new Date(C,Q,ue,pe,Re,Fe,0)},ce=w.__private__.setCreationDate=function(x){var C;if(x===void 0&&(x=new Date),x instanceof Date)C=Le(x);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(x))throw new Error("Invalid argument passed to jsPDF.setCreationDate");C=x}return ve=C},T=w.__private__.getCreationDate=function(x){var C=ve;return x==="jsDate"&&(C=W(ve)),C};w.setCreationDate=function(x){return ce(x),this},w.getCreationDate=function(x){return T(x)};var q,V=w.__private__.padd2=function(x){return("0"+parseInt(x)).slice(-2)},te=w.__private__.padd2Hex=function(x){return("00"+(x=x.toString())).substr(x.length)},se=0,ye=[],je=[],Ce=0,ze=[],We=[],Xe=!1,Ve=je;w.__private__.setCustomOutputDestination=function(x){Xe=!0,Ve=x};var dt=function(x){Xe||(Ve=x)};w.__private__.resetCustomOutputDestination=function(){Xe=!1,Ve=je};var G=w.__private__.out=function(x){return x=x.toString(),Ce+=x.length+1,Ve.push(x),Ve},Qe=w.__private__.write=function(x){return G(arguments.length===1?x.toString():Array.prototype.join.call(arguments," "))},xt=w.__private__.getArrayBuffer=function(x){for(var C=x.length,Q=new ArrayBuffer(C),ue=new Uint8Array(Q);C--;)ue[C]=x.charCodeAt(C);return Q},ut=[["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]];w.__private__.getStandardFonts=function(){return ut};var Ie=t.fontSize||16;w.__private__.setFontSize=w.setFontSize=function(x){return Ie=F===H?x/qt:x,this};var mt,Ze=w.__private__.getFontSize=w.getFontSize=function(){return F===Y?Ie:Ie*qt},bt=t.R2L||!1;w.__private__.setR2L=w.setR2L=function(x){return bt=x,this},w.__private__.getR2L=w.getR2L=function(){return bt};var ht,Wt=w.__private__.setZoomMode=function(x){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(x))mt=x;else if(isNaN(x)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(x)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+x+'" is not recognized.');mt=x}else mt=parseInt(x,10)};w.__private__.getZoomMode=function(){return mt};var Gt,wt=w.__private__.setPageMode=function(x){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(x)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+x+'" is not recognized.');ht=x};w.__private__.getPageMode=function(){return ht};var _t=w.__private__.setLayoutMode=function(x){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(x)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+x+'" is not recognized.');Gt=x};w.__private__.getLayoutMode=function(){return Gt},w.__private__.setDisplayMode=w.setDisplayMode=function(x,C,Q){return Wt(x),_t(C),wt(Q),this};var Dt={title:"",subject:"",author:"",keywords:"",creator:""};w.__private__.getDocumentProperty=function(x){if(Object.keys(Dt).indexOf(x)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Dt[x]},w.__private__.getDocumentProperties=function(){return Dt},w.__private__.setDocumentProperties=w.setProperties=w.setDocumentProperties=function(x){for(var C in Dt)Dt.hasOwnProperty(C)&&x[C]&&(Dt[C]=x[C]);return this},w.__private__.setDocumentProperty=function(x,C){if(Object.keys(Dt).indexOf(x)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Dt[x]=C};var $e,qt,pt,Dn,we,Ye={},Je={},Kt=[],rt={},fn={},yt={},At={},Et=null,Ct=0,St=[],nn=new bm(w),ni=t.hotfixes||[],pn={},Ra={},Oa=[],jt=function x(C,Q,ue,pe,Re,Fe){if(!(this instanceof x))return new x(C,Q,ue,pe,Re,Fe);isNaN(C)&&(C=1),isNaN(Q)&&(Q=0),isNaN(ue)&&(ue=0),isNaN(pe)&&(pe=1),isNaN(Re)&&(Re=0),isNaN(Fe)&&(Fe=0),this._matrix=[C,Q,ue,pe,Re,Fe]};Object.defineProperty(jt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(x){this._matrix[0]=x}}),Object.defineProperty(jt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(x){this._matrix[1]=x}}),Object.defineProperty(jt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(x){this._matrix[2]=x}}),Object.defineProperty(jt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(x){this._matrix[3]=x}}),Object.defineProperty(jt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(x){this._matrix[4]=x}}),Object.defineProperty(jt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(x){this._matrix[5]=x}}),Object.defineProperty(jt.prototype,"a",{get:function(){return this._matrix[0]},set:function(x){this._matrix[0]=x}}),Object.defineProperty(jt.prototype,"b",{get:function(){return this._matrix[1]},set:function(x){this._matrix[1]=x}}),Object.defineProperty(jt.prototype,"c",{get:function(){return this._matrix[2]},set:function(x){this._matrix[2]=x}}),Object.defineProperty(jt.prototype,"d",{get:function(){return this._matrix[3]},set:function(x){this._matrix[3]=x}}),Object.defineProperty(jt.prototype,"e",{get:function(){return this._matrix[4]},set:function(x){this._matrix[4]=x}}),Object.defineProperty(jt.prototype,"f",{get:function(){return this._matrix[5]},set:function(x){this._matrix[5]=x}}),Object.defineProperty(jt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(jt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(jt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(jt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),jt.prototype.join=function(x){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(oe).join(x)},jt.prototype.multiply=function(x){var C=x.sx*this.sx+x.shy*this.shx,Q=x.sx*this.shy+x.shy*this.sy,ue=x.shx*this.sx+x.sy*this.shx,pe=x.shx*this.shy+x.sy*this.sy,Re=x.tx*this.sx+x.ty*this.shx+this.tx,Fe=x.tx*this.shy+x.ty*this.sy+this.ty;return new jt(C,Q,ue,pe,Re,Fe)},jt.prototype.decompose=function(){var x=this.sx,C=this.shy,Q=this.shx,ue=this.sy,pe=this.tx,Re=this.ty,Fe=Math.sqrt(x*x+C*C),st=(x/=Fe)*Q+(C/=Fe)*ue;Q-=x*st,ue-=C*st;var at=Math.sqrt(Q*Q+ue*ue);return st/=at,x*(ue/=at)<C*(Q/=at)&&(x=-x,C=-C,st=-st,Fe=-Fe),{scale:new jt(Fe,0,0,at,0,0),translate:new jt(1,0,0,1,pe,Re),rotate:new jt(x,C,-C,x,0,0),skew:new jt(1,0,st,1,0,0)}},jt.prototype.toString=function(x){return this.join(" ")},jt.prototype.inversed=function(){var x=this.sx,C=this.shy,Q=this.shx,ue=this.sy,pe=this.tx,Re=this.ty,Fe=1/(x*ue-C*Q),st=ue*Fe,at=-C*Fe,Mt=-Q*Fe,Ft=x*Fe;return new jt(st,at,Mt,Ft,-st*pe-Mt*Re,-at*pe-Ft*Re)},jt.prototype.applyToPoint=function(x){var C=x.x*this.sx+x.y*this.shx+this.tx,Q=x.x*this.shy+x.y*this.sy+this.ty;return new Ai(C,Q)},jt.prototype.applyToRectangle=function(x){var C=this.applyToPoint(x),Q=this.applyToPoint(new Ai(x.x+x.w,x.y+x.h));return new ji(C.x,C.y,Q.x-C.x,Q.y-C.y)},jt.prototype.clone=function(){var x=this.sx,C=this.shy,Q=this.shx,ue=this.sy,pe=this.tx,Re=this.ty;return new jt(x,C,Q,ue,pe,Re)},w.Matrix=jt;var Lr=w.matrixMult=function(x,C){return C.multiply(x)},Cn=new jt(1,0,0,1,0,0);w.unitMatrix=w.identityMatrix=Cn;var kn=function(x,C){if(!fn[x]){var Q=(C instanceof Yl?"Sh":"P")+(Object.keys(rt).length+1).toString(10);C.id=Q,fn[x]=Q,rt[Q]=C,nn.publish("addPattern",C)}};w.ShadingPattern=Yl,w.TilingPattern=Ju,w.addShadingPattern=function(x,C){return Z("addShadingPattern()"),kn(x,C),this},w.beginTilingPattern=function(x){Z("beginTilingPattern()"),Co(x.boundingBox[0],x.boundingBox[1],x.boundingBox[2]-x.boundingBox[0],x.boundingBox[3]-x.boundingBox[1],x.matrix)},w.endTilingPattern=function(x,C){Z("endTilingPattern()"),C.stream=We[q].join(`
|
|
484
|
+
`),kn(x,C),nn.publish("endTilingPattern",C),Oa.pop().restore()};var xr,Mn=w.__private__.newObject=function(){var x=mr();return wr(x,!0),x},mr=w.__private__.newObjectDeferred=function(){return se++,ye[se]=function(){return Ce},se},wr=function(x,C){return C=typeof C=="boolean"&&C,ye[x]=Ce,C&&G(x+" 0 obj"),x},$i=w.__private__.newAdditionalObject=function(){var x={objId:mr(),content:""};return ze.push(x),x},ba=mr(),oa=mr(),Ir=w.__private__.decodeColorString=function(x){var C=x.split(" ");if(C.length!==2||C[1]!=="g"&&C[1]!=="G")C.length!==5||C[4]!=="k"&&C[4]!=="K"||(C=[(1-C[0])*(1-C[3]),(1-C[1])*(1-C[3]),(1-C[2])*(1-C[3]),"r"]);else{var Q=parseFloat(C[0]);C=[Q,Q,Q,"r"]}for(var ue="#",pe=0;pe<3;pe++)ue+=("0"+Math.floor(255*parseFloat(C[pe])).toString(16)).slice(-2);return ue},Er=w.__private__.encodeColorString=function(x){var C;typeof x=="string"&&(x={ch1:x});var Q=x.ch1,ue=x.ch2,pe=x.ch3,Re=x.ch4,Fe=x.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Q=="string"&&Q.charAt(0)!=="#"){var st=new py(Q);if(st.ok)Q=st.toHex();else if(!/^\d*\.?\d*$/.test(Q))throw new Error('Invalid color "'+Q+'" passed to jsPDF.encodeColorString.')}if(typeof Q=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Q)&&(Q="#"+Q[1]+Q[1]+Q[2]+Q[2]+Q[3]+Q[3]),typeof Q=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Q)){var at=parseInt(Q.substr(1),16);Q=at>>16&255,ue=at>>8&255,pe=255&at}if(ue===void 0||Re===void 0&&Q===ue&&ue===pe)C=typeof Q=="string"?Q+" "+Fe[0]:x.precision===2?O(Q/255)+" "+Fe[0]:U(Q/255)+" "+Fe[0];else if(Re===void 0||Sn(Re)==="object"){if(Re&&!isNaN(Re.a)&&Re.a===0)return["1.","1.","1.",Fe[1]].join(" ");C=typeof Q=="string"?[Q,ue,pe,Fe[1]].join(" "):x.precision===2?[O(Q/255),O(ue/255),O(pe/255),Fe[1]].join(" "):[U(Q/255),U(ue/255),U(pe/255),Fe[1]].join(" ")}else C=typeof Q=="string"?[Q,ue,pe,Re,Fe[2]].join(" "):x.precision===2?[O(Q),O(ue),O(pe),O(Re),Fe[2]].join(" "):[U(Q),U(ue),U(pe),U(Re),Fe[2]].join(" ");return C},Hr=w.__private__.getFilters=function(){return h},Sr=w.__private__.putStream=function(x){var C=(x=x||{}).data||"",Q=x.filters||Hr(),ue=x.alreadyAppliedFilters||[],pe=x.addLength1||!1,Re=C.length,Fe=x.objectId,st=function(Nn){return Nn};if(v!==null&&Fe===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");v!==null&&(st=yr.encryptor(Fe,0));var at={};Q===!0&&(Q=["FlateEncode"]);var Mt=x.additionalKeyValues||[],Ft=(at=gt.API.processDataByFilters!==void 0?gt.API.processDataByFilters(C,Q):{data:C,reverseChain:[]}).reverseChain+(Array.isArray(ue)?ue.join(" "):ue.toString());if(at.data.length!==0&&(Mt.push({key:"Length",value:at.data.length}),pe===!0&&Mt.push({key:"Length1",value:Re})),Ft.length!=0)if(Ft.split("/").length-1==1)Mt.push({key:"Filter",value:Ft});else{Mt.push({key:"Filter",value:"["+Ft+"]"});for(var Jt=0;Jt<Mt.length;Jt+=1)if(Mt[Jt].key==="DecodeParms"){for(var tr=[],mn=0;mn<at.reverseChain.split("/").length-1;mn+=1)tr.push("null");tr.push(Mt[Jt].value),Mt[Jt].value="["+tr.join(" ")+"]"}}G("<<");for(var gn=0;gn<Mt.length;gn++)G("/"+Mt[gn].key+" "+Mt[gn].value);G(">>"),at.data.length!==0&&(G("stream"),G(st(at.data)),G("endstream"))},Rn=w.__private__.putPage=function(x){var C=x.number,Q=x.data,ue=x.objId,pe=x.contentsObjId;wr(ue,!0),G("<</Type /Page"),G("/Parent "+x.rootDictionaryObjId+" 0 R"),G("/Resources "+x.resourceDictionaryObjId+" 0 R"),G("/MediaBox ["+parseFloat(oe(x.mediaBox.bottomLeftX))+" "+parseFloat(oe(x.mediaBox.bottomLeftY))+" "+oe(x.mediaBox.topRightX)+" "+oe(x.mediaBox.topRightY)+"]"),x.cropBox!==null&&G("/CropBox ["+oe(x.cropBox.bottomLeftX)+" "+oe(x.cropBox.bottomLeftY)+" "+oe(x.cropBox.topRightX)+" "+oe(x.cropBox.topRightY)+"]"),x.bleedBox!==null&&G("/BleedBox ["+oe(x.bleedBox.bottomLeftX)+" "+oe(x.bleedBox.bottomLeftY)+" "+oe(x.bleedBox.topRightX)+" "+oe(x.bleedBox.topRightY)+"]"),x.trimBox!==null&&G("/TrimBox ["+oe(x.trimBox.bottomLeftX)+" "+oe(x.trimBox.bottomLeftY)+" "+oe(x.trimBox.topRightX)+" "+oe(x.trimBox.topRightY)+"]"),x.artBox!==null&&G("/ArtBox ["+oe(x.artBox.bottomLeftX)+" "+oe(x.artBox.bottomLeftY)+" "+oe(x.artBox.topRightX)+" "+oe(x.artBox.topRightY)+"]"),typeof x.userUnit=="number"&&x.userUnit!==1&&G("/UserUnit "+x.userUnit),nn.publish("putPage",{objId:ue,pageContext:St[C],pageNumber:C,page:Q}),G("/Contents "+pe+" 0 R"),G(">>"),G("endobj");var Re=Q.join(`
|
|
485
|
+
`);return F===H&&(Re+=`
|
|
486
|
+
Q`),wr(pe,!0),Sr({data:Re,filters:Hr(),objectId:pe}),G("endobj"),ue},Da=w.__private__.putPages=function(){var x,C,Q=[];for(x=1;x<=Ct;x++)St[x].objId=mr(),St[x].contentsObjId=mr();for(x=1;x<=Ct;x++)Q.push(Rn({number:x,data:We[x],objId:St[x].objId,contentsObjId:St[x].contentsObjId,mediaBox:St[x].mediaBox,cropBox:St[x].cropBox,bleedBox:St[x].bleedBox,trimBox:St[x].trimBox,artBox:St[x].artBox,userUnit:St[x].userUnit,rootDictionaryObjId:ba,resourceDictionaryObjId:oa}));wr(ba,!0),G("<</Type /Pages");var ue="/Kids [";for(C=0;C<Ct;C++)ue+=Q[C]+" 0 R ";G(ue+"]"),G("/Count "+Ct),G(">>"),G("endobj"),nn.publish("postPutPages")},Zi=function(x){nn.publish("putFont",{font:x,out:G,newObject:Mn,putStream:Sr}),x.isAlreadyPutted!==!0&&(x.objectNumber=Mn(),G("<<"),G("/Type /Font"),G("/BaseFont /"+$u(x.postScriptName)),G("/Subtype /Type1"),typeof x.encoding=="string"&&G("/Encoding /"+x.encoding),G("/FirstChar 32"),G("/LastChar 255"),G(">>"),G("endobj"))},xa=function(x){x.objectNumber=Mn();var C=[];C.push({key:"Type",value:"/XObject"}),C.push({key:"Subtype",value:"/Form"}),C.push({key:"BBox",value:"["+[oe(x.x),oe(x.y),oe(x.x+x.width),oe(x.y+x.height)].join(" ")+"]"}),C.push({key:"Matrix",value:"["+x.matrix.toString()+"]"});var Q=x.pages[1].join(`
|
|
487
|
+
`);Sr({data:Q,additionalKeyValues:C,objectId:x.objectNumber}),G("endobj")},za=function(x,C){C||(C=21);var Q=Mn(),ue=(function(Fe,st){var at,Mt=[],Ft=1/(st-1);for(at=0;at<1;at+=Ft)Mt.push(at);if(Mt.push(1),Fe[0].offset!=0){var Jt={offset:0,color:Fe[0].color};Fe.unshift(Jt)}if(Fe[Fe.length-1].offset!=1){var tr={offset:1,color:Fe[Fe.length-1].color};Fe.push(tr)}for(var mn="",gn=0,Nn=0;Nn<Mt.length;Nn++){for(at=Mt[Nn];at>Fe[gn+1].offset;)gn++;var zn=Fe[gn].offset,Bn=(at-zn)/(Fe[gn+1].offset-zn),Mr=Fe[gn].color,Ia=Fe[gn+1].color;mn+=te(Math.round((1-Bn)*Mr[0]+Bn*Ia[0]).toString(16))+te(Math.round((1-Bn)*Mr[1]+Bn*Ia[1]).toString(16))+te(Math.round((1-Bn)*Mr[2]+Bn*Ia[2]).toString(16))}return mn.trim()})(x.colors,C),pe=[];pe.push({key:"FunctionType",value:"0"}),pe.push({key:"Domain",value:"[0.0 1.0]"}),pe.push({key:"Size",value:"["+C+"]"}),pe.push({key:"BitsPerSample",value:"8"}),pe.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),pe.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Sr({data:ue,additionalKeyValues:pe,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Q}),G("endobj"),x.objectNumber=Mn(),G("<< /ShadingType "+x.type),G("/ColorSpace /DeviceRGB");var Re="/Coords ["+oe(parseFloat(x.coords[0]))+" "+oe(parseFloat(x.coords[1]))+" ";x.type===2?Re+=oe(parseFloat(x.coords[2]))+" "+oe(parseFloat(x.coords[3])):Re+=oe(parseFloat(x.coords[2]))+" "+oe(parseFloat(x.coords[3]))+" "+oe(parseFloat(x.coords[4]))+" "+oe(parseFloat(x.coords[5])),G(Re+="]"),x.matrix&&G("/Matrix ["+x.matrix.toString()+"]"),G("/Function "+Q+" 0 R"),G("/Extend [true true]"),G(">>"),G("endobj")},xo=function(x,C){var Q=mr(),ue=Mn();C.push({resourcesOid:Q,objectOid:ue}),x.objectNumber=ue;var pe=[];pe.push({key:"Type",value:"/Pattern"}),pe.push({key:"PatternType",value:"1"}),pe.push({key:"PaintType",value:"1"}),pe.push({key:"TilingType",value:"1"}),pe.push({key:"BBox",value:"["+x.boundingBox.map(oe).join(" ")+"]"}),pe.push({key:"XStep",value:oe(x.xStep)}),pe.push({key:"YStep",value:oe(x.yStep)}),pe.push({key:"Resources",value:Q+" 0 R"}),x.matrix&&pe.push({key:"Matrix",value:"["+x.matrix.toString()+"]"}),Sr({data:x.stream,additionalKeyValues:pe,objectId:x.objectNumber}),G("endobj")},tu=function(x){for(var C in x.objectNumber=Mn(),G("<<"),x)switch(C){case"opacity":G("/ca "+O(x[C]));break;case"stroke-opacity":G("/CA "+O(x[C]))}G(">>"),G("endobj")},wo=function(x){wr(x.resourcesOid,!0),G("<<"),G("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var C in G("/Font <<"),Ye)Ye.hasOwnProperty(C)&&(_===!1||_===!0&&j.hasOwnProperty(C))&&G("/"+C+" "+Ye[C].objectNumber+" 0 R");G(">>")})(),(function(){if(Object.keys(rt).length>0){for(var C in G("/Shading <<"),rt)rt.hasOwnProperty(C)&&rt[C]instanceof Yl&&rt[C].objectNumber>=0&&G("/"+C+" "+rt[C].objectNumber+" 0 R");nn.publish("putShadingPatternDict"),G(">>")}})(),(function(C){if(Object.keys(rt).length>0){for(var Q in G("/Pattern <<"),rt)rt.hasOwnProperty(Q)&&rt[Q]instanceof w.TilingPattern&&rt[Q].objectNumber>=0&&rt[Q].objectNumber<C&&G("/"+Q+" "+rt[Q].objectNumber+" 0 R");nn.publish("putTilingPatternDict"),G(">>")}})(x.objectOid),(function(){if(Object.keys(yt).length>0){var C;for(C in G("/ExtGState <<"),yt)yt.hasOwnProperty(C)&&yt[C].objectNumber>=0&&G("/"+C+" "+yt[C].objectNumber+" 0 R");nn.publish("putGStateDict"),G(">>")}})(),(function(){for(var C in G("/XObject <<"),pn)pn.hasOwnProperty(C)&&pn[C].objectNumber>=0&&G("/"+C+" "+pn[C].objectNumber+" 0 R");nn.publish("putXobjectDict"),G(">>")})(),G(">>"),G("endobj")},nu=function(x){Je[x.fontName]=Je[x.fontName]||{},Je[x.fontName][x.fontStyle]=x.id},Ms=function(x,C,Q,ue,pe){var Re={id:"F"+(Object.keys(Ye).length+1).toString(10),postScriptName:x,fontName:C,fontStyle:Q,encoding:ue,isStandardFont:pe||!1,metadata:{}};return nn.publish("addFont",{font:Re,instance:this}),Ye[Re.id]=Re,nu(Re),Re.id},Wr=w.__private__.pdfEscape=w.pdfEscape=function(x,C){return(function(Q,ue){var pe,Re,Fe,st,at,Mt,Ft,Jt,tr;if(Fe=(ue=ue||{}).sourceEncoding||"Unicode",at=ue.outputEncoding,(ue.autoencode||at)&&Ye[$e].metadata&&Ye[$e].metadata[Fe]&&Ye[$e].metadata[Fe].encoding&&(st=Ye[$e].metadata[Fe].encoding,!at&&Ye[$e].encoding&&(at=Ye[$e].encoding),!at&&st.codePages&&(at=st.codePages[0]),typeof at=="string"&&(at=st[at]),at)){for(Ft=!1,Mt=[],pe=0,Re=Q.length;pe<Re;pe++)(Jt=at[Q.charCodeAt(pe)])?Mt.push(String.fromCharCode(Jt)):Mt.push(Q[pe]),Mt[pe].charCodeAt(0)>>8&&(Ft=!0);Q=Mt.join("")}for(pe=Q.length;Ft===void 0&&pe!==0;)Q.charCodeAt(pe-1)>>8&&(Ft=!0),pe--;if(!Ft)return Q;for(Mt=ue.noBOM?[]:[254,255],pe=0,Re=Q.length;pe<Re;pe++){if((tr=(Jt=Q.charCodeAt(pe))>>8)>>8)throw new Error("Character at position "+pe+" of string '"+Q+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Mt.push(tr),Mt.push(Jt-(tr<<8))}return String.fromCharCode.apply(void 0,Mt)})(x,C).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},la=w.__private__.beginPage=function(x){We[++Ct]=[],St[Ct]={objId:0,contentsObjId:0,userUnit:Number(d),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(x[0]),topRightY:Number(x[1])}},wi(Ct),dt(We[q])},So=function(x,C){var Q,ue,pe;switch(a=C||a,typeof x=="string"&&(Q=E(x.toLowerCase()),Array.isArray(Q)&&(ue=Q[0],pe=Q[1])),Array.isArray(x)&&(ue=x[0]*qt,pe=x[1]*qt),isNaN(ue)&&(ue=o[0],pe=o[1]),(ue>14400||pe>14400)&&(Tn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),ue=Math.min(14400,ue),pe=Math.min(14400,pe)),o=[ue,pe],a.substr(0,1)){case"l":pe>ue&&(o=[pe,ue]);break;case"p":ue>pe&&(o=[pe,ue])}la(o),Ps(kt),G(Si),_i!==0&&G(_i+" J"),as!==0&&G(as+" j"),nn.publish("addPage",{pageNumber:Ct})},_o=function(x){x>0&&x<=Ct&&(We.splice(x,1),St.splice(x,1),Ct--,q>Ct&&(q=Ct),this.setPage(q))},wi=function(x){x>0&&x<=Ct&&(q=x)},Ao=w.__private__.getNumberOfPages=w.getNumberOfPages=function(){return We.length-1},jo=function(x,C,Q){var ue,pe=void 0;return Q=Q||{},x=x!==void 0?x:Ye[$e].fontName,C=C!==void 0?C:Ye[$e].fontStyle,ue=x.toLowerCase(),Je[ue]!==void 0&&Je[ue][C]!==void 0?pe=Je[ue][C]:Je[x]!==void 0&&Je[x][C]!==void 0?pe=Je[x][C]:Q.disableWarning===!1&&Tn.warn("Unable to look up font label for font '"+x+"', '"+C+"'. Refer to getFontList() for available fonts."),pe||Q.noFallback||(pe=Je.times[C])==null&&(pe=Je.times.normal),pe},ri=w.__private__.putInfo=function(){var x=Mn(),C=function(ue){return ue};for(var Q in v!==null&&(C=yr.encryptor(x,0)),G("<<"),G("/Producer ("+Wr(C("jsPDF "+gt.version))+")"),Dt)Dt.hasOwnProperty(Q)&&Dt[Q]&&G("/"+Q.substr(0,1).toUpperCase()+Q.substr(1)+" ("+Wr(C(Dt[Q]))+")");G("/CreationDate ("+Wr(C(ve))+")"),G(">>"),G("endobj")},Rs=w.__private__.putCatalog=function(x){var C=(x=x||{}).rootDictionaryObjId||ba;switch(Mn(),G("<<"),G("/Type /Catalog"),G("/Pages "+C+" 0 R"),mt||(mt="fullwidth"),mt){case"fullwidth":G("/OpenAction [3 0 R /FitH null]");break;case"fullheight":G("/OpenAction [3 0 R /FitV null]");break;case"fullpage":G("/OpenAction [3 0 R /Fit]");break;case"original":G("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Q=""+mt;Q.substr(Q.length-1)==="%"&&(mt=parseInt(mt)/100),typeof mt=="number"&&G("/OpenAction [3 0 R /XYZ null null "+O(mt)+"]")}switch(Gt||(Gt="continuous"),Gt){case"continuous":G("/PageLayout /OneColumn");break;case"single":G("/PageLayout /SinglePage");break;case"two":case"twoleft":G("/PageLayout /TwoColumnLeft");break;case"tworight":G("/PageLayout /TwoColumnRight")}ht&&G("/PageMode /"+ht),nn.publish("putCatalog"),G(">>"),G("endobj")},ta=w.__private__.putTrailer=function(){G("trailer"),G("<<"),G("/Size "+(se+1)),G("/Root "+se+" 0 R"),G("/Info "+(se-1)+" 0 R"),v!==null&&G("/Encrypt "+yr.oid+" 0 R"),G("/ID [ <"+ee+"> <"+ee+"> ]"),G(">>")},Vn=w.__private__.putHeader=function(){G("%PDF-"+k),G("%ºß¬à")},ru=w.__private__.putXRef=function(){var x="0000000000";G("xref"),G("0 "+(se+1)),G("0000000000 65535 f ");for(var C=1;C<=se;C++)typeof ye[C]=="function"?G((x+ye[C]()).slice(-10)+" 00000 n "):ye[C]!==void 0?G((x+ye[C]).slice(-10)+" 00000 n "):G("0000000000 00000 n ")},ua=w.__private__.buildDocument=function(){var x;se=0,Ce=0,je=[],ye=[],ze=[],ba=mr(),oa=mr(),dt(je),nn.publish("buildDocument"),Vn(),Da(),(function(){nn.publish("putAdditionalObjects");for(var Q=0;Q<ze.length;Q++){var ue=ze[Q];wr(ue.objId,!0),G(ue.content),G("endobj")}nn.publish("postPutAdditionalObjects")})(),x=[],(function(){for(var Q in Ye)Ye.hasOwnProperty(Q)&&(_===!1||_===!0&&j.hasOwnProperty(Q))&&Zi(Ye[Q])})(),(function(){var Q;for(Q in yt)yt.hasOwnProperty(Q)&&tu(yt[Q])})(),(function(){for(var Q in pn)pn.hasOwnProperty(Q)&&xa(pn[Q])})(),(function(Q){var ue;for(ue in rt)rt.hasOwnProperty(ue)&&(rt[ue]instanceof Yl?za(rt[ue]):rt[ue]instanceof Ju&&xo(rt[ue],Q))})(x),nn.publish("putResources"),x.forEach(wo),wo({resourcesOid:oa,objectOid:Number.MAX_SAFE_INTEGER}),nn.publish("postPutResources"),v!==null&&(yr.oid=Mn(),G("<<"),G("/Filter /Standard"),G("/V "+yr.v),G("/R "+yr.r),G("/U <"+yr.toHexString(yr.U)+">"),G("/O <"+yr.toHexString(yr.O)+">"),G("/P "+yr.P),G(">>"),G("endobj")),ri(),Rs();var C=Ce;return ru(),ta(),G("startxref"),G(""+C),G("%%EOF"),dt(We[q]),je.join(`
|
|
488
|
+
`)},Os=w.__private__.getBlob=function(x){return new Blob([xt(x)],{type:"application/pdf"})},Ji=function(x){for(;x.firstChild;)x.removeChild(x.firstChild)},ca=function(x){var C,Q=x.document,ue=Q.documentElement,pe=Q.head,Re=Q.body;return pe||(pe=Q.createElement("head"),ue.appendChild(pe)),Re||(Re=Q.createElement("body"),ue.appendChild(Re)),Ji(pe),Ji(Re),(C=Q.createElement("style")).appendChild(Q.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),pe.appendChild(C),{document:Q,body:Re}},_r=w.output=w.__private__.output=(xr=function(x,C){switch(typeof(C=C||{})=="string"?C={filename:C}:C.filename=C.filename||"generated.pdf",x){case void 0:return ua();case"save":w.save(C.filename);break;case"arraybuffer":return xt(ua());case"blob":return Os(ua());case"bloburi":case"bloburl":if(Pt.URL!==void 0&&typeof Pt.URL.createObjectURL=="function")return Pt.URL&&Pt.URL.createObjectURL(Os(ua()))||void 0;Tn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Q="",ue=ua();try{Q=mm(ue)}catch{Q=mm(unescape(encodeURIComponent(ue)))}return"data:application/pdf;filename="+encodeURIComponent(C.filename)+";base64,"+Q;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Pt)==="[object Window]"){var pe="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Re=!C.pdfObjectUrl;Re||(pe=C.pdfObjectUrl);var Fe=Pt.open();if(Fe!==null){var st=ca(Fe),at=st.document.createElement("script"),Mt=this;at.src=pe,Re&&(at.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",at.crossOrigin="anonymous"),at.onload=function(){Fe.PDFObject.embed(Mt.output("dataurlstring"),C)},st.body.appendChild(at)}return Fe}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Pt)==="[object Window]"){var Ft=C.pdfJsUrl||"examples/PDF.js/web/viewer.html",Jt=Pt.open();if(Jt!==null){var tr=ca(Jt),mn=tr.document.createElement("iframe"),gn=Ft.indexOf("?")===-1?"?":"&";Mt=this,mn.id="pdfViewer",mn.width="500px",mn.height="400px",mn.src=Ft+gn+"file=&downloadName="+encodeURIComponent(C.filename),mn.onload=function(){Jt.document.title=C.filename,mn.contentWindow.PDFViewerApplication.open(Mt.output("bloburl"))},tr.body.appendChild(mn)}return Jt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Pt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Nn=Pt.open();if(Nn!==null){var zn=ca(Nn),Bn=zn.document.createElement("iframe");Bn.src=this.output("datauristring",C),zn.body.appendChild(Bn),Nn.document.title=C.filename}if(Nn||typeof safari>"u")return Nn;break;case"datauri":case"dataurl":return Pt.document.location.href=this.output("datauristring",C);default:return null}},xr.foo=function(){try{return xr.apply(this,arguments)}catch(Q){var x=Q.stack||"";~x.indexOf(" at ")&&(x=x.split(" at ")[1]);var C="Error in function "+x.split(`
|
|
489
|
+
`)[0].split("<")[0]+": "+Q.message;if(!Pt.console)throw new Error(C);Pt.console.error(C,Q),Pt.alert&&alert(C)}},xr.foo.bar=xr,xr.foo),Ba=function(x){return Array.isArray(ni)===!0&&ni.indexOf(x)>-1};switch(i){case"pt":qt=1;break;case"mm":qt=72/25.4;break;case"cm":qt=72/2.54;break;case"in":qt=72;break;case"px":qt=Ba("px_scaling")==1?.75:96/72;break;case"pc":case"em":qt=12;break;case"ex":qt=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);qt=i}var yr=null;ce(),le();var ko=w.__private__.getPageInfo=w.getPageInfo=function(x){if(isNaN(x)||x%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:St[x].objId,pageNumber:x,pageContext:St[x]}},es=w.__private__.getPageInfoByObjId=function(x){if(isNaN(x)||x%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var C in St)if(St[C].objId===x)break;return ko(C)},au=w.__private__.getCurrentPageInfo=w.getCurrentPageInfo=function(){return{objId:St[q].objId,pageNumber:q,pageContext:St[q]}};w.addPage=function(){return So.apply(this,arguments),this},w.setPage=function(){return wi.apply(this,arguments),dt.call(this,We[q]),this},w.insertPage=function(x){return this.addPage(),this.movePage(q,x),this},w.movePage=function(x,C){var Q,ue;if(x>C){Q=We[x],ue=St[x];for(var pe=x;pe>C;pe--)We[pe]=We[pe-1],St[pe]=St[pe-1];We[C]=Q,St[C]=ue,this.setPage(C)}else if(x<C){Q=We[x],ue=St[x];for(var Re=x;Re<C;Re++)We[Re]=We[Re+1],St[Re]=St[Re+1];We[C]=Q,St[C]=ue,this.setPage(C)}return this},w.deletePage=function(){return _o.apply(this,arguments),this},w.__private__.text=w.text=function(x,C,Q,ue,pe){var Re,Fe,st,at,Mt,Ft,Jt,tr,mn,gn=(ue=ue||{}).scope||this;if(typeof x=="number"&&typeof C=="number"&&(typeof Q=="string"||Array.isArray(Q))){var Nn=Q;Q=C,C=x,x=Nn}if(arguments[3]instanceof jt==0?(st=arguments[4],at=arguments[5],Sn(Jt=arguments[3])==="object"&&Jt!==null||(typeof st=="string"&&(at=st,st=null),typeof Jt=="string"&&(at=Jt,Jt=null),typeof Jt=="number"&&(st=Jt,Jt=null),ue={flags:Jt,angle:st,align:at})):(Z("The transform parameter of text() with a Matrix value"),mn=pe),isNaN(C)||isNaN(Q)||x==null)throw new Error("Invalid arguments passed to jsPDF.text");if(x.length===0)return gn;var zn,Bn="",Mr=typeof ue.lineHeightFactor=="number"?ue.lineHeightFactor:ns,Ia=gn.internal.scaleFactor;function Li(yn){return yn=yn.split(" ").join(Array(ue.TabLen||9).join(" ")),Wr(yn,Jt)}function Is(yn){for(var an,Un=yn.concat(),nr=[],si=Un.length;si--;)typeof(an=Un.shift())=="string"?nr.push(an):Array.isArray(yn)&&(an.length===1||an[1]===void 0&&an[2]===void 0)?nr.push(an[0]):nr.push([an[0],an[1],an[2]]);return nr}function is(yn,an){var Un;if(typeof yn=="string")Un=an(yn)[0];else if(Array.isArray(yn)){for(var nr,si,Sl=yn.concat(),qo=[],gu=Sl.length;gu--;)typeof(nr=Sl.shift())=="string"?qo.push(an(nr)[0]):Array.isArray(nr)&&typeof nr[0]=="string"&&(si=an(nr[0],nr[1],nr[2]),qo.push([si[0],si[1],si[2]]));Un=qo}return Un}var Ei=!1,ss=!0;if(typeof x=="string")Ei=!0;else if(Array.isArray(x)){var Hs=x.concat();Fe=[];for(var Ws,Qn=Hs.length;Qn--;)(typeof(Ws=Hs.shift())!="string"||Array.isArray(Ws)&&typeof Ws[0]!="string")&&(ss=!1);Ei=ss}if(Ei===!1)throw new Error('Type of text must be string or Array. "'+x+'" is not recognized.');typeof x=="string"&&(x=x.match(/[\r?\n]/)?x.split(/\r\n|\r|\n/g):[x]);var Ys=Ie/gn.internal.scaleFactor,Gs=Ys*(Mr-1);switch(ue.baseline){case"bottom":Q-=Gs;break;case"top":Q+=Ys-Gs;break;case"hanging":Q+=Ys-2*Gs;break;case"middle":Q+=Ys/2-Gs}if((Ft=ue.maxWidth||0)>0&&(typeof x=="string"?x=gn.splitTextToSize(x,Ft):Object.prototype.toString.call(x)==="[object Array]"&&(x=x.reduce(function(yn,an){return yn.concat(gn.splitTextToSize(an,Ft))},[]))),Re={text:x,x:C,y:Q,options:ue,mutex:{pdfEscape:Wr,activeFontKey:$e,fonts:Ye,activeFontSize:Ie}},nn.publish("preProcessText",Re),x=Re.text,st=(ue=Re.options).angle,mn instanceof jt==0&&st&&typeof st=="number"){st*=Math.PI/180,ue.rotationDirection===0&&(st=-st),F===H&&(st=-st);var wl=Math.cos(st),Ha=Math.sin(st);mn=new jt(wl,Ha,-Ha,wl,0,0)}else st&&st instanceof jt&&(mn=st);F!==H||mn||(mn=Cn),(Mt=ue.charSpace||wa)!==void 0&&(Bn+=oe(ne(Mt))+` Tc
|
|
490
|
+
`,this.setCharSpace(this.getCharSpace()||0)),(tr=ue.horizontalScale)!==void 0&&(Bn+=oe(100*tr)+` Tz
|
|
491
|
+
`),ue.lang;var Rr=-1,os=ue.renderingMode!==void 0?ue.renderingMode:ue.stroke,ii=gn.internal.getCurrentPageInfo().pageContext;switch(os){case 0:case!1:case"fill":Rr=0;break;case 1:case!0:case"stroke":Rr=1;break;case 2:case"fillThenStroke":Rr=2;break;case 3:case"invisible":Rr=3;break;case 4:case"fillAndAddForClipping":Rr=4;break;case 5:case"strokeAndAddPathForClipping":Rr=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Rr=6;break;case 7:case"addToPathForClipping":Rr=7}var pu=ii.usedRenderingMode!==void 0?ii.usedRenderingMode:-1;Rr!==-1?Bn+=Rr+` Tr
|
|
492
|
+
`:pu!==-1&&(Bn+=`0 Tr
|
|
493
|
+
`),Rr!==-1&&(ii.usedRenderingMode=Rr),at=ue.align||"left";var Gr,ls=Ie*Mr,Ro=gn.internal.pageSize.getWidth(),us=Ye[$e];Mt=ue.charSpace||wa,Ft=ue.maxWidth||0,Jt=Object.assign({autoencode:!0,noBOM:!0},ue.flags);var Ti=[],Oo=function(yn){return gn.getStringUnitWidth(yn,{font:us,charSpace:Mt,fontSize:Ie,doKerning:!1})*Ie/Ia};if(Object.prototype.toString.call(x)==="[object Array]"){var Or;Fe=Is(x),at!=="left"&&(Gr=Fe.map(Oo));var Vr,Do=0;if(at==="right"){C-=Gr[0],x=[],Qn=Fe.length;for(var cs=0;cs<Qn;cs++)cs===0?(Vr=Tr(C),Or=qa(Q)):(Vr=ne(Do-Gr[cs]),Or=-ls),x.push([Fe[cs],Vr,Or]),Do=Gr[cs]}else if(at==="center"){C-=Gr[0]/2,x=[],Qn=Fe.length;for(var fs=0;fs<Qn;fs++)fs===0?(Vr=Tr(C),Or=qa(Q)):(Vr=ne((Do-Gr[fs])/2),Or=-ls),x.push([Fe[fs],Vr,Or]),Do=Gr[fs]}else if(at==="left"){x=[],Qn=Fe.length;for(var zo=0;zo<Qn;zo++)x.push(Fe[zo])}else if(at==="justify"&&us.encoding==="Identity-H"){x=[],Qn=Fe.length,Ft=Ft!==0?Ft:Ro;for(var Vs=0,rn=0;rn<Qn;rn++)if(Or=rn===0?qa(Q):-ls,Vr=rn===0?Tr(C):Vs,rn<Qn-1){var Qs=ne((Ft-Gr[rn])/(Fe[rn].split(" ").length-1)),Wa=Fe[rn].split(" ");x.push([Wa[0]+" ",Vr,Or]),Vs=0;for(var Sa=1;Sa<Wa.length;Sa++){var ds=(Oo(Wa[Sa-1]+" "+Wa[Sa])-Oo(Wa[Sa]))*Ia+Qs;Sa==Wa.length-1?x.push([Wa[Sa],ds,0]):x.push([Wa[Sa]+" ",ds,0]),Vs-=ds}}else x.push([Fe[rn],Vr,Or]);x.push(["",Vs,0])}else{if(at!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(x=[],Qn=Fe.length,Ft=Ft!==0?Ft:Ro,rn=0;rn<Qn;rn++){Or=rn===0?qa(Q):-ls,Vr=rn===0?Tr(C):0;var Bo=Fe[rn].split(" ").length-1,Xs=Bo>0?(Ft-Gr[rn])/Bo:0;rn<Qn-1?Ti.push(oe(ne(Xs))):Ti.push(0),x.push([Fe[rn],Vr,Or])}}}(typeof ue.R2L=="boolean"?ue.R2L:bt)===!0&&(x=is(x,function(yn,an,Un){return[yn.split("").reverse().join(""),an,Un]})),Re={text:x,x:C,y:Q,options:ue,mutex:{pdfEscape:Wr,activeFontKey:$e,fonts:Ye,activeFontSize:Ie}},nn.publish("postProcessText",Re),x=Re.text,zn=Re.mutex.isHex||!1;var Po=Ye[$e].encoding;Po!=="WinAnsiEncoding"&&Po!=="StandardEncoding"||(x=is(x,function(yn,an,Un){return[Li(yn),an,Un]})),Fe=Is(x),x=[];for(var _a,Ci,Aa,Ya=Array.isArray(Fe[0])?1:0,Mi="",ja=function(yn,an,Un){var nr="";return Un instanceof jt?(Un=typeof ue.angle=="number"?Lr(Un,new jt(1,0,0,1,yn,an)):Lr(new jt(1,0,0,1,yn,an),Un),F===H&&(Un=Lr(new jt(1,0,0,-1,0,0),Un)),nr=Un.join(" ")+` Tm
|
|
494
|
+
`):nr=oe(yn)+" "+oe(an)+` Td
|
|
495
|
+
`,nr},Xn=0;Xn<Fe.length;Xn++){switch(Mi="",Ya){case 1:Aa=(zn?"<":"(")+Fe[Xn][0]+(zn?">":")"),_a=parseFloat(Fe[Xn][1]),Ci=parseFloat(Fe[Xn][2]);break;case 0:Aa=(zn?"<":"(")+Fe[Xn]+(zn?">":")"),_a=Tr(C),Ci=qa(Q)}Ti!==void 0&&Ti[Xn]!==void 0&&(Mi=Ti[Xn]+` Tw
|
|
496
|
+
`),Xn===0?x.push(Mi+ja(_a,Ci,mn)+Aa):Ya===0?x.push(Mi+Aa):Ya===1&&x.push(Mi+ja(_a,Ci,mn)+Aa)}x=Ya===0?x.join(` Tj
|
|
497
|
+
T* `):x.join(` Tj
|
|
498
|
+
`),x+=` Tj
|
|
499
|
+
`;var ka=`BT
|
|
500
|
+
/`;return ka+=$e+" "+Ie+` Tf
|
|
501
|
+
`,ka+=oe(Ie*Mr)+` TL
|
|
502
|
+
`,ka+=Ua+`
|
|
503
|
+
`,ka+=Bn,ka+=x,G(ka+="ET"),j[$e]=!0,gn};var iu=w.__private__.clip=w.clip=function(x){return G(x==="evenodd"?"W*":"W"),this};w.clipEvenOdd=function(){return iu("evenodd")},w.__private__.discardPath=w.discardPath=function(){return G("n"),this};var Yr=w.__private__.isValidStyle=function(x){var C=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(x)!==-1&&(C=!0),C};w.__private__.setDefaultPathOperation=w.setDefaultPathOperation=function(x){return Yr(x)&&(g=x),this};var su=w.__private__.getStyle=w.getStyle=function(x){var C=g;switch(x){case"D":case"S":C="S";break;case"F":C="f";break;case"FD":case"DF":C="B";break;case"f":case"f*":case"B":case"B*":C=x}return C},Ds=w.close=function(){return G("h"),this};w.stroke=function(){return G("S"),this},w.fill=function(x){return zs("f",x),this},w.fillEvenOdd=function(x){return zs("f*",x),this},w.fillStroke=function(x){return zs("B",x),this},w.fillStrokeEvenOdd=function(x){return zs("B*",x),this};var zs=function(x,C){Sn(C)==="object"?hc(C,x):G(x)},Bs=function(x){x===null||F===H&&x===void 0||(x=su(x),G(x))};function dc(x,C,Q,ue,pe){var Re=new Ju(C||this.boundingBox,Q||this.xStep,ue||this.yStep,this.gState,pe||this.matrix);Re.stream=this.stream;var Fe=x+"$$"+this.cloneIndex+++"$$";return kn(Fe,Re),Re}var hc=function(x,C){var Q=fn[x.key],ue=rt[Q];if(ue instanceof Yl)G("q"),G(No(C)),ue.gState&&w.setGState(ue.gState),G(x.matrix.toString()+" cm"),G("/"+Q+" sh"),G("Q");else if(ue instanceof Ju){var pe=new jt(1,0,0,-1,0,Fs());x.matrix&&(pe=pe.multiply(x.matrix||Cn),Q=dc.call(ue,x.key,x.boundingBox,x.xStep,x.yStep,pe).id),G("q"),G("/Pattern cs"),G("/"+Q+" scn"),ue.gState&&w.setGState(ue.gState),G(C),G("Q")}},No=function(x){switch(x){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"}},ai=w.moveTo=function(x,C){return G(oe(ne(x))+" "+oe(re(C))+" m"),this},Lo=w.lineTo=function(x,C){return G(oe(ne(x))+" "+oe(re(C))+" l"),this},fa=w.curveTo=function(x,C,Q,ue,pe,Re){return G([oe(ne(x)),oe(re(C)),oe(ne(Q)),oe(re(ue)),oe(ne(pe)),oe(re(Re)),"c"].join(" ")),this};w.__private__.line=w.line=function(x,C,Q,ue,pe){if(isNaN(x)||isNaN(C)||isNaN(Q)||isNaN(ue)||!Yr(pe))throw new Error("Invalid arguments passed to jsPDF.line");return F===Y?this.lines([[Q-x,ue-C]],x,C,[1,1],pe||"S"):this.lines([[Q-x,ue-C]],x,C,[1,1]).stroke()},w.__private__.lines=w.lines=function(x,C,Q,ue,pe,Re){var Fe,st,at,Mt,Ft,Jt,tr,mn,gn,Nn,zn,Bn;if(typeof x=="number"&&(Bn=Q,Q=C,C=x,x=Bn),ue=ue||[1,1],Re=Re||!1,isNaN(C)||isNaN(Q)||!Array.isArray(x)||!Array.isArray(ue)||!Yr(pe)||typeof Re!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(ai(C,Q),Fe=ue[0],st=ue[1],Mt=x.length,Nn=C,zn=Q,at=0;at<Mt;at++)(Ft=x[at]).length===2?(Nn=Ft[0]*Fe+Nn,zn=Ft[1]*st+zn,Lo(Nn,zn)):(Jt=Ft[0]*Fe+Nn,tr=Ft[1]*st+zn,mn=Ft[2]*Fe+Nn,gn=Ft[3]*st+zn,Nn=Ft[4]*Fe+Nn,zn=Ft[5]*st+zn,fa(Jt,tr,mn,gn,Nn,zn));return Re&&Ds(),Bs(pe),this},w.path=function(x){for(var C=0;C<x.length;C++){var Q=x[C],ue=Q.c;switch(Q.op){case"m":ai(ue[0],ue[1]);break;case"l":Lo(ue[0],ue[1]);break;case"c":fa.apply(this,ue);break;case"h":Ds()}}return this},w.__private__.rect=w.rect=function(x,C,Q,ue,pe){if(isNaN(x)||isNaN(C)||isNaN(Q)||isNaN(ue)||!Yr(pe))throw new Error("Invalid arguments passed to jsPDF.rect");return F===Y&&(ue=-ue),G([oe(ne(x)),oe(re(C)),oe(ne(Q)),oe(ne(ue)),"re"].join(" ")),Bs(pe),this},w.__private__.triangle=w.triangle=function(x,C,Q,ue,pe,Re,Fe){if(isNaN(x)||isNaN(C)||isNaN(Q)||isNaN(ue)||isNaN(pe)||isNaN(Re)||!Yr(Fe))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Q-x,ue-C],[pe-Q,Re-ue],[x-pe,C-Re]],x,C,[1,1],Fe,!0),this},w.__private__.roundedRect=w.roundedRect=function(x,C,Q,ue,pe,Re,Fe){if(isNaN(x)||isNaN(C)||isNaN(Q)||isNaN(ue)||isNaN(pe)||isNaN(Re)||!Yr(Fe))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var st=4/3*(Math.SQRT2-1);return pe=Math.min(pe,.5*Q),Re=Math.min(Re,.5*ue),this.lines([[Q-2*pe,0],[pe*st,0,pe,Re-Re*st,pe,Re],[0,ue-2*Re],[0,Re*st,-pe*st,Re,-pe,Re],[2*pe-Q,0],[-pe*st,0,-pe,-Re*st,-pe,-Re],[0,2*Re-ue],[0,-Re*st,pe*st,-Re,pe,-Re]],x+pe,C,[1,1],Fe,!0),this},w.__private__.ellipse=w.ellipse=function(x,C,Q,ue,pe){if(isNaN(x)||isNaN(C)||isNaN(Q)||isNaN(ue)||!Yr(pe))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Re=4/3*(Math.SQRT2-1)*Q,Fe=4/3*(Math.SQRT2-1)*ue;return ai(x+Q,C),fa(x+Q,C-Fe,x+Re,C-ue,x,C-ue),fa(x-Re,C-ue,x-Q,C-Fe,x-Q,C),fa(x-Q,C+Fe,x-Re,C+ue,x,C+ue),fa(x+Re,C+ue,x+Q,C+Fe,x+Q,C),Bs(pe),this},w.__private__.circle=w.circle=function(x,C,Q,ue){if(isNaN(x)||isNaN(C)||isNaN(Q)||!Yr(ue))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(x,C,Q,Q,ue)},w.setFont=function(x,C,Q){return Q&&(C=xe(C,Q)),$e=jo(x,C,{disableWarning:!1}),this};var ts=w.__private__.getFont=w.getFont=function(){return Ye[jo.apply(w,arguments)]};w.__private__.getFontList=w.getFontList=function(){var x,C,Q={};for(x in Je)if(Je.hasOwnProperty(x))for(C in Q[x]=[],Je[x])Je[x].hasOwnProperty(C)&&Q[x].push(C);return Q},w.addFont=function(x,C,Q,ue,pe){var Re=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Re.indexOf(arguments[3])!==-1?pe=arguments[3]:arguments[3]&&Re.indexOf(arguments[3])==-1&&(Q=xe(Q,ue)),Ms.call(this,x,C,Q,pe=pe||"Identity-H")};var ns,kt=t.lineWidth||.200025,ou=w.__private__.getLineWidth=w.getLineWidth=function(){return kt},Ps=w.__private__.setLineWidth=w.setLineWidth=function(x){return kt=x,G(oe(ne(x))+" w"),this};w.__private__.setLineDash=gt.API.setLineDash=gt.API.setLineDashPattern=function(x,C){if(x=x||[],C=C||0,isNaN(C)||!Array.isArray(x))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return x=x.map(function(Q){return oe(ne(Q))}).join(" "),C=oe(ne(C)),G("["+x+"] "+C+" d"),this};var Pa=w.__private__.getLineHeight=w.getLineHeight=function(){return Ie*ns};w.__private__.getLineHeight=w.getLineHeight=function(){return Ie*ns};var xl=w.__private__.setLineHeightFactor=w.setLineHeightFactor=function(x){return typeof(x=x||1.15)=="number"&&(ns=x),this},qs=w.__private__.getLineHeightFactor=w.getLineHeightFactor=function(){return ns};xl(t.lineHeight);var Tr=w.__private__.getHorizontalCoordinate=function(x){return ne(x)},qa=w.__private__.getVerticalCoordinate=function(x){return F===H?x:St[q].mediaBox.topRightY-St[q].mediaBox.bottomLeftY-ne(x)},Eo=w.__private__.getHorizontalCoordinateString=w.getHorizontalCoordinateString=function(x){return oe(Tr(x))},lu=w.__private__.getVerticalCoordinateString=w.getVerticalCoordinateString=function(x){return oe(qa(x))},Si=t.strokeColor||"0 G";w.__private__.getStrokeColor=w.getDrawColor=function(){return Ir(Si)},w.__private__.setStrokeColor=w.setDrawColor=function(x,C,Q,ue){return Si=Er({ch1:x,ch2:C,ch3:Q,ch4:ue,pdfColorType:"draw",precision:2}),G(Si),this};var rs=t.fillColor||"0 g";w.__private__.getFillColor=w.getFillColor=function(){return Ir(rs)},w.__private__.setFillColor=w.setFillColor=function(x,C,Q,ue){return rs=Er({ch1:x,ch2:C,ch3:Q,ch4:ue,pdfColorType:"fill",precision:2}),G(rs),this};var Ua=t.textColor||"0 g",Cr=w.__private__.getTextColor=w.getTextColor=function(){return Ir(Ua)};w.__private__.setTextColor=w.setTextColor=function(x,C,Q,ue){return Ua=Er({ch1:x,ch2:C,ch3:Q,ch4:ue,pdfColorType:"text",precision:3}),this};var wa=t.charSpace,To=w.__private__.getCharSpace=w.getCharSpace=function(){return parseFloat(wa||0)};w.__private__.setCharSpace=w.setCharSpace=function(x){if(isNaN(x))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return wa=x,this};var _i=0;w.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},w.__private__.setLineCap=w.setLineCap=function(x){var C=w.CapJoinStyles[x];if(C===void 0)throw new Error("Line cap style of '"+x+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return _i=C,G(C+" J"),this};var as=0;w.__private__.setLineJoin=w.setLineJoin=function(x){var C=w.CapJoinStyles[x];if(C===void 0)throw new Error("Line join style of '"+x+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return as=C,G(C+" j"),this},w.__private__.setLineMiterLimit=w.__private__.setMiterLimit=w.setLineMiterLimit=w.setMiterLimit=function(x){if(x=x||0,isNaN(x))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return G(oe(ne(x))+" M"),this},w.GState=rh,w.setGState=function(x){(x=typeof x=="string"?yt[At[x]]:Us(null,x)).equals(Et)||(G("/"+x.id+" gs"),Et=x)};var Us=function(x,C){if(!x||!At[x]){var Q=!1;for(var ue in yt)if(yt.hasOwnProperty(ue)&&yt[ue].equals(C)){Q=!0;break}if(Q)C=yt[ue];else{var pe="GS"+(Object.keys(yt).length+1).toString(10);yt[pe]=C,C.id=pe}return x&&(At[x]=C.id),nn.publish("addGState",C),C}};w.addGState=function(x,C){return Us(x,C),this},w.saveGraphicsState=function(){return G("q"),Kt.push({key:$e,size:Ie,color:Ua}),this},w.restoreGraphicsState=function(){G("Q");var x=Kt.pop();return $e=x.key,Ie=x.size,Ua=x.color,Et=null,this},w.setCurrentTransformationMatrix=function(x){return G(x.toString()+" cm"),this},w.comment=function(x){return G("#"+x),this};var Ai=function(x,C){var Q=x||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Q},set:function(Re){isNaN(Re)||(Q=parseFloat(Re))}});var ue=C||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return ue},set:function(Re){isNaN(Re)||(ue=parseFloat(Re))}});var pe="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return pe},set:function(Re){pe=Re.toString()}}),this},ji=function(x,C,Q,ue){Ai.call(this,x,C),this.type="rect";var pe=Q||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return pe},set:function(Fe){isNaN(Fe)||(pe=parseFloat(Fe))}});var Re=ue||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Re},set:function(Fe){isNaN(Fe)||(Re=parseFloat(Fe))}}),this},ki=function(){this.page=Ct,this.currentPage=q,this.pages=We.slice(0),this.pagesContext=St.slice(0),this.x=pt,this.y=Dn,this.matrix=we,this.width=uu(q),this.height=Fa(q),this.outputDestination=Ve,this.id="",this.objectNumber=-1};ki.prototype.restore=function(){Ct=this.page,q=this.currentPage,St=this.pagesContext,We=this.pages,pt=this.x,Dn=this.y,we=this.matrix,Ni(q,this.width),cu(q,this.height),Ve=this.outputDestination};var Co=function(x,C,Q,ue,pe){Oa.push(new ki),Ct=q=0,We=[],pt=x,Dn=C,we=pe,la([Q,ue])};for(var Mo in w.beginFormObject=function(x,C,Q,ue,pe){return Co(x,C,Q,ue,pe),this},w.endFormObject=function(x){return(function(C){if(Ra[C])Oa.pop().restore();else{var Q=new ki,ue="Xo"+(Object.keys(pn).length+1).toString(10);Q.id=ue,Ra[C]=ue,pn[ue]=Q,nn.publish("addFormObject",Q),Oa.pop().restore()}})(x),this},w.doFormObject=function(x,C){var Q=pn[Ra[x]];return G("q"),G(C.toString()+" cm"),G("/"+Q.id+" Do"),G("Q"),this},w.getFormObject=function(x){var C=pn[Ra[x]];return{x:C.x,y:C.y,width:C.width,height:C.height,matrix:C.matrix}},w.save=function(x,C){return x=x||"generated.pdf",(C=C||{}).returnPromise=C.returnPromise||!1,C.returnPromise===!1?(Wl(Os(ua()),x),typeof Wl.unload=="function"&&Pt.setTimeout&&setTimeout(Wl.unload,911),this):new Promise(function(Q,ue){try{var pe=Wl(Os(ua()),x);typeof Wl.unload=="function"&&Pt.setTimeout&&setTimeout(Wl.unload,911),Q(pe)}catch(Re){ue(Re.message)}})},gt.API)gt.API.hasOwnProperty(Mo)&&(Mo==="events"&>.API.events.length?(function(x,C){var Q,ue,pe;for(pe=C.length-1;pe!==-1;pe--)Q=C[pe][0],ue=C[pe][1],x.subscribe.apply(x,[Q].concat(typeof ue=="function"?[ue]:ue))})(nn,gt.API.events):w[Mo]=gt.API[Mo]);function uu(x){return St[x].mediaBox.topRightX-St[x].mediaBox.bottomLeftX}function Ni(x,C){St[x].mediaBox.topRightX=C+St[x].mediaBox.bottomLeftX}function Fa(x){return St[x].mediaBox.topRightY-St[x].mediaBox.bottomLeftY}function cu(x,C){St[x].mediaBox.topRightY=C+St[x].mediaBox.bottomLeftY}var fu=w.getPageWidth=function(x){return uu(x=x||q)/qt},du=w.setPageWidth=function(x,C){Ni(x,C*qt)},Fs=w.getPageHeight=function(x){return Fa(x=x||q)/qt},hu=w.setPageHeight=function(x,C){cu(x,C*qt)};return w.internal={pdfEscape:Wr,getStyle:su,getFont:ts,getFontSize:Ze,getCharSpace:To,getTextColor:Cr,getLineHeight:Pa,getLineHeightFactor:qs,getLineWidth:ou,write:Qe,getHorizontalCoordinate:Tr,getVerticalCoordinate:qa,getCoordinateString:Eo,getVerticalCoordinateString:lu,collections:{},newObject:Mn,newAdditionalObject:$i,newObjectDeferred:mr,newObjectDeferredBegin:wr,getFilters:Hr,putStream:Sr,events:nn,scaleFactor:qt,pageSize:{getWidth:function(){return fu(q)},setWidth:function(x){du(q,x)},getHeight:function(){return Fs(q)},setHeight:function(x){hu(q,x)}},encryptionOptions:v,encryption:yr,getEncryptor:function(x){return v!==null?yr.encryptor(x,0):function(C){return C}},output:_r,getNumberOfPages:Ao,get pages(){return We},out:G,f2:O,f3:U,getPageInfo:ko,getPageInfoByObjId:es,getCurrentPageInfo:au,getPDFVersion:L,Point:Ai,Rectangle:ji,Matrix:jt,hasHotfix:Ba},Object.defineProperty(w.internal.pageSize,"width",{get:function(){return fu(q)},set:function(x){du(q,x)},enumerable:!0,configurable:!0}),Object.defineProperty(w.internal.pageSize,"height",{get:function(){return Fs(q)},set:function(x){hu(q,x)},enumerable:!0,configurable:!0}),function(x){for(var C=0,Q=ut.length;C<Q;C++){var ue=Ms.call(this,x[C][0],x[C][1],x[C][2],ut[C][3],!0);_===!1&&(j[ue]=!0);var pe=x[C][0].split("-");nu({id:ue,fontName:pe[0],fontStyle:pe[1]||""})}nn.publish("addFonts",{fonts:Ye,dictionary:Je})}.call(w,ut),$e="F1",So(o,a),nn.publish("initialized"),w}Ku.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},Ku.prototype.toHexString=function(t){return t.split("").map(function(n){return("0"+(255&n.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Ku.prototype.hexToBytes=function(t){for(var n=[],a=0;a<t.length;a+=2)n.push(String.fromCharCode(parseInt(t.substr(a,2),16)));return n.join("")},Ku.prototype.processOwnerPassword=function(t,n){return p0(h0(n).substr(0,5),t)},Ku.prototype.encryptor=function(t,n){var a=h0(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&n,n>>8&255)).substr(0,10);return function(i){return p0(a,i)}},rh.prototype.equals=function(t){var n,a="id,objectNumber,equals";if(!t||Sn(t)!==Sn(this))return!1;var i=0;for(n in this)if(!(a.indexOf(n)>=0)){if(this.hasOwnProperty(n)&&!t.hasOwnProperty(n)||this[n]!==t[n])return!1;i++}for(n in t)t.hasOwnProperty(n)&&a.indexOf(n)<0&&i--;return i===0},gt.API={events:[]},gt.version="4.2.1";var ir=gt.API,F0=1,eu=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Qu=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Zl=function(t){return t.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(n){var a=n.charCodeAt(0).toString(16).toUpperCase();return"#"+(a.length===1?"0"+a:a)})},It=function(t){return t.toFixed(2)},hl=function(t){return t.toFixed(5)};ir.__acroform__={};var Ma=function(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t},xm=function(t){return t*F0},_s=function(t){var n=new vy,a=lt.internal.getHeight(t)||0,i=lt.internal.getWidth(t)||0;return n.BBox=[0,0,Number(It(i)),Number(It(a))],n},Q8=ir.__acroform__.setBit=function(t,n){if(t=t||0,n=n||0,isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<n},X8=ir.__acroform__.clearBit=function(t,n){if(t=t||0,n=n||0,isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<n)},K8=ir.__acroform__.getBit=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<n?1:0},hr=ir.__acroform__.getBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return K8(t,n-1)},pr=ir.__acroform__.setBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Q8(t,n-1)},gr=ir.__acroform__.clearBitForPdf=function(t,n){if(isNaN(t)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return X8(t,n-1)},$8=ir.__acroform__.calculateCoordinates=function(t,n){var a=n.internal.getHorizontalCoordinate,i=n.internal.getVerticalCoordinate,o=t[0],u=t[1],h=t[2],d=t[3],f={};return f.lowerLeft_X=a(o)||0,f.lowerLeft_Y=i(u+d)||0,f.upperRight_X=a(o+h)||0,f.upperRight_Y=i(u)||0,[Number(It(f.lowerLeft_X)),Number(It(f.lowerLeft_Y)),Number(It(f.upperRight_X)),Number(It(f.upperRight_Y))]},Z8=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var n=[],a=t._V||t.DV,i=g0(t,a),o=t.scope.internal.getFont(t.fontName,t.fontStyle).id;n.push("/Tx BMC"),n.push("q"),n.push("BT"),n.push(t.scope.__private__.encodeColorString(t.color)),n.push("/"+o+" "+It(i.fontSize)+" Tf"),n.push("1 0 0 1 0 0 Tm"),n.push(i.text),n.push("ET"),n.push("Q"),n.push("EMC");var u=_s(t);return u.scope=t.scope,u.stream=n.join(`
|
|
504
|
+
`),u}},g0=function(t,n){var a=t.fontSize===0?t.maxFontSize:t.fontSize,i={text:"",fontSize:""},o=(n=(n=n.substr(0,1)=="("?n.substr(1):n).substr(n.length-1)==")"?n.substr(0,n.length-1):n).split(" ");o=t.multiline?o.map(function(O){return O.split(`
|
|
505
|
+
`)}):o.map(function(O){return[O]});var u=a,h=lt.internal.getHeight(t)||0;h=h<0?-h:h;var d=lt.internal.getWidth(t)||0;d=d<0?-d:d;var f=function(O,U,ne){if(O+1<o.length){var re=U+" "+o[O+1][0];return zd(re,t,ne).width<=d-4}return!1};u++;e:for(;u>0;){n="",u--;var g,v,_=zd("3",t,u).height,j=t.multiline?h-u:(h-_)/2,w=j+=2,k=0,L=0,R=0;if(u<=0){n=`(...) Tj
|
|
506
|
+
`,n+="% Width of Text: "+zd(n,t,u=12).width+", FieldWidth:"+d+`
|
|
507
|
+
`;break}for(var E="",Y=0,H=0;H<o.length;H++)if(o.hasOwnProperty(H)){var F=!1;if(o[H].length!==1&&R!==o[H].length-1){if((_+2)*(Y+2)+2>h)continue e;E+=o[H][R],F=!0,L=H,H--}else{E=(E+=o[H][R]+" ").substr(E.length-1)==" "?E.substr(0,E.length-1):E;var X=parseInt(H),_e=f(X,E,u),xe=H>=o.length-1;if(_e&&!xe){E+=" ",R=0;continue}if(_e||xe){if(xe)L=X;else if(t.multiline&&(_+2)*(Y+2)+2>h)continue e}else{if(!t.multiline||(_+2)*(Y+2)+2>h)continue e;L=X}}for(var oe="",Z=k;Z<=L;Z++){var ge=o[Z];if(t.multiline){if(Z===L){oe+=ge[R]+" ",R=(R+1)%ge.length;continue}if(Z===k){oe+=ge[ge.length-1]+" ";continue}}oe+=ge[0]+" "}switch(oe=oe.substr(oe.length-1)==" "?oe.substr(0,oe.length-1):oe,v=zd(oe,t,u).width,t.textAlign){case"right":g=d-v-2;break;case"center":g=(d-v)/2;break;default:g=2}n+=It(g)+" "+It(w)+` Td
|
|
508
|
+
`,n+="("+eu(oe)+`) Tj
|
|
509
|
+
`,n+=-It(g)+` 0 Td
|
|
510
|
+
`,w=-(u+2),v=0,k=F?L:L+1,Y++,E=""}break}return i.text=n,i.fontSize=u,i},zd=function(t,n,a){var i=n.scope.internal.getFont(n.fontName,n.fontStyle),o=n.scope.getStringUnitWidth(t,{font:i,fontSize:parseFloat(a),charSpace:0})*parseFloat(a);return{height:n.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(a),charSpace:0})*parseFloat(a)*1.5,width:o}},J8={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},e_=function(t,n){var a={type:"reference",object:t};n.internal.getPageInfo(t.page).pageContext.annotations.find(function(i){return i.type===a.type&&i.object===a.object})===void 0&&n.internal.getPageInfo(t.page).pageContext.annotations.push(a)},t_=function(t,n){if(n.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(Xi.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(J8)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");F0=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new by,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(a){a.internal.events.unsubscribe(a.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete a.internal.acroformPlugin.acroFormDictionaryRoot._eventID,a.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(a){a.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=a.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in i)if(i.hasOwnProperty(o)){var u=i[o];u.objId=void 0,u.hasAnnotation&&e_(u,a)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(a){if(a.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");a.internal.write("/AcroForm "+a.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(a){(function(i,o){var u=!i;for(var h in i||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(h)){var d=i[h],f=[],g=d.Rect;if(d.Rect&&(d.Rect=$8(d.Rect,o)),o.internal.newObjectDeferredBegin(d.objId,!0),d.DA=lt.createDefaultAppearanceStream(d),Sn(d)==="object"&&typeof d.getKeyValueListForStream=="function"&&(f=d.getKeyValueListForStream()),d.Rect=g,d.hasAppearanceStream&&!d.appearanceStreamContent){var v=Z8(d);f.push({key:"AP",value:"<</N "+v+">>"}),o.internal.acroformPlugin.xForms.push(v)}if(d.appearanceStreamContent){var _="";for(var j in d.appearanceStreamContent)if(d.appearanceStreamContent.hasOwnProperty(j)){var w=d.appearanceStreamContent[j];if(_+="/"+j+" ",_+="<<",Object.keys(w).length>=1||Array.isArray(w)){for(var h in w)if(w.hasOwnProperty(h)){var k=w[h];typeof k=="function"&&(k=k.call(o,d)),_+="/"+h+" "+k+" ",o.internal.acroformPlugin.xForms.indexOf(k)>=0||o.internal.acroformPlugin.xForms.push(k)}}else typeof(k=w)=="function"&&(k=k.call(o,d)),_+="/"+h+" "+k,o.internal.acroformPlugin.xForms.indexOf(k)>=0||o.internal.acroformPlugin.xForms.push(k);_+=">>"}f.push({key:"AP",value:`<<
|
|
511
|
+
`+_+">>"})}o.internal.putStream({additionalKeyValues:f,objectId:d.objId}),o.internal.out("endobj")}u&&(function(L,R){for(var E in L)if(L.hasOwnProperty(E)){var Y=E,H=L[E];R.internal.newObjectDeferredBegin(H.objId,!0),Sn(H)==="object"&&typeof H.putStream=="function"&&H.putStream(),delete L[Y]}})(o.internal.acroformPlugin.xForms,o)})(a,t)}),t.internal.acroformPlugin.isInitialized=!0}},yy=ir.__acroform__.arrayToPdfArray=function(t,n,a){var i=function(h){return h};if(Array.isArray(t)){for(var o="[",u=0;u<t.length;u++)switch(u!==0&&(o+=" "),Sn(t[u])){case"boolean":case"number":case"object":o+=t[u].toString();break;case"string":t[u].substr(0,1)==="/"?o+="/"+Zl(t[u].substr(1)):(n!==void 0&&a&&(i=a.internal.getEncryptor(n)),o+="("+eu(i(t[u].toString()))+")")}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},W1=function(t,n,a){var i=function(o){return o};return n!==void 0&&a&&(i=a.internal.getEncryptor(n)),(t=t||"").toString(),"("+eu(i(t))+")"},As=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(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};As.prototype.toString=function(){return this.objId+" 0 R"},As.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},As.prototype.getKeyValueListForStream=function(){var t=[],n=Object.getOwnPropertyNames(this).filter(function(u){return u!="content"&&u!="appearanceStreamContent"&&u!="scope"&&u!="objId"&&u.substring(0,1)!="_"});for(var a in n)if(Object.getOwnPropertyDescriptor(this,n[a]).configurable===!1){var i=n[a],o=this[i];o&&(Array.isArray(o)?t.push({key:i,value:yy(o,this.objId,this.scope)}):o instanceof As?(o.scope=this.scope,t.push({key:i,value:o.objId+" 0 R"})):typeof o!="function"&&t.push({key:i,value:o}))}return t};var vy=function(){As.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 t,n=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return n},set:function(a){n=a}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(a){t=a.trim()},get:function(){return t||null}})};Ma(vy,As);var by=function(){As.call(this);var t,n=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return n.length>0?n:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return n}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var a=function(i){return i};return this.scope&&(a=this.scope.internal.getEncryptor(this.objId)),"("+eu(a(t))+")"}},set:function(a){t=a}})};Ma(by,As);var Xi=function t(){As.call(this);var n=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return n},set:function(E){if(isNaN(E))throw new Error('Invalid value "'+E+'" for attribute F supplied.');n=E}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!hr(n,3)},set:function(E){E?this.F=pr(n,3):this.F=gr(n,3)}});var a=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return a},set:function(E){if(isNaN(E))throw new Error('Invalid value "'+E+'" for attribute Ff supplied.');a=E}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(E){i=E!==void 0?E:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(E){i[0]=E}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(E){i[1]=E}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(E){i[2]=E}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(E){i[3]=E}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(E){switch(E){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=E;break;default:throw new Error('Invalid value "'+E+'" for attribute FT supplied.')}}});var u=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!u||u.length<1){if(this instanceof ah)return;u="FieldObject"+t.FieldNum++}var E=function(Y){return Y};return this.scope&&(E=this.scope.internal.getEncryptor(this.objId)),"("+eu(E(u))+")"},set:function(E){u=E.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return u},set:function(E){u=E}});var h="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return h},set:function(E){h=E}});var d="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return d},set:function(E){d=E}});var f=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return f},set:function(E){f=E}});var g=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return g===void 0?50/F0:g},set:function(E){g=E}});var v="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return v},set:function(E){v=E}});var _="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!_||this instanceof ah||this instanceof Vl))return W1(_,this.objId,this.scope)},set:function(E){E=E.toString(),_=E}});var j=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(j)return this instanceof Ur==0?W1(j,this.objId,this.scope):j},set:function(E){E=E.toString(),j=this instanceof Ur==0?E.substr(0,1)==="("?Qu(E.substr(1,E.length-2)):Qu(E):E}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ur==1?Qu(j.substr(1,j.length-1)):j},set:function(E){E=E.toString(),j=this instanceof Ur==1?"/"+Zl(E):E}});var w=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(w)return w},set:function(E){this.V=E}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(w)return this instanceof Ur==0?W1(w,this.objId,this.scope):w},set:function(E){E=E.toString(),w=this instanceof Ur==0?E.substr(0,1)==="("?Qu(E.substr(1,E.length-2)):Qu(E):E}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Ur==1?Qu(w.substr(1,w.length-1)):w},set:function(E){E=E.toString(),w=this instanceof Ur==1?"/"+Zl(E):E}}),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 k,L=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return L},set:function(E){E=!!E,L=E}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(k)return k},set:function(E){k=E}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,1)},set:function(E){E?this.Ff=pr(this.Ff,1):this.Ff=gr(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,2)},set:function(E){E?this.Ff=pr(this.Ff,2):this.Ff=gr(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,3)},set:function(E){E?this.Ff=pr(this.Ff,3):this.Ff=gr(this.Ff,3)}});var R=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(R!==null)return R},set:function(E){if([0,1,2].indexOf(E)===-1)throw new Error('Invalid value "'+E+'" for attribute Q supplied.');R=E}}),Object.defineProperty(this,"textAlign",{get:function(){var E;switch(R){case 0:default:E="left";break;case 1:E="center";break;case 2:E="right"}return E},configurable:!0,enumerable:!0,set:function(E){switch(E){case"right":case 2:R=2;break;case"center":case 1:R=1;break;default:R=0}}})};Ma(Xi,As);var ec=function(){Xi.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(a){t=a}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(a){t=a}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return yy(n,this.objId,this.scope)},set:function(a){var i,o;o=[],typeof(i=a)=="string"&&(o=(function(u,h,d){d||(d=1);for(var f,g=[];f=h.exec(u);)g.push(f[d]);return g})(i,/\((.*?)\)/g)),n=o}}),this.getOptions=function(){return n},this.setOptions=function(a){n=a,this.sort&&n.sort()},this.addOption=function(a){a=(a=a||"").toString(),n.push(a),this.sort&&n.sort()},this.removeOption=function(a,i){for(i=i||!1,a=(a=a||"").toString();n.indexOf(a)!==-1&&(n.splice(n.indexOf(a),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,18)},set:function(a){a?this.Ff=pr(this.Ff,18):this.Ff=gr(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,19)},set:function(a){this.combo===!0&&(a?this.Ff=pr(this.Ff,19):this.Ff=gr(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,20)},set:function(a){a?(this.Ff=pr(this.Ff,20),n.sort()):this.Ff=gr(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,22)},set:function(a){a?this.Ff=pr(this.Ff,22):this.Ff=gr(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,23)},set:function(a){a?this.Ff=pr(this.Ff,23):this.Ff=gr(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,27)},set:function(a){a?this.Ff=pr(this.Ff,27):this.Ff=gr(this.Ff,27)}}),this.hasAppearanceStream=!1};Ma(ec,Xi);var tc=function(){ec.call(this),this.fontName="helvetica",this.combo=!1};Ma(tc,ec);var nc=function(){tc.call(this),this.combo=!0};Ma(nc,tc);var Hd=function(){nc.call(this),this.edit=!0};Ma(Hd,nc);var Ur=function(){Xi.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,15)},set:function(a){a?this.Ff=pr(this.Ff,15):this.Ff=gr(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,16)},set:function(a){a?this.Ff=pr(this.Ff,16):this.Ff=gr(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,17)},set:function(a){a?this.Ff=pr(this.Ff,17):this.Ff=gr(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,26)},set:function(a){a?this.Ff=pr(this.Ff,26):this.Ff=gr(this.Ff,26)}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(u){return u};if(this.scope&&(a=this.scope.internal.getEncryptor(this.objId)),Object.keys(n).length!==0){var i,o=[];for(i in o.push("<<"),n)o.push("/"+i+" ("+eu(a(n[i]))+")");return o.push(">>"),o.join(`
|
|
512
|
+
`)}},set:function(a){Sn(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(a){var i=a==null?"":a.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),t="/"+Zl(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(a){t="/"+Zl(a)}})};Ma(Ur,Xi);var Wd=function(){Ur.call(this),this.pushButton=!0};Ma(Wd,Ur);var rc=function(){Ur.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n!==void 0?n:[]}})};Ma(rc,Ur);var ah=function(){var t,n;Xi.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(o){t=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(o){n=o}});var a,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(d){return d};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var u,h=[];for(u in h.push("<<"),i)h.push("/"+u+" ("+eu(o(i[u]))+")");return h.push(">>"),h.join(`
|
|
513
|
+
`)},set:function(o){Sn(o)==="object"&&(i=o)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(o){typeof o=="string"&&(i.CA=o)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return a},set:function(o){var u=o==null?"":o.toString();u.substr(0,1)==="/"&&(u=u.substr(1)),a="/"+Zl(u)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return a.substr(1,a.length-1)},set:function(o){var u=o==null?"":o.toString();u.substr(0,1)==="/"&&(u=u.substr(1)),a="/"+Zl(u)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=lt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Ma(ah,Xi),rc.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var n in this.Kids)if(this.Kids.hasOwnProperty(n)){var a=this.Kids[n];a.appearanceStreamContent=t.createAppearanceStream(a.optionName),a.caption=t.getCA()}},rc.prototype.createOption=function(t){var n=new ah;return n.Parent=this,n.optionName=t,this.Kids.push(n),n_.call(this.scope,n),n};var Yd=function(){Ur.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=lt.CheckBox.createAppearanceStream()};Ma(Yd,Ur);var Vl=function(){Xi.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,13)},set:function(n){n?this.Ff=pr(this.Ff,13):this.Ff=gr(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,21)},set:function(n){n?this.Ff=pr(this.Ff,21):this.Ff=gr(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,23)},set:function(n){n?this.Ff=pr(this.Ff,23):this.Ff=gr(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,24)},set:function(n){n?this.Ff=pr(this.Ff,24):this.Ff=gr(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,25)},set:function(n){n?this.Ff=pr(this.Ff,25):this.Ff=gr(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,26)},set:function(n){n?this.Ff=pr(this.Ff,26):this.Ff=gr(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(n){Number.isInteger(n)&&(t=n)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Ma(Vl,Xi);var Gd=function(){Vl.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!hr(this.Ff,14)},set:function(t){t?this.Ff=pr(this.Ff,14):this.Ff=gr(this.Ff,14)}}),this.password=!0};Ma(Gd,Vl);var lt={CheckBox:{createAppearanceStream:function(){return{N:{On:lt.CheckBox.YesNormal},D:{On:lt.CheckBox.YesPushDown,Off:lt.CheckBox.OffPushDown}}},YesPushDown:function(t){var n=_s(t);n.scope=t.scope;var a=[],i=t.scope.internal.getFont(t.fontName,t.fontStyle).id,o=t.scope.__private__.encodeColorString(t.color),u=g0(t,t.caption);return a.push("0.749023 g"),a.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),a.push("f"),a.push("BMC"),a.push("q"),a.push("0 0 1 rg"),a.push("/"+i+" "+It(u.fontSize)+" Tf "+o),a.push("BT"),a.push(u.text),a.push("ET"),a.push("Q"),a.push("EMC"),n.stream=a.join(`
|
|
514
|
+
`),n},YesNormal:function(t){var n=_s(t);n.scope=t.scope;var a=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),o=[],u=lt.internal.getHeight(t),h=lt.internal.getWidth(t),d=g0(t,t.caption);return o.push("1 g"),o.push("0 0 "+It(h)+" "+It(u)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+It(h-1)+" "+It(u-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+a+" "+It(d.fontSize)+" Tf "+i),o.push(d.text),o.push("ET"),o.push("Q"),n.stream=o.join(`
|
|
515
|
+
`),n},OffPushDown:function(t){var n=_s(t);n.scope=t.scope;var a=[];return a.push("0.749023 g"),a.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),a.push("f"),n.stream=a.join(`
|
|
516
|
+
`),n}},RadioButton:{Circle:{createAppearanceStream:function(t){var n={D:{Off:lt.RadioButton.Circle.OffPushDown},N:{}};return n.N[t]=lt.RadioButton.Circle.YesNormal,n.D[t]=lt.RadioButton.Circle.YesPushDown,n},getCA:function(){return"l"},YesNormal:function(t){var n=_s(t);n.scope=t.scope;var a=[],i=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var o=lt.internal.Bezier_C,u=Number((i*o).toFixed(5));return a.push("q"),a.push("1 0 0 1 "+hl(lt.internal.getWidth(t)/2)+" "+hl(lt.internal.getHeight(t)/2)+" cm"),a.push(i+" 0 m"),a.push(i+" "+u+" "+u+" "+i+" 0 "+i+" c"),a.push("-"+u+" "+i+" -"+i+" "+u+" -"+i+" 0 c"),a.push("-"+i+" -"+u+" -"+u+" -"+i+" 0 -"+i+" c"),a.push(u+" -"+i+" "+i+" -"+u+" "+i+" 0 c"),a.push("f"),a.push("Q"),n.stream=a.join(`
|
|
517
|
+
`),n},YesPushDown:function(t){var n=_s(t);n.scope=t.scope;var a=[],i=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),u=Number((o*lt.internal.Bezier_C).toFixed(5)),h=Number((i*lt.internal.Bezier_C).toFixed(5));return a.push("0.749023 g"),a.push("q"),a.push("1 0 0 1 "+hl(lt.internal.getWidth(t)/2)+" "+hl(lt.internal.getHeight(t)/2)+" cm"),a.push(o+" 0 m"),a.push(o+" "+u+" "+u+" "+o+" 0 "+o+" c"),a.push("-"+u+" "+o+" -"+o+" "+u+" -"+o+" 0 c"),a.push("-"+o+" -"+u+" -"+u+" -"+o+" 0 -"+o+" c"),a.push(u+" -"+o+" "+o+" -"+u+" "+o+" 0 c"),a.push("f"),a.push("Q"),a.push("0 g"),a.push("q"),a.push("1 0 0 1 "+hl(lt.internal.getWidth(t)/2)+" "+hl(lt.internal.getHeight(t)/2)+" cm"),a.push(i+" 0 m"),a.push(i+" "+h+" "+h+" "+i+" 0 "+i+" c"),a.push("-"+h+" "+i+" -"+i+" "+h+" -"+i+" 0 c"),a.push("-"+i+" -"+h+" -"+h+" -"+i+" 0 -"+i+" c"),a.push(h+" -"+i+" "+i+" -"+h+" "+i+" 0 c"),a.push("f"),a.push("Q"),n.stream=a.join(`
|
|
518
|
+
`),n},OffPushDown:function(t){var n=_s(t);n.scope=t.scope;var a=[],i=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),u=Number((o*lt.internal.Bezier_C).toFixed(5));return a.push("0.749023 g"),a.push("q"),a.push("1 0 0 1 "+hl(lt.internal.getWidth(t)/2)+" "+hl(lt.internal.getHeight(t)/2)+" cm"),a.push(o+" 0 m"),a.push(o+" "+u+" "+u+" "+o+" 0 "+o+" c"),a.push("-"+u+" "+o+" -"+o+" "+u+" -"+o+" 0 c"),a.push("-"+o+" -"+u+" -"+u+" -"+o+" 0 -"+o+" c"),a.push(u+" -"+o+" "+o+" -"+u+" "+o+" 0 c"),a.push("f"),a.push("Q"),n.stream=a.join(`
|
|
519
|
+
`),n}},Cross:{createAppearanceStream:function(t){var n={D:{Off:lt.RadioButton.Cross.OffPushDown},N:{}};return n.N[t]=lt.RadioButton.Cross.YesNormal,n.D[t]=lt.RadioButton.Cross.YesPushDown,n},getCA:function(){return"8"},YesNormal:function(t){var n=_s(t);n.scope=t.scope;var a=[],i=lt.internal.calculateCross(t);return a.push("q"),a.push("1 1 "+It(lt.internal.getWidth(t)-2)+" "+It(lt.internal.getHeight(t)-2)+" re"),a.push("W"),a.push("n"),a.push(It(i.x1.x)+" "+It(i.x1.y)+" m"),a.push(It(i.x2.x)+" "+It(i.x2.y)+" l"),a.push(It(i.x4.x)+" "+It(i.x4.y)+" m"),a.push(It(i.x3.x)+" "+It(i.x3.y)+" l"),a.push("s"),a.push("Q"),n.stream=a.join(`
|
|
520
|
+
`),n},YesPushDown:function(t){var n=_s(t);n.scope=t.scope;var a=lt.internal.calculateCross(t),i=[];return i.push("0.749023 g"),i.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+It(lt.internal.getWidth(t)-2)+" "+It(lt.internal.getHeight(t)-2)+" re"),i.push("W"),i.push("n"),i.push(It(a.x1.x)+" "+It(a.x1.y)+" m"),i.push(It(a.x2.x)+" "+It(a.x2.y)+" l"),i.push(It(a.x4.x)+" "+It(a.x4.y)+" m"),i.push(It(a.x3.x)+" "+It(a.x3.y)+" l"),i.push("s"),i.push("Q"),n.stream=i.join(`
|
|
521
|
+
`),n},OffPushDown:function(t){var n=_s(t);n.scope=t.scope;var a=[];return a.push("0.749023 g"),a.push("0 0 "+It(lt.internal.getWidth(t))+" "+It(lt.internal.getHeight(t))+" re"),a.push("f"),n.stream=a.join(`
|
|
522
|
+
`),n}}},createDefaultAppearanceStream:function(t){var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,a=t.scope.__private__.encodeColorString(t.color);return"/"+n+" "+t.fontSize+" Tf "+a}};lt.internal={Bezier_C:.551915024494,calculateCross:function(t){var n=lt.internal.getWidth(t),a=lt.internal.getHeight(t),i=Math.min(n,a);return{x1:{x:(n-i)/2,y:(a-i)/2+i},x2:{x:(n-i)/2+i,y:(a-i)/2},x3:{x:(n-i)/2,y:(a-i)/2},x4:{x:(n-i)/2+i,y:(a-i)/2+i}}}},lt.internal.getWidth=function(t){var n=0;return Sn(t)==="object"&&(n=xm(t.Rect[2])),n},lt.internal.getHeight=function(t){var n=0;return Sn(t)==="object"&&(n=xm(t.Rect[3])),n};var n_=ir.addField=function(t){if(t_(this,t),!(t instanceof Xi))throw new Error("Invalid argument passed to jsPDF.addField.");var n;return(n=t).scope.internal.acroformPlugin.printedOut&&(n.scope.internal.acroformPlugin.printedOut=!1,n.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),n.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};ir.AcroFormChoiceField=ec,ir.AcroFormListBox=tc,ir.AcroFormComboBox=nc,ir.AcroFormEditBox=Hd,ir.AcroFormButton=Ur,ir.AcroFormPushButton=Wd,ir.AcroFormRadioButton=rc,ir.AcroFormCheckBox=Yd,ir.AcroFormTextField=Vl,ir.AcroFormPasswordField=Gd,ir.AcroFormAppearance=lt,ir.AcroForm={ChoiceField:ec,ListBox:tc,ComboBox:nc,EditBox:Hd,Button:Ur,PushButton:Wd,RadioButton:rc,CheckBox:Yd,TextField:Vl,PasswordField:Gd,Appearance:lt},gt.AcroForm={ChoiceField:ec,ListBox:tc,ComboBox:nc,EditBox:Hd,Button:Ur,PushButton:Wd,RadioButton:rc,CheckBox:Yd,TextField:Vl,PasswordField:Gd,Appearance:lt};gt.AcroForm;function xy(t){return t.reduce(function(n,a,i){return n[a]=i,n},{})}(function(t){var n="addImage_";t.__addimage__={};var a="UNKNOWN",i={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]]},o=t.__addimage__.getImageFileTypeByImageData=function(O,U){var ne,re,ve,ee,J,le=a;if((U=U||a)==="RGBA"||O.data!==void 0&&O.data instanceof Uint8ClampedArray&&"height"in O&&"width"in O)return"RGBA";if(_e(O))for(J in i)for(ve=i[J],ne=0;ne<ve.length;ne+=1){for(ee=!0,re=0;re<ve[ne].length;re+=1)if(ve[ne][re]!==void 0&&ve[ne][re]!==O[re]){ee=!1;break}if(ee===!0){le=J;break}}else for(J in i)for(ve=i[J],ne=0;ne<ve.length;ne+=1){for(ee=!0,re=0;re<ve[ne].length;re+=1)if(ve[ne][re]!==void 0&&ve[ne][re]!==O.charCodeAt(re)){ee=!1;break}if(ee===!0){le=J;break}}return le===a&&U!==a&&(le=U),le},u=function O(U){for(var ne=this.internal.write,re=this.internal.putStream,ve=(0,this.internal.getFilters)();ve.indexOf("FlateEncode")!==-1;)ve.splice(ve.indexOf("FlateEncode"),1);U.objectId=this.internal.newObject();var ee=[];if(ee.push({key:"Type",value:"/XObject"}),ee.push({key:"Subtype",value:"/Image"}),ee.push({key:"Width",value:U.width}),ee.push({key:"Height",value:U.height}),U.colorSpace===E.INDEXED?ee.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(U.palette.length/3-1)+" "+("sMask"in U&&U.sMask!==void 0?U.objectId+2:U.objectId+1)+" 0 R]"}):(ee.push({key:"ColorSpace",value:"/"+U.colorSpace}),U.colorSpace===E.DEVICE_CMYK&&ee.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ee.push({key:"BitsPerComponent",value:U.bitsPerComponent}),"decodeParameters"in U&&U.decodeParameters!==void 0&&ee.push({key:"DecodeParms",value:"<<"+U.decodeParameters+">>"}),"transparency"in U&&Array.isArray(U.transparency)&&U.transparency.length>0){for(var J="",le=0,Le=U.transparency.length;le<Le;le++)J+=U.transparency[le]+" "+U.transparency[le]+" ";ee.push({key:"Mask",value:"["+J+"]"})}U.sMask!==void 0&&ee.push({key:"SMask",value:U.objectId+1+" 0 R"});var W=U.filter!==void 0?["/"+U.filter]:void 0;if(re({data:U.data,additionalKeyValues:ee,alreadyAppliedFilters:W,objectId:U.objectId}),ne("endobj"),"sMask"in U&&U.sMask!==void 0){var ce,T=(ce=U.sMaskBitsPerComponent)!==null&&ce!==void 0?ce:U.bitsPerComponent,q={width:U.width,height:U.height,colorSpace:"DeviceGray",bitsPerComponent:T,data:U.sMask};"filter"in U&&(q.decodeParameters="/Predictor ".concat(U.predictor," /Colors 1 /BitsPerComponent ").concat(T," /Columns ").concat(U.width),q.filter=U.filter),O.call(this,q)}if(U.colorSpace===E.INDEXED){var V=this.internal.newObject();re({data:oe(new Uint8Array(U.palette)),objectId:V}),ne("endobj")}},h=function(){var O=this.internal.collections[n+"images"];for(var U in O)u.call(this,O[U])},d=function(){var O,U=this.internal.collections[n+"images"],ne=this.internal.write;for(var re in U)ne("/I"+(O=U[re]).index,O.objectId,"0","R")},f=function(){this.internal.collections[n+"images"]||(this.internal.collections[n+"images"]={},this.internal.events.subscribe("putResources",h),this.internal.events.subscribe("putXobjectDict",d))},g=function(){var O=this.internal.collections[n+"images"];return f.call(this),O},v=function(){return Object.keys(this.internal.collections[n+"images"]).length},_=function(O){return typeof t["process"+O.toUpperCase()]=="function"},j=function(O){return Sn(O)==="object"&&O.nodeType===1},w=function(O,U){if(O.nodeName==="IMG"&&O.hasAttribute("src")){var ne=""+O.getAttribute("src");if(ne.indexOf("data:image/")===0)return Id(unescape(ne).split("base64,").pop());var re=t.loadFile(ne,!0);if(re!==void 0)return re}if(O.nodeName==="CANVAS"){if(O.width===0||O.height===0)throw new Error("Given canvas must have data. Canvas width: "+O.width+", height: "+O.height);var ve;switch(U){case"PNG":ve="image/png";break;case"WEBP":ve="image/webp";break;default:ve="image/jpeg"}return Id(O.toDataURL(ve,1).split("base64,").pop())}},k=function(O){var U=this.internal.collections[n+"images"];if(U){for(var ne in U)if(O===U[ne].alias)return U[ne]}},L=function(O,U,ne){return O||U||(O=-96,U=-96),O<0&&(O=-1*ne.width*72/O/this.internal.scaleFactor),U<0&&(U=-1*ne.height*72/U/this.internal.scaleFactor),O===0&&(O=U*ne.width/ne.height),U===0&&(U=O*ne.height/ne.width),[O,U]},R=function(O,U,ne,re,ve,ee){var J=L.call(this,ne,re,ve),le=this.internal.getCoordinateString,Le=this.internal.getVerticalCoordinateString,W=g.call(this);if(ne=J[0],re=J[1],W[ve.index]=ve,ee){ee*=Math.PI/180;var ce=Math.cos(ee),T=Math.sin(ee),q=function(te){return te.toFixed(4)},V=[q(ce),q(T),q(-1*T),q(ce),0,0,"cm"]}this.internal.write("q"),ee?(this.internal.write([1,"0","0",1,le(O),Le(U+re),"cm"].join(" ")),this.internal.write(V.join(" ")),this.internal.write([le(ne),"0","0",le(re),"0","0","cm"].join(" "))):this.internal.write([le(ne),"0","0",le(re),le(O),Le(U+re),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+ve.index+" Do"),this.internal.write("Q")},E=t.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"};t.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 Y=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},H=t.__addimage__.sHashCode=function(O){var U,ne,re=0;if(typeof O=="string")for(ne=O.length,U=0;U<ne;U++)re=(re<<5)-re+O.charCodeAt(U),re|=0;else if(_e(O))for(ne=O.byteLength/2,U=0;U<ne;U++)re=(re<<5)-re+O[U],re|=0;return re},F=t.__addimage__.validateStringAsBase64=function(O){(O=O||"").toString().trim();var U=!0;return O.length===0&&(U=!1),O.length%4!=0&&(U=!1),/^[A-Za-z0-9+/]+$/.test(O.substr(0,O.length-2))===!1&&(U=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(O.substr(-2))===!1&&(U=!1),U},X=t.__addimage__.extractImageFromDataUrl=function(O){if(O==null||!(O=O.trim()).startsWith("data:"))return null;var U=O.indexOf(",");return U<0?null:O.substring(0,U).trim().endsWith("base64")?O.substring(U+1):null};t.__addimage__.isArrayBuffer=function(O){return O instanceof ArrayBuffer};var _e=t.__addimage__.isArrayBufferView=function(O){return O instanceof Int8Array||O instanceof Uint8Array||O instanceof Uint8ClampedArray||O instanceof Int16Array||O instanceof Uint16Array||O instanceof Int32Array||O instanceof Uint32Array||O instanceof Float32Array||O instanceof Float64Array},xe=t.__addimage__.binaryStringToUint8Array=function(O){for(var U=O.length,ne=new Uint8Array(U),re=0;re<U;re++)ne[re]=O.charCodeAt(re);return ne},oe=t.__addimage__.arrayBufferToBinaryString=function(O){for(var U="",ne=_e(O)?O:new Uint8Array(O),re=0;re<ne.length;re+=8192)U+=String.fromCharCode.apply(null,ne.subarray(re,re+8192));return U};t.addImage=function(){var O,U,ne,re,ve,ee,J,le,Le;if(typeof arguments[1]=="number"?(U=a,ne=arguments[1],re=arguments[2],ve=arguments[3],ee=arguments[4],J=arguments[5],le=arguments[6],Le=arguments[7]):(U=arguments[1],ne=arguments[2],re=arguments[3],ve=arguments[4],ee=arguments[5],J=arguments[6],le=arguments[7],Le=arguments[8]),Sn(O=arguments[0])==="object"&&!j(O)&&"imageData"in O){var W=O;O=W.imageData,U=W.format||U||a,ne=W.x||ne||0,re=W.y||re||0,ve=W.w||W.width||ve,ee=W.h||W.height||ee,J=W.alias||J,le=W.compression||le,Le=W.rotation||W.angle||Le}var ce=this.internal.getFilters();if(le===void 0&&ce.indexOf("FlateEncode")!==-1&&(le="SLOW"),isNaN(ne)||isNaN(re))throw new Error("Invalid coordinates passed to jsPDF.addImage");f.call(this);var T=Z.call(this,O,U,J,le);return R.call(this,ne,re,ve,ee,T,Le),this};var Z=function(O,U,ne,re){var ve,ee,J;if(typeof O=="string"&&o(O)===a){O=unescape(O);var le=ge(O,!1);(le!==""||(le=t.loadFile(O,!0))!==void 0)&&(O=le)}if(j(O)&&(O=w(O,U)),U=o(O,U),!_(U))throw new Error("addImage does not support files of type '"+U+"', please ensure that a plugin for '"+U+"' support is added.");if(((J=ne)==null||J.length===0)&&(ne=(function(Le){return typeof Le=="string"||_e(Le)?H(Le):_e(Le.data)?H(Le.data):null})(O)),(ve=k.call(this,ne))||(O instanceof Uint8Array||U==="RGBA"||(ee=O,O=xe(O)),ve=this["process"+U.toUpperCase()](O,v.call(this),ne,(function(Le){return Le&&typeof Le=="string"&&(Le=Le.toUpperCase()),Le in t.image_compression?Le:Y.NONE})(re),ee)),!ve)throw new Error("An unknown error occurred whilst processing the image.");return ve},ge=t.__addimage__.convertBase64ToBinaryString=function(O,U){U=typeof U!="boolean"||U;var ne,re="";if(typeof O=="string"){var ve;ne=(ve=X(O))!==null&&ve!==void 0?ve:O;try{re=Id(ne)}catch(ee){if(U)throw F(ne)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ee.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return re};t.getImageProperties=function(O){var U,ne,re="";if(j(O)&&(O=w(O)),typeof O=="string"&&o(O)===a&&((re=ge(O,!1))===""&&(re=t.loadFile(O)||""),O=re),ne=o(O),!_(ne))throw new Error("addImage does not support files of type '"+ne+"', please ensure that a plugin for '"+ne+"' support is added.");if(O instanceof Uint8Array||(O=xe(O)),!(U=this["process"+ne.toUpperCase()](O)))throw new Error("An unknown error occurred whilst processing the image");return U.fileType=ne,U}})(gt.API),(function(t){var n=function(a){if(a!==void 0&&a!="")return!0};gt.API.events.push(["addPage",function(a){this.internal.getPageInfo(a.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(a){for(var i,o,u,h=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString,f=this.internal.getPageInfoByObjId(a.objId),g=a.pageContext.annotations,v=!1,_=0;_<g.length&&!v;_++)switch((i=g[_]).type){case"link":(n(i.options.url)||n(i.options.pageNumber))&&(v=!0);break;case"reference":case"text":case"freetext":v=!0}if(v!=0){this.internal.write("/Annots [");for(var j=0;j<g.length;j++){i=g[j];var w=this.internal.pdfEscape,k=this.internal.getEncryptor(a.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var L=this.internal.newAdditionalObject(),R=this.internal.newAdditionalObject(),E=this.internal.getEncryptor(L.objId),Y=i.title||"Note";u="<</Type /Annot /Subtype /Text "+(o="/Rect ["+h(i.bounds.x)+" "+d(i.bounds.y+i.bounds.h)+" "+h(i.bounds.x+i.bounds.w)+" "+d(i.bounds.y)+"] ")+"/Contents ("+w(E(i.contents))+")",u+=" /Popup "+R.objId+" 0 R",u+=" /P "+f.objId+" 0 R",u+=" /T ("+w(E(Y))+") >>",L.content=u;var H=L.objId+" 0 R";u="<</Type /Annot /Subtype /Popup "+(o="/Rect ["+h(i.bounds.x+30)+" "+d(i.bounds.y+i.bounds.h)+" "+h(i.bounds.x+i.bounds.w+30)+" "+d(i.bounds.y)+"] ")+" /Parent "+H,i.open&&(u+=" /Open true"),u+=" >>",R.content=u,this.internal.write(L.objId,"0 R",R.objId,"0 R");break;case"freetext":o="/Rect ["+h(i.bounds.x)+" "+d(i.bounds.y)+" "+h(i.bounds.x+i.bounds.w)+" "+d(i.bounds.y+i.bounds.h)+"] ";var F="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(i.color||"#000000");u="<</Type /Annot /Subtype /FreeText "+o+"/Contents ("+w(k(i.contents))+")",u+=" /DS("+w(k(F))+")",u+=" /Border [0 0 0]",u+=" >>",this.internal.write(u);break;case"link":if(i.options.name){var X=this.annotations._nameMap[i.options.name];i.options.pageNumber=X.page,i.options.top=X.y}else i.options.top||(i.options.top=0);if(o="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",u="",i.options.url)u="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /A <</S /URI /URI ("+w(k(i.options.url))+") >>";else if(i.options.pageNumber)switch(u="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(i.options.pageNumber).objId+" 0 R",i.options.magFactor=i.options.magFactor||"XYZ",i.options.magFactor){case"Fit":u+=" /Fit]";break;case"FitH":u+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,u+=" /FitV "+i.options.left+"]";break;default:var _e=d(i.options.top);i.options.left=i.options.left||0,i.options.zoom===void 0&&(i.options.zoom=0),u+=" /XYZ "+i.options.left+" "+_e+" "+i.options.zoom+"]"}u!=""&&(u+=" >>",this.internal.write(u))}}this.internal.write("]")}}]),t.createAnnotation=function(a){var i=this.internal.getCurrentPageInfo();switch(a.type){case"link":this.link(a.bounds.x,a.bounds.y,a.bounds.w,a.bounds.h,a);break;case"text":case"freetext":i.pageContext.annotations.push(a)}},t.link=function(a,i,o,u,h){var d=this.internal.getCurrentPageInfo(),f=this.internal.getCoordinateString,g=this.internal.getVerticalCoordinateString;d.pageContext.annotations.push({finalBounds:{x:f(a),y:g(i),w:f(a+o),h:g(i+u)},options:h,type:"link"})},t.textWithLink=function(a,i,o,u){var h,d,f=this.getTextWidth(a),g=this.internal.getLineHeight()/this.internal.scaleFactor;if(u.maxWidth!==void 0){d=u.maxWidth;var v=this.splitTextToSize(a,d).length;h=Math.ceil(g*v)}else d=f,h=g;return this.text(a,i,o,u),o+=.2*g,u.align==="center"&&(i-=f/2),u.align==="right"&&(i-=f),this.link(i,o-g,d,h,u),f},t.getTextWidth=function(a){var i=this.internal.getFontSize();return this.getStringUnitWidth(a)*i/this.internal.scaleFactor}})(gt.API),(function(t){var n={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]},a={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}},i={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},o=[1570,1571,1573,1575];t.__arabicParser__={};var u=t.__arabicParser__.isInArabicSubstitutionA=function(L){return n[L.charCodeAt(0)]!==void 0},h=t.__arabicParser__.isArabicLetter=function(L){return typeof L=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(L)},d=t.__arabicParser__.isArabicEndLetter=function(L){return h(L)&&u(L)&&n[L.charCodeAt(0)].length<=2},f=t.__arabicParser__.isArabicAlfLetter=function(L){return h(L)&&o.indexOf(L.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(L){return h(L)&&u(L)&&n[L.charCodeAt(0)].length>=1};var g=t.__arabicParser__.arabicLetterHasFinalForm=function(L){return h(L)&&u(L)&&n[L.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(L){return h(L)&&u(L)&&n[L.charCodeAt(0)].length>=3};var v=t.__arabicParser__.arabicLetterHasMedialForm=function(L){return h(L)&&u(L)&&n[L.charCodeAt(0)].length==4},_=t.__arabicParser__.resolveLigatures=function(L){var R=0,E=a,Y="",H=0;for(R=0;R<L.length;R+=1)E[L.charCodeAt(R)]!==void 0?(H++,typeof(E=E[L.charCodeAt(R)])=="number"&&(Y+=String.fromCharCode(E),E=a,H=0),R===L.length-1&&(E=a,Y+=L.charAt(R-(H-1)),R-=H-1,H=0)):(E=a,Y+=L.charAt(R-H),R-=H,H=0);return Y};t.__arabicParser__.isArabicDiacritic=function(L){return L!==void 0&&i[L.charCodeAt(0)]!==void 0};var j=t.__arabicParser__.getCorrectForm=function(L,R,E){return h(L)?u(L)===!1?-1:!g(L)||!h(R)&&!h(E)||!h(E)&&d(R)||d(L)&&!h(R)||d(L)&&f(R)||d(L)&&d(R)?0:v(L)&&h(R)&&!d(R)&&h(E)&&g(E)?3:d(L)||!h(E)?1:2:-1},w=function(L){var R=0,E=0,Y=0,H="",F="",X="",_e=(L=L||"").split("\\s+"),xe=[];for(R=0;R<_e.length;R+=1){for(xe.push(""),E=0;E<_e[R].length;E+=1)H=_e[R][E],F=_e[R][E-1],X=_e[R][E+1],h(H)?(Y=j(H,F,X),xe[R]+=Y!==-1?String.fromCharCode(n[H.charCodeAt(0)][Y]):H):xe[R]+=H;xe[R]=_(xe[R])}return xe.join(" ")},k=t.__arabicParser__.processArabic=t.processArabic=function(){var L,R=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,E=[];if(Array.isArray(R)){var Y=0;for(E=[],Y=0;Y<R.length;Y+=1)Array.isArray(R[Y])?E.push([w(R[Y][0]),R[Y][1],R[Y][2]]):E.push([w(R[Y])]);L=E}else L=w(R);return typeof arguments[0]=="string"?L:(arguments[0].text=L,arguments[0])};t.events.push(["preProcessText",k])})(gt.API),gt.API.autoPrint=function(t){var n;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){n=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 "+n+" 0 R")})),this},(function(t){var n=function(){var a=void 0;Object.defineProperty(this,"pdf",{get:function(){return a},set:function(d){a=d}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(d){i=isNaN(d)||Number.isInteger(d)===!1||d<0?150:d,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(d){o=isNaN(d)||Number.isInteger(d)===!1||d<0?300:d,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var u=[];Object.defineProperty(this,"childNodes",{get:function(){return u},set:function(d){u=d}});var h={};Object.defineProperty(this,"style",{get:function(){return h},set:function(d){h=d}}),Object.defineProperty(this,"parentNode",{})};n.prototype.getContext=function(a,i){var o;if((a=a||"2d")!=="2d")return null;for(o in i)this.pdf.context2d.hasOwnProperty(o)&&(this.pdf.context2d[o]=i[o]);return this.pdf.context2d._canvas=this,this.pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}])})(gt.API),(function(t){var n={left:0,top:0,bottom:0,right:0},a=!1,i=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({},n),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new u,this.internal.__cell__.pages=1},u=function(){var f=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return f},set:function(L){f=L}});var g=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return g},set:function(L){g=L}});var v=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return v},set:function(L){v=L}});var _=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return _},set:function(L){_=L}});var j=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return j},set:function(L){j=L}});var w=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return w},set:function(L){w=L}});var k=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return k},set:function(L){k=L}}),this};u.prototype.clone=function(){return new u(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},u.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(f){return i.call(this),this.internal.__cell__.headerFunction=typeof f=="function"?f:void 0,this},t.getTextDimensions=function(f,g){i.call(this);var v=(g=g||{}).fontSize||this.getFontSize(),_=g.font||this.getFont(),j=g.scaleFactor||this.internal.scaleFactor,w=0,k=0,L=0,R=this;if(!Array.isArray(f)&&typeof f!="string"){if(typeof f!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");f=String(f)}var E=g.maxWidth;E>0?typeof f=="string"?f=this.splitTextToSize(f,E):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(H,F){return H.concat(R.splitTextToSize(F,E))},[])):f=Array.isArray(f)?f:[f];for(var Y=0;Y<f.length;Y++)w<(L=this.getStringUnitWidth(f[Y],{font:_})*v)&&(w=L);return w!==0&&(k=f.length),{w:w/=j,h:Math.max((k*v*this.getLineHeightFactor()-v*(this.getLineHeightFactor()-1))/j,0)}},t.cellAddPage=function(){i.call(this),this.addPage();var f=this.internal.__cell__.margins||n;return this.internal.__cell__.lastCell=new u(f.left,f.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var h=t.cell=function(){var f;f=arguments[0]instanceof u?arguments[0]:new u(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),i.call(this);var g=this.internal.__cell__.lastCell,v=this.internal.__cell__.padding,_=this.internal.__cell__.margins||n,j=this.internal.__cell__.tableHeaderRow,w=this.internal.__cell__.printHeaders;return g.lineNumber!==void 0&&(g.lineNumber===f.lineNumber?(f.x=(g.x||0)+(g.width||0),f.y=g.y||0):g.y+g.height+f.height+_.bottom>this.getPageHeight()?(this.cellAddPage(),f.y=_.top,w&&j&&(this.printHeaderRow(f.lineNumber,!0),f.y+=j[0].height)):f.y=g.y+g.height||f.y),f.text[0]!==void 0&&(this.rect(f.x,f.y,f.width,f.height,a===!0?"FD":void 0),f.align==="right"?this.text(f.text,f.x+f.width-v,f.y+v,{align:"right",baseline:"top"}):f.align==="center"?this.text(f.text,f.x+f.width/2,f.y+v,{align:"center",baseline:"top",maxWidth:f.width-v-v}):this.text(f.text,f.x+v,f.y+v,{align:"left",baseline:"top",maxWidth:f.width-v-v})),this.internal.__cell__.lastCell=f,this};t.table=function(f,g,v,_,j){if(i.call(this),!v)throw new Error("No data for PDF table.");var w,k,L,R,E=[],Y=[],H=[],F={},X={},_e=[],xe=[],oe=(j=j||{}).autoSize||!1,Z=j.printHeaders!==!1,ge=j.css&&j.css["font-size"]!==void 0?16*j.css["font-size"]:j.fontSize||12,O=j.margins||Object.assign({width:this.getPageWidth()},n),U=typeof j.padding=="number"?j.padding:3,ne=j.headerBackgroundColor||"#c8c8c8",re=j.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=Z,this.internal.__cell__.margins=O,this.internal.__cell__.table_font_size=ge,this.internal.__cell__.padding=U,this.internal.__cell__.headerBackgroundColor=ne,this.internal.__cell__.headerTextColor=re,this.setFontSize(ge),_==null)Y=E=Object.keys(v[0]),H=E.map(function(){return"left"});else if(Array.isArray(_)&&Sn(_[0])==="object")for(E=_.map(function(W){return W.name}),Y=_.map(function(W){return W.prompt||W.name||""}),H=_.map(function(W){return W.align||"left"}),w=0;w<_.length;w+=1)X[_[w].name]=.7499990551181103*_[w].width;else Array.isArray(_)&&typeof _[0]=="string"&&(Y=E=_,H=E.map(function(){return"left"}));if(oe||Array.isArray(_)&&typeof _[0]=="string")for(w=0;w<E.length;w+=1){for(F[R=E[w]]=v.map(function(W){return W[R]}),this.setFont(void 0,"bold"),_e.push(this.getTextDimensions(Y[w],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),k=F[R],this.setFont(void 0,"normal"),L=0;L<k.length;L+=1)_e.push(this.getTextDimensions(k[L],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);X[R]=Math.max.apply(null,_e)+U+U,_e=[]}if(Z){var ve={};for(w=0;w<E.length;w+=1)ve[E[w]]={},ve[E[w]].text=Y[w],ve[E[w]].align=H[w];var ee=d.call(this,ve,X);xe=E.map(function(W){return new u(f,g,X[W],ee,ve[W].text,void 0,ve[W].align)}),this.setTableHeaderRow(xe),this.printHeaderRow(1,!1)}var J=_.reduce(function(W,ce){return W[ce.name]=ce.align,W},{});for(w=0;w<v.length;w+=1){"rowStart"in j&&j.rowStart instanceof Function&&j.rowStart({row:w,data:v[w]},this);var le=d.call(this,v[w],X);for(L=0;L<E.length;L+=1){var Le=v[w][E[L]];"cellStart"in j&&j.cellStart instanceof Function&&j.cellStart({row:w,col:L,data:Le},this),h.call(this,new u(f,g,X[E[L]],le,Le,w+2,J[E[L]]))}}return this.internal.__cell__.table_x=f,this.internal.__cell__.table_y=g,this};var d=function(f,g){var v=this.internal.__cell__.padding,_=this.internal.__cell__.table_font_size,j=this.internal.scaleFactor;return Object.keys(f).map(function(w){var k=f[w];return this.splitTextToSize(k.hasOwnProperty("text")?k.text:k,g[w]-v-v)},this).map(function(w){return this.getLineHeightFactor()*w.length*_/j+v+v},this).reduce(function(w,k){return Math.max(w,k)},0)};t.setTableHeaderRow=function(f){i.call(this),this.internal.__cell__.tableHeaderRow=f},t.printHeaderRow=function(f,g){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var v;if(a=!0,typeof this.internal.__cell__.headerFunction=="function"){var _=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new u(_[0],_[1],_[2],_[3],void 0,-1)}this.setFont(void 0,"bold");for(var j=[],w=0;w<this.internal.__cell__.tableHeaderRow.length;w+=1){v=this.internal.__cell__.tableHeaderRow[w].clone(),g&&(v.y=this.internal.__cell__.margins.top||0,j.push(v)),v.lineNumber=f;var k=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),h.call(this,v),this.setTextColor(k)}j.length>0&&this.setTableHeaderRow(j),this.setFont(void 0,"normal"),a=!1}})(gt.API);var wy={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Sy=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],m0=xy(Sy),_y=[100,200,300,400,500,600,700,800,900],r_=xy(_y);function Y1(t){var n=t.family.replace(/"|'/g,"").toLowerCase(),a=(function(u){return wy[u=u||"normal"]?u:"normal"})(t.style),i=(function(u){return u?typeof u=="number"?u>=100&&u<=900&&u%100==0?u:400:/^\d00$/.test(u)?parseInt(u):u==="bold"?700:400:400})(t.weight),o=(function(u){return typeof m0[u=u||"normal"]=="number"?u:"normal"})(t.stretch);return{family:n,style:a,weight:i,stretch:o,src:t.src||[],ref:t.ref||{name:n,style:[o,a,i].join(" ")}}}function wm(t,n,a,i){var o;for(o=a;o>=0&&o<n.length;o+=i)if(t[n[o]])return t[n[o]];for(o=a;o>=0&&o<n.length;o-=i)if(t[n[o]])return t[n[o]]}var a_={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Sm={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function _m(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Am(t){return t.trimLeft()}function i_(t,n){for(var a=0;a<t.length;){if(t.charAt(a)===n)return[t.substring(0,a),t.substring(a+1)];a+=1}return null}function s_(t){var n=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return n===null?null:[n[0],t.substring(n[0].length)]}var Xu,Bd,jm,km,Nm,G1=["times"];function Lm(t,n,a,i,o){var u=4,h=Tm;switch(o){case gt.API.image_compression.FAST:u=1,h=Em;break;case gt.API.image_compression.MEDIUM:u=6,h=Cm;break;case gt.API.image_compression.SLOW:u=9,h=Mm}t=(function(f,g,v,_){for(var j,w=f.length/g,k=new Uint8Array(f.length+w),L=[o_,Em,Tm,Cm,Mm],R=0;R<w;R+=1){var E=R*g,Y=f.subarray(E,E+g);if(_)k.set(_(Y,v,j),E+R);else{for(var H=L.length,F=[],X=0;X<H;X+=1)F[X]=L[X](Y,v,j);var _e=u_(F.concat());k.set(F[_e],E+R)}j=Y}return k})(t,n,Math.ceil(a*i/8),h);var d=u0(t,{level:u});return gt.API.__addimage__.arrayBufferToBinaryString(d)}function o_(t){var n=Array.apply([],t);return n.unshift(0),n}function Em(t,n){var a=t.length,i=[];i[0]=1;for(var o=0;o<a;o+=1){var u=t[o-n]||0;i[o+1]=t[o]-u+256&255}return i}function Tm(t,n,a){var i=t.length,o=[];o[0]=2;for(var u=0;u<i;u+=1){var h=a&&a[u]||0;o[u+1]=t[u]-h+256&255}return o}function Cm(t,n,a){var i=t.length,o=[];o[0]=3;for(var u=0;u<i;u+=1){var h=t[u-n]||0,d=a&&a[u]||0;o[u+1]=t[u]+256-(h+d>>>1)&255}return o}function Mm(t,n,a){var i=t.length,o=[];o[0]=4;for(var u=0;u<i;u+=1){var h=l_(t[u-n]||0,a&&a[u]||0,a&&a[u-n]||0);o[u+1]=t[u]-h+256&255}return o}function l_(t,n,a){if(t===n&&n===a)return t;var i=Math.abs(n-a),o=Math.abs(t-a),u=Math.abs(t+n-a-a);return i<=o&&i<=u?t:o<=u?n:a}function u_(t){var n=t.map(function(a){return a.reduce(function(i,o){return i+Math.abs(o)},0)});return n.indexOf(Math.min.apply(null,n))}function V1(t,n,a){var i=n*a,o=Math.floor(i/8),u=16-(i-8*o+a),h=(1<<a)-1;return Ay(t,o)>>u&h}function Rm(t,n,a,i){var o=a*i,u=Math.floor(o/8),h=16-(o-8*u+i),d=(1<<i)-1,f=(n&d)<<h;(function(g,v,_){if(v+1<g.byteLength)g.setUint16(v,_,!1);else{var j=_>>8&255;g.setUint8(v,j)}})(t,u,Ay(t,u)&~(d<<h)&65535|f)}function Ay(t,n){return n+1<t.byteLength?t.getUint16(n,!1):t.getUint8(n)<<8}function c_(t){var n=0;if(t[n++]!==71||t[n++]!==73||t[n++]!==70||t[n++]!==56||(t[n++]+1&253)!=56||t[n++]!==97)throw new Error("Invalid GIF 87a/89a header.");var a=t[n++]|t[n++]<<8,i=t[n++]|t[n++]<<8,o=t[n++],u=o>>7,h=1<<1+(7&o);t[n++],t[n++];var d=null,f=null;u&&(d=n,f=h,n+=3*h);var g=!0,v=[],_=0,j=null,w=0,k=null;for(this.width=a,this.height=i;g&&n<t.length;)switch(t[n++]){case 33:switch(t[n++]){case 255:if(t[n]!==11||t[n+1]==78&&t[n+2]==69&&t[n+3]==84&&t[n+4]==83&&t[n+5]==67&&t[n+6]==65&&t[n+7]==80&&t[n+8]==69&&t[n+9]==50&&t[n+10]==46&&t[n+11]==48&&t[n+12]==3&&t[n+13]==1&&t[n+16]==0)n+=14,k=t[n++]|t[n++]<<8,n++;else for(n+=12;;){if(!((O=t[n++])>=0))throw Error("Invalid block size");if(O===0)break;n+=O}break;case 249:if(t[n++]!==4||t[n+4]!==0)throw new Error("Invalid graphics extension block.");var L=t[n++];_=t[n++]|t[n++]<<8,j=t[n++],1&L||(j=null),w=L>>2&7,n++;break;case 254:for(;;){if(!((O=t[n++])>=0))throw Error("Invalid block size");if(O===0)break;n+=O}break;default:throw new Error("Unknown graphic control label: 0x"+t[n-1].toString(16))}break;case 44:var R=t[n++]|t[n++]<<8,E=t[n++]|t[n++]<<8,Y=t[n++]|t[n++]<<8,H=t[n++]|t[n++]<<8,F=t[n++],X=F>>6&1,_e=1<<1+(7&F),xe=d,oe=f,Z=!1;F>>7&&(Z=!0,xe=n,oe=_e,n+=3*_e);var ge=n;for(n++;;){var O;if(!((O=t[n++])>=0))throw Error("Invalid block size");if(O===0)break;n+=O}v.push({x:R,y:E,width:Y,height:H,has_local_palette:Z,palette_offset:xe,palette_size:oe,data_offset:ge,data_length:n-ge,transparent_index:j,interlaced:!!X,delay:_,disposal:w});break;case 59:g=!1;break;default:throw new Error("Unknown gif block: 0x"+t[n-1].toString(16))}this.numFrames=function(){return v.length},this.loopCount=function(){return k},this.frameInfo=function(U){if(U<0||U>=v.length)throw new Error("Frame index out of range.");return v[U]},this.decodeAndBlitFrameBGRA=function(U,ne){var re=this.frameInfo(U),ve=re.width*re.height;if(ve>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ee=new Uint8Array(ve);Om(t,re.data_offset,ee,ve);var J=re.palette_offset,le=re.transparent_index;le===null&&(le=256);var Le=re.width,W=a-Le,ce=Le,T=4*(re.y*a+re.x),q=4*((re.y+re.height)*a+re.x),V=T,te=4*W;re.interlaced===!0&&(te+=4*a*7);for(var se=8,ye=0,je=ee.length;ye<je;++ye){var Ce=ee[ye];if(ce===0&&(ce=Le,(V+=te)>=q&&(te=4*W+4*a*(se-1),V=T+(Le+W)*(se<<1),se>>=1)),Ce===le)V+=4;else{var ze=t[J+3*Ce],We=t[J+3*Ce+1],Xe=t[J+3*Ce+2];ne[V++]=Xe,ne[V++]=We,ne[V++]=ze,ne[V++]=255}--ce}},this.decodeAndBlitFrameRGBA=function(U,ne){var re=this.frameInfo(U),ve=re.width*re.height;if(ve>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ee=new Uint8Array(ve);Om(t,re.data_offset,ee,ve);var J=re.palette_offset,le=re.transparent_index;le===null&&(le=256);var Le=re.width,W=a-Le,ce=Le,T=4*(re.y*a+re.x),q=4*((re.y+re.height)*a+re.x),V=T,te=4*W;re.interlaced===!0&&(te+=4*a*7);for(var se=8,ye=0,je=ee.length;ye<je;++ye){var Ce=ee[ye];if(ce===0&&(ce=Le,(V+=te)>=q&&(te=4*W+4*a*(se-1),V=T+(Le+W)*(se<<1),se>>=1)),Ce===le)V+=4;else{var ze=t[J+3*Ce],We=t[J+3*Ce+1],Xe=t[J+3*Ce+2];ne[V++]=ze,ne[V++]=We,ne[V++]=Xe,ne[V++]=255}--ce}}}function Om(t,n,a,i){for(var o=t[n++],u=1<<o,h=u+1,d=h+1,f=o+1,g=(1<<f)-1,v=0,_=0,j=0,w=t[n++],k=new Int32Array(4096),L=null;;){for(;v<16&&w!==0;)_|=t[n++]<<v,v+=8,w===1?w=t[n++]:--w;if(v<f)break;var R=_&g;if(_>>=f,v-=f,R!==u){if(R===h)break;for(var E=R<d?R:L,Y=0,H=E;H>u;)H=k[H]>>8,++Y;var F=H;if(j+Y+(E!==R?1:0)>i)return void Tn.log("Warning, gif stream longer than expected.");a[j++]=F;var X=j+=Y;for(E!==R&&(a[j++]=F),H=E;Y--;)H=k[H],a[--X]=255&H,H>>=8;L!==null&&d<4096&&(k[d++]=L<<8|F,d>=g+1&&f<12&&(++f,g=g<<1|1)),L=R}else d=h+1,g=(1<<(f=o+1))-1,L=null}return j!==i&&Tn.log("Warning, gif stream shorter than expected."),a}/**
|
|
523
|
+
* @license
|
|
524
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
525
|
+
All rights reserved.
|
|
526
|
+
|
|
527
|
+
Redistribution and use in source and binary forms, with or without
|
|
528
|
+
modification, are permitted provided that the following conditions are
|
|
529
|
+
met:
|
|
530
|
+
|
|
531
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
532
|
+
this list of conditions and the following disclaimer.
|
|
533
|
+
|
|
534
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
535
|
+
notice, this list of conditions and the following disclaimer in the
|
|
536
|
+
documentation and/or other materials provided with the distribution.
|
|
537
|
+
|
|
538
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
539
|
+
contributors may be used to endorse or promote products derived from
|
|
540
|
+
this software without specific prior written permission.
|
|
541
|
+
|
|
542
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
543
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
544
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
545
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
546
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
547
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
548
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
549
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
550
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
551
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
552
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
553
|
+
*/function Q1(t){var n,a,i,o,u,h=Math.floor,d=new Array(64),f=new Array(64),g=new Array(64),v=new Array(64),_=new Array(65535),j=new Array(65535),w=new Array(64),k=new Array(64),L=[],R=0,E=7,Y=new Array(64),H=new Array(64),F=new Array(64),X=new Array(256),_e=new Array(2048),xe=[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],oe=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Z=[0,1,2,3,4,5,6,7,8,9,10,11],ge=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],O=[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],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],ne=[0,1,2,3,4,5,6,7,8,9,10,11],re=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],ve=[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 ee(T,q){for(var V=0,te=0,se=new Array,ye=1;ye<=16;ye++){for(var je=1;je<=T[ye];je++)se[q[te]]=[],se[q[te]][0]=V,se[q[te]][1]=ye,te++,V++;V*=2}return se}function J(T){for(var q=T[0],V=T[1]-1;V>=0;)q&1<<V&&(R|=1<<E),V--,--E<0&&(R==255?(le(255),le(0)):le(R),E=7,R=0)}function le(T){L.push(T)}function Le(T){le(T>>8&255),le(255&T)}function W(T,q,V,te,se){for(var ye,je=se[0],Ce=se[240],ze=(function(Ie,mt){var Ze,bt,ht,Wt,Gt,wt,_t,Dt,$e,qt,pt=0;for($e=0;$e<8;++$e){Ze=Ie[pt],bt=Ie[pt+1],ht=Ie[pt+2],Wt=Ie[pt+3],Gt=Ie[pt+4],wt=Ie[pt+5],_t=Ie[pt+6];var Dn=Ze+(Dt=Ie[pt+7]),we=Ze-Dt,Ye=bt+_t,Je=bt-_t,Kt=ht+wt,rt=ht-wt,fn=Wt+Gt,yt=Wt-Gt,At=Dn+fn,Et=Dn-fn,Ct=Ye+Kt,St=Ye-Kt;Ie[pt]=At+Ct,Ie[pt+4]=At-Ct;var nn=.707106781*(St+Et);Ie[pt+2]=Et+nn,Ie[pt+6]=Et-nn;var ni=.382683433*((At=yt+rt)-(St=Je+we)),pn=.5411961*At+ni,Ra=1.306562965*St+ni,Oa=.707106781*(Ct=rt+Je),jt=we+Oa,Lr=we-Oa;Ie[pt+5]=Lr+pn,Ie[pt+3]=Lr-pn,Ie[pt+1]=jt+Ra,Ie[pt+7]=jt-Ra,pt+=8}for(pt=0,$e=0;$e<8;++$e){Ze=Ie[pt],bt=Ie[pt+8],ht=Ie[pt+16],Wt=Ie[pt+24],Gt=Ie[pt+32],wt=Ie[pt+40],_t=Ie[pt+48];var Cn=Ze+(Dt=Ie[pt+56]),kn=Ze-Dt,xr=bt+_t,Mn=bt-_t,mr=ht+wt,wr=ht-wt,$i=Wt+Gt,ba=Wt-Gt,oa=Cn+$i,Ir=Cn-$i,Er=xr+mr,Hr=xr-mr;Ie[pt]=oa+Er,Ie[pt+32]=oa-Er;var Sr=.707106781*(Hr+Ir);Ie[pt+16]=Ir+Sr,Ie[pt+48]=Ir-Sr;var Rn=.382683433*((oa=ba+wr)-(Hr=Mn+kn)),Da=.5411961*oa+Rn,Zi=1.306562965*Hr+Rn,xa=.707106781*(Er=wr+Mn),za=kn+xa,xo=kn-xa;Ie[pt+40]=xo+Da,Ie[pt+24]=xo-Da,Ie[pt+8]=za+Zi,Ie[pt+56]=za-Zi,pt++}for($e=0;$e<64;++$e)qt=Ie[$e]*mt[$e],w[$e]=qt>0?qt+.5|0:qt-.5|0;return w})(T,q),We=0;We<64;++We)k[xe[We]]=ze[We];var Xe=k[0]-V;V=k[0],Xe==0?J(te[0]):(J(te[j[ye=32767+Xe]]),J(_[ye]));for(var Ve=63;Ve>0&&k[Ve]==0;)Ve--;if(Ve==0)return J(je),V;for(var dt,G=1;G<=Ve;){for(var Qe=G;k[G]==0&&G<=Ve;)++G;var xt=G-Qe;if(xt>=16){dt=xt>>4;for(var ut=1;ut<=dt;++ut)J(Ce);xt&=15}ye=32767+k[G],J(se[(xt<<4)+j[ye]]),J(_[ye]),G++}return Ve!=63&&J(je),V}function ce(T){T=Math.min(Math.max(T,1),100),u!=T&&((function(q){for(var V=[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],te=0;te<64;te++){var se=h((V[te]*q+50)/100);se=Math.min(Math.max(se,1),255),d[xe[te]]=se}for(var ye=[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],je=0;je<64;je++){var Ce=h((ye[je]*q+50)/100);Ce=Math.min(Math.max(Ce,1),255),f[xe[je]]=Ce}for(var ze=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],We=0,Xe=0;Xe<8;Xe++)for(var Ve=0;Ve<8;Ve++)g[We]=1/(d[xe[We]]*ze[Xe]*ze[Ve]*8),v[We]=1/(f[xe[We]]*ze[Xe]*ze[Ve]*8),We++})(T<50?Math.floor(5e3/T):Math.floor(200-2*T)),u=T)}this.encode=function(T,q){q&&ce(q),L=new Array,R=0,E=7,Le(65496),Le(65504),Le(16),le(74),le(70),le(73),le(70),le(0),le(1),le(1),le(0),Le(1),Le(1),le(0),le(0),(function(){Le(65499),Le(132),le(0);for(var bt=0;bt<64;bt++)le(d[bt]);le(1);for(var ht=0;ht<64;ht++)le(f[ht])})(),(function(bt,ht){Le(65472),Le(17),le(8),Le(ht),Le(bt),le(3),le(1),le(17),le(0),le(2),le(17),le(1),le(3),le(17),le(1)})(T.width,T.height),(function(){Le(65476),Le(418),le(0);for(var bt=0;bt<16;bt++)le(oe[bt+1]);for(var ht=0;ht<=11;ht++)le(Z[ht]);le(16);for(var Wt=0;Wt<16;Wt++)le(ge[Wt+1]);for(var Gt=0;Gt<=161;Gt++)le(O[Gt]);le(1);for(var wt=0;wt<16;wt++)le(U[wt+1]);for(var _t=0;_t<=11;_t++)le(ne[_t]);le(17);for(var Dt=0;Dt<16;Dt++)le(re[Dt+1]);for(var $e=0;$e<=161;$e++)le(ve[$e])})(),Le(65498),Le(12),le(3),le(1),le(0),le(2),le(17),le(3),le(17),le(0),le(63),le(0);var V=0,te=0,se=0;R=0,E=7,this.encode.displayName="_encode_";for(var ye,je,Ce,ze,We,Xe,Ve,dt,G,Qe=T.data,xt=T.width,ut=T.height,Ie=4*xt,mt=0;mt<ut;){for(ye=0;ye<Ie;){for(We=Ie*mt+ye,Ve=-1,dt=0,G=0;G<64;G++)Xe=We+(dt=G>>3)*Ie+(Ve=4*(7&G)),mt+dt>=ut&&(Xe-=Ie*(mt+1+dt-ut)),ye+Ve>=Ie&&(Xe-=ye+Ve-Ie+4),je=Qe[Xe++],Ce=Qe[Xe++],ze=Qe[Xe++],Y[G]=(_e[je]+_e[Ce+256|0]+_e[ze+512|0]>>16)-128,H[G]=(_e[je+768|0]+_e[Ce+1024|0]+_e[ze+1280|0]>>16)-128,F[G]=(_e[je+1280|0]+_e[Ce+1536|0]+_e[ze+1792|0]>>16)-128;V=W(Y,g,V,n,i),te=W(H,v,te,a,o),se=W(F,v,se,a,o),ye+=32}mt+=8}if(E>=0){var Ze=[];Ze[1]=E+1,Ze[0]=(1<<E+1)-1,J(Ze)}return Le(65497),new Uint8Array(L)},t=t||50,(function(){for(var T=String.fromCharCode,q=0;q<256;q++)X[q]=T(q)})(),n=ee(oe,Z),a=ee(U,ne),i=ee(ge,O),o=ee(re,ve),(function(){for(var T=1,q=2,V=1;V<=15;V++){for(var te=T;te<q;te++)j[32767+te]=V,_[32767+te]=[],_[32767+te][1]=V,_[32767+te][0]=te;for(var se=-(q-1);se<=-T;se++)j[32767+se]=V,_[32767+se]=[],_[32767+se][1]=V,_[32767+se][0]=q-1+se;T<<=1,q<<=1}})(),(function(){for(var T=0;T<256;T++)_e[T]=19595*T,_e[T+256|0]=38470*T,_e[T+512|0]=7471*T+32768,_e[T+768|0]=-11059*T,_e[T+1024|0]=-21709*T,_e[T+1280|0]=32768*T+8421375,_e[T+1536|0]=-27439*T,_e[T+1792|0]=-5329*T})(),ce(t)}/**
|
|
554
|
+
* @license
|
|
555
|
+
* Copyright (c) 2017 Aras Abbasi
|
|
556
|
+
*
|
|
557
|
+
* Licensed under the MIT License.
|
|
558
|
+
* http://opensource.org/licenses/mit-license
|
|
559
|
+
*/function Gi(t,n){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!n,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 Dm(t){function n(Z){if(!Z)throw Error("assert :P")}function a(Z,ge,O){for(var U=0;4>U;U++)if(Z[ge+U]!=O.charCodeAt(U))return!0;return!1}function i(Z,ge,O,U,ne){for(var re=0;re<ne;re++)Z[ge+re]=O[U+re]}function o(Z,ge,O,U){for(var ne=0;ne<U;ne++)Z[ge+ne]=O}function u(Z){return new Int32Array(Z)}function h(Z,ge){for(var O=[],U=0;U<Z;U++)O.push(new ge);return O}function d(Z,ge){var O=[];return(function U(ne,re,ve){for(var ee=ve[re],J=0;J<ee&&(ne.push(ve.length>re+1?[]:new ge),!(ve.length<re+1));J++)U(ne[J],re+1,ve)})(O,0,Z),O}var f=function(){var Z=this;function ge(c,y){for(var S=1<<y-1>>>0;c&S;)S>>>=1;return S?(c&S-1)+S:c}function O(c,y,S,A,M){n(!(A%S));do c[y+(A-=S)]=M;while(0<A)}function U(c,y,S,A,M){if(n(2328>=M),512>=M)var D=u(512);else if((D=u(M))==null)return 0;return(function(z,P,I,$,fe,ke){var K,he,be=P,Me=1<<I,Ae=u(16),De=u(16);for(n(fe!=0),n($!=null),n(z!=null),n(0<I),he=0;he<fe;++he){if(15<$[he])return 0;++Ae[$[he]]}if(Ae[0]==fe)return 0;for(De[1]=0,K=1;15>K;++K){if(Ae[K]>1<<K)return 0;De[K+1]=De[K]+Ae[K]}for(he=0;he<fe;++he)K=$[he],0<$[he]&&(ke[De[K]++]=he);if(De[15]==1)return($=new ne).g=0,$.value=ke[0],O(z,be,1,Me,$),Me;var Oe,He=-1,qe=Me-1,ft=0,et=1,zt=1,tt=1<<I;for(he=0,K=1,fe=2;K<=I;++K,fe<<=1){if(et+=zt<<=1,0>(zt-=Ae[K]))return 0;for(;0<Ae[K];--Ae[K])($=new ne).g=K,$.value=ke[he++],O(z,be+ft,fe,tt,$),ft=ge(ft,K)}for(K=I+1,fe=2;15>=K;++K,fe<<=1){if(et+=zt<<=1,0>(zt-=Ae[K]))return 0;for(;0<Ae[K];--Ae[K]){if($=new ne,(ft&qe)!=He){for(be+=tt,Oe=1<<(He=K)-I;15>He&&!(0>=(Oe-=Ae[He]));)++He,Oe<<=1;Me+=tt=1<<(Oe=He-I),z[P+(He=ft&qe)].g=Oe+I,z[P+He].value=be-P-He}$.g=K-I,$.value=ke[he++],O(z,be+(ft>>I),fe,tt,$),ft=ge(ft,K)}}return et!=2*De[15]-1?0:Me})(c,y,S,A,M,D)}function ne(){this.value=this.g=0}function re(){this.value=this.g=0}function ve(){this.G=h(5,ne),this.H=u(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=h(us,re)}function ee(c,y,S,A){n(c!=null),n(y!=null),n(2147483648>A),c.Ca=254,c.I=0,c.b=-8,c.Ka=0,c.oa=y,c.pa=S,c.Jd=y,c.Yc=S+A,c.Zc=4<=A?S+A-4+1:S,je(c)}function J(c,y){for(var S=0;0<y--;)S|=ze(c,128)<<y;return S}function le(c,y){var S=J(c,y);return Ce(c)?-S:S}function Le(c,y,S,A){var M,D=0;for(n(c!=null),n(y!=null),n(4294967288>A),c.Sb=A,c.Ra=0,c.u=0,c.h=0,4<A&&(A=4),M=0;M<A;++M)D+=y[S+M]<<8*M;c.Ra=D,c.bb=A,c.oa=y,c.pa=S}function W(c){for(;8<=c.u&&c.bb<c.Sb;)c.Ra>>>=8,c.Ra+=c.oa[c.pa+c.bb]<<Or-8>>>0,++c.bb,c.u-=8;te(c)&&(c.h=1,c.u=0)}function ce(c,y){if(n(0<=y),!c.h&&y<=Oo){var S=V(c)&Ti[y];return c.u+=y,W(c),S}return c.h=1,c.u=0}function T(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function q(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function V(c){return c.Ra>>>(c.u&Or-1)>>>0}function te(c){return n(c.bb<=c.Sb),c.h||c.bb==c.Sb&&c.u>Or}function se(c,y){c.u=y,c.h=te(c)}function ye(c){c.u>=Vr&&(n(c.u>=Vr),W(c))}function je(c){n(c!=null&&c.oa!=null),c.pa<c.Zc?(c.I=(c.oa[c.pa++]|c.I<<8)>>>0,c.b+=8):(n(c!=null&&c.oa!=null),c.pa<c.Yc?(c.b+=8,c.I=c.oa[c.pa++]|c.I<<8):c.Ka?c.b=0:(c.I<<=8,c.b+=8,c.Ka=1))}function Ce(c){return J(c,1)}function ze(c,y){var S=c.Ca;0>c.b&&je(c);var A=c.b,M=S*y>>>8,D=(c.I>>>A>M)+0;for(D?(S-=M,c.I-=M+1<<A>>>0):S=M+1,A=S,M=0;256<=A;)M+=8,A>>=8;return A=7^M+Do[A],c.b-=A,c.Ca=(S<<A)-1,D}function We(c,y,S){c[y+0]=S>>24&255,c[y+1]=S>>16&255,c[y+2]=S>>8&255,c[y+3]=255&S}function Xe(c,y){return c[y+0]|c[y+1]<<8}function Ve(c,y){return Xe(c,y)|c[y+2]<<16}function dt(c,y){return Xe(c,y)|Xe(c,y+2)<<16}function G(c,y){var S=1<<y;return n(c!=null),n(0<y),c.X=u(S),c.X==null?0:(c.Mb=32-y,c.Xa=y,1)}function Qe(c,y){n(c!=null),n(y!=null),n(c.Xa==y.Xa),i(y.X,0,c.X,0,1<<y.Xa)}function xt(){this.X=[],this.Xa=this.Mb=0}function ut(c,y,S,A){n(S!=null),n(A!=null);var M=S[0],D=A[0];return M==0&&(M=(c*D+y/2)/y),D==0&&(D=(y*M+c/2)/c),0>=M||0>=D?0:(S[0]=M,A[0]=D,1)}function Ie(c,y){return c+(1<<y)-1>>>y}function mt(c,y){return((4278255360&c)+(4278255360&y)>>>0&4278255360)+((16711935&c)+(16711935&y)>>>0&16711935)>>>0}function Ze(c,y){Z[y]=function(S,A,M,D,z,P,I){var $;for($=0;$<z;++$){var fe=Z[c](P[I+$-1],M,D+$);P[I+$]=mt(S[A+$],fe)}}}function bt(){this.ud=this.hd=this.jd=0}function ht(c,y){return((4278124286&(c^y))>>>1)+(c&y)>>>0}function Wt(c){return 0<=c&&256>c?c:0>c?0:255<c?255:void 0}function Gt(c,y){return Wt(c+(c-y+.5>>1))}function wt(c,y,S){return Math.abs(y-S)-Math.abs(c-S)}function _t(c,y,S,A,M,D,z){for(A=D[z-1],S=0;S<M;++S)D[z+S]=A=mt(c[y+S],A)}function Dt(c,y,S,A,M){var D;for(D=0;D<S;++D){var z=c[y+D],P=z>>8&255,I=16711935&(I=(I=16711935&z)+((P<<16)+P));A[M+D]=(4278255360&z)+I>>>0}}function $e(c,y){y.jd=255&c,y.hd=c>>8&255,y.ud=c>>16&255}function qt(c,y,S,A,M,D){var z;for(z=0;z<A;++z){var P=y[S+z],I=P>>>8,$=P,fe=255&(fe=(fe=P>>>16)+((c.jd<<24>>24)*(I<<24>>24)>>>5));$=255&($=($+=(c.hd<<24>>24)*(I<<24>>24)>>>5)+((c.ud<<24>>24)*(fe<<24>>24)>>>5)),M[D+z]=(4278255360&P)+(fe<<16)+$}}function pt(c,y,S,A,M){Z[y]=function(D,z,P,I,$,fe,ke,K,he){for(I=ke;I<K;++I)for(ke=0;ke<he;++ke)$[fe++]=M(P[A(D[z++])])},Z[c]=function(D,z,P,I,$,fe,ke){var K=8>>D.b,he=D.Ea,be=D.K[0],Me=D.w;if(8>K)for(D=(1<<D.b)-1,Me=(1<<K)-1;z<P;++z){var Ae,De=0;for(Ae=0;Ae<he;++Ae)Ae&D||(De=A(I[$++])),fe[ke++]=M(be[De&Me]),De>>=K}else Z["VP8LMapColor"+S](I,$,be,Me,fe,ke,z,P,he)}}function Dn(c,y,S,A,M){for(S=y+S;y<S;){var D=c[y++];A[M++]=D>>16&255,A[M++]=D>>8&255,A[M++]=255&D}}function we(c,y,S,A,M){for(S=y+S;y<S;){var D=c[y++];A[M++]=D>>16&255,A[M++]=D>>8&255,A[M++]=255&D,A[M++]=D>>24&255}}function Ye(c,y,S,A,M){for(S=y+S;y<S;){var D=(z=c[y++])>>16&240|z>>12&15,z=240&z|z>>28&15;A[M++]=D,A[M++]=z}}function Je(c,y,S,A,M){for(S=y+S;y<S;){var D=(z=c[y++])>>16&248|z>>13&7,z=z>>5&224|z>>3&31;A[M++]=D,A[M++]=z}}function Kt(c,y,S,A,M){for(S=y+S;y<S;){var D=c[y++];A[M++]=255&D,A[M++]=D>>8&255,A[M++]=D>>16&255}}function rt(c,y,S,A,M,D){if(D==0)for(S=y+S;y<S;)We(A,((D=c[y++])[0]>>24|D[1]>>8&65280|D[2]<<8&16711680|D[3]<<24)>>>0),M+=32;else i(A,M,c,y,S)}function fn(c,y){Z[y][0]=Z[c+"0"],Z[y][1]=Z[c+"1"],Z[y][2]=Z[c+"2"],Z[y][3]=Z[c+"3"],Z[y][4]=Z[c+"4"],Z[y][5]=Z[c+"5"],Z[y][6]=Z[c+"6"],Z[y][7]=Z[c+"7"],Z[y][8]=Z[c+"8"],Z[y][9]=Z[c+"9"],Z[y][10]=Z[c+"10"],Z[y][11]=Z[c+"11"],Z[y][12]=Z[c+"12"],Z[y][13]=Z[c+"13"],Z[y][14]=Z[c+"0"],Z[y][15]=Z[c+"0"]}function yt(c){return c==kl||c==hs||c==Oi||c==Io}function At(){this.eb=[],this.size=this.A=this.fb=0}function Et(){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 Ct(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new At,this.f.kb=new Et,this.sd=null}function St(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function nn(){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 ni(c){return alert("todo:WebPSamplerProcessPlane"),c.T}function pn(c,y){var S=c.T,A=y.ba.f.RGBA,M=A.eb,D=A.fb+c.ka*A.A,z=br[y.ba.S],P=c.y,I=c.O,$=c.f,fe=c.N,ke=c.ea,K=c.W,he=y.cc,be=y.dc,Me=y.Mc,Ae=y.Nc,De=c.ka,Oe=c.ka+c.T,He=c.U,qe=He+1>>1;for(De==0?z(P,I,null,null,$,fe,ke,K,$,fe,ke,K,M,D,null,null,He):(z(y.ec,y.fc,P,I,he,be,Me,Ae,$,fe,ke,K,M,D-A.A,M,D,He),++S);De+2<Oe;De+=2)he=$,be=fe,Me=ke,Ae=K,fe+=c.Rc,K+=c.Rc,D+=2*A.A,z(P,(I+=2*c.fa)-c.fa,P,I,he,be,Me,Ae,$,fe,ke,K,M,D-A.A,M,D,He);return I+=c.fa,c.j+Oe<c.o?(i(y.ec,y.fc,P,I,He),i(y.cc,y.dc,$,fe,qe),i(y.Mc,y.Nc,ke,K,qe),S--):1&Oe||z(P,I,null,null,$,fe,ke,K,$,fe,ke,K,M,D+A.A,null,null,He),S}function Ra(c,y,S){var A=c.F,M=[c.J];if(A!=null){var D=c.U,z=y.ba.S,P=z==Js||z==Oi;y=y.ba.f.RGBA;var I=[0],$=c.ka;I[0]=c.T,c.Kb&&($==0?--I[0]:(--$,M[0]-=c.width),c.j+c.ka+c.T==c.o&&(I[0]=c.o-c.j-$));var fe=y.eb;$=y.fb+$*y.A,c=ha(A,M[0],c.width,D,I,fe,$+(P?0:3),y.A),n(S==I),c&&yt(z)&&Uo(fe,$,P,D,I,y.A)}return 0}function Oa(c){var y=c.ma,S=y.ba.S,A=11>S,M=S==Fo||S==jl||S==Js||S==Ri||S==12||yt(S);if(y.memory=null,y.Ib=null,y.Jb=null,y.Nd=null,!Gr(y.Oa,c,M?11:12))return 0;if(M&&yt(S)&&Ia(),c.da)alert("todo:use_scaling");else{if(A){if(y.Ib=ni,c.Kb){if(S=c.U+1>>1,y.memory=u(c.U+2*S),y.memory==null)return 0;y.ec=y.memory,y.fc=0,y.cc=y.ec,y.dc=y.fc+c.U,y.Mc=y.cc,y.Nc=y.dc+S,y.Ib=pn,Ia()}}else alert("todo:EmitYUV");M&&(y.Jb=Ra,A&&Bn())}if(A&&!Rf){for(c=0;256>c;++c)fh[c]=89858*(c-128)+or>>fi,El[c]=-22014*(c-128)+or,yc[c]=-45773*(c-128),lr[c]=113618*(c-128)+or>>fi;for(c=ms;c<ju;++c)y=76283*(c-16)+or>>fi,Tl[c-ms]=ri(y,255),vc[c-ms]=ri(y+8>>4,15);Rf=1}return 1}function jt(c){var y=c.ma,S=c.U,A=c.T;return n(!(1&c.ka)),0>=S||0>=A?0:(S=y.Ib(c,y),y.Jb!=null&&y.Jb(c,y,S),y.Dc+=S,1)}function Lr(c){c.ma.memory=null}function Cn(c,y,S,A){return ce(c,8)!=47?0:(y[0]=ce(c,14)+1,S[0]=ce(c,14)+1,A[0]=ce(c,1),ce(c,3)!=0?0:!c.h)}function kn(c,y){if(4>c)return c+1;var S=c-2>>1;return(2+(1&c)<<S)+ce(y,S)+1}function xr(c,y){return 120<y?y-120:1<=(S=((S=zi[y-1])>>4)*c+(8-(15&S)))?S:1;var S}function Mn(c,y,S){var A=V(S),M=c[y+=255&A].g-8;return 0<M&&(se(S,S.u+8),A=V(S),y+=c[y].value,y+=A&(1<<M)-1),se(S,S.u+c[y].g),c[y].value}function mr(c,y,S){return S.g+=c.g,S.value+=c.value<<y>>>0,n(8>=S.g),c.g}function wr(c,y,S){var A=c.xc;return n((y=A==0?0:c.vc[c.md*(S>>A)+(y>>A)])<c.Wb),c.Ya[y]}function $i(c,y,S,A){var M=c.ab,D=c.c*y,z=c.C;y=z+y;var P=S,I=A;for(A=c.Ta,S=c.Ua;0<M--;){var $=c.gc[M],fe=z,ke=y,K=P,he=I,be=(I=A,P=S,$.Ea);switch(n(fe<ke),n(ke<=$.nc),$.hc){case 2:zo(K,he,(ke-fe)*be,I,P);break;case 0:var Me=fe,Ae=ke,De=I,Oe=P,He=(tt=$).Ea;Me==0&&(cs(K,he,null,null,1,De,Oe),_t(K,he+1,0,0,He-1,De,Oe+1),he+=He,Oe+=He,++Me);for(var qe=1<<tt.b,ft=qe-1,et=Ie(He,tt.b),zt=tt.K,tt=tt.w+(Me>>tt.b)*et;Me<Ae;){var Qt=zt,rr=tt,Rt=1;for(fs(K,he,De,Oe-He,1,De,Oe);Rt<He;){var nt=(Rt&~ft)+qe;nt>He&&(nt=He),(0,Sa[Qt[rr++]>>8&15])(K,he+ +Rt,De,Oe+Rt-He,nt-Rt,De,Oe+Rt),Rt=nt}he+=He,Oe+=He,++Me&ft||(tt+=et)}ke!=$.nc&&i(I,P-be,I,P+(ke-fe-1)*be,be);break;case 1:for(be=K,Ae=he,He=(K=$.Ea)-(Oe=K&~(De=(he=1<<$.b)-1)),Me=Ie(K,$.b),qe=$.K,$=$.w+(fe>>$.b)*Me;fe<ke;){for(ft=qe,et=$,zt=new bt,tt=Ae+Oe,Qt=Ae+K;Ae<tt;)$e(ft[et++],zt),ds(zt,be,Ae,he,I,P),Ae+=he,P+=he;Ae<Qt&&($e(ft[et++],zt),ds(zt,be,Ae,He,I,P),Ae+=He,P+=He),++fe&De||($+=Me)}break;case 3:if(K==I&&he==P&&0<$.b){for(Ae=I,K=be=P+(ke-fe)*be-(Oe=(ke-fe)*Ie($.Ea,$.b)),he=I,De=P,Me=[],Oe=(He=Oe)-1;0<=Oe;--Oe)Me[Oe]=he[De+Oe];for(Oe=He-1;0<=Oe;--Oe)Ae[K+Oe]=Me[Oe];Vs($,fe,ke,I,be,I,P)}else Vs($,fe,ke,K,he,I,P)}P=A,I=S}I!=S&&i(A,S,P,I,D)}function ba(c,y){var S=c.V,A=c.Ba+c.c*c.C,M=y-c.C;if(n(y<=c.l.o),n(16>=M),0<M){var D=c.l,z=c.Ta,P=c.Ua,I=D.width;if($i(c,M,S,A),M=P=[P],n((S=c.C)<(A=y)),n(D.v<D.va),A>D.o&&(A=D.o),S<D.j){var $=D.j-S;S=D.j,M[0]+=$*I}if(S>=A?S=0:(M[0]+=4*D.v,D.ka=S-D.j,D.U=D.va-D.v,D.T=A-S,S=1),S){if(P=P[0],11>(S=c.ca).S){var fe=S.f.RGBA,ke=(A=S.S,M=D.U,D=D.T,$=fe.eb,fe.A),K=D;for(fe=fe.fb+c.Ma*fe.A;0<K--;){var he=z,be=P,Me=M,Ae=$,De=fe;switch(A){case Dr:Bo(he,be,Me,Ae,De);break;case Fo:Xs(he,be,Me,Ae,De);break;case kl:Xs(he,be,Me,Ae,De),Uo(Ae,De,0,Me,1,0);break;case oi:Ci(he,be,Me,Ae,De);break;case jl:rt(he,be,Me,Ae,De,1);break;case hs:rt(he,be,Me,Ae,De,1),Uo(Ae,De,0,Me,1,0);break;case Js:rt(he,be,Me,Ae,De,0);break;case Oi:rt(he,be,Me,Ae,De,0),Uo(Ae,De,1,Me,1,0);break;case Ri:Po(he,be,Me,Ae,De);break;case Io:Po(he,be,Me,Ae,De),da(Ae,De,Me,1,0);break;case xu:_a(he,be,Me,Ae,De);break;default:n(0)}P+=I,fe+=ke}c.Ma+=D}else alert("todo:EmitRescaledRowsYUVA");n(c.Ma<=S.height)}}c.C=y,n(c.C<=c.i)}function oa(c){var y;if(0<c.ua)return 0;for(y=0;y<c.Wb;++y){var S=c.Ya[y].G,A=c.Ya[y].H;if(0<S[1][A[1]+0].g||0<S[2][A[2]+0].g||0<S[3][A[3]+0].g)return 0}return 1}function Ir(c,y,S,A,M,D){if(c.Z!=0){var z=c.qd,P=c.rd;for(n(ui[c.Z]!=null);y<S;++y)ui[c.Z](z,P,A,M,A,M,D),z=A,P=M,M+=D;c.qd=z,c.rd=P}}function Er(c,y){var S=c.l.ma,A=S.Z==0||S.Z==1?c.l.j:c.C;if(A=c.C<A?A:c.C,n(y<=c.l.o),y>A){var M=c.l.width,D=S.ca,z=S.tb+M*A,P=c.V,I=c.Ba+c.c*A,$=c.gc;n(c.ab==1),n($[0].hc==3),Qs($[0],A,y,P,I,D,z),Ir(S,A,y,D,z,M)}c.C=c.Ma=y}function Hr(c,y,S,A,M,D,z){var P=c.$/A,I=c.$%A,$=c.m,fe=c.s,ke=S+c.$,K=ke;M=S+A*M;var he=S+A*D,be=280+fe.ua,Me=c.Pb?P:16777216,Ae=0<fe.ua?fe.Wa:null,De=fe.wc,Oe=ke<he?wr(fe,I,P):null;n(c.C<D),n(he<=M);var He=!1;e:for(;;){for(;He||ke<he;){var qe=0;if(P>=Me){var ft=ke-S;n((Me=c).Pb),Me.wd=Me.m,Me.xd=ft,0<Me.s.ua&&Qe(Me.s.Wa,Me.s.vb),Me=P+Tf}if(I&De||(Oe=wr(fe,I,P)),n(Oe!=null),Oe.Qb&&(y[ke]=Oe.qb,He=!0),!He)if(ye($),Oe.jc){qe=$,ft=y;var et=ke,zt=Oe.pd[V(qe)&us-1];n(Oe.jc),256>zt.g?(se(qe,qe.u+zt.g),ft[et]=zt.value,qe=0):(se(qe,qe.u+zt.g-256),n(256<=zt.value),qe=zt.value),qe==0&&(He=!0)}else qe=Mn(Oe.G[0],Oe.H[0],$);if($.h)break;if(He||256>qe){if(!He)if(Oe.nd)y[ke]=(Oe.qb|qe<<8)>>>0;else{if(ye($),He=Mn(Oe.G[1],Oe.H[1],$),ye($),ft=Mn(Oe.G[2],Oe.H[2],$),et=Mn(Oe.G[3],Oe.H[3],$),$.h)break;y[ke]=(et<<24|He<<16|qe<<8|ft)>>>0}if(He=!1,++ke,++I>=A&&(I=0,++P,z!=null&&P<=D&&!(P%16)&&z(c,P),Ae!=null))for(;K<ke;)qe=y[K++],Ae.X[(506832829*qe&4294967295)>>>Ae.Mb]=qe}else if(280>qe){if(qe=kn(qe-256,$),ft=Mn(Oe.G[4],Oe.H[4],$),ye($),ft=xr(A,ft=kn(ft,$)),$.h)break;if(ke-S<ft||M-ke<qe)break e;for(et=0;et<qe;++et)y[ke+et]=y[ke+et-ft];for(ke+=qe,I+=qe;I>=A;)I-=A,++P,z!=null&&P<=D&&!(P%16)&&z(c,P);if(n(ke<=M),I&De&&(Oe=wr(fe,I,P)),Ae!=null)for(;K<ke;)qe=y[K++],Ae.X[(506832829*qe&4294967295)>>>Ae.Mb]=qe}else{if(!(qe<be))break e;for(He=qe-280,n(Ae!=null);K<ke;)qe=y[K++],Ae.X[(506832829*qe&4294967295)>>>Ae.Mb]=qe;qe=ke,n(!(He>>>(ft=Ae).Xa)),y[qe]=ft.X[He],He=!0}He||n($.h==te($))}if(c.Pb&&$.h&&ke<M)n(c.m.h),c.a=5,c.m=c.wd,c.$=c.xd,0<c.s.ua&&Qe(c.s.vb,c.s.Wa);else{if($.h)break e;z?.(c,P>D?D:P),c.a=0,c.$=ke-S}return 1}return c.a=3,0}function Sr(c){n(c!=null),c.vc=null,c.yc=null,c.Ya=null;var y=c.Wa;y!=null&&(y.X=null),c.vb=null,n(c!=null)}function Rn(){var c=new st;return c==null?null:(c.a=0,c.xb=Ho,fn("Predictor","VP8LPredictors"),fn("Predictor","VP8LPredictors_C"),fn("PredictorAdd","VP8LPredictorsAdd"),fn("PredictorAdd","VP8LPredictorsAdd_C"),zo=Dt,ds=qt,Bo=Dn,Xs=we,Po=Ye,_a=Je,Ci=Kt,Z.VP8LMapColor32b=rn,Z.VP8LMapColor8b=Wa,c)}function Da(c,y,S,A,M){var D=1,z=[c],P=[y],I=A.m,$=A.s,fe=null,ke=0;e:for(;;){if(S)for(;D&&ce(I,1);){var K=z,he=P,be=A,Me=1,Ae=be.m,De=be.gc[be.ab],Oe=ce(Ae,2);if(be.Oc&1<<Oe)D=0;else{switch(be.Oc|=1<<Oe,De.hc=Oe,De.Ea=K[0],De.nc=he[0],De.K=[null],++be.ab,n(4>=be.ab),Oe){case 0:case 1:De.b=ce(Ae,3)+2,Me=Da(Ie(De.Ea,De.b),Ie(De.nc,De.b),0,be,De.K),De.K=De.K[0];break;case 3:var He,qe=ce(Ae,8)+1,ft=16<qe?0:4<qe?1:2<qe?2:3;if(K[0]=Ie(De.Ea,ft),De.b=ft,He=Me=Da(qe,1,0,be,De.K)){var et,zt=qe,tt=De,Qt=1<<(8>>tt.b),rr=u(Qt);if(rr==null)He=0;else{var Rt=tt.K[0],nt=tt.w;for(rr[0]=tt.K[0][0],et=1;et<1*zt;++et)rr[et]=mt(Rt[nt+et],rr[et-1]);for(;et<4*Qt;++et)rr[et]=0;tt.K[0]=null,tt.K[0]=rr,He=1}}Me=He;break;case 2:break;default:n(0)}D=Me}}if(z=z[0],P=P[0],D&&ce(I,1)&&!(D=1<=(ke=ce(I,4))&&11>=ke)){A.a=3;break e}var Ge;if(Ge=D)t:{var Pn,Bt,Ht,it=A,Ut=z,en=P,Ln=ke,Kn=S,$n=it.m,In=it.s,Vt=[null],tn=1,Hn=0,Nt=to[Ln];n:for(;;){if(Kn&&ce($n,1)){var ur=ce($n,3)+2,ma=Ie(Ut,ur),Wn=Ie(en,ur),Xr=ma*Wn;if(!Da(ma,Wn,0,it,Vt))break n;for(Vt=Vt[0],In.xc=ur,Pn=0;Pn<Xr;++Pn){var vn=Vt[Pn]>>8&65535;Vt[Pn]=vn,vn>=tn&&(tn=vn+1)}}if($n.h)break n;for(Bt=0;5>Bt;++Bt){var Zn=pa[Bt];!Bt&&0<Ln&&(Zn+=1<<Ln),Hn<Zn&&(Hn=Zn)}var Kr=h(tn*Nt,ne),Ar=tn,_n=h(Ar,ve);if(_n==null)var sn=null;else n(65536>=Ar),sn=_n;var zr=u(Hn);if(sn==null||zr==null||Kr==null){it.a=1;break n}var jr=Kr;for(Pn=Ht=0;Pn<tn;++Pn){var hn=sn[Pn],$r=hn.G,cr=hn.H,di=0,Ga=1,fr=0;for(Bt=0;5>Bt;++Bt){Zn=pa[Bt],$r[Bt]=jr,cr[Bt]=Ht,!Bt&&0<Ln&&(Zn+=1<<Ln);a:{var Cl,ku=Zn,Ml=it,Yo=zr,zf=jr,Bf=Ht,Rl=0,Ui=Ml.m,hh=ce(Ui,1);if(o(Yo,0,0,ku),hh){var Pf=ce(Ui,1)+1,qf=ce(Ui,1),bc=ce(Ui,qf==0?1:8);Yo[bc]=1,Pf==2&&(Yo[bc=ce(Ui,8)]=1);var Go=1}else{var xc=u(19),wc=ce(Ui,4)+4;if(19<wc){Ml.a=3;var Ol=0;break a}for(Cl=0;Cl<wc;++Cl)xc[Di[Cl]]=ce(Ui,3);var Nu=void 0,Vo=void 0,Uf=Ml,Ff=xc,Fi=ku,Dl=Yo,Lu=0,Va=Uf.m,Qo=8,Sc=h(128,ne);r:for(;U(Sc,0,7,Ff,19);){if(ce(Va,1)){var If=2+2*ce(Va,3);if((Nu=2+ce(Va,If))>Fi)break r}else Nu=Fi;for(Vo=0;Vo<Fi&&Nu--;){ye(Va);var _c=Sc[0+(127&V(Va))];se(Va,Va.u+_c.g);var ao=_c.value;if(16>ao)Dl[Vo++]=ao,ao!=0&&(Qo=ao);else{var Hf=ao==16,Ac=ao-16,jc=Ea[Ac],kc=ce(Va,wu[Ac])+jc;if(Vo+kc>Fi)break r;for(var Wf=Hf?Qo:0;0<kc--;)Dl[Vo++]=Wf}}Lu=1;break r}Lu||(Uf.a=3),Go=Lu}(Go=Go&&!Ui.h)&&(Rl=U(zf,Bf,8,Yo,ku)),Go&&Rl!=0?Ol=Rl:(Ml.a=3,Ol=0)}if(Ol==0)break n;if(Ga&&eo[Bt]==1&&(Ga=jr[Ht].g==0),di+=jr[Ht].g,Ht+=Ol,3>=Bt){var io,Eu=zr[0];for(io=1;io<Zn;++io)zr[io]>Eu&&(Eu=zr[io]);fr+=Eu}}if(hn.nd=Ga,hn.Qb=0,Ga&&(hn.qb=($r[3][cr[3]+0].value<<24|$r[1][cr[1]+0].value<<16|$r[2][cr[2]+0].value)>>>0,di==0&&256>$r[0][cr[0]+0].value&&(hn.Qb=1,hn.qb+=$r[0][cr[0]+0].value<<8)),hn.jc=!hn.Qb&&6>fr,hn.jc){var zl,Ii=hn;for(zl=0;zl<us;++zl){var hi=zl,Hi=Ii.pd[hi],Bl=Ii.G[0][Ii.H[0]+hi];256<=Bl.value?(Hi.g=Bl.g+256,Hi.value=Bl.value):(Hi.g=0,Hi.value=0,hi>>=mr(Bl,8,Hi),hi>>=mr(Ii.G[1][Ii.H[1]+hi],16,Hi),hi>>=mr(Ii.G[2][Ii.H[2]+hi],0,Hi),mr(Ii.G[3][Ii.H[3]+hi],24,Hi))}}}In.vc=Vt,In.Wb=tn,In.Ya=sn,In.yc=Kr,Ge=1;break t}Ge=0}if(!(D=Ge)){A.a=3;break e}if(0<ke){if($.ua=1<<ke,!G($.Wa,ke)){A.a=1,D=0;break e}}else $.ua=0;var Pl=A,Nc=z,Yf=P,Lc=Pl.s,Ec=Lc.xc;if(Pl.c=Nc,Pl.i=Yf,Lc.md=Ie(Nc,Ec),Lc.wc=Ec==0?-1:(1<<Ec)-1,S){A.xb=Mf;break e}if((fe=u(z*P))==null){A.a=1,D=0;break e}D=(D=Hr(A,fe,0,z,P,P,null))&&!I.h;break e}return D?(M!=null?M[0]=fe:(n(fe==null),n(S)),A.$=0,S||Sr($)):Sr($),D}function Zi(c,y){var S=c.c*c.i,A=S+y+16*y;return n(c.c<=y),c.V=u(A),c.V==null?(c.Ta=null,c.Ua=0,c.a=1,0):(c.Ta=c.V,c.Ua=c.Ba+S+y,1)}function xa(c,y){var S=c.C,A=y-S,M=c.V,D=c.Ba+c.c*S;for(n(y<=c.l.o);0<A;){var z=16<A?16:A,P=c.l.ma,I=c.l.width,$=I*z,fe=P.ca,ke=P.tb+I*S,K=c.Ta,he=c.Ua;$i(c,z,M,D),Ks(K,he,fe,ke,$),Ir(P,S,S+z,fe,ke,I),A-=z,M+=z*c.c,S+=z}n(S==y),c.C=c.Ma=y}function za(){this.ub=this.yd=this.td=this.Rb=0}function xo(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function tu(){this.Fb=this.Bb=this.Cb=0,this.Zb=u(4),this.Lb=u(4)}function wo(){this.Yb=(function(){var c=[];return(function y(S,A,M){for(var D=M[A],z=0;z<D&&(S.push(M.length>A+1?[]:0),!(M.length<A+1));z++)y(S[z],A+1,M)})(c,0,[3,11]),c})()}function nu(){this.jb=u(3),this.Wc=d([4,8],wo),this.Xc=d([4,17],wo)}function Ms(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new u(4),this.od=new u(4)}function Wr(){this.ld=this.La=this.dd=this.tc=0}function la(){this.Na=this.la=0}function So(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function _o(){this.ad=u(384),this.Za=0,this.Ob=u(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function wi(){this.uc=this.M=this.Nb=0,this.wa=Array(new Wr),this.Y=0,this.ya=Array(new _o),this.aa=0,this.l=new Rs}function Ao(){this.y=u(16),this.f=u(8),this.ea=u(8)}function jo(){this.cb=this.a=0,this.sc="",this.m=new T,this.Od=new za,this.Kc=new xo,this.ed=new Ms,this.Qa=new tu,this.Ic=this.$c=this.Aa=0,this.D=new wi,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=h(8,T),this.ia=0,this.pb=h(4,So),this.Pa=new nu,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ao),this.Hd=0,this.rb=Array(new la),this.sb=0,this.wa=Array(new Wr),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 _o),this.L=this.aa=0,this.gd=d([4,2],Wr),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 ri(c,y){return 0>c?0:c>y?y:c}function Rs(){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 ta(){var c=new jo;return c!=null&&(c.a=0,c.sc="OK",c.cb=0,c.Xb=0,sr||(sr=Os)),c}function Vn(c,y,S){return c.a==0&&(c.a=y,c.sc=S,c.cb=0),0}function ru(c,y,S){return 3<=S&&c[y+0]==157&&c[y+1]==1&&c[y+2]==42}function ua(c,y){if(c==null)return 0;if(c.a=0,c.sc="OK",y==null)return Vn(c,2,"null VP8Io passed to VP8GetHeaders()");var S=y.data,A=y.w,M=y.ha;if(4>M)return Vn(c,7,"Truncated header.");var D=S[A+0]|S[A+1]<<8|S[A+2]<<16,z=c.Od;if(z.Rb=!(1&D),z.td=D>>1&7,z.yd=D>>4&1,z.ub=D>>5,3<z.td)return Vn(c,3,"Incorrect keyframe parameters.");if(!z.yd)return Vn(c,4,"Frame not displayable.");A+=3,M-=3;var P=c.Kc;if(z.Rb){if(7>M)return Vn(c,7,"cannot parse picture header");if(!ru(S,A,M))return Vn(c,3,"Bad code word");P.c=16383&(S[A+4]<<8|S[A+3]),P.Td=S[A+4]>>6,P.i=16383&(S[A+6]<<8|S[A+5]),P.Ud=S[A+6]>>6,A+=7,M-=7,c.za=P.c+15>>4,c.Ub=P.i+15>>4,y.width=P.c,y.height=P.i,y.Da=0,y.j=0,y.v=0,y.va=y.width,y.o=y.height,y.da=0,y.ib=y.width,y.hb=y.height,y.U=y.width,y.T=y.height,o((D=c.Pa).jb,0,255,D.jb.length),n((D=c.Qa)!=null),D.Cb=0,D.Bb=0,D.Fb=1,o(D.Zb,0,0,D.Zb.length),o(D.Lb,0,0,D.Lb)}if(z.ub>M)return Vn(c,7,"bad partition length");ee(D=c.m,S,A,z.ub),A+=z.ub,M-=z.ub,z.Rb&&(P.Ld=Ce(D),P.Kd=Ce(D)),P=c.Qa;var I,$=c.Pa;if(n(D!=null),n(P!=null),P.Cb=Ce(D),P.Cb){if(P.Bb=Ce(D),Ce(D)){for(P.Fb=Ce(D),I=0;4>I;++I)P.Zb[I]=Ce(D)?le(D,7):0;for(I=0;4>I;++I)P.Lb[I]=Ce(D)?le(D,6):0}if(P.Bb)for(I=0;3>I;++I)$.jb[I]=Ce(D)?J(D,8):255}else P.Bb=0;if(D.Ka)return Vn(c,3,"cannot parse segment header");if((P=c.ed).zd=Ce(D),P.Tb=J(D,6),P.wb=J(D,3),P.Pc=Ce(D),P.Pc&&Ce(D)){for($=0;4>$;++$)Ce(D)&&(P.vd[$]=le(D,6));for($=0;4>$;++$)Ce(D)&&(P.od[$]=le(D,6))}if(c.L=P.Tb==0?0:P.zd?1:2,D.Ka)return Vn(c,3,"cannot parse filter header");var fe=M;if(M=I=A,A=I+fe,P=fe,c.Xb=(1<<J(c.m,2))-1,fe<3*($=c.Xb))S=7;else{for(I+=3*$,P-=3*$,fe=0;fe<$;++fe){var ke=S[M+0]|S[M+1]<<8|S[M+2]<<16;ke>P&&(ke=P),ee(c.Jc[+fe],S,I,ke),I+=ke,P-=ke,M+=3}ee(c.Jc[+$],S,I,P),S=I<A?0:5}if(S!=0)return Vn(c,S,"cannot parse partitions");for(S=J(I=c.m,7),M=Ce(I)?le(I,4):0,A=Ce(I)?le(I,4):0,P=Ce(I)?le(I,4):0,$=Ce(I)?le(I,4):0,I=Ce(I)?le(I,4):0,fe=c.Qa,ke=0;4>ke;++ke){if(fe.Cb){var K=fe.Zb[ke];fe.Fb||(K+=S)}else{if(0<ke){c.pb[ke]=c.pb[0];continue}K=S}var he=c.pb[ke];he.Sc[0]=Nl[ri(K+M,127)],he.Sc[1]=Ll[ri(K+0,127)],he.Eb[0]=2*Nl[ri(K+A,127)],he.Eb[1]=101581*Ll[ri(K+P,127)]>>16,8>he.Eb[1]&&(he.Eb[1]=8),he.Qc[0]=Nl[ri(K+$,117)],he.Qc[1]=Ll[ri(K+I,127)],he.lc=K+I}if(!z.Rb)return Vn(c,4,"Not a key frame.");for(Ce(D),z=c.Pa,S=0;4>S;++S){for(M=0;8>M;++M)for(A=0;3>A;++A)for(P=0;11>P;++P)$=ze(D,no[S][M][A][P])?J(D,8):li[S][M][A][P],z.Wc[S][M].Yb[A][P]=$;for(M=0;17>M;++M)z.Xc[S][M]=z.Wc[S][Cf[M]]}return c.kc=Ce(D),c.kc&&(c.Bd=J(D,8)),c.cb=1}function Os(c,y,S,A,M,D,z){var P=y[M].Yb[S];for(S=0;16>M;++M){if(!ze(c,P[S+0]))return M;for(;!ze(c,P[S+1]);)if(P=y[++M].Yb[0],S=0,M==16)return 16;var I=y[M+1].Yb;if(ze(c,P[S+2])){var $=c,fe=0;if(ze($,(K=P)[(ke=S)+3]))if(ze($,K[ke+6])){for(P=0,ke=2*(fe=ze($,K[ke+8]))+(K=ze($,K[ke+9+fe])),fe=0,K=Fn[ke];K[P];++P)fe+=fe+ze($,K[P]);fe+=3+(8<<ke)}else ze($,K[ke+7])?(fe=7+2*ze($,165),fe+=ze($,145)):fe=5+ze($,159);else fe=ze($,K[ke+4])?3+ze($,K[ke+5]):2;P=I[2]}else fe=1,P=I[1];I=z+un[M],0>($=c).b&&je($);var ke,K=$.b,he=(ke=$.Ca>>1)-($.I>>K)>>31;--$.b,$.Ca+=he,$.Ca|=1,$.I-=(ke+1&he)<<K,D[I]=((fe^he)-he)*A[(0<M)+0]}return 16}function Ji(c){var y=c.rb[c.sb-1];y.la=0,y.Na=0,o(c.zc,0,0,c.zc.length),c.ja=0}function ca(c,y,S,A,M){M=c[y+S+32*A]+(M>>3),c[y+S+32*A]=-256&M?0>M?0:255:M}function _r(c,y,S,A,M,D){ca(c,y,0,S,A+M),ca(c,y,1,S,A+D),ca(c,y,2,S,A-D),ca(c,y,3,S,A-M)}function Ba(c){return(20091*c>>16)+c}function yr(c,y,S,A){var M,D=0,z=u(16);for(M=0;4>M;++M){var P=c[y+0]+c[y+8],I=c[y+0]-c[y+8],$=(35468*c[y+4]>>16)-Ba(c[y+12]),fe=Ba(c[y+4])+(35468*c[y+12]>>16);z[D+0]=P+fe,z[D+1]=I+$,z[D+2]=I-$,z[D+3]=P-fe,D+=4,y++}for(M=D=0;4>M;++M)P=(c=z[D+0]+4)+z[D+8],I=c-z[D+8],$=(35468*z[D+4]>>16)-Ba(z[D+12]),ca(S,A,0,0,P+(fe=Ba(z[D+4])+(35468*z[D+12]>>16))),ca(S,A,1,0,I+$),ca(S,A,2,0,I-$),ca(S,A,3,0,P-fe),D++,A+=32}function ko(c,y,S,A){var M=c[y+0]+4,D=35468*c[y+4]>>16,z=Ba(c[y+4]),P=35468*c[y+1]>>16;_r(S,A,0,M+z,c=Ba(c[y+1]),P),_r(S,A,1,M+D,c,P),_r(S,A,2,M-D,c,P),_r(S,A,3,M-z,c,P)}function es(c,y,S,A,M){yr(c,y,S,A),M&&yr(c,y+16,S,A+4)}function au(c,y,S,A){Ya(c,y+0,S,A,1),Ya(c,y+32,S,A+128,1)}function iu(c,y,S,A){var M;for(c=c[y+0]+4,M=0;4>M;++M)for(y=0;4>y;++y)ca(S,A,y,M,c)}function Yr(c,y,S,A){c[y+0]&&Xn(c,y+0,S,A),c[y+16]&&Xn(c,y+16,S,A+4),c[y+32]&&Xn(c,y+32,S,A+128),c[y+48]&&Xn(c,y+48,S,A+128+4)}function su(c,y,S,A){var M,D=u(16);for(M=0;4>M;++M){var z=c[y+0+M]+c[y+12+M],P=c[y+4+M]+c[y+8+M],I=c[y+4+M]-c[y+8+M],$=c[y+0+M]-c[y+12+M];D[0+M]=z+P,D[8+M]=z-P,D[4+M]=$+I,D[12+M]=$-I}for(M=0;4>M;++M)z=(c=D[0+4*M]+3)+D[3+4*M],P=D[1+4*M]+D[2+4*M],I=D[1+4*M]-D[2+4*M],$=c-D[3+4*M],S[A+0]=z+P>>3,S[A+16]=$+I>>3,S[A+32]=z-P>>3,S[A+48]=$-I>>3,A+=64}function Ds(c,y,S){var A,M=y-32,D=vr,z=255-c[M-1];for(A=0;A<S;++A){var P,I=D,$=z+c[y-1];for(P=0;P<S;++P)c[y+P]=I[$+c[M+P]];y+=32}}function zs(c,y){Ds(c,y,4)}function Bs(c,y){Ds(c,y,8)}function dc(c,y){Ds(c,y,16)}function hc(c,y){var S;for(S=0;16>S;++S)i(c,y+32*S,c,y-32,16)}function No(c,y){var S;for(S=16;0<S;--S)o(c,y,c[y-1],16),y+=32}function ai(c,y,S){var A;for(A=0;16>A;++A)o(y,S+32*A,c,16)}function Lo(c,y){var S,A=16;for(S=0;16>S;++S)A+=c[y-1+32*S]+c[y+S-32];ai(A>>5,c,y)}function fa(c,y){var S,A=8;for(S=0;16>S;++S)A+=c[y-1+32*S];ai(A>>4,c,y)}function ts(c,y){var S,A=8;for(S=0;16>S;++S)A+=c[y+S-32];ai(A>>4,c,y)}function ns(c,y){ai(128,c,y)}function kt(c,y,S){return c+2*y+S+2>>2}function ou(c,y){var S,A=y-32;for(A=new Uint8Array([kt(c[A-1],c[A+0],c[A+1]),kt(c[A+0],c[A+1],c[A+2]),kt(c[A+1],c[A+2],c[A+3]),kt(c[A+2],c[A+3],c[A+4])]),S=0;4>S;++S)i(c,y+32*S,A,0,A.length)}function Ps(c,y){var S=c[y-1],A=c[y-1+32],M=c[y-1+64],D=c[y-1+96];We(c,y+0,16843009*kt(c[y-1-32],S,A)),We(c,y+32,16843009*kt(S,A,M)),We(c,y+64,16843009*kt(A,M,D)),We(c,y+96,16843009*kt(M,D,D))}function Pa(c,y){var S,A=4;for(S=0;4>S;++S)A+=c[y+S-32]+c[y-1+32*S];for(A>>=3,S=0;4>S;++S)o(c,y+32*S,A,4)}function xl(c,y){var S=c[y-1+0],A=c[y-1+32],M=c[y-1+64],D=c[y-1-32],z=c[y+0-32],P=c[y+1-32],I=c[y+2-32],$=c[y+3-32];c[y+0+96]=kt(A,M,c[y-1+96]),c[y+1+96]=c[y+0+64]=kt(S,A,M),c[y+2+96]=c[y+1+64]=c[y+0+32]=kt(D,S,A),c[y+3+96]=c[y+2+64]=c[y+1+32]=c[y+0+0]=kt(z,D,S),c[y+3+64]=c[y+2+32]=c[y+1+0]=kt(P,z,D),c[y+3+32]=c[y+2+0]=kt(I,P,z),c[y+3+0]=kt($,I,P)}function qs(c,y){var S=c[y+1-32],A=c[y+2-32],M=c[y+3-32],D=c[y+4-32],z=c[y+5-32],P=c[y+6-32],I=c[y+7-32];c[y+0+0]=kt(c[y+0-32],S,A),c[y+1+0]=c[y+0+32]=kt(S,A,M),c[y+2+0]=c[y+1+32]=c[y+0+64]=kt(A,M,D),c[y+3+0]=c[y+2+32]=c[y+1+64]=c[y+0+96]=kt(M,D,z),c[y+3+32]=c[y+2+64]=c[y+1+96]=kt(D,z,P),c[y+3+64]=c[y+2+96]=kt(z,P,I),c[y+3+96]=kt(P,I,I)}function Tr(c,y){var S=c[y-1+0],A=c[y-1+32],M=c[y-1+64],D=c[y-1-32],z=c[y+0-32],P=c[y+1-32],I=c[y+2-32],$=c[y+3-32];c[y+0+0]=c[y+1+64]=D+z+1>>1,c[y+1+0]=c[y+2+64]=z+P+1>>1,c[y+2+0]=c[y+3+64]=P+I+1>>1,c[y+3+0]=I+$+1>>1,c[y+0+96]=kt(M,A,S),c[y+0+64]=kt(A,S,D),c[y+0+32]=c[y+1+96]=kt(S,D,z),c[y+1+32]=c[y+2+96]=kt(D,z,P),c[y+2+32]=c[y+3+96]=kt(z,P,I),c[y+3+32]=kt(P,I,$)}function qa(c,y){var S=c[y+0-32],A=c[y+1-32],M=c[y+2-32],D=c[y+3-32],z=c[y+4-32],P=c[y+5-32],I=c[y+6-32],$=c[y+7-32];c[y+0+0]=S+A+1>>1,c[y+1+0]=c[y+0+64]=A+M+1>>1,c[y+2+0]=c[y+1+64]=M+D+1>>1,c[y+3+0]=c[y+2+64]=D+z+1>>1,c[y+0+32]=kt(S,A,M),c[y+1+32]=c[y+0+96]=kt(A,M,D),c[y+2+32]=c[y+1+96]=kt(M,D,z),c[y+3+32]=c[y+2+96]=kt(D,z,P),c[y+3+64]=kt(z,P,I),c[y+3+96]=kt(P,I,$)}function Eo(c,y){var S=c[y-1+0],A=c[y-1+32],M=c[y-1+64],D=c[y-1+96];c[y+0+0]=S+A+1>>1,c[y+2+0]=c[y+0+32]=A+M+1>>1,c[y+2+32]=c[y+0+64]=M+D+1>>1,c[y+1+0]=kt(S,A,M),c[y+3+0]=c[y+1+32]=kt(A,M,D),c[y+3+32]=c[y+1+64]=kt(M,D,D),c[y+3+64]=c[y+2+64]=c[y+0+96]=c[y+1+96]=c[y+2+96]=c[y+3+96]=D}function lu(c,y){var S=c[y-1+0],A=c[y-1+32],M=c[y-1+64],D=c[y-1+96],z=c[y-1-32],P=c[y+0-32],I=c[y+1-32],$=c[y+2-32];c[y+0+0]=c[y+2+32]=S+z+1>>1,c[y+0+32]=c[y+2+64]=A+S+1>>1,c[y+0+64]=c[y+2+96]=M+A+1>>1,c[y+0+96]=D+M+1>>1,c[y+3+0]=kt(P,I,$),c[y+2+0]=kt(z,P,I),c[y+1+0]=c[y+3+32]=kt(S,z,P),c[y+1+32]=c[y+3+64]=kt(A,S,z),c[y+1+64]=c[y+3+96]=kt(M,A,S),c[y+1+96]=kt(D,M,A)}function Si(c,y){var S;for(S=0;8>S;++S)i(c,y+32*S,c,y-32,8)}function rs(c,y){var S;for(S=0;8>S;++S)o(c,y,c[y-1],8),y+=32}function Ua(c,y,S){var A;for(A=0;8>A;++A)o(y,S+32*A,c,8)}function Cr(c,y){var S,A=8;for(S=0;8>S;++S)A+=c[y+S-32]+c[y-1+32*S];Ua(A>>4,c,y)}function wa(c,y){var S,A=4;for(S=0;8>S;++S)A+=c[y+S-32];Ua(A>>3,c,y)}function To(c,y){var S,A=4;for(S=0;8>S;++S)A+=c[y-1+32*S];Ua(A>>3,c,y)}function _i(c,y){Ua(128,c,y)}function as(c,y,S){var A=c[y-S],M=c[y+0],D=3*(M-A)+bu[1020+c[y-2*S]-c[y+S]],z=Zs[112+(D+4>>3)];c[y-S]=vr[255+A+Zs[112+(D+3>>3)]],c[y+0]=vr[255+M-z]}function Us(c,y,S,A){var M=c[y+0],D=c[y+S];return La[255+c[y-2*S]-c[y-S]]>A||La[255+D-M]>A}function Ai(c,y,S,A){return 4*La[255+c[y-S]-c[y+0]]+La[255+c[y-2*S]-c[y+S]]<=A}function ji(c,y,S,A,M){var D=c[y-3*S],z=c[y-2*S],P=c[y-S],I=c[y+0],$=c[y+S],fe=c[y+2*S],ke=c[y+3*S];return 4*La[255+P-I]+La[255+z-$]>A?0:La[255+c[y-4*S]-D]<=M&&La[255+D-z]<=M&&La[255+z-P]<=M&&La[255+ke-fe]<=M&&La[255+fe-$]<=M&&La[255+$-I]<=M}function ki(c,y,S,A){var M=2*A+1;for(A=0;16>A;++A)Ai(c,y+A,S,M)&&as(c,y+A,S)}function Co(c,y,S,A){var M=2*A+1;for(A=0;16>A;++A)Ai(c,y+A*S,1,M)&&as(c,y+A*S,1)}function Mo(c,y,S,A){var M;for(M=3;0<M;--M)ki(c,y+=4*S,S,A)}function uu(c,y,S,A){var M;for(M=3;0<M;--M)Co(c,y+=4,S,A)}function Ni(c,y,S,A,M,D,z,P){for(D=2*D+1;0<M--;){if(ji(c,y,S,D,z))if(Us(c,y,S,P))as(c,y,S);else{var I=c,$=y,fe=S,ke=I[$-2*fe],K=I[$-fe],he=I[$+0],be=I[$+fe],Me=I[$+2*fe],Ae=27*(Oe=bu[1020+3*(he-K)+bu[1020+ke-be]])+63>>7,De=18*Oe+63>>7,Oe=9*Oe+63>>7;I[$-3*fe]=vr[255+I[$-3*fe]+Oe],I[$-2*fe]=vr[255+ke+De],I[$-fe]=vr[255+K+Ae],I[$+0]=vr[255+he-Ae],I[$+fe]=vr[255+be-De],I[$+2*fe]=vr[255+Me-Oe]}y+=A}}function Fa(c,y,S,A,M,D,z,P){for(D=2*D+1;0<M--;){if(ji(c,y,S,D,z))if(Us(c,y,S,P))as(c,y,S);else{var I=c,$=y,fe=S,ke=I[$-fe],K=I[$+0],he=I[$+fe],be=Zs[112+(4+(Me=3*(K-ke))>>3)],Me=Zs[112+(Me+3>>3)],Ae=be+1>>1;I[$-2*fe]=vr[255+I[$-2*fe]+Ae],I[$-fe]=vr[255+ke+Me],I[$+0]=vr[255+K-be],I[$+fe]=vr[255+he-Ae]}y+=A}}function cu(c,y,S,A,M,D){Ni(c,y,S,1,16,A,M,D)}function fu(c,y,S,A,M,D){Ni(c,y,1,S,16,A,M,D)}function du(c,y,S,A,M,D){var z;for(z=3;0<z;--z)Fa(c,y+=4*S,S,1,16,A,M,D)}function Fs(c,y,S,A,M,D){var z;for(z=3;0<z;--z)Fa(c,y+=4,1,S,16,A,M,D)}function hu(c,y,S,A,M,D,z,P){Ni(c,y,M,1,8,D,z,P),Ni(S,A,M,1,8,D,z,P)}function x(c,y,S,A,M,D,z,P){Ni(c,y,1,M,8,D,z,P),Ni(S,A,1,M,8,D,z,P)}function C(c,y,S,A,M,D,z,P){Fa(c,y+4*M,M,1,8,D,z,P),Fa(S,A+4*M,M,1,8,D,z,P)}function Q(c,y,S,A,M,D,z,P){Fa(c,y+4,1,M,8,D,z,P),Fa(S,A+4,1,M,8,D,z,P)}function ue(){this.ba=new Ct,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new nn,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function pe(){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 Re(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Fe(){this.ua=0,this.Wa=new xt,this.vb=new xt,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new ve,this.yc=new ne}function st(){this.xb=this.a=0,this.l=new Rs,this.ca=new Ct,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new q,this.Pb=0,this.wd=new q,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Fe,this.ab=0,this.gc=h(4,Re),this.Oc=0}function at(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Rs,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Mt(c,y,S,A,M,D,z){for(c=c==null?0:c[y+0],y=0;y<z;++y)M[D+y]=c+S[A+y]&255,c=M[D+y]}function Ft(c,y,S,A,M,D,z){var P;if(c==null)Mt(null,null,S,A,M,D,z);else for(P=0;P<z;++P)M[D+P]=c[y+P]+S[A+P]&255}function Jt(c,y,S,A,M,D,z){if(c==null)Mt(null,null,S,A,M,D,z);else{var P,I=c[y+0],$=I,fe=I;for(P=0;P<z;++P)$=fe+(I=c[y+P])-$,fe=S[A+P]+(-256&$?0>$?0:255:$)&255,$=I,M[D+P]=fe}}function tr(c,y,S,A){var M=y.width,D=y.o;if(n(c!=null&&y!=null),0>S||0>=A||S+A>D)return null;if(!c.Cc){if(c.ga==null){var z;if(c.ga=new at,(z=c.ga==null)||(z=y.width*y.o,n(c.Gb.length==0),c.Gb=u(z),c.Uc=0,c.Gb==null?z=0:(c.mb=c.Gb,c.nb=c.Uc,c.rc=null,z=1),z=!z),!z){z=c.ga;var P=c.Fa,I=c.P,$=c.qc,fe=c.mb,ke=c.nb,K=I+1,he=$-1,be=z.l;if(n(P!=null&&fe!=null&&y!=null),ui[0]=null,ui[1]=Mt,ui[2]=Ft,ui[3]=Jt,z.ca=fe,z.tb=ke,z.c=y.width,z.i=y.height,n(0<z.c&&0<z.i),1>=$)y=0;else if(z.$a=3&P[I+0],z.Z=P[I+0]>>2&3,z.Lc=P[I+0]>>4&3,I=P[I+0]>>6&3,0>z.$a||1<z.$a||4<=z.Z||1<z.Lc||I)y=0;else if(be.put=jt,be.ac=Oa,be.bc=Lr,be.ma=z,be.width=y.width,be.height=y.height,be.Da=y.Da,be.v=y.v,be.va=y.va,be.j=y.j,be.o=y.o,z.$a)e:{n(z.$a==1),y=Rn();t:for(;;){if(y==null){y=0;break e}if(n(z!=null),z.mc=y,y.c=z.c,y.i=z.i,y.l=z.l,y.l.ma=z,y.l.width=z.c,y.l.height=z.i,y.a=0,Le(y.m,P,K,he),!Da(z.c,z.i,1,y,null)||(y.ab==1&&y.gc[0].hc==3&&oa(y.s)?(z.ic=1,P=y.c*y.i,y.Ta=null,y.Ua=0,y.V=u(P),y.Ba=0,y.V==null?(y.a=1,y=0):y=1):(z.ic=0,y=Zi(y,z.c)),!y))break t;y=1;break e}z.mc=null,y=0}else y=he>=z.c*z.i;z=!y}if(z)return null;c.ga.Lc!=1?c.Ga=0:A=D-S}n(c.ga!=null),n(S+A<=D);e:{if(y=(P=c.ga).c,D=P.l.o,P.$a==0){if(K=c.rc,he=c.Vc,be=c.Fa,I=c.P+1+S*y,$=c.mb,fe=c.nb+S*y,n(I<=c.P+c.qc),P.Z!=0)for(n(ui[P.Z]!=null),z=0;z<A;++z)ui[P.Z](K,he,be,I,$,fe,y),K=$,he=fe,fe+=y,I+=y;else for(z=0;z<A;++z)i($,fe,be,I,y),K=$,he=fe,fe+=y,I+=y;c.rc=K,c.Vc=he}else{if(n(P.mc!=null),y=S+A,n((z=P.mc)!=null),n(y<=z.i),z.C>=y)y=1;else if(P.ic||Bn(),P.ic){P=z.V,K=z.Ba,he=z.c;var Me=z.i,Ae=(be=1,I=z.$/he,$=z.$%he,fe=z.m,ke=z.s,z.$),De=he*Me,Oe=he*y,He=ke.wc,qe=Ae<Oe?wr(ke,$,I):null;n(Ae<=De),n(y<=Me),n(oa(ke));t:for(;;){for(;!fe.h&&Ae<Oe;){if($&He||(qe=wr(ke,$,I)),n(qe!=null),ye(fe),256>(Me=Mn(qe.G[0],qe.H[0],fe)))P[K+Ae]=Me,++Ae,++$>=he&&($=0,++I<=y&&!(I%16)&&Er(z,I));else{if(!(280>Me)){be=0;break t}Me=kn(Me-256,fe);var ft,et=Mn(qe.G[4],qe.H[4],fe);if(ye(fe),!(Ae>=(et=xr(he,et=kn(et,fe)))&&De-Ae>=Me)){be=0;break t}for(ft=0;ft<Me;++ft)P[K+Ae+ft]=P[K+Ae+ft-et];for(Ae+=Me,$+=Me;$>=he;)$-=he,++I<=y&&!(I%16)&&Er(z,I);Ae<Oe&&$&He&&(qe=wr(ke,$,I))}n(fe.h==te(fe))}Er(z,I>y?y:I);break t}!be||fe.h&&Ae<De?(be=0,z.a=fe.h?5:3):z.$=Ae,y=be}else y=Hr(z,z.V,z.Ba,z.c,z.i,y,xa);if(!y){A=0;break e}}S+A>=D&&(c.Cc=1),A=1}if(!A)return null;if(c.Cc&&((A=c.ga)!=null&&(A.mc=null),c.ga=null,0<c.Ga))return alert("todo:WebPDequantizeLevels"),null}return c.nb+S*M}function mn(c,y,S,A,M,D){for(;0<M--;){var z,P=c,I=y+(S?1:0),$=c,fe=y+(S?0:3);for(z=0;z<A;++z){var ke=$[fe+4*z];ke!=255&&(ke*=32897,P[I+4*z+0]=P[I+4*z+0]*ke>>23,P[I+4*z+1]=P[I+4*z+1]*ke>>23,P[I+4*z+2]=P[I+4*z+2]*ke>>23)}y+=D}}function gn(c,y,S,A,M){for(;0<A--;){var D;for(D=0;D<S;++D){var z=c[y+2*D+0],P=15&($=c[y+2*D+1]),I=4369*P,$=(240&$|$>>4)*I>>16;c[y+2*D+0]=(240&z|z>>4)*I>>16&240|(15&z|z<<4)*I>>16>>4&15,c[y+2*D+1]=240&$|P}y+=M}}function Nn(c,y,S,A,M,D,z,P){var I,$,fe=255;for($=0;$<M;++$){for(I=0;I<A;++I){var ke=c[y+I];D[z+4*I]=ke,fe&=ke}y+=S,z+=P}return fe!=255}function zn(c,y,S,A,M){var D;for(D=0;D<M;++D)S[A+D]=c[y+D]>>8}function Bn(){Uo=mn,da=gn,ha=Nn,Ks=zn}function Mr(c,y,S){Z[c]=function(A,M,D,z,P,I,$,fe,ke,K,he,be,Me,Ae,De,Oe,He){var qe,ft=He-1>>1,et=P[I+0]|$[fe+0]<<16,zt=ke[K+0]|he[be+0]<<16;n(A!=null);var tt=3*et+zt+131074>>2;for(y(A[M+0],255&tt,tt>>16,Me,Ae),D!=null&&(tt=3*zt+et+131074>>2,y(D[z+0],255&tt,tt>>16,De,Oe)),qe=1;qe<=ft;++qe){var Qt=P[I+qe]|$[fe+qe]<<16,rr=ke[K+qe]|he[be+qe]<<16,Rt=et+Qt+zt+rr+524296,nt=Rt+2*(Qt+zt)>>3;tt=nt+et>>1,et=(Rt=Rt+2*(et+rr)>>3)+Qt>>1,y(A[M+2*qe-1],255&tt,tt>>16,Me,Ae+(2*qe-1)*S),y(A[M+2*qe-0],255&et,et>>16,Me,Ae+(2*qe-0)*S),D!=null&&(tt=Rt+zt>>1,et=nt+rr>>1,y(D[z+2*qe-1],255&tt,tt>>16,De,Oe+(2*qe-1)*S),y(D[z+2*qe+0],255&et,et>>16,De,Oe+(2*qe+0)*S)),et=Qt,zt=rr}1&He||(tt=3*et+zt+131074>>2,y(A[M+He-1],255&tt,tt>>16,Me,Ae+(He-1)*S),D!=null&&(tt=3*zt+et+131074>>2,y(D[z+He-1],255&tt,tt>>16,De,Oe+(He-1)*S)))}}function Ia(){br[Dr]=Pi,br[Fo]=ci,br[oi]=gs,br[jl]=Su,br[Js]=_u,br[Ri]=Wo,br[xu]=Au,br[kl]=ci,br[hs]=Su,br[Oi]=_u,br[Io]=Wo}function Li(c){return c&-16384?0>c?0:255:c>>ch}function Is(c,y){return Li((19077*c>>8)+(26149*y>>8)-14234)}function is(c,y,S){return Li((19077*c>>8)-(6419*y>>8)-(13320*S>>8)+8708)}function Ei(c,y){return Li((19077*c>>8)+(33050*y>>8)-17685)}function ss(c,y,S,A,M){A[M+0]=Is(c,S),A[M+1]=is(c,y,S),A[M+2]=Ei(c,y)}function Hs(c,y,S,A,M){A[M+0]=Ei(c,y),A[M+1]=is(c,y,S),A[M+2]=Is(c,S)}function Ws(c,y,S,A,M){var D=is(c,y,S);y=D<<3&224|Ei(c,y)>>3,A[M+0]=248&Is(c,S)|D>>5,A[M+1]=y}function Qn(c,y,S,A,M){var D=240&Ei(c,y)|15;A[M+0]=240&Is(c,S)|is(c,y,S)>>4,A[M+1]=D}function Ys(c,y,S,A,M){A[M+0]=255,ss(c,y,S,A,M+1)}function Gs(c,y,S,A,M){Hs(c,y,S,A,M),A[M+3]=255}function wl(c,y,S,A,M){ss(c,y,S,A,M),A[M+3]=255}function Ha(c,y,S){Z[c]=function(A,M,D,z,P,I,$,fe,ke){for(var K=fe+(-2&ke)*S;fe!=K;)y(A[M+0],D[z+0],P[I+0],$,fe),y(A[M+1],D[z+0],P[I+0],$,fe+S),M+=2,++z,++I,fe+=2*S;1&ke&&y(A[M+0],D[z+0],P[I+0],$,fe)}}function Rr(c,y,S){return S==0?c==0?y==0?6:5:y==0?4:0:S}function os(c,y,S,A,M){switch(c>>>30){case 3:Ya(y,S,A,M,0);break;case 2:Mi(y,S,A,M);break;case 1:Xn(y,S,A,M)}}function ii(c,y){var S,A,M=y.M,D=y.Nb,z=c.oc,P=c.pc+40,I=c.oc,$=c.pc+584,fe=c.oc,ke=c.pc+600;for(S=0;16>S;++S)z[P+32*S-1]=129;for(S=0;8>S;++S)I[$+32*S-1]=129,fe[ke+32*S-1]=129;for(0<M?z[P-1-32]=I[$-1-32]=fe[ke-1-32]=129:(o(z,P-32-1,127,21),o(I,$-32-1,127,9),o(fe,ke-32-1,127,9)),A=0;A<c.za;++A){var K=y.ya[y.aa+A];if(0<A){for(S=-1;16>S;++S)i(z,P+32*S-4,z,P+32*S+12,4);for(S=-1;8>S;++S)i(I,$+32*S-4,I,$+32*S+4,4),i(fe,ke+32*S-4,fe,ke+32*S+4,4)}var he=c.Gd,be=c.Hd+A,Me=K.ad,Ae=K.Hc;if(0<M&&(i(z,P-32,he[be].y,0,16),i(I,$-32,he[be].f,0,8),i(fe,ke-32,he[be].ea,0,8)),K.Za){var De=z,Oe=P-32+16;for(0<M&&(A>=c.za-1?o(De,Oe,he[be].y[15],4):i(De,Oe,he[be+1].y,0,4)),S=0;4>S;S++)De[Oe+128+S]=De[Oe+256+S]=De[Oe+384+S]=De[Oe+0+S];for(S=0;16>S;++S,Ae<<=2)De=z,Oe=P+ro[S],Qr[K.Ob[S]](De,Oe),os(Ae,Me,16*+S,De,Oe)}else if(De=Rr(A,M,K.Ob[0]),Bi[De](z,P),Ae!=0)for(S=0;16>S;++S,Ae<<=2)os(Ae,Me,16*+S,z,P+ro[S]);for(S=K.Gc,De=Rr(A,M,K.Dd),ga[De](I,$),ga[De](fe,ke),Ae=Me,De=I,Oe=$,255&(K=0|S)&&(170&K?ja(Ae,256,De,Oe):ka(Ae,256,De,Oe)),K=fe,Ae=ke,255&(S>>=8)&&(170&S?ja(Me,320,K,Ae):ka(Me,320,K,Ae)),M<c.Ub-1&&(i(he[be].y,0,z,P+480,16),i(he[be].f,0,I,$+224,8),i(he[be].ea,0,fe,ke+224,8)),S=8*D*c.B,he=c.sa,be=c.ta+16*A+16*D*c.R,Me=c.qa,K=c.ra+8*A+S,Ae=c.Ha,De=c.Ia+8*A+S,S=0;16>S;++S)i(he,be+S*c.R,z,P+32*S,16);for(S=0;8>S;++S)i(Me,K+S*c.B,I,$+32*S,8),i(Ae,De+S*c.B,fe,ke+32*S,8)}}function pu(c,y,S,A,M,D,z,P,I){var $=[0],fe=[0],ke=0,K=I!=null?I.kd:0,he=I??new pe;if(c==null||12>S)return 7;he.data=c,he.w=y,he.ha=S,y=[y],S=[S],he.gb=[he.gb];e:{var be=y,Me=S,Ae=he.gb;if(n(c!=null),n(Me!=null),n(Ae!=null),Ae[0]=0,12<=Me[0]&&!a(c,be[0],"RIFF")){if(a(c,be[0]+8,"WEBP")){Ae=3;break e}var De=dt(c,be[0]+4);if(12>De||4294967286<De){Ae=3;break e}if(K&&De>Me[0]-8){Ae=7;break e}Ae[0]=De,be[0]+=12,Me[0]-=12}Ae=0}if(Ae!=0)return Ae;for(De=0<he.gb[0],S=S[0];;){e:{var Oe=c;Me=y,Ae=S;var He=$,qe=fe,ft=be=[0];if((tt=ke=[ke])[0]=0,8>Ae[0])Ae=7;else{if(!a(Oe,Me[0],"VP8X")){if(dt(Oe,Me[0]+4)!=10){Ae=3;break e}if(18>Ae[0]){Ae=7;break e}var et=dt(Oe,Me[0]+8),zt=1+Ve(Oe,Me[0]+12);if(2147483648<=zt*(Oe=1+Ve(Oe,Me[0]+15))){Ae=3;break e}ft!=null&&(ft[0]=et),He!=null&&(He[0]=zt),qe!=null&&(qe[0]=Oe),Me[0]+=18,Ae[0]-=18,tt[0]=1}Ae=0}}if(ke=ke[0],be=be[0],Ae!=0)return Ae;if(Me=!!(2&be),!De&&ke)return 3;if(D!=null&&(D[0]=!!(16&be)),z!=null&&(z[0]=Me),P!=null&&(P[0]=0),z=$[0],be=fe[0],ke&&Me&&I==null){Ae=0;break}if(4>S){Ae=7;break}if(De&&ke||!De&&!ke&&!a(c,y[0],"ALPH")){S=[S],he.na=[he.na],he.P=[he.P],he.Sa=[he.Sa];e:{et=c,Ae=y,De=S;var tt=he.gb;He=he.na,qe=he.P,ft=he.Sa,zt=22,n(et!=null),n(De!=null),Oe=Ae[0];var Qt=De[0];for(n(He!=null),n(ft!=null),He[0]=null,qe[0]=null,ft[0]=0;;){if(Ae[0]=Oe,De[0]=Qt,8>Qt){Ae=7;break e}var rr=dt(et,Oe+4);if(4294967286<rr){Ae=3;break e}var Rt=8+rr+1&-2;if(zt+=Rt,0<tt&&zt>tt){Ae=3;break e}if(!a(et,Oe,"VP8 ")||!a(et,Oe,"VP8L")){Ae=0;break e}if(Qt[0]<Rt){Ae=7;break e}a(et,Oe,"ALPH")||(He[0]=et,qe[0]=Oe+8,ft[0]=rr),Oe+=Rt,Qt-=Rt}}if(S=S[0],he.na=he.na[0],he.P=he.P[0],he.Sa=he.Sa[0],Ae!=0)break}S=[S],he.Ja=[he.Ja],he.xa=[he.xa];e:if(tt=c,Ae=y,De=S,He=he.gb[0],qe=he.Ja,ft=he.xa,et=Ae[0],Oe=!a(tt,et,"VP8 "),zt=!a(tt,et,"VP8L"),n(tt!=null),n(De!=null),n(qe!=null),n(ft!=null),8>De[0])Ae=7;else{if(Oe||zt){if(tt=dt(tt,et+4),12<=He&&tt>He-12){Ae=3;break e}if(K&&tt>De[0]-8){Ae=7;break e}qe[0]=tt,Ae[0]+=8,De[0]-=8,ft[0]=zt}else ft[0]=5<=De[0]&&tt[et+0]==47&&!(tt[et+4]>>5),qe[0]=De[0];Ae=0}if(S=S[0],he.Ja=he.Ja[0],he.xa=he.xa[0],y=y[0],Ae!=0)break;if(4294967286<he.Ja)return 3;if(P==null||Me||(P[0]=he.xa?2:1),z=[z],be=[be],he.xa){if(5>S){Ae=7;break}P=z,K=be,Me=D,c==null||5>S?c=0:5<=S&&c[y+0]==47&&!(c[y+4]>>5)?(De=[0],tt=[0],He=[0],Le(qe=new q,c,y,S),Cn(qe,De,tt,He)?(P!=null&&(P[0]=De[0]),K!=null&&(K[0]=tt[0]),Me!=null&&(Me[0]=He[0]),c=1):c=0):c=0}else{if(10>S){Ae=7;break}P=be,c==null||10>S||!ru(c,y+3,S-3)?c=0:(K=c[y+0]|c[y+1]<<8|c[y+2]<<16,Me=16383&(c[y+7]<<8|c[y+6]),c=16383&(c[y+9]<<8|c[y+8]),1&K||3<(K>>1&7)||!(K>>4&1)||K>>5>=he.Ja||!Me||!c?c=0:(z&&(z[0]=Me),P&&(P[0]=c),c=1))}if(!c||(z=z[0],be=be[0],ke&&($[0]!=z||fe[0]!=be)))return 3;I!=null&&(I[0]=he,I.offset=y-I.w,n(4294967286>y-I.w),n(I.offset==I.ha-S));break}return Ae==0||Ae==7&&ke&&I==null?(D!=null&&(D[0]|=he.na!=null&&0<he.na.length),A!=null&&(A[0]=z),M!=null&&(M[0]=be),0):Ae}function Gr(c,y,S){var A=y.width,M=y.height,D=0,z=0,P=A,I=M;if(y.Da=c!=null&&0<c.Da,y.Da&&(P=c.cd,I=c.bd,D=c.v,z=c.j,11>S||(D&=-2,z&=-2),0>D||0>z||0>=P||0>=I||D+P>A||z+I>M))return 0;if(y.v=D,y.j=z,y.va=D+P,y.o=z+I,y.U=P,y.T=I,y.da=c!=null&&0<c.da,y.da){if(!ut(P,I,S=[c.ib],D=[c.hb]))return 0;y.ib=S[0],y.hb=D[0]}return y.ob=c!=null&&c.ob,y.Kb=c==null||!c.Sd,y.da&&(y.ob=y.ib<3*A/4&&y.hb<3*M/4,y.Kb=0),1}function ls(c){if(c==null)return 2;if(11>c.S){var y=c.f.RGBA;y.fb+=(c.height-1)*y.A,y.A=-y.A}else y=c.f.kb,c=c.height,y.O+=(c-1)*y.fa,y.fa=-y.fa,y.N+=(c-1>>1)*y.Ab,y.Ab=-y.Ab,y.W+=(c-1>>1)*y.Db,y.Db=-y.Db,y.F!=null&&(y.J+=(c-1)*y.lb,y.lb=-y.lb);return 0}function Ro(c,y,S,A){if(A==null||0>=c||0>=y)return 2;if(S!=null){if(S.Da){var M=S.cd,D=S.bd,z=-2&S.v,P=-2&S.j;if(0>z||0>P||0>=M||0>=D||z+M>c||P+D>y)return 2;c=M,y=D}if(S.da){if(!ut(c,y,M=[S.ib],D=[S.hb]))return 2;c=M[0],y=D[0]}}A.width=c,A.height=y;e:{var I=A.width,$=A.height;if(c=A.S,0>=I||0>=$||!(c>=Dr&&13>c))c=2;else{if(0>=A.Rd&&A.sd==null){z=D=M=y=0;var fe=(P=I*Df[c])*$;if(11>c||(D=($+1)/2*(y=(I+1)/2),c==12&&(z=(M=I)*$)),($=u(fe+2*D+z))==null){c=1;break e}A.sd=$,11>c?((I=A.f.RGBA).eb=$,I.fb=0,I.A=P,I.size=fe):((I=A.f.kb).y=$,I.O=0,I.fa=P,I.Fd=fe,I.f=$,I.N=0+fe,I.Ab=y,I.Cd=D,I.ea=$,I.W=0+fe+D,I.Db=y,I.Ed=D,c==12&&(I.F=$,I.J=0+fe+2*D),I.Tc=z,I.lb=M)}if(y=1,M=A.S,D=A.width,z=A.height,M>=Dr&&13>M)if(11>M)c=A.f.RGBA,y&=(P=Math.abs(c.A))*(z-1)+D<=c.size,y&=P>=D*Df[M],y&=c.eb!=null;else{c=A.f.kb,P=(D+1)/2,fe=(z+1)/2,I=Math.abs(c.fa),$=Math.abs(c.Ab);var ke=Math.abs(c.Db),K=Math.abs(c.lb),he=K*(z-1)+D;y&=I*(z-1)+D<=c.Fd,y&=$*(fe-1)+P<=c.Cd,y=(y&=ke*(fe-1)+P<=c.Ed)&I>=D&$>=P&ke>=P,y&=c.y!=null,y&=c.f!=null,y&=c.ea!=null,M==12&&(y&=K>=D,y&=he<=c.Tc,y&=c.F!=null)}else y=0;c=y?0:2}}return c!=0||S!=null&&S.fd&&(c=ls(A)),c}var us=64,Ti=[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],Oo=24,Or=32,Vr=8,Do=[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];Ze("Predictor0","PredictorAdd0"),Z.Predictor0=function(){return 4278190080},Z.Predictor1=function(c){return c},Z.Predictor2=function(c,y,S){return y[S+0]},Z.Predictor3=function(c,y,S){return y[S+1]},Z.Predictor4=function(c,y,S){return y[S-1]},Z.Predictor5=function(c,y,S){return ht(ht(c,y[S+1]),y[S+0])},Z.Predictor6=function(c,y,S){return ht(c,y[S-1])},Z.Predictor7=function(c,y,S){return ht(c,y[S+0])},Z.Predictor8=function(c,y,S){return ht(y[S-1],y[S+0])},Z.Predictor9=function(c,y,S){return ht(y[S+0],y[S+1])},Z.Predictor10=function(c,y,S){return ht(ht(c,y[S-1]),ht(y[S+0],y[S+1]))},Z.Predictor11=function(c,y,S){var A=y[S+0];return 0>=wt(A>>24&255,c>>24&255,(y=y[S-1])>>24&255)+wt(A>>16&255,c>>16&255,y>>16&255)+wt(A>>8&255,c>>8&255,y>>8&255)+wt(255&A,255&c,255&y)?A:c},Z.Predictor12=function(c,y,S){var A=y[S+0];return(Wt((c>>24&255)+(A>>24&255)-((y=y[S-1])>>24&255))<<24|Wt((c>>16&255)+(A>>16&255)-(y>>16&255))<<16|Wt((c>>8&255)+(A>>8&255)-(y>>8&255))<<8|Wt((255&c)+(255&A)-(255&y)))>>>0},Z.Predictor13=function(c,y,S){var A=y[S-1];return(Gt((c=ht(c,y[S+0]))>>24&255,A>>24&255)<<24|Gt(c>>16&255,A>>16&255)<<16|Gt(c>>8&255,A>>8&255)<<8|Gt(255&c,255&A))>>>0};var cs=Z.PredictorAdd0;Z.PredictorAdd1=_t,Ze("Predictor2","PredictorAdd2"),Ze("Predictor3","PredictorAdd3"),Ze("Predictor4","PredictorAdd4"),Ze("Predictor5","PredictorAdd5"),Ze("Predictor6","PredictorAdd6"),Ze("Predictor7","PredictorAdd7"),Ze("Predictor8","PredictorAdd8"),Ze("Predictor9","PredictorAdd9"),Ze("Predictor10","PredictorAdd10"),Ze("Predictor11","PredictorAdd11"),Ze("Predictor12","PredictorAdd12"),Ze("Predictor13","PredictorAdd13");var fs=Z.PredictorAdd2;pt("ColorIndexInverseTransform","MapARGB","32b",function(c){return c>>8&255},function(c){return c}),pt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(c){return c},function(c){return c>>8&255});var zo,Vs=Z.ColorIndexInverseTransform,rn=Z.MapARGB,Qs=Z.VP8LColorIndexInverseTransformAlpha,Wa=Z.MapAlpha,Sa=Z.VP8LPredictorsAdd=[];Sa.length=16,(Z.VP8LPredictors=[]).length=16,(Z.VP8LPredictorsAdd_C=[]).length=16,(Z.VP8LPredictors_C=[]).length=16;var ds,Bo,Xs,Po,_a,Ci,Aa,Ya,Mi,ja,Xn,ka,yn,an,Un,nr,si,Sl,qo,gu,pc,gc,mu,Na,Uo,da,ha,Ks,yu=u(511),_l=u(2041),Al=u(225),vu=u(767),$s=0,bu=_l,Zs=Al,vr=vu,La=yu,Dr=0,Fo=1,oi=2,jl=3,Js=4,Ri=5,xu=6,kl=7,hs=8,Oi=9,Io=10,wu=[2,3,7],Ea=[3,3,11],pa=[280,256,256,256,40],eo=[0,1,1,1,0],Di=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],zi=[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],to=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Tf=8,Nl=[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],Ll=[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],sr=null,Fn=[[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]],un=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ps=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],li=[[[[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,255,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]]]],mc=[[[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,1,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]]],no=[[[[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,255,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]]]],Cf=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Bi=[],Qr=[],ga=[],Mf=1,Ho=2,ui=[],br=[];Mr("UpsampleRgbLinePair",ss,3),Mr("UpsampleBgrLinePair",Hs,3),Mr("UpsampleRgbaLinePair",wl,4),Mr("UpsampleBgraLinePair",Gs,4),Mr("UpsampleArgbLinePair",Ys,4),Mr("UpsampleRgba4444LinePair",Qn,2),Mr("UpsampleRgb565LinePair",Ws,2);var Pi=Z.UpsampleRgbLinePair,gs=Z.UpsampleBgrLinePair,ci=Z.UpsampleRgbaLinePair,Su=Z.UpsampleBgraLinePair,_u=Z.UpsampleArgbLinePair,Wo=Z.UpsampleRgba4444LinePair,Au=Z.UpsampleRgb565LinePair,fi=16,or=1<<fi-1,ms=-227,ju=482,ch=6,Rf=0,fh=u(256),lr=u(256),yc=u(256),El=u(256),Tl=u(ju-ms),vc=u(ju-ms);Ha("YuvToRgbRow",ss,3),Ha("YuvToBgrRow",Hs,3),Ha("YuvToRgbaRow",wl,4),Ha("YuvToBgraRow",Gs,4),Ha("YuvToArgbRow",Ys,4),Ha("YuvToRgba4444Row",Qn,2),Ha("YuvToRgb565Row",Ws,2);var ro=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],qi=[0,2,8],dh=[8,7,6,4,4,2,2,2,1,1,1,1],Of=1;this.WebPDecodeRGBA=function(c,y,S,A,M){var D=Fo,z=new ue,P=new Ct;z.ba=P,P.S=D,P.width=[P.width],P.height=[P.height];var I=P.width,$=P.height,fe=new St;if(fe==null||c==null)var ke=2;else n(fe!=null),ke=pu(c,y,S,fe.width,fe.height,fe.Pd,fe.Qd,fe.format,null);if(ke!=0?I=0:(I!=null&&(I[0]=fe.width[0]),$!=null&&($[0]=fe.height[0]),I=1),I){P.width=P.width[0],P.height=P.height[0],A!=null&&(A[0]=P.width),M!=null&&(M[0]=P.height);e:{if(A=new Rs,(M=new pe).data=c,M.w=y,M.ha=S,M.kd=1,y=[0],n(M!=null),((c=pu(M.data,M.w,M.ha,null,null,null,y,null,M))==0||c==7)&&y[0]&&(c=4),(y=c)==0){if(n(z!=null),A.data=M.data,A.w=M.w+M.offset,A.ha=M.ha-M.offset,A.put=jt,A.ac=Oa,A.bc=Lr,A.ma=z,M.xa){if((c=Rn())==null){z=1;break e}if((function(K,he){var be=[0],Me=[0],Ae=[0];t:for(;;){if(K==null)return 0;if(he==null)return K.a=2,0;if(K.l=he,K.a=0,Le(K.m,he.data,he.w,he.ha),!Cn(K.m,be,Me,Ae)){K.a=3;break t}if(K.xb=Ho,he.width=be[0],he.height=Me[0],!Da(be[0],Me[0],1,K,null))break t;return 1}return n(K.a!=0),0})(c,A)){if(A=(y=Ro(A.width,A.height,z.Oa,z.ba))==0){t:{A=c;n:for(;;){if(A==null){A=0;break t}if(n(A.s.yc!=null),n(A.s.Ya!=null),n(0<A.s.Wb),n((S=A.l)!=null),n((M=S.ma)!=null),A.xb!=0){if(A.ca=M.ba,A.tb=M.tb,n(A.ca!=null),!Gr(M.Oa,S,jl)){A.a=2;break n}if(!Zi(A,S.width)||S.da)break n;if((S.da||yt(A.ca.S))&&Bn(),11>A.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),A.ca.f.kb.F!=null&&Bn()),A.Pb&&0<A.s.ua&&A.s.vb.X==null&&!G(A.s.vb,A.s.Wa.Xa)){A.a=1;break n}A.xb=0}if(!Hr(A,A.V,A.Ba,A.c,A.i,S.o,ba))break n;M.Dc=A.Ma,A=1;break t}n(A.a!=0),A=0}A=!A}A&&(y=c.a)}else y=c.a}else{if((c=new ta)==null){z=1;break e}if(c.Fa=M.na,c.P=M.P,c.qc=M.Sa,ua(c,A)){if((y=Ro(A.width,A.height,z.Oa,z.ba))==0){if(c.Aa=0,S=z.Oa,n((M=c)!=null),S!=null){if(0<(I=0>(I=S.Md)?0:100<I?255:255*I/100)){for($=fe=0;4>$;++$)12>(ke=M.pb[$]).lc&&(ke.ia=I*dh[0>ke.lc?0:ke.lc]>>3),fe|=ke.ia;fe&&(alert("todo:VP8InitRandom"),M.ia=1)}M.Ga=S.Id,100<M.Ga?M.Ga=100:0>M.Ga&&(M.Ga=0)}(function(K,he){if(K==null)return 0;if(he==null)return Vn(K,2,"NULL VP8Io parameter in VP8Decode().");if(!K.cb&&!ua(K,he))return 0;if(n(K.cb),he.ac==null||he.ac(he)){he.ob&&(K.L=0);var be=qi[K.L];if(K.L==2?(K.yb=0,K.zb=0):(K.yb=he.v-be>>4,K.zb=he.j-be>>4,0>K.yb&&(K.yb=0),0>K.zb&&(K.zb=0)),K.Va=he.o+15+be>>4,K.Hb=he.va+15+be>>4,K.Hb>K.za&&(K.Hb=K.za),K.Va>K.Ub&&(K.Va=K.Ub),0<K.L){var Me=K.ed;for(be=0;4>be;++be){var Ae;if(K.Qa.Cb){var De=K.Qa.Lb[be];K.Qa.Fb||(De+=Me.Tb)}else De=Me.Tb;for(Ae=0;1>=Ae;++Ae){var Oe=K.gd[be][Ae],He=De;if(Me.Pc&&(He+=Me.vd[0],Ae&&(He+=Me.od[0])),0<(He=0>He?0:63<He?63:He)){var qe=He;0<Me.wb&&(qe=4<Me.wb?qe>>2:qe>>1)>9-Me.wb&&(qe=9-Me.wb),1>qe&&(qe=1),Oe.dd=qe,Oe.tc=2*He+qe,Oe.ld=40<=He?2:15<=He?1:0}else Oe.tc=0;Oe.La=Ae}}}be=0}else Vn(K,6,"Frame setup failed"),be=K.a;if(be=be==0){if(be){K.$c=0,0<K.Aa||(K.Ic=Of);t:{be=K.Ic,Me=4*(qe=K.za);var ft=32*qe,et=qe+1,zt=0<K.L?qe*(0<K.Aa?2:1):0,tt=(K.Aa==2?2:1)*qe;if((Oe=Me+832+(Ae=3*(16*be+qi[K.L])/2*ft)+(De=K.Fa!=null&&0<K.Fa.length?K.Kc.c*K.Kc.i:0))!=Oe)be=0;else{if(Oe>K.Vb){if(K.Vb=0,K.Ec=u(Oe),K.Fc=0,K.Ec==null){be=Vn(K,1,"no memory during frame initialization.");break t}K.Vb=Oe}Oe=K.Ec,He=K.Fc,K.Ac=Oe,K.Bc=He,He+=Me,K.Gd=h(ft,Ao),K.Hd=0,K.rb=h(et+1,la),K.sb=1,K.wa=zt?h(zt,Wr):null,K.Y=0,K.D.Nb=0,K.D.wa=K.wa,K.D.Y=K.Y,0<K.Aa&&(K.D.Y+=qe),n(!0),K.oc=Oe,K.pc=He,He+=832,K.ya=h(tt,_o),K.aa=0,K.D.ya=K.ya,K.D.aa=K.aa,K.Aa==2&&(K.D.aa+=qe),K.R=16*qe,K.B=8*qe,qe=(ft=qi[K.L])*K.R,ft=ft/2*K.B,K.sa=Oe,K.ta=He+qe,K.qa=K.sa,K.ra=K.ta+16*be*K.R+ft,K.Ha=K.qa,K.Ia=K.ra+8*be*K.B+ft,K.$c=0,He+=Ae,K.mb=De?Oe:null,K.nb=De?He:null,n(He+De<=K.Fc+K.Vb),Ji(K),o(K.Ac,K.Bc,0,Me),be=1}}if(be){if(he.ka=0,he.y=K.sa,he.O=K.ta,he.f=K.qa,he.N=K.ra,he.ea=K.Ha,he.Vd=K.Ia,he.fa=K.R,he.Rc=K.B,he.F=null,he.J=0,!$s){for(be=-255;255>=be;++be)yu[255+be]=0>be?-be:be;for(be=-1020;1020>=be;++be)_l[1020+be]=-128>be?-128:127<be?127:be;for(be=-112;112>=be;++be)Al[112+be]=-16>be?-16:15<be?15:be;for(be=-255;510>=be;++be)vu[255+be]=0>be?0:255<be?255:be;$s=1}Aa=su,Ya=es,ja=au,Xn=iu,ka=Yr,Mi=ko,yn=cu,an=fu,Un=hu,nr=x,si=du,Sl=Fs,qo=C,gu=Q,pc=ki,gc=Co,mu=Mo,Na=uu,Qr[0]=Pa,Qr[1]=zs,Qr[2]=ou,Qr[3]=Ps,Qr[4]=xl,Qr[5]=Tr,Qr[6]=qs,Qr[7]=qa,Qr[8]=lu,Qr[9]=Eo,Bi[0]=Lo,Bi[1]=dc,Bi[2]=hc,Bi[3]=No,Bi[4]=fa,Bi[5]=ts,Bi[6]=ns,ga[0]=Cr,ga[1]=Bs,ga[2]=Si,ga[3]=rs,ga[4]=To,ga[5]=wa,ga[6]=_i,be=1}else be=0}be&&(be=(function(Qt,rr){for(Qt.M=0;Qt.M<Qt.Va;++Qt.M){var Rt,nt=Qt.Jc[Qt.M&Qt.Xb],Ge=Qt.m,Pn=Qt;for(Rt=0;Rt<Pn.za;++Rt){var Bt=Ge,Ht=Pn,it=Ht.Ac,Ut=Ht.Bc+4*Rt,en=Ht.zc,Ln=Ht.ya[Ht.aa+Rt];if(Ht.Qa.Bb?Ln.$b=ze(Bt,Ht.Pa.jb[0])?2+ze(Bt,Ht.Pa.jb[2]):ze(Bt,Ht.Pa.jb[1]):Ln.$b=0,Ht.kc&&(Ln.Ad=ze(Bt,Ht.Bd)),Ln.Za=!ze(Bt,145)+0,Ln.Za){var Kn=Ln.Ob,$n=0;for(Ht=0;4>Ht;++Ht){var In,Vt=en[0+Ht];for(In=0;4>In;++In){Vt=mc[it[Ut+In]][Vt];for(var tn=ps[ze(Bt,Vt[0])];0<tn;)tn=ps[2*tn+ze(Bt,Vt[tn])];Vt=-tn,it[Ut+In]=Vt}i(Kn,$n,it,Ut,4),$n+=4,en[0+Ht]=Vt}}else Vt=ze(Bt,156)?ze(Bt,128)?1:3:ze(Bt,163)?2:0,Ln.Ob[0]=Vt,o(it,Ut,Vt,4),o(en,0,Vt,4);Ln.Dd=ze(Bt,142)?ze(Bt,114)?ze(Bt,183)?1:3:2:0}if(Pn.m.Ka)return Vn(Qt,7,"Premature end-of-partition0 encountered.");for(;Qt.ja<Qt.za;++Qt.ja){if(Pn=nt,Bt=(Ge=Qt).rb[Ge.sb-1],it=Ge.rb[Ge.sb+Ge.ja],Rt=Ge.ya[Ge.aa+Ge.ja],Ut=Ge.kc?Rt.Ad:0)Bt.la=it.la=0,Rt.Za||(Bt.Na=it.Na=0),Rt.Hc=0,Rt.Gc=0,Rt.ia=0;else{var Hn,Nt;if(Bt=it,it=Pn,Ut=Ge.Pa.Xc,en=Ge.ya[Ge.aa+Ge.ja],Ln=Ge.pb[en.$b],Ht=en.ad,Kn=0,$n=Ge.rb[Ge.sb-1],Vt=In=0,o(Ht,Kn,0,384),en.Za)var ur=0,ma=Ut[3];else{tn=u(16);var Wn=Bt.Na+$n.Na;if(Wn=sr(it,Ut[1],Wn,Ln.Eb,0,tn,0),Bt.Na=$n.Na=(0<Wn)+0,1<Wn)Aa(tn,0,Ht,Kn);else{var Xr=tn[0]+3>>3;for(tn=0;256>tn;tn+=16)Ht[Kn+tn]=Xr}ur=1,ma=Ut[0]}var vn=15&Bt.la,Zn=15&$n.la;for(tn=0;4>tn;++tn){var Kr=1&Zn;for(Xr=Nt=0;4>Xr;++Xr)vn=vn>>1|(Kr=(Wn=sr(it,ma,Wn=Kr+(1&vn),Ln.Sc,ur,Ht,Kn))>ur)<<7,Nt=Nt<<2|(3<Wn?3:1<Wn?2:Ht[Kn+0]!=0),Kn+=16;vn>>=4,Zn=Zn>>1|Kr<<7,In=(In<<8|Nt)>>>0}for(ma=vn,ur=Zn>>4,Hn=0;4>Hn;Hn+=2){for(Nt=0,vn=Bt.la>>4+Hn,Zn=$n.la>>4+Hn,tn=0;2>tn;++tn){for(Kr=1&Zn,Xr=0;2>Xr;++Xr)Wn=Kr+(1&vn),vn=vn>>1|(Kr=0<(Wn=sr(it,Ut[2],Wn,Ln.Qc,0,Ht,Kn)))<<3,Nt=Nt<<2|(3<Wn?3:1<Wn?2:Ht[Kn+0]!=0),Kn+=16;vn>>=2,Zn=Zn>>1|Kr<<5}Vt|=Nt<<4*Hn,ma|=vn<<4<<Hn,ur|=(240&Zn)<<Hn}Bt.la=ma,$n.la=ur,en.Hc=In,en.Gc=Vt,en.ia=43690&Vt?0:Ln.ia,Ut=!(In|Vt)}if(0<Ge.L&&(Ge.wa[Ge.Y+Ge.ja]=Ge.gd[Rt.$b][Rt.Za],Ge.wa[Ge.Y+Ge.ja].La|=!Ut),Pn.Ka)return Vn(Qt,7,"Premature end-of-file encountered.")}if(Ji(Qt),Ge=rr,Pn=1,Rt=(nt=Qt).D,Bt=0<nt.L&&nt.M>=nt.zb&&nt.M<=nt.Va,nt.Aa==0)t:{if(Rt.M=nt.M,Rt.uc=Bt,ii(nt,Rt),Pn=1,Rt=(Nt=nt.D).Nb,Bt=(Vt=qi[nt.L])*nt.R,it=Vt/2*nt.B,tn=16*Rt*nt.R,Xr=8*Rt*nt.B,Ut=nt.sa,en=nt.ta-Bt+tn,Ln=nt.qa,Ht=nt.ra-it+Xr,Kn=nt.Ha,$n=nt.Ia-it+Xr,Zn=(vn=Nt.M)==0,In=vn>=nt.Va-1,nt.Aa==2&&ii(nt,Nt),Nt.uc)for(Kr=(Wn=nt).D.M,n(Wn.D.uc),Nt=Wn.yb;Nt<Wn.Hb;++Nt){ur=Nt,ma=Kr;var Ar=(_n=(fr=Wn).D).Nb;Hn=fr.R;var _n=_n.wa[_n.Y+ur],sn=fr.sa,zr=fr.ta+16*Ar*Hn+16*ur,jr=_n.dd,hn=_n.tc;if(hn!=0)if(n(3<=hn),fr.L==1)0<ur&&gc(sn,zr,Hn,hn+4),_n.La&&Na(sn,zr,Hn,hn),0<ma&&pc(sn,zr,Hn,hn+4),_n.La&&mu(sn,zr,Hn,hn);else{var $r=fr.B,cr=fr.qa,di=fr.ra+8*Ar*$r+8*ur,Ga=fr.Ha,fr=fr.Ia+8*Ar*$r+8*ur;Ar=_n.ld,0<ur&&(an(sn,zr,Hn,hn+4,jr,Ar),nr(cr,di,Ga,fr,$r,hn+4,jr,Ar)),_n.La&&(Sl(sn,zr,Hn,hn,jr,Ar),gu(cr,di,Ga,fr,$r,hn,jr,Ar)),0<ma&&(yn(sn,zr,Hn,hn+4,jr,Ar),Un(cr,di,Ga,fr,$r,hn+4,jr,Ar)),_n.La&&(si(sn,zr,Hn,hn,jr,Ar),qo(cr,di,Ga,fr,$r,hn,jr,Ar))}}if(nt.ia&&alert("todo:DitherRow"),Ge.put!=null){if(Nt=16*vn,vn=16*(vn+1),Zn?(Ge.y=nt.sa,Ge.O=nt.ta+tn,Ge.f=nt.qa,Ge.N=nt.ra+Xr,Ge.ea=nt.Ha,Ge.W=nt.Ia+Xr):(Nt-=Vt,Ge.y=Ut,Ge.O=en,Ge.f=Ln,Ge.N=Ht,Ge.ea=Kn,Ge.W=$n),In||(vn-=Vt),vn>Ge.o&&(vn=Ge.o),Ge.F=null,Ge.J=null,nt.Fa!=null&&0<nt.Fa.length&&Nt<vn&&(Ge.J=tr(nt,Ge,Nt,vn-Nt),Ge.F=nt.mb,Ge.F==null&&Ge.F.length==0)){Pn=Vn(nt,3,"Could not decode alpha data.");break t}Nt<Ge.j&&(Vt=Ge.j-Nt,Nt=Ge.j,n(!(1&Vt)),Ge.O+=nt.R*Vt,Ge.N+=nt.B*(Vt>>1),Ge.W+=nt.B*(Vt>>1),Ge.F!=null&&(Ge.J+=Ge.width*Vt)),Nt<vn&&(Ge.O+=Ge.v,Ge.N+=Ge.v>>1,Ge.W+=Ge.v>>1,Ge.F!=null&&(Ge.J+=Ge.v),Ge.ka=Nt-Ge.j,Ge.U=Ge.va-Ge.v,Ge.T=vn-Nt,Pn=Ge.put(Ge))}Rt+1!=nt.Ic||In||(i(nt.sa,nt.ta-Bt,Ut,en+16*nt.R,Bt),i(nt.qa,nt.ra-it,Ln,Ht+8*nt.B,it),i(nt.Ha,nt.Ia-it,Kn,$n+8*nt.B,it))}if(!Pn)return Vn(Qt,6,"Output aborted.")}return 1})(K,he)),he.bc!=null&&he.bc(he),be&=1}return be?(K.cb=0,be):0})(c,A)||(y=c.a)}}else y=c.a}y==0&&z.Oa!=null&&z.Oa.fd&&(y=ls(z.ba))}z=y}D=z!=0?null:11>D?P.f.RGBA.eb:P.f.kb.y}else D=null;return D};var Df=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function g(Z,ge){for(var O="",U=0;U<4;U++)O+=String.fromCharCode(Z[ge++]);return O}function v(Z,ge){return Z[ge+0]|Z[ge+1]<<8}function _(Z,ge){return(Z[ge+0]|Z[ge+1]<<8|Z[ge+2]<<16)>>>0}function j(Z,ge){return(Z[ge+0]|Z[ge+1]<<8|Z[ge+2]<<16|Z[ge+3]<<24)>>>0}new f;var w=[0],k=[0],L=[],R=new f,E=t,Y=(function(Z,ge){var O={},U=0,ne=!1,re=0,ve=0;if(O.frames=[],!(function(T,q){for(var V=0;V<4;V++)if(T[q+V]!="RIFF".charCodeAt(V))return!0;return!1})(Z,ge)){for(j(Z,ge+=4),ge+=8;ge<Z.length;){var ee=g(Z,ge),J=j(Z,ge+=4);ge+=4;var le=J+(1&J);switch(ee){case"VP8 ":case"VP8L":O.frames[U]===void 0&&(O.frames[U]={}),(ce=O.frames[U]).src_off=ne?ve:ge-8,ce.src_size=re+J+8,U++,ne&&(ne=!1,re=0,ve=0);break;case"VP8X":(ce=O.header={}).feature_flags=Z[ge];var Le=ge+4;ce.canvas_width=1+_(Z,Le),Le+=3,ce.canvas_height=1+_(Z,Le),Le+=3;break;case"ALPH":ne=!0,re=le+8,ve=ge-8;break;case"ANIM":(ce=O.header).bgcolor=j(Z,ge),Le=ge+4,ce.loop_count=v(Z,Le),Le+=2;break;case"ANMF":var W,ce;(ce=O.frames[U]={}).offset_x=2*_(Z,ge),ge+=3,ce.offset_y=2*_(Z,ge),ge+=3,ce.width=1+_(Z,ge),ge+=3,ce.height=1+_(Z,ge),ge+=3,ce.duration=_(Z,ge),ge+=3,W=Z[ge++],ce.dispose=1&W,ce.blend=W>>1&1}ee!="ANMF"&&(ge+=le)}return O}})(E,0);Y.response=E,Y.rgbaoutput=!0,Y.dataurl=!1;var H=Y.header?Y.header:null,F=Y.frames?Y.frames:null;if(H){H.loop_counter=H.loop_count,w=[H.canvas_height],k=[H.canvas_width];for(var X=0;X<F.length&&F[X].blend!=0;X++);}var _e=F[0],xe=R.WebPDecodeRGBA(E,_e.src_off,_e.src_size,k,w);_e.rgba=xe,_e.imgwidth=k[0],_e.imgheight=w[0];for(var oe=0;oe<k[0]*w[0]*4;oe++)L[oe]=xe[oe];return this.width=k,this.height=w,this.data=L,this}/** ====================================================================
|
|
560
|
+
* @license
|
|
561
|
+
* jsPDF XMP metadata plugin
|
|
562
|
+
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
|
563
|
+
*
|
|
564
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
565
|
+
* a copy of this software and associated documentation files (the
|
|
566
|
+
* "Software"), to deal in the Software without restriction, including
|
|
567
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
568
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
569
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
570
|
+
* the following conditions:
|
|
571
|
+
*
|
|
572
|
+
* The above copyright notice and this permission notice shall be
|
|
573
|
+
* included in all copies or substantial portions of the Software.
|
|
574
|
+
*
|
|
575
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
576
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
577
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
578
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
579
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
580
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
581
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
582
|
+
* ====================================================================
|
|
583
|
+
*/function f_(){var t,n=this.internal.__metadata__.metadata,a=unescape(encodeURIComponent(n));t=this.internal.__metadata__.rawXml?a:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>'+a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function d_(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(t){var n,a,i,o,u,h,d,f,g,v=function(T){return T=T||{},this.isStrokeTransparent=T.isStrokeTransparent||!1,this.strokeOpacity=T.strokeOpacity||1,this.strokeStyle=T.strokeStyle||"#000000",this.fillStyle=T.fillStyle||"#000000",this.isFillTransparent=T.isFillTransparent||!1,this.fillOpacity=T.fillOpacity||1,this.font=T.font||"10px sans-serif",this.textBaseline=T.textBaseline||"alphabetic",this.textAlign=T.textAlign||"left",this.lineWidth=T.lineWidth||1,this.lineJoin=T.lineJoin||"miter",this.lineCap=T.lineCap||"butt",this.path=T.path||[],this.transform=T.transform!==void 0?T.transform.clone():new f,this.globalCompositeOperation=T.globalCompositeOperation||"normal",this.globalAlpha=T.globalAlpha||1,this.clip_path=T.clip_path||[],this.currentPoint=T.currentPoint||new h,this.miterLimit=T.miterLimit||10,this.lastPoint=T.lastPoint||new h,this.lineDashOffset=T.lineDashOffset||0,this.lineDash=T.lineDash||[],this.margin=T.margin||[0,0,0,0],this.prevPageLastElemOffset=T.prevPageLastElemOffset||0,this.ignoreClearRect=typeof T.ignoreClearRect!="boolean"||T.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new _(this),n=this.internal.f2,a=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,u=this.internal.getVerticalCoordinate,h=this.internal.Point,d=this.internal.Rectangle,f=this.internal.Matrix,g=new v}]);var _=function(T){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var q=T;Object.defineProperty(this,"pdf",{get:function(){return q}});var V=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return V},set:function(G){V=!!G}});var te=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return te},set:function(G){te=!!G}});var se=0;Object.defineProperty(this,"posX",{get:function(){return se},set:function(G){isNaN(G)||(se=G)}});var ye=0;Object.defineProperty(this,"posY",{get:function(){return ye},set:function(G){isNaN(G)||(ye=G)}}),Object.defineProperty(this,"margin",{get:function(){return g.margin},set:function(G){var Qe;typeof G=="number"?Qe=[G,G,G,G]:((Qe=new Array(4))[0]=G[0],Qe[1]=G.length>=2?G[1]:Qe[0],Qe[2]=G.length>=3?G[2]:Qe[0],Qe[3]=G.length>=4?G[3]:Qe[1]),g.margin=Qe}});var je=!1;Object.defineProperty(this,"autoPaging",{get:function(){return je},set:function(G){je=G}});var Ce=0;Object.defineProperty(this,"lastBreak",{get:function(){return Ce},set:function(G){Ce=G}});var ze=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ze},set:function(G){ze=G}}),Object.defineProperty(this,"ctx",{get:function(){return g},set:function(G){G instanceof v&&(g=G)}}),Object.defineProperty(this,"path",{get:function(){return g.path},set:function(G){g.path=G}});var We=[];Object.defineProperty(this,"ctxStack",{get:function(){return We},set:function(G){We=G}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(G){var Qe;Qe=j(G),this.ctx.fillStyle=Qe.style,this.ctx.isFillTransparent=Qe.a===0,this.ctx.fillOpacity=Qe.a,this.pdf.setFillColor(Qe.r,Qe.g,Qe.b,{a:Qe.a}),this.pdf.setTextColor(Qe.r,Qe.g,Qe.b,{a:Qe.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(G){var Qe=j(G);this.ctx.strokeStyle=Qe.style,this.ctx.isStrokeTransparent=Qe.a===0,this.ctx.strokeOpacity=Qe.a,Qe.a===0?this.pdf.setDrawColor(255,255,255):(Qe.a,this.pdf.setDrawColor(Qe.r,Qe.g,Qe.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(G){["butt","round","square"].indexOf(G)!==-1&&(this.ctx.lineCap=G,this.pdf.setLineCap(G))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(G){isNaN(G)||(this.ctx.lineWidth=G,this.pdf.setLineWidth(G))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(G){["bevel","round","miter"].indexOf(G)!==-1&&(this.ctx.lineJoin=G,this.pdf.setLineJoin(G))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(G){isNaN(G)||(this.ctx.miterLimit=G,this.pdf.setMiterLimit(G))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(G){this.ctx.textBaseline=G}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(G){["right","end","center","left","start"].indexOf(G)!==-1&&(this.ctx.textAlign=G)}});var Xe=null,Ve=null,dt=null;Object.defineProperty(this,"fontFaces",{get:function(){return dt},set:function(G){Xe=null,Ve=null,dt=G}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(G){var Qe;if(this.ctx.font=G,(Qe=/^\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(G))!==null){var xt=Qe[1];Qe[2];var ut=Qe[3],Ie=Qe[4];Qe[5];var mt=Qe[6],Ze=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Ie)[2];Ie=Math.floor(Ze==="px"?parseFloat(Ie)*this.pdf.internal.scaleFactor:Ze==="em"?parseFloat(Ie)*this.pdf.getFontSize():parseFloat(Ie)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Ie);var bt=(function(pt){var Dn,we,Ye=[],Je=pt.trim();if(Je==="")return G1;if(Je in Sm)return[Sm[Je]];for(;Je!=="";){switch(we=null,Dn=(Je=Am(Je)).charAt(0)){case'"':case"'":we=i_(Je.substring(1),Dn);break;default:we=s_(Je)}if(we===null||(Ye.push(we[0]),(Je=Am(we[1]))!==""&&Je.charAt(0)!==","))return G1;Je=Je.replace(/^,/,"")}return Ye})(mt);if(this.fontFaces){var ht=(function(pt,Dn){var we=pt.getFontList(),Ye=JSON.stringify(we);if(Xe===null||Ve!==Ye){var Je=(function(Kt){var rt=[];return Object.keys(Kt).forEach(function(fn){Kt[fn].forEach(function(yt){var At=null;switch(yt){case"bold":At={family:fn,weight:"bold"};break;case"italic":At={family:fn,style:"italic"};break;case"bolditalic":At={family:fn,weight:"bold",style:"italic"};break;case"":case"normal":At={family:fn}}At!==null&&(At.ref={name:fn,style:yt},rt.push(At))})}),rt})(we);Xe=(function(Kt){for(var rt={},fn=0;fn<Kt.length;++fn){var yt=Y1(Kt[fn]),At=yt.family,Et=yt.stretch,Ct=yt.style,St=yt.weight;rt[At]=rt[At]||{},rt[At][Et]=rt[At][Et]||{},rt[At][Et][Ct]=rt[At][Et][Ct]||{},rt[At][Et][Ct][St]=yt}return rt})(Je.concat(Dn)),Ve=Ye}return Xe})(this.pdf,this.fontFaces),Wt=bt.map(function(pt){return{family:pt,stretch:"normal",weight:ut,style:xt}}),Gt=(function(pt,Dn,we){for(var Ye=(we=we||{}).defaultFontFamily||"times",Je=Object.assign({},a_,we.genericFontFamilies||{}),Kt=null,rt=null,fn=0;fn<Dn.length;++fn)if(Je[(Kt=Y1(Dn[fn])).family]&&(Kt.family=Je[Kt.family]),pt.hasOwnProperty(Kt.family)){rt=pt[Kt.family];break}if(!(rt=rt||pt[Ye]))throw new Error("Could not find a font-family for the rule '"+_m(Kt)+"' and default family '"+Ye+"'.");if(rt=(function(yt,At){if(At[yt])return At[yt];var Et=m0[yt],Ct=Et<=m0.normal?-1:1,St=wm(At,Sy,Et,Ct);if(!St)throw new Error("Could not find a matching font-stretch value for "+yt);return St})(Kt.stretch,rt),rt=(function(yt,At){if(At[yt])return At[yt];for(var Et=wy[yt],Ct=0;Ct<Et.length;++Ct)if(At[Et[Ct]])return At[Et[Ct]];throw new Error("Could not find a matching font-style for "+yt)})(Kt.style,rt),!(rt=(function(yt,At){if(At[yt])return At[yt];if(yt===400&&At[500])return At[500];if(yt===500&&At[400])return At[400];var Et=r_[yt],Ct=wm(At,_y,Et,yt<400?-1:1);if(!Ct)throw new Error("Could not find a matching font-weight for value "+yt);return Ct})(Kt.weight,rt)))throw new Error("Failed to resolve a font for the rule '"+_m(Kt)+"'.");return rt})(ht,Wt);this.pdf.setFont(Gt.ref.name,Gt.ref.style)}else{var wt="";(ut==="bold"||parseInt(ut,10)>=700||xt==="bold")&&(wt="bold"),xt==="italic"&&(wt+="italic"),wt.length===0&&(wt="normal");for(var _t="",Dt={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"},$e=0;$e<bt.length;$e++){if(this.pdf.internal.getFont(bt[$e],wt,{noFallback:!0,disableWarning:!0})!==void 0){_t=bt[$e];break}if(wt==="bolditalic"&&this.pdf.internal.getFont(bt[$e],"bold",{noFallback:!0,disableWarning:!0})!==void 0)_t=bt[$e],wt="bold";else if(this.pdf.internal.getFont(bt[$e],"normal",{noFallback:!0,disableWarning:!0})!==void 0){_t=bt[$e],wt="normal";break}}if(_t===""){for(var qt=0;qt<bt.length;qt++)if(Dt[bt[qt]]){_t=Dt[bt[qt]];break}}_t=_t===""?"Times":_t,this.pdf.setFont(_t,wt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(G){this.ctx.globalCompositeOperation=G}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(G){this.ctx.globalAlpha=G}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(G){this.ctx.lineDashOffset=G,ce.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(G){this.ctx.lineDash=G,ce.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(G){this.ctx.ignoreClearRect=!!G}})};_.prototype.setLineDash=function(T){this.lineDash=T},_.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},_.prototype.fill=function(){F.call(this,"fill",!1)},_.prototype.stroke=function(){F.call(this,"stroke",!1)},_.prototype.beginPath=function(){this.path=[{type:"begin"}]},_.prototype.moveTo=function(T,q){if(isNaN(T)||isNaN(q))throw Tn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var V=this.ctx.transform.applyToPoint(new h(T,q));this.path.push({type:"mt",x:V.x,y:V.y}),this.ctx.lastPoint=new h(T,q)},_.prototype.closePath=function(){var T=new h(0,0),q=0;for(q=this.path.length-1;q!==-1;q--)if(this.path[q].type==="begin"&&Sn(this.path[q+1])==="object"&&typeof this.path[q+1].x=="number"){T=new h(this.path[q+1].x,this.path[q+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new h(T.x,T.y)},_.prototype.lineTo=function(T,q){if(isNaN(T)||isNaN(q))throw Tn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var V=this.ctx.transform.applyToPoint(new h(T,q));this.path.push({type:"lt",x:V.x,y:V.y}),this.ctx.lastPoint=new h(V.x,V.y)},_.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),F.call(this,null,!0)},_.prototype.quadraticCurveTo=function(T,q,V,te){if(isNaN(V)||isNaN(te)||isNaN(T)||isNaN(q))throw Tn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var se=this.ctx.transform.applyToPoint(new h(V,te)),ye=this.ctx.transform.applyToPoint(new h(T,q));this.path.push({type:"qct",x1:ye.x,y1:ye.y,x:se.x,y:se.y}),this.ctx.lastPoint=new h(se.x,se.y)},_.prototype.bezierCurveTo=function(T,q,V,te,se,ye){if(isNaN(se)||isNaN(ye)||isNaN(T)||isNaN(q)||isNaN(V)||isNaN(te))throw Tn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var je=this.ctx.transform.applyToPoint(new h(se,ye)),Ce=this.ctx.transform.applyToPoint(new h(T,q)),ze=this.ctx.transform.applyToPoint(new h(V,te));this.path.push({type:"bct",x1:Ce.x,y1:Ce.y,x2:ze.x,y2:ze.y,x:je.x,y:je.y}),this.ctx.lastPoint=new h(je.x,je.y)},_.prototype.arc=function(T,q,V,te,se,ye){if(isNaN(T)||isNaN(q)||isNaN(V)||isNaN(te)||isNaN(se))throw Tn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ye=!!ye,!this.ctx.transform.isIdentity){var je=this.ctx.transform.applyToPoint(new h(T,q));T=je.x,q=je.y;var Ce=this.ctx.transform.applyToPoint(new h(0,V)),ze=this.ctx.transform.applyToPoint(new h(0,0));V=Math.sqrt(Math.pow(Ce.x-ze.x,2)+Math.pow(Ce.y-ze.y,2))}Math.abs(se-te)>=2*Math.PI&&(te=0,se=2*Math.PI),this.path.push({type:"arc",x:T,y:q,radius:V,startAngle:te,endAngle:se,counterclockwise:ye})},_.prototype.arcTo=function(T,q,V,te,se){throw new Error("arcTo not implemented.")},_.prototype.rect=function(T,q,V,te){if(isNaN(T)||isNaN(q)||isNaN(V)||isNaN(te))throw Tn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(T,q),this.lineTo(T+V,q),this.lineTo(T+V,q+te),this.lineTo(T,q+te),this.lineTo(T,q),this.lineTo(T+V,q),this.lineTo(T,q)},_.prototype.fillRect=function(T,q,V,te){if(isNaN(T)||isNaN(q)||isNaN(V)||isNaN(te))throw Tn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!w.call(this)){var se={};this.lineCap!=="butt"&&(se.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(se.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(T,q,V,te),this.fill(),se.hasOwnProperty("lineCap")&&(this.lineCap=se.lineCap),se.hasOwnProperty("lineJoin")&&(this.lineJoin=se.lineJoin)}},_.prototype.strokeRect=function(T,q,V,te){if(isNaN(T)||isNaN(q)||isNaN(V)||isNaN(te))throw Tn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");k.call(this)||(this.beginPath(),this.rect(T,q,V,te),this.stroke())},_.prototype.clearRect=function(T,q,V,te){if(isNaN(T)||isNaN(q)||isNaN(V)||isNaN(te))throw Tn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(T,q,V,te))},_.prototype.save=function(T){T=typeof T!="boolean"||T;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,V=0;V<this.pdf.internal.getNumberOfPages();V++)this.pdf.setPage(V+1),this.pdf.internal.out("q");if(this.pdf.setPage(q),T){this.ctx.fontSize=this.pdf.internal.getFontSize();var te=new v(this.ctx);this.ctxStack.push(this.ctx),this.ctx=te}},_.prototype.restore=function(T){T=typeof T!="boolean"||T;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,V=0;V<this.pdf.internal.getNumberOfPages();V++)this.pdf.setPage(V+1),this.pdf.internal.out("Q");this.pdf.setPage(q),T&&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)},_.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var j=function(T){var q,V,te,se;if(T.isCanvasGradient===!0&&(T=T.getColor()),!T)return{r:0,g:0,b:0,a:0,style:T};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(T))q=0,V=0,te=0,se=0;else{var ye=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(T);if(ye!==null)q=parseInt(ye[1]),V=parseInt(ye[2]),te=parseInt(ye[3]),se=1;else if((ye=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(T))!==null)q=parseInt(ye[1]),V=parseInt(ye[2]),te=parseInt(ye[3]),se=parseFloat(ye[4]);else{if(se=1,typeof T=="string"&&T.charAt(0)!=="#"){var je=new py(T);T=je.ok?je.toHex():"#000000"}T.length===4?(q=T.substring(1,2),q+=q,V=T.substring(2,3),V+=V,te=T.substring(3,4),te+=te):(q=T.substring(1,3),V=T.substring(3,5),te=T.substring(5,7)),q=parseInt(q,16),V=parseInt(V,16),te=parseInt(te,16)}}return{r:q,g:V,b:te,a:se,style:T}},w=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},k=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};_.prototype.fillText=function(T,q,V,te){if(isNaN(q)||isNaN(V)||typeof T!="string")throw Tn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(te=isNaN(te)?void 0:te,!w.call(this)){var se=le(this.ctx.transform.rotation),ye=this.ctx.transform.scaleX;U.call(this,{text:T,x:q,y:V,scale:ye,angle:se,align:this.textAlign,maxWidth:te})}},_.prototype.strokeText=function(T,q,V,te){if(isNaN(q)||isNaN(V)||typeof T!="string")throw Tn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!k.call(this)){te=isNaN(te)?void 0:te;var se=le(this.ctx.transform.rotation),ye=this.ctx.transform.scaleX;U.call(this,{text:T,x:q,y:V,scale:ye,renderingMode:"stroke",angle:se,align:this.textAlign,maxWidth:te})}},_.prototype.measureText=function(T){if(typeof T!="string")throw Tn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var q=this.pdf,V=this.pdf.internal.scaleFactor,te=q.internal.getFontSize(),se=q.getStringUnitWidth(T)*te/q.internal.scaleFactor;return new function(ye){var je=(ye=ye||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return je}}),this}({width:se*=Math.round(96*V/72*1e4)/1e4})},_.prototype.scale=function(T,q){if(isNaN(T)||isNaN(q))throw Tn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var V=new f(T,0,0,q,0,0);this.ctx.transform=this.ctx.transform.multiply(V)},_.prototype.rotate=function(T){if(isNaN(T))throw Tn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var q=new f(Math.cos(T),Math.sin(T),-Math.sin(T),Math.cos(T),0,0);this.ctx.transform=this.ctx.transform.multiply(q)},_.prototype.translate=function(T,q){if(isNaN(T)||isNaN(q))throw Tn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var V=new f(1,0,0,1,T,q);this.ctx.transform=this.ctx.transform.multiply(V)},_.prototype.transform=function(T,q,V,te,se,ye){if(isNaN(T)||isNaN(q)||isNaN(V)||isNaN(te)||isNaN(se)||isNaN(ye))throw Tn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var je=new f(T,q,V,te,se,ye);this.ctx.transform=this.ctx.transform.multiply(je)},_.prototype.setTransform=function(T,q,V,te,se,ye){T=isNaN(T)?1:T,q=isNaN(q)?0:q,V=isNaN(V)?0:V,te=isNaN(te)?1:te,se=isNaN(se)?0:se,ye=isNaN(ye)?0:ye,this.ctx.transform=new f(T,q,V,te,se,ye)};var L=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};_.prototype.drawImage=function(T,q,V,te,se,ye,je,Ce,ze){var We=this.pdf.getImageProperties(T),Xe=1,Ve=1,dt=1,G=1;te!==void 0&&Ce!==void 0&&(dt=Ce/te,G=ze/se,Xe=We.width/te*Ce/te,Ve=We.height/se*ze/se),ye===void 0&&(ye=q,je=V,q=0,V=0),te!==void 0&&Ce===void 0&&(Ce=te,ze=se),te===void 0&&Ce===void 0&&(Ce=We.width,ze=We.height);var Qe=this.ctx.transform.decompose(),xt=le(Qe.rotate.shx),ut=new f,Ie=(ut=(ut=(ut=ut.multiply(Qe.translate)).multiply(Qe.skew)).multiply(Qe.scale)).applyToRectangle(new d(ye-q*dt,je-V*G,te*Xe,se*Ve));if(this.autoPaging){for(var mt,Ze=R.call(this,Ie),bt=[],ht=0;ht<Ze.length;ht+=1)bt.indexOf(Ze[ht])===-1&&bt.push(Ze[ht]);H(bt);for(var Wt=bt[0],Gt=bt[bt.length-1],wt=Wt;wt<Gt+1;wt++){this.pdf.setPage(wt);var _t=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Dt=wt===1?this.posY+this.margin[0]:this.margin[0],$e=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],qt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],pt=wt===1?0:$e+(wt-2)*qt;if(this.ctx.clip_path.length!==0){var Dn=this.path;mt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(mt,this.posX+this.margin[3],-pt+Dt+this.ctx.prevPageLastElemOffset),X.call(this,"fill",!0),this.path=Dn}var we=JSON.parse(JSON.stringify(Ie));we=Y([we],this.posX+this.margin[3],-pt+Dt+this.ctx.prevPageLastElemOffset)[0];var Ye=(wt>Wt||wt<Gt)&&L.call(this);Ye&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_t,qt,null).clip().discardPath()),this.pdf.addImage(T,"JPEG",we.x,we.y,we.w,we.h,null,null,xt),Ye&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(T,"JPEG",Ie.x,Ie.y,Ie.w,Ie.h,null,null,xt)};var R=function(T,q,V){var te=[];q=q||this.pdf.internal.pageSize.width,V=V||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var se=this.posY+this.ctx.prevPageLastElemOffset;switch(T.type){default:case"mt":case"lt":te.push(Math.floor((T.y+se)/V)+1);break;case"arc":te.push(Math.floor((T.y+se-T.radius)/V)+1),te.push(Math.floor((T.y+se+T.radius)/V)+1);break;case"qct":var ye=Le(this.ctx.lastPoint.x,this.ctx.lastPoint.y,T.x1,T.y1,T.x,T.y);te.push(Math.floor((ye.y+se)/V)+1),te.push(Math.floor((ye.y+ye.h+se)/V)+1);break;case"bct":var je=W(this.ctx.lastPoint.x,this.ctx.lastPoint.y,T.x1,T.y1,T.x2,T.y2,T.x,T.y);te.push(Math.floor((je.y+se)/V)+1),te.push(Math.floor((je.y+je.h+se)/V)+1);break;case"rect":te.push(Math.floor((T.y+se)/V)+1),te.push(Math.floor((T.y+T.h+se)/V)+1)}for(var Ce=0;Ce<te.length;Ce+=1)for(;this.pdf.internal.getNumberOfPages()<te[Ce];)E.call(this);return te},E=function(){var T=this.fillStyle,q=this.strokeStyle,V=this.font,te=this.lineCap,se=this.lineWidth,ye=this.lineJoin;this.pdf.addPage(),this.fillStyle=T,this.strokeStyle=q,this.font=V,this.lineCap=te,this.lineWidth=se,this.lineJoin=ye},Y=function(T,q,V){for(var te=0;te<T.length;te++)switch(T[te].type){case"bct":T[te].x2+=q,T[te].y2+=V;case"qct":T[te].x1+=q,T[te].y1+=V;default:T[te].x+=q,T[te].y+=V}return T},H=function(T){return T.sort(function(q,V){return q-V})},F=function(T,q){var V=this.fillStyle,te=this.strokeStyle,se=this.lineCap,ye=this.lineWidth,je=Math.abs(ye*this.ctx.transform.scaleX),Ce=this.lineJoin;if(this.autoPaging){for(var ze,We,Xe=JSON.parse(JSON.stringify(this.path)),Ve=JSON.parse(JSON.stringify(this.path)),dt=[],G=0;G<Ve.length;G++)if(Ve[G].x!==void 0)for(var Qe=R.call(this,Ve[G]),xt=0;xt<Qe.length;xt+=1)dt.indexOf(Qe[xt])===-1&&dt.push(Qe[xt]);for(var ut=0;ut<dt.length;ut++)for(;this.pdf.internal.getNumberOfPages()<dt[ut];)E.call(this);H(dt);for(var Ie=dt[0],mt=dt[dt.length-1],Ze=Ie;Ze<mt+1;Ze++){this.pdf.setPage(Ze),this.fillStyle=V,this.strokeStyle=te,this.lineCap=se,this.lineWidth=je,this.lineJoin=Ce;var bt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ht=Ze===1?this.posY+this.margin[0]:this.margin[0],Wt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Gt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],wt=Ze===1?0:Wt+(Ze-2)*Gt;if(this.ctx.clip_path.length!==0){var _t=this.path;ze=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(ze,this.posX+this.margin[3],-wt+ht+this.ctx.prevPageLastElemOffset),X.call(this,T,!0),this.path=_t}if(We=JSON.parse(JSON.stringify(Xe)),this.path=Y(We,this.posX+this.margin[3],-wt+ht+this.ctx.prevPageLastElemOffset),q===!1||Ze===0){var Dt=(Ze>Ie||Ze<mt)&&L.call(this);Dt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],bt,Gt,null).clip().discardPath()),X.call(this,T,q),Dt&&this.pdf.restoreGraphicsState()}this.lineWidth=ye}this.path=Xe}else this.lineWidth=je,X.call(this,T,q),this.lineWidth=ye},X=function(T,q){if((T!=="stroke"||q||!k.call(this))&&(T==="stroke"||q||!w.call(this))){for(var V,te,se=[],ye=this.path,je=0;je<ye.length;je++){var Ce=ye[je];switch(Ce.type){case"begin":se.push({begin:!0});break;case"close":se.push({close:!0});break;case"mt":se.push({start:Ce,deltas:[],abs:[]});break;case"lt":var ze=se.length;if(ye[je-1]&&!isNaN(ye[je-1].x)&&(V=[Ce.x-ye[je-1].x,Ce.y-ye[je-1].y],ze>0)){for(;ze>=0;ze--)if(se[ze-1].close!==!0&&se[ze-1].begin!==!0){se[ze-1].deltas.push(V),se[ze-1].abs.push(Ce);break}}break;case"bct":V=[Ce.x1-ye[je-1].x,Ce.y1-ye[je-1].y,Ce.x2-ye[je-1].x,Ce.y2-ye[je-1].y,Ce.x-ye[je-1].x,Ce.y-ye[je-1].y],se[se.length-1].deltas.push(V);break;case"qct":var We=ye[je-1].x+2/3*(Ce.x1-ye[je-1].x),Xe=ye[je-1].y+2/3*(Ce.y1-ye[je-1].y),Ve=Ce.x+2/3*(Ce.x1-Ce.x),dt=Ce.y+2/3*(Ce.y1-Ce.y),G=Ce.x,Qe=Ce.y;V=[We-ye[je-1].x,Xe-ye[je-1].y,Ve-ye[je-1].x,dt-ye[je-1].y,G-ye[je-1].x,Qe-ye[je-1].y],se[se.length-1].deltas.push(V);break;case"arc":se.push({deltas:[],abs:[],arc:!0}),Array.isArray(se[se.length-1].abs)&&se[se.length-1].abs.push(Ce)}}te=q?null:T==="stroke"?"stroke":"fill";for(var xt=!1,ut=0;ut<se.length;ut++)if(se[ut].arc)for(var Ie=se[ut].abs,mt=0;mt<Ie.length;mt++){var Ze=Ie[mt];Ze.type==="arc"?oe.call(this,Ze.x,Ze.y,Ze.radius,Ze.startAngle,Ze.endAngle,Ze.counterclockwise,void 0,q,!xt):ne.call(this,Ze.x,Ze.y),xt=!0}else if(se[ut].close===!0)this.pdf.internal.out("h"),xt=!1;else if(se[ut].begin!==!0){var bt=se[ut].start.x,ht=se[ut].start.y;re.call(this,se[ut].deltas,bt,ht),xt=!0}te&&Z.call(this,te),q&&ge.call(this)}},_e=function(T){var q=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,V=q*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return T-V;case"top":return T+q-V;case"hanging":return T+q-2*V;case"middle":return T+q/2-V;default:return T}},xe=function(T){return T+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};_.prototype.createLinearGradient=function(){var T=function(){};return T.colorStops=[],T.addColorStop=function(q,V){this.colorStops.push([q,V])},T.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},T.isCanvasGradient=!0,T},_.prototype.createPattern=function(){return this.createLinearGradient()},_.prototype.createRadialGradient=function(){return this.createLinearGradient()};var oe=function(T,q,V,te,se,ye,je,Ce,ze){for(var We=ee.call(this,V,te,se,ye),Xe=0;Xe<We.length;Xe++){var Ve=We[Xe];Xe===0&&(ze?O.call(this,Ve.x1+T,Ve.y1+q):ne.call(this,Ve.x1+T,Ve.y1+q)),ve.call(this,T,q,Ve.x2,Ve.y2,Ve.x3,Ve.y3,Ve.x4,Ve.y4)}Ce?ge.call(this):Z.call(this,je)},Z=function(T){switch(T){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},ge=function(){this.pdf.clip(),this.pdf.discardPath()},O=function(T,q){this.pdf.internal.out(a(T)+" "+i(q)+" m")},U=function(T){var q;switch(T.align){case"right":case"end":q="right";break;case"center":q="center";break;default:q="left"}var V,te,se,ye=this.pdf.getTextDimensions(T.text),je=_e.call(this,T.y),Ce=xe.call(this,je)-ye.h,ze=this.ctx.transform.applyToPoint(new h(T.x,je));if(this.autoPaging){var We=this.ctx.transform.decompose(),Xe=new f;Xe=(Xe=(Xe=Xe.multiply(We.translate)).multiply(We.skew)).multiply(We.scale);for(var Ve=this.ctx.transform.applyToRectangle(new d(T.x,je,ye.w,ye.h)),dt=Xe.applyToRectangle(new d(T.x,Ce,ye.w,ye.h)),G=R.call(this,dt),Qe=[],xt=0;xt<G.length;xt+=1)Qe.indexOf(G[xt])===-1&&Qe.push(G[xt]);H(Qe);for(var ut=Qe[0],Ie=Qe[Qe.length-1],mt=ut;mt<Ie+1;mt++){this.pdf.setPage(mt);var Ze=mt===1?this.posY+this.margin[0]:this.margin[0],bt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[2],Wt=ht-this.margin[0],Gt=this.pdf.internal.pageSize.width-this.margin[1],wt=Gt-this.margin[3],_t=mt===1?0:bt+(mt-2)*Wt;if(this.ctx.clip_path.length!==0){var Dt=this.path;V=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(V,this.posX+this.margin[3],-1*_t+Ze),X.call(this,"fill",!0),this.path=Dt}var $e=Y([JSON.parse(JSON.stringify(dt))],this.posX+this.margin[3],-_t+Ze+this.ctx.prevPageLastElemOffset)[0];T.scale>=.01&&(te=this.pdf.internal.getFontSize(),this.pdf.setFontSize(te*T.scale),se=this.lineWidth,this.lineWidth=se*T.scale);var qt=this.autoPaging!=="text";if(qt||$e.y+$e.h<=ht){if(qt||$e.y>=Ze&&$e.x<=Gt){var pt=qt?T.text:this.pdf.splitTextToSize(T.text,T.maxWidth||Gt-$e.x)[0],Dn=Y([JSON.parse(JSON.stringify(Ve))],this.posX+this.margin[3],-_t+Ze+this.ctx.prevPageLastElemOffset)[0],we=qt&&(mt>ut||mt<Ie)&&L.call(this);we&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],wt,Wt,null).clip().discardPath()),this.pdf.text(pt,Dn.x,Dn.y,{angle:T.angle,align:q,renderingMode:T.renderingMode}),we&&this.pdf.restoreGraphicsState()}}else $e.y<ht&&(this.ctx.prevPageLastElemOffset+=ht-$e.y);T.scale>=.01&&(this.pdf.setFontSize(te),this.lineWidth=se)}}else T.scale>=.01&&(te=this.pdf.internal.getFontSize(),this.pdf.setFontSize(te*T.scale),se=this.lineWidth,this.lineWidth=se*T.scale),this.pdf.text(T.text,ze.x+this.posX,ze.y+this.posY,{angle:T.angle,align:q,renderingMode:T.renderingMode,maxWidth:T.maxWidth}),T.scale>=.01&&(this.pdf.setFontSize(te),this.lineWidth=se)},ne=function(T,q,V,te){V=V||0,te=te||0,this.pdf.internal.out(a(T+V)+" "+i(q+te)+" l")},re=function(T,q,V){return this.pdf.lines(T,q,V,null,null)},ve=function(T,q,V,te,se,ye,je,Ce){this.pdf.internal.out([n(o(V+T)),n(u(te+q)),n(o(se+T)),n(u(ye+q)),n(o(je+T)),n(u(Ce+q)),"c"].join(" "))},ee=function(T,q,V,te){for(var se=2*Math.PI,ye=Math.PI/2;q>V;)q-=se;var je=Math.abs(V-q);je<se&&te&&(je=se-je);for(var Ce=[],ze=te?-1:1,We=q;je>1e-5;){var Xe=We+ze*Math.min(je,ye);Ce.push(J.call(this,T,We,Xe)),je-=Math.abs(Xe-We),We=Xe}return Ce},J=function(T,q,V){var te=(V-q)/2,se=T*Math.cos(te),ye=T*Math.sin(te),je=se,Ce=-ye,ze=je*je+Ce*Ce,We=ze+je*se+Ce*ye,Xe=4/3*(Math.sqrt(2*ze*We)-We)/(je*ye-Ce*se),Ve=je-Xe*Ce,dt=Ce+Xe*je,G=Ve,Qe=-dt,xt=te+q,ut=Math.cos(xt),Ie=Math.sin(xt);return{x1:T*Math.cos(q),y1:T*Math.sin(q),x2:Ve*ut-dt*Ie,y2:Ve*Ie+dt*ut,x3:G*ut-Qe*Ie,y3:G*Ie+Qe*ut,x4:T*Math.cos(V),y4:T*Math.sin(V)}},le=function(T){return 180*T/Math.PI},Le=function(T,q,V,te,se,ye){var je=T+.5*(V-T),Ce=q+.5*(te-q),ze=se+.5*(V-se),We=ye+.5*(te-ye),Xe=Math.min(T,se,je,ze),Ve=Math.max(T,se,je,ze),dt=Math.min(q,ye,Ce,We),G=Math.max(q,ye,Ce,We);return new d(Xe,dt,Ve-Xe,G-dt)},W=function(T,q,V,te,se,ye,je,Ce){var ze,We,Xe,Ve,dt,G,Qe,xt,ut,Ie,mt,Ze,bt,ht,Wt=V-T,Gt=te-q,wt=se-V,_t=ye-te,Dt=je-se,$e=Ce-ye;for(We=0;We<41;We++)ut=(Qe=(Xe=T+(ze=We/40)*Wt)+ze*((dt=V+ze*wt)-Xe))+ze*(dt+ze*(se+ze*Dt-dt)-Qe),Ie=(xt=(Ve=q+ze*Gt)+ze*((G=te+ze*_t)-Ve))+ze*(G+ze*(ye+ze*$e-G)-xt),We==0?(mt=ut,Ze=Ie,bt=ut,ht=Ie):(mt=Math.min(mt,ut),Ze=Math.min(Ze,Ie),bt=Math.max(bt,ut),ht=Math.max(ht,Ie));return new d(Math.round(mt),Math.round(Ze),Math.round(bt-mt),Math.round(ht-Ze))},ce=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var T,q,V=(T=this.ctx.lineDash,q=this.ctx.lineDashOffset,JSON.stringify({lineDash:T,lineDashOffset:q}));this.prevLineDash!==V&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=V)}}})(gt.API),(function(t){var n=function(h){var d,f,g,v,_,j,w,k,L,R;for(f=[],g=0,v=(h+=d="\0\0\0\0".slice(h.length%4||4)).length;v>g;g+=4)(_=(h.charCodeAt(g)<<24)+(h.charCodeAt(g+1)<<16)+(h.charCodeAt(g+2)<<8)+h.charCodeAt(g+3))!==0?(j=(_=((_=((_=((_=(_-(R=_%85))/85)-(L=_%85))/85)-(k=_%85))/85)-(w=_%85))/85)%85,f.push(j+33,w+33,k+33,L+33,R+33)):f.push(122);return(function(E,Y){for(var H=Y;H>0;H--)E.pop()})(f,d.length),String.fromCharCode.apply(String,f)+"~>"},a=function(h){var d,f,g,v,_,j=String,w="length",k=255,L="charCodeAt",R="slice",E="replace";for(h[R](-2),h=h[R](0,-2)[E](/\s/g,"")[E]("z","!!!!!"),g=[],v=0,_=(h+=d="uuuuu"[R](h[w]%5||5))[w];_>v;v+=5)f=52200625*(h[L](v)-33)+614125*(h[L](v+1)-33)+7225*(h[L](v+2)-33)+85*(h[L](v+3)-33)+(h[L](v+4)-33),g.push(k&f>>24,k&f>>16,k&f>>8,k&f);return(function(Y,H){for(var F=H;F>0;F--)Y.pop()})(g,d[w]),j.fromCharCode.apply(j,g)},i=function(h){return h.split("").map(function(d){return("0"+d.charCodeAt().toString(16)).slice(-2)}).join("")+">"},o=function(h){var d=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((h=h.replace(/\s/g,"")).indexOf(">")!==-1&&(h=h.substr(0,h.indexOf(">"))),h.length%2&&(h+="0"),d.test(h)===!1)return"";for(var f="",g=0;g<h.length;g+=2)f+=String.fromCharCode("0x"+(h[g]+h[g+1]));return f},u=function(h){for(var d=new Uint8Array(h.length),f=h.length;f--;)d[f]=h.charCodeAt(f);return(d=u0(d)).reduce(function(g,v){return g+String.fromCharCode(v)},"")};t.processDataByFilters=function(h,d){var f=0,g=h||"",v=[];for(typeof(d=d||[])=="string"&&(d=[d]),f=0;f<d.length;f+=1)switch(d[f]){case"ASCII85Decode":case"/ASCII85Decode":g=a(g),v.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":g=n(g),v.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":g=o(g),v.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":g=i(g),v.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":g=u(g),v.push("/FlateDecode");break;default:throw new Error('The filter: "'+d[f]+'" is not implemented')}return{data:g,reverseChain:v.reverse().join(" ")}}})(gt.API),(function(t){t.loadFile=function(n,a,i){return(function(o,u,h){u=u!==!1,h=typeof h=="function"?h:function(){};var d=void 0;try{d=(function(f,g,v){var _=new XMLHttpRequest,j=0,w=function(k){var L=k.length,R=[],E=String.fromCharCode;for(j=0;j<L;j+=1)R.push(E(255&k.charCodeAt(j)));return R.join("")};if(_.open("GET",f,!g),_.overrideMimeType("text/plain; charset=x-user-defined"),g===!1&&(_.onload=function(){_.status===200?v(w(this.responseText)):v(void 0)}),_.send(null),g&&_.status===200)return w(_.responseText)})(o,u,h)}catch{}return d})(n,a,i)},t.allowFsRead=void 0,t.loadImageFile=t.loadFile})(gt.API),(function(t){function n(){return(Pt.html2canvas?Promise.resolve(Pt.html2canvas):Ud(()=>import("./html2canvas.esm-ezMWrafe.js"),[])).catch(function(d){return Promise.reject(new Error("Could not load html2canvas: "+d))}).then(function(d){return d.default?d.default:d})}function a(){return(Pt.DOMPurify?Promise.resolve(Pt.DOMPurify):Ud(()=>import("./purify.es-BgtpMKW3.js"),[])).catch(function(d){return Promise.reject(new Error("Could not load dompurify: "+d))}).then(function(d){return d.default?d.default:d})}var i=function(d){var f=Sn(d);return f==="undefined"?"undefined":f==="string"||d instanceof String?"string":f==="number"||d instanceof Number?"number":f==="function"||d instanceof Function?"function":d&&d.constructor===Array?"array":d&&d.nodeType===1?"element":f==="object"?"object":"unknown"},o=function(d,f){var g=document.createElement(d);for(var v in f.className&&(g.className=f.className),f.innerHTML&&f.dompurify&&(g.innerHTML=f.dompurify.sanitize(f.innerHTML)),f.style)g.style[v]=f.style[v];return g},u=function d(f,g){for(var v=f.nodeType===3?document.createTextNode(f.nodeValue):f.cloneNode(!1),_=f.firstChild;_;_=_.nextSibling)g!==!0&&_.nodeType===1&&_.nodeName==="SCRIPT"||v.appendChild(d(_,g));return f.nodeType===1&&(f.nodeName==="CANVAS"?(v.width=f.width,v.height=f.height,v.getContext("2d").drawImage(f,0,0)):f.nodeName!=="TEXTAREA"&&f.nodeName!=="SELECT"||(v.value=f.value),v.addEventListener("load",function(){v.scrollTop=f.scrollTop,v.scrollLeft=f.scrollLeft},!0)),v},h=function d(f){var g=Object.assign(d.convert(Promise.resolve()),JSON.parse(JSON.stringify(d.template))),v=d.convert(Promise.resolve(),g);return(v=v.setProgress(1,d,1,[d])).set(f)};(h.prototype=Object.create(Promise.prototype)).constructor=h,h.convert=function(d,f){return d.__proto__=f||h.prototype,d},h.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"}},h.prototype.from=function(d,f){return this.then(function(){switch(f=f||(function(g){switch(i(g)){case"string":return"string";case"element":return g.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(d),f){case"string":return this.then(a).then(function(g){return this.set({src:o("div",{innerHTML:d,dompurify:g})})});case"element":return this.set({src:d});case"canvas":return this.set({canvas:d});case"img":return this.set({img:d});default:return this.error("Unknown source type.")}})},h.prototype.to=function(d){switch(d){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.")}},h.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 d={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},f=u(this.prop.src,this.opt.html2canvas.javascriptEnabled);f.tagName==="BODY"&&(d.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:d}),this.prop.container.appendChild(f),this.prop.container.firstChild.appendChild(o("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"})},h.prototype.toCanvas=function(){var d=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(d).then(n).then(function(f){var g=Object.assign({},this.opt.html2canvas);return delete g.onrendered,f(this.prop.container,g)}).then(function(f){(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toContext2d=function(){var d=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(d).then(n).then(function(f){var g=this.opt.jsPDF,v=this.opt.fontFaces,_=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,j=Object.assign({async:!0,allowTaint:!0,scale:_,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 j.onrendered,g.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,g.context2d.posX=this.opt.x,g.context2d.posY=this.opt.y,g.context2d.margin=this.opt.margin,g.context2d.fontFaces=v,v)for(var w=0;w<v.length;++w){var k=v[w],L=k.src.find(function(R){return R.format==="truetype"});L&&g.addFont(L.url,k.ref.name,k.ref.style)}return j.windowHeight=j.windowHeight||0,j.windowHeight=j.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):j.windowHeight,g.context2d.save(!0),f(this.prop.container,j)}).then(function(f){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(f),this.prop.canvas=f,document.body.removeChild(this.prop.overlay)})},h.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var d=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=d})},h.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},h.prototype.output=function(d,f,g){return(g=g||"pdf").toLowerCase()==="img"||g.toLowerCase()==="image"?this.outputImg(d,f):this.outputPdf(d,f)},h.prototype.outputPdf=function(d,f){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(d,f)})},h.prototype.outputImg=function(d){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(d){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 "'+d+'" is not supported.'}})},h.prototype.save=function(d){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(d?{filename:d}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},h.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},h.prototype.set=function(d){if(i(d)!=="object")return this;var f=Object.keys(d||{}).map(function(g){if(g in h.template.prop)return function(){this.prop[g]=d[g]};switch(g){case"margin":return this.setMargin.bind(this,d.margin);case"jsPDF":return function(){return this.opt.jsPDF=d.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,d.pageSize);default:return function(){this.opt[g]=d[g]}}},this);return this.then(function(){return this.thenList(f)})},h.prototype.get=function(d,f){return this.then(function(){var g=d in h.template.prop?this.prop[d]:this.opt[d];return f?f(g):g})},h.prototype.setMargin=function(d){return this.then(function(){switch(i(d)){case"number":d=[d,d,d,d];case"array":if(d.length===2&&(d=[d[0],d[1],d[0],d[1]]),d.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=d}).then(this.setPageSize)},h.prototype.setPageSize=function(d){function f(g,v){return Math.floor(g*v/72*96)}return this.then(function(){(d=d||gt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(d.inner={width:d.width-this.opt.margin[1]-this.opt.margin[3],height:d.height-this.opt.margin[0]-this.opt.margin[2]},d.inner.px={width:f(d.inner.width,d.k),height:f(d.inner.height,d.k)},d.inner.ratio=d.inner.height/d.inner.width),this.prop.pageSize=d})},h.prototype.setProgress=function(d,f,g,v){return d!=null&&(this.progress.val=d),f!=null&&(this.progress.state=f),g!=null&&(this.progress.n=g),v!=null&&(this.progress.stack=v),this.progress.ratio=this.progress.val/this.progress.state,this},h.prototype.updateProgress=function(d,f,g,v){return this.setProgress(d?this.progress.val+d:null,f||null,g?this.progress.n+g:null,v?this.progress.stack.concat(v):null)},h.prototype.then=function(d,f){var g=this;return this.thenCore(d,f,function(v,_){return g.updateProgress(null,null,1,[v]),Promise.prototype.then.call(this,function(j){return g.updateProgress(null,v),j}).then(v,_).then(function(j){return g.updateProgress(1),j})})},h.prototype.thenCore=function(d,f,g){g=g||Promise.prototype.then;var v=this;d&&(d=d.bind(v)),f&&(f=f.bind(v));var _=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?v:h.convert(Object.assign({},v),Promise.prototype),j=g.call(_,d,f);return h.convert(j,v.__proto__)},h.prototype.thenExternal=function(d,f){return Promise.prototype.then.call(this,d,f)},h.prototype.thenList=function(d){var f=this;return d.forEach(function(g){f=f.thenCore(g)}),f},h.prototype.catch=function(d){d&&(d=d.bind(this));var f=Promise.prototype.catch.call(this,d);return h.convert(f,this)},h.prototype.catchExternal=function(d){return Promise.prototype.catch.call(this,d)},h.prototype.error=function(d){return this.then(function(){throw new Error(d)})},h.prototype.using=h.prototype.set,h.prototype.saveAs=h.prototype.save,h.prototype.export=h.prototype.output,h.prototype.run=h.prototype.then,gt.getPageSize=function(d,f,g){if(Sn(d)==="object"){var v=d;d=v.orientation,f=v.unit||f,g=v.format||g}f=f||"mm",g=g||"a4",d=(""+(d||"P")).toLowerCase();var _,j=(""+g).toLowerCase(),w={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(f){case"pt":_=1;break;case"mm":_=72/25.4;break;case"cm":_=72/2.54;break;case"in":_=72;break;case"px":_=.75;break;case"pc":case"em":_=12;break;case"ex":_=6;break;default:throw"Invalid unit: "+f}var k,L=0,R=0;if(w.hasOwnProperty(j))L=w[j][1]/_,R=w[j][0]/_;else try{L=g[1],R=g[0]}catch{throw new Error("Invalid format: "+g)}if(d==="p"||d==="portrait")d="p",R>L&&(k=R,R=L,L=k);else{if(d!=="l"&&d!=="landscape")throw"Invalid orientation: "+d;d="l",L>R&&(k=R,R=L,L=k)}return{width:R,height:L,unit:f,k:_,orientation:d}},t.html=function(d,f){(f=f||{}).callback=f.callback||function(){},f.html2canvas=f.html2canvas||{},f.html2canvas.canvas=f.html2canvas.canvas||this.canvas,f.jsPDF=f.jsPDF||this,f.fontFaces=f.fontFaces?f.fontFaces.map(Y1):null;var g=new h(f);return f.worker?g:g.from(d).doCallback()}})(gt.API),gt.API.addJS=function(t){var n,a,i=(function(o){for(var u="",h=0;h<o.length;h++){var d=o[h];if(d==="("||d===")"){for(var f=0,g=h-1;g>=0&&o[g]==="\\";g--)f++;u+=f%2==0?"\\"+d:d}else u+=d}return u})(t);return this.internal.events.subscribe("postPutResources",function(){n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(n+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),a=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+i+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){n!==void 0&&a!==void 0&&this.internal.out("/Names <</JavaScript "+n+" 0 R>>")}),this},(function(t){var n;t.events.push(["postPutResources",function(){var a=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=a.outline.render().split(/\r\n/),u=0;u<o.length;u++){var h=o[u],d=i.exec(h);if(d!=null){var f=d[1];a.internal.newObjectDeferredBegin(f,!1)}a.internal.write(h)}if(this.outline.createNamedDestinations){var g=this.internal.pages.length,v=[];for(u=0;u<g;u++){var _=a.internal.newObject();v.push(_);var j=a.internal.getPageInfo(u+1);a.internal.write("<< /D["+j.objId+" 0 R /XYZ null null null]>> endobj")}var w=a.internal.newObject();for(a.internal.write("<< /Names [ "),u=0;u<v.length;u++)a.internal.write("(page_"+(u+1)+")"+v[u]+" 0 R");a.internal.write(" ] >>","endobj"),n=a.internal.newObject(),a.internal.write("<< /Dests "+w+" 0 R"),a.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var a=this;a.outline.root.children.length>0&&(a.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&a.internal.write("/Names "+n+" 0 R"))}]),t.events.push(["initialized",function(){var a=this;a.outline={createNamedDestinations:!1,root:{children:[]}},a.outline.add=function(i,o,u){var h={title:o,options:u,children:[]};return i==null&&(i=this.root),i.children.push(h),h},a.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=a,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},a.outline.genIds_r=function(i){i.id=a.internal.newObjectDeferred();for(var o=0;o<i.children.length;o++)this.genIds_r(i.children[o])},a.outline.renderRoot=function(i){this.objStart(i),this.line("/Type /Outlines"),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.line("/Count "+this.count_r({count:0},i)),this.objEnd()},a.outline.renderItems=function(i){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,u=0;u<i.children.length;u++){var h=i.children[u];this.objStart(h),this.line("/Title "+this.makeString(h.title)),this.line("/Parent "+this.makeRef(i)),u>0&&this.line("/Prev "+this.makeRef(i.children[u-1])),u<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[u+1])),h.children.length>0&&(this.line("/First "+this.makeRef(h.children[0])),this.line("/Last "+this.makeRef(h.children[h.children.length-1])));var d=this.count=this.count_r({count:0},h);if(d>0&&this.line("/Count "+d),h.options&&h.options.pageNumber){var f=a.internal.getPageInfo(h.options.pageNumber);this.line("/Dest ["+f.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var g=0;g<i.children.length;g++)this.renderItems(i.children[g])},a.outline.line=function(i){this.ctx.val+=i+`\r
|
|
584
|
+
`},a.outline.makeRef=function(i){return i.id+" 0 R"},a.outline.makeString=function(i){return"("+a.internal.pdfEscape(i)+")"},a.outline.objStart=function(i){this.ctx.val+=`\r
|
|
585
|
+
`+i.id+` 0 obj\r
|
|
586
|
+
<<\r
|
|
587
|
+
`},a.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
588
|
+
endobj\r
|
|
589
|
+
`},a.outline.count_r=function(i,o){for(var u=0;u<o.children.length;u++)i.count++,this.count_r(i,o.children[u]);return i.count}}])})(gt.API),(function(t){var n=[192,193,194,195,196,197,198,199];t.processJPEG=function(a,i,o,u,h,d){var f,g=this.decode.DCT_DECODE,v=null;if(typeof a=="string"||this.__addimage__.isArrayBuffer(a)||this.__addimage__.isArrayBufferView(a)){switch(a=h||a,a=this.__addimage__.isArrayBuffer(a)?new Uint8Array(a):a,f=(function(_){for(var j,w=256*_.charCodeAt(4)+_.charCodeAt(5),k=_.length,L={width:0,height:0,numcomponents:1},R=4;R<k;R+=2){if(R+=w,n.indexOf(_.charCodeAt(R+1))!==-1){j=256*_.charCodeAt(R+5)+_.charCodeAt(R+6),L={width:256*_.charCodeAt(R+7)+_.charCodeAt(R+8),height:j,numcomponents:_.charCodeAt(R+9)};break}w=256*_.charCodeAt(R+2)+_.charCodeAt(R+3)}return L})(a=this.__addimage__.isArrayBufferView(a)?this.__addimage__.arrayBufferToBinaryString(a):a),f.numcomponents){case 1:d=this.color_spaces.DEVICE_GRAY;break;case 4:d=this.color_spaces.DEVICE_CMYK;break;case 3:d=this.color_spaces.DEVICE_RGB}v={data:a,width:f.width,height:f.height,colorSpace:d,bitsPerComponent:8,filter:g,index:i,alias:o}}return v}})(gt.API),gt.API.processPNG=function(t,n,a,i){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var o,u=H8(t,{checkCrc:!0}),h=u.width,d=u.height,f=u.channels,g=u.palette,v=u.depth;o=g&&f===1?(function(oe){for(var Z=oe.width,ge=oe.height,O=oe.data,U=oe.palette,ne=oe.depth,re=!1,ve=[],ee=[],J=void 0,le=!1,Le=0,W=0;W<U.length;W++){var ce=Tg(U[W],4),T=ce[0],q=ce[1],V=ce[2],te=ce[3];ve.push(T,q,V),te!=null&&(te===0?(Le++,ee.length<1&&ee.push(W)):te<255&&(le=!0))}if(le||Le>1){re=!0,ee=void 0;var se=Z*ge;J=new Uint8Array(se);for(var ye=new DataView(O.buffer),je=0;je<se;je++){var Ce=V1(ye,je,ne),ze=Tg(U[Ce],4)[3];J[je]=ze}}else Le===0&&(ee=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:re?8:void 0,colorBytes:O,alphaBytes:J,needSMask:re,palette:ve,mask:ee}})(u):f===2||f===4?(function(oe){for(var Z=oe.data,ge=oe.width,O=oe.height,U=oe.channels,ne=oe.depth,re=U===2?"DeviceGray":"DeviceRGB",ve=U-1,ee=ge*O,J=ve,le=ee*J,Le=1*ee,W=Math.ceil(le*ne/8),ce=Math.ceil(Le*ne/8),T=new Uint8Array(W),q=new Uint8Array(ce),V=new DataView(Z.buffer),te=new DataView(T.buffer),se=new DataView(q.buffer),ye=!1,je=0;je<ee;je++){for(var Ce=je*U,ze=0;ze<J;ze++)Rm(te,V1(V,Ce+ze,ne),je*J+ze,ne);var We=V1(V,Ce+J,ne);We<(1<<ne)-1&&(ye=!0),Rm(se,We,1*je,ne)}return{colorSpace:re,colorsPerPixel:ve,sMaskBitsPerComponent:ye?ne:void 0,colorBytes:T,alphaBytes:q,needSMask:ye}})(u):(function(oe){var Z=oe.data,ge=oe.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:ge,colorsPerPixel:ge==="DeviceGray"?1:3,colorBytes:Z instanceof Uint16Array?(function(O){for(var U=O.length,ne=new Uint8Array(2*U),re=new DataView(ne.buffer,ne.byteOffset,ne.byteLength),ve=0;ve<U;ve++)re.setUint16(2*ve,O[ve],!1);return ne})(Z):Z,needSMask:!1}})(u);var _,j,w,k=o,L=k.colorSpace,R=k.colorsPerPixel,E=k.sMaskBitsPerComponent,Y=k.colorBytes,H=k.alphaBytes,F=k.needSMask,X=k.palette,_e=k.mask,xe=null;return i!==gt.API.image_compression.NONE&&typeof u0=="function"?(xe=(function(oe){var Z;switch(oe){case gt.API.image_compression.FAST:Z=11;break;case gt.API.image_compression.MEDIUM:Z=13;break;case gt.API.image_compression.SLOW:Z=14;break;default:Z=12}return Z})(i),_=this.decode.FLATE_DECODE,j="/Predictor ".concat(xe," /Colors ").concat(R," /BitsPerComponent ").concat(v," /Columns ").concat(h),t=Lm(Y,Math.ceil(h*R*v/8),R,v,i),F&&(w=Lm(H,Math.ceil(h*E/8),1,E,i))):(_=void 0,j=void 0,t=Y,F&&(w=H)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(w&&this.__addimage__.isArrayBuffer(w)||this.__addimage__.isArrayBufferView(w))&&(w=this.__addimage__.arrayBufferToBinaryString(w)),{alias:a,data:t,index:n,filter:_,decodeParameters:j,transparency:_e,palette:X,sMask:w,predictor:xe,width:h,height:d,bitsPerComponent:v,sMaskBitsPerComponent:E,colorSpace:L}}},(function(t){t.processGIF89A=function(n,a,i,o){var u=new c_(n),h=u.width,d=u.height,f=[];u.decodeAndBlitFrameRGBA(0,f);var g={data:f,width:h,height:d},v=new Q1(100).encode(g,100);return t.processJPEG.call(this,v,a,i,o)},t.processGIF87A=t.processGIF89A})(gt.API),Gi.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var n=0;n<t;n++){var a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0);this.palette[n]={red:o,green:i,blue:a,quad:u}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Gi.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,n=this.width*this.height*4;if(n>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(n);try{this[t]()}catch(a){Tn.log("bit decode error:"+a)}},Gi.prototype.bit1=function(){var t,n=Math.ceil(this.width/8),a=n%4;for(t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o<n;o++)for(var u=this.datav.getUint8(this.pos++,!0),h=i*this.width*4+8*o*4,d=0;d<8&&8*o+d<this.width;d++){var f=this.palette[u>>7-d&1];this.data[h+4*d]=f.blue,this.data[h+4*d+1]=f.green,this.data[h+4*d+2]=f.red,this.data[h+4*d+3]=255}a!==0&&(this.pos+=4-a)}},Gi.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),n=t%4,a=this.height-1;a>=0;a--){for(var i=this.bottom_up?a:this.height-1-a,o=0;o<t;o++){var u=this.datav.getUint8(this.pos++,!0),h=i*this.width*4+2*o*4,d=u>>4,f=15&u,g=this.palette[d];if(this.data[h]=g.blue,this.data[h+1]=g.green,this.data[h+2]=g.red,this.data[h+3]=255,2*o+1>=this.width)break;g=this.palette[f],this.data[h+4]=g.blue,this.data[h+4+1]=g.green,this.data[h+4+2]=g.red,this.data[h+4+3]=255}n!==0&&(this.pos+=4-n)}},Gi.prototype.bit8=function(){for(var t=this.width%4,n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var o=this.datav.getUint8(this.pos++,!0),u=a*this.width*4+4*i;if(o<this.palette.length){var h=this.palette[o];this.data[u]=h.red,this.data[u+1]=h.green,this.data[u+2]=h.blue,this.data[u+3]=255}else this.data[u]=255,this.data[u+1]=255,this.data[u+2]=255,this.data[u+3]=255}t!==0&&(this.pos+=4-t)}},Gi.prototype.bit15=function(){for(var t=this.width%3,n=parseInt("11111",2),a=this.height-1;a>=0;a--){for(var i=this.bottom_up?a:this.height-1-a,o=0;o<this.width;o++){var u=this.datav.getUint16(this.pos,!0);this.pos+=2;var h=(u&n)/n*255|0,d=(u>>5&n)/n*255|0,f=(u>>10&n)/n*255|0,g=u>>15?255:0,v=i*this.width*4+4*o;this.data[v]=f,this.data[v+1]=d,this.data[v+2]=h,this.data[v+3]=g}this.pos+=t}},Gi.prototype.bit16=function(){for(var t=this.width%3,n=parseInt("11111",2),a=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var o=this.bottom_up?i:this.height-1-i,u=0;u<this.width;u++){var h=this.datav.getUint16(this.pos,!0);this.pos+=2;var d=(h&n)/n*255|0,f=(h>>5&a)/a*255|0,g=(h>>11)/n*255|0,v=o*this.width*4+4*u;this.data[v]=g,this.data[v+1]=f,this.data[v+2]=d,this.data[v+3]=255}this.pos+=t}},Gi.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0),h=n*this.width*4+4*a;this.data[h]=u,this.data[h+1]=o,this.data[h+2]=i,this.data[h+3]=255}this.pos+=this.width%4}},Gi.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var n=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),u=this.datav.getUint8(this.pos++,!0),h=this.datav.getUint8(this.pos++,!0),d=n*this.width*4+4*a;this.data[d]=u,this.data[d+1]=o,this.data[d+2]=i,this.data[d+3]=h}},Gi.prototype.getData=function(){return this.data},(function(t){t.processBMP=function(n,a,i,o){var u=new Gi(n,!1),h=u.width,d=u.height,f={data:u.getData(),width:h,height:d},g=new Q1(100).encode(f,100);return t.processJPEG.call(this,g,a,i,o)}})(gt.API),Dm.prototype.getData=function(){return this.data},(function(t){t.processWEBP=function(n,a,i,o){var u=new Dm(n),h=u.width,d=u.height,f={data:u.getData(),width:h,height:d},g=new Q1(100).encode(f,100);return t.processJPEG.call(this,g,a,i,o)}})(gt.API),gt.API.processRGBA=function(t,n,a){for(var i=t.data,o=i.length,u=new Uint8Array(o/4*3),h=new Uint8Array(o/4),d=0,f=0,g=0;g<o;g+=4){var v=i[g],_=i[g+1],j=i[g+2],w=i[g+3];u[d++]=v,u[d++]=_,u[d++]=j,h[f++]=w}var k=this.__addimage__.arrayBufferToBinaryString(u);return{alpha:this.__addimage__.arrayBufferToBinaryString(h),data:k,index:n,alias:a,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},gt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Xu=gt.API,Bd=Xu.getCharWidthsArray=function(t,n){var a,i,o=(n=n||{}).font||this.internal.getFont(),u=n.fontSize||this.internal.getFontSize(),h=n.charSpace||this.internal.getCharSpace(),d=n.widths?n.widths:o.metadata.Unicode.widths,f=d.fof?d.fof:1,g=n.kerning?n.kerning:o.metadata.Unicode.kerning,v=g.fof?g.fof:1,_=n.doKerning!==!1,j=0,w=t.length,k=0,L=d[0]||f,R=[];for(a=0;a<w;a++)i=t.charCodeAt(a),typeof o.metadata.widthOfString=="function"?R.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(i))+h*(1e3/u)||0)/1e3):(j=_&&Sn(g[i])==="object"&&!isNaN(parseInt(g[i][k],10))?g[i][k]/v:0,R.push((d[i]||L)/f+j)),k=i;return R},jm=Xu.getStringUnitWidth=function(t,n){var a=(n=n||{}).fontSize||this.internal.getFontSize(),i=n.font||this.internal.getFont(),o=n.charSpace||this.internal.getCharSpace();return Xu.processArabic&&(t=Xu.processArabic(t)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(t,a,o)/a:Bd.apply(this,arguments).reduce(function(u,h){return u+h},0)},km=function(t,n,a,i){for(var o=[],u=0,h=t.length,d=0;u!==h&&d+n[u]<a;)d+=n[u],u++;o.push(t.slice(0,u));var f=u;for(d=0;u!==h;)d+n[u]>i&&(o.push(t.slice(f,u)),d=0,f=u),d+=n[u],u++;return f!==u&&o.push(t.slice(f,u)),o},Nm=function(t,n,a){a||(a={});var i,o,u,h,d,f,g,v=[],_=[v],j=a.textIndent||0,w=0,k=0,L=t.split(" "),R=Bd.apply(this,[" ",a])[0];if(f=a.lineIndent===-1?L[0].length+2:a.lineIndent||0){var E=Array(f).join(" "),Y=[];L.map(function(F){(F=F.split(/\s*\n/)).length>1?Y=Y.concat(F.map(function(X,_e){return(_e&&X.length?`
|
|
590
|
+
`:"")+X})):Y.push(F[0])}),L=Y,f=jm.apply(this,[E,a])}for(u=0,h=L.length;u<h;u++){var H=0;if(i=L[u],f&&i[0]==`
|
|
591
|
+
`&&(i=i.substr(1),H=1),j+w+(k=(o=Bd.apply(this,[i,a])).reduce(function(F,X){return F+X},0))>n||H){if(k>n){for(d=km.apply(this,[i,o,n-(j+w),n]),v.push(d.shift()),v=[d.pop()];d.length;)_.push([d.shift()]);k=o.slice(i.length-(v[0]?v[0].length:0)).reduce(function(F,X){return F+X},0)}else v=[i];_.push(v),j=k+f,w=R}else v.push(i),j+=w+k,w=R}return g=f?function(F,X){return(X?E:"")+F.join(" ")}:function(F){return F.join(" ")},_.map(g)},Xu.splitTextToSize=function(t,n,a){var i,o=(a=a||{}).fontSize||this.internal.getFontSize(),u=function(v){if(v.widths&&v.kerning)return{widths:v.widths,kerning:v.kerning};var _=this.internal.getFont(v.fontName,v.fontStyle),j="Unicode";return _.metadata[j]?{widths:_.metadata[j].widths||{0:1},kerning:_.metadata[j].kerning||{}}:{font:_.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,a);i=Array.isArray(t)?t:String(t).split(/\r?\n/);var h=1*this.internal.scaleFactor*n/o;u.textIndent=a.textIndent?1*a.textIndent*this.internal.scaleFactor/o:0,u.lineIndent=a.lineIndent;var d,f,g=[];for(d=0,f=i.length;d<f;d++)g=g.concat(Nm.apply(this,[i[d],h,u]));return g},(function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var n="0123456789abcdef",a="klmnopqrstuvwxyz",i={},o={},u=0;u<16;u++)i[a[u]]=n[u],o[n[u]]=a[u];var h=function(j){return"0x"+parseInt(j,10).toString(16)},d=t.__fontmetrics__.compress=function(j){var w,k,L,R,E=["{"];for(var Y in j){if(w=j[Y],isNaN(parseInt(Y,10))?k="'"+Y+"'":(Y=parseInt(Y,10),k=(k=h(Y).slice(2)).slice(0,-1)+o[k.slice(-1)]),typeof w=="number")w<0?(L=h(w).slice(3),R="-"):(L=h(w).slice(2),R=""),L=R+L.slice(0,-1)+o[L.slice(-1)];else{if(Sn(w)!=="object")throw new Error("Don't know what to do with value type "+Sn(w)+".");L=d(w)}E.push(k+L)}return E.push("}"),E.join("")},f=t.__fontmetrics__.uncompress=function(j){if(typeof j!="string")throw new Error("Invalid argument passed to uncompress.");for(var w,k,L,R,E={},Y=1,H=E,F=[],X="",_e="",xe=j.length-1,oe=1;oe<xe;oe+=1)(R=j[oe])=="'"?w?(L=w.join(""),w=void 0):w=[]:w?w.push(R):R=="{"?(F.push([H,L]),H={},L=void 0):R=="}"?((k=F.pop())[0][k[1]]=H,L=void 0,H=k[0]):R=="-"?Y=-1:L===void 0?i.hasOwnProperty(R)?(X+=i[R],L=parseInt(X,16)*Y,Y=1,X=""):X+=R:i.hasOwnProperty(R)?(_e+=i[R],H[L]=parseInt(_e,16)*Y,Y=1,L=void 0,_e=""):_e+=R;return E},g={codePages:["WinAnsiEncoding"],WinAnsiEncoding:f("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},v={Unicode:{Courier:g,"Courier-Bold":g,"Courier-BoldOblique":g,"Courier-Oblique":g,Helvetica:g,"Helvetica-Bold":g,"Helvetica-BoldOblique":g,"Helvetica-Oblique":g,"Times-Roman":g,"Times-Bold":g,"Times-BoldItalic":g,"Times-Italic":g}},_={Unicode:{"Courier-Oblique":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":f("{'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":f("{'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:f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":f("{'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:f("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:f("{'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":f("{'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:f("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":f("{'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":f("{'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":f("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(j){var w=j.font,k=_.Unicode[w.postScriptName];k&&(w.metadata.Unicode={},w.metadata.Unicode.widths=k.widths,w.metadata.Unicode.kerning=k.kerning);var L=v.Unicode[w.postScriptName];L&&(w.metadata.Unicode.encoding=L,w.encoding=L.codePages[0])}])})(gt.API),(function(t){var n=function(a){for(var i=a.length,o=new Uint8Array(i),u=0;u<i;u++)o[u]=a.charCodeAt(u);return o};t.API.events.push(["addFont",function(a){var i=void 0,o=a.font,u=a.instance;if(!o.isStandardFont){if(u===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");if(typeof(i=u.existsFileInVFS(o.postScriptName)===!1?u.loadFile(o.postScriptName):u.getFileFromVFS(o.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");(function(h,d){d=/^\x00\x01\x00\x00/.test(d)?n(d):n(Id(d)),h.metadata=t.API.TTFFont.open(d),h.metadata.Unicode=h.metadata.Unicode||{encoding:{},kerning:{},widths:[]},h.metadata.glyIdsUsed=[0]})(o,i)}}])})(gt),gt.API.addSvgAsImage=function(t,n,a,i,o,u,h,d){if(isNaN(n)||isNaN(a))throw Tn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw Tn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=i,f.height=o;var g=f.getContext("2d");g.fillStyle="#fff",g.fillRect(0,0,f.width,f.height);var v={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},_=this;return(Pt.canvg?Promise.resolve(Pt.canvg):Ud(()=>import("./index.es-D85_UUf8.js"),[])).catch(function(j){return Promise.reject(new Error("Could not load canvg: "+j))}).then(function(j){return j.default?j.default:j}).then(function(j){return j.fromString(g,t,v)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(j){return j.render(v)}).then(function(){_.addImage(f.toDataURL("image/jpeg",1),n,a,i,o,h,d)})},gt.API.putTotalPages=function(t){var n,a=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),a=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),a=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o<this.internal.pages[i].length;o++)this.internal.pages[i][o]=this.internal.pages[i][o].replace(n,a);return this},gt.API.viewerPreferences=function(t,n){var a;t=t||{},n=n||!1;var i,o,u,h={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}},d=Object.keys(h),f=[],g=0,v=0,_=0;function j(k,L){var R,E=!1;for(R=0;R<k.length;R+=1)k[R]===L&&(E=!0);return E}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(h)),this.internal.viewerpreferences.isSubscribed=!1),a=this.internal.viewerpreferences.configuration,t==="reset"||n===!0){var w=d.length;for(_=0;_<w;_+=1)a[d[_]].value=a[d[_]].defaultValue,a[d[_]].explicitSet=!1}if(Sn(t)==="object"){for(o in t)if(u=t[o],j(d,o)&&u!==void 0){if(a[o].type==="boolean"&&typeof u=="boolean")a[o].value=u;else if(a[o].type==="name"&&j(a[o].valueSet,u))a[o].value=u;else if(a[o].type==="integer"&&Number.isInteger(u))a[o].value=u;else if(a[o].type==="array"){for(g=0;g<u.length;g+=1)if(i=!0,u[g].length===1&&typeof u[g][0]=="number")f.push(String(u[g]-1));else if(u[g].length>1){for(v=0;v<u[g].length;v+=1)typeof u[g][v]!="number"&&(i=!1);i===!0&&f.push([u[g][0]-1,u[g][1]-1].join(" "))}a[o].value="["+f.join(" ")+"]"}else a[o].value=a[o].defaultValue;a[o].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var k,L=[];for(k in a)a[k].explicitSet===!0&&(a[k].type==="name"?L.push("/"+k+" /"+a[k].value):L.push("/"+k+" "+a[k].value));L.length!==0&&this.internal.write(`/ViewerPreferences
|
|
592
|
+
<<
|
|
593
|
+
`+L.join(`
|
|
594
|
+
`)+`
|
|
595
|
+
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=a,this},gt.API.addMetadata=function(t,n){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:t,namespaceUri:n??"http://jspdf.default.namespaceuri/",rawXml:typeof n=="boolean"&&n},this.internal.events.subscribe("putCatalog",d_),this.internal.events.subscribe("postPutResources",f_)),this},(function(t){var n=t.API,a=n.pdfEscape16=function(u,h){for(var d,f=h.metadata.Unicode.widths,g=["","0","00","000","0000"],v=[""],_=0,j=u.length;_<j;++_){if(d=h.metadata.characterToGlyph(u.charCodeAt(_)),h.metadata.glyIdsUsed.push(d),h.metadata.toUnicode[d]=u.charCodeAt(_),f.indexOf(d)==-1&&(f.push(d),f.push([parseInt(h.metadata.widthOfGlyph(d),10)])),d=="0")return v.join("");d=d.toString(16),v.push(g[4-d.length],d)}return v.join("")},i=function(u){var h,d,f,g,v,_,j;for(v=`/CIDInit /ProcSet findresource begin
|
|
596
|
+
12 dict begin
|
|
597
|
+
begincmap
|
|
598
|
+
/CIDSystemInfo <<
|
|
599
|
+
/Registry (Adobe)
|
|
600
|
+
/Ordering (UCS)
|
|
601
|
+
/Supplement 0
|
|
602
|
+
>> def
|
|
603
|
+
/CMapName /Adobe-Identity-UCS def
|
|
604
|
+
/CMapType 2 def
|
|
605
|
+
1 begincodespacerange
|
|
606
|
+
<0000><ffff>
|
|
607
|
+
endcodespacerange`,f=[],_=0,j=(d=Object.keys(u).sort(function(w,k){return w-k})).length;_<j;_++)h=d[_],f.length>=100&&(v+=`
|
|
608
|
+
`+f.length+` beginbfchar
|
|
609
|
+
`+f.join(`
|
|
610
|
+
`)+`
|
|
611
|
+
endbfchar`,f=[]),u[h]!==void 0&&u[h]!==null&&typeof u[h].toString=="function"&&(g=("0000"+u[h].toString(16)).slice(-4),h=("0000"+(+h).toString(16)).slice(-4),f.push("<"+h+"><"+g+">"));return f.length&&(v+=`
|
|
612
|
+
`+f.length+` beginbfchar
|
|
613
|
+
`+f.join(`
|
|
614
|
+
`)+`
|
|
615
|
+
endbfchar
|
|
616
|
+
`),v+`endcmap
|
|
617
|
+
CMapName currentdict /CMap defineresource pop
|
|
618
|
+
end
|
|
619
|
+
end`};n.events.push(["putFont",function(u){(function(h){var d=h.font,f=h.out,g=h.newObject,v=h.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="Identity-H"){for(var _=d.metadata.Unicode.widths,j=d.metadata.subset.encode(d.metadata.glyIdsUsed,1),w="",k=0;k<j.length;k++)w+=String.fromCharCode(j[k]);var L=g();v({data:w,addLength1:!0,objectId:L}),f("endobj");var R=g();v({data:i(d.metadata.toUnicode),addLength1:!0,objectId:R}),f("endobj");var E=g();f("<<"),f("/Type /FontDescriptor"),f("/FontName /"+$u(d.fontName)),f("/FontFile2 "+L+" 0 R"),f("/FontBBox "+t.API.PDFObject.convert(d.metadata.bbox)),f("/Flags "+d.metadata.flags),f("/StemV "+d.metadata.stemV),f("/ItalicAngle "+d.metadata.italicAngle),f("/Ascent "+d.metadata.ascender),f("/Descent "+d.metadata.decender),f("/CapHeight "+d.metadata.capHeight),f(">>"),f("endobj");var Y=g();f("<<"),f("/Type /Font"),f("/BaseFont /"+$u(d.fontName)),f("/FontDescriptor "+E+" 0 R"),f("/W "+t.API.PDFObject.convert(_)),f("/CIDToGIDMap /Identity"),f("/DW 1000"),f("/Subtype /CIDFontType2"),f("/CIDSystemInfo"),f("<<"),f("/Supplement 0"),f("/Registry (Adobe)"),f("/Ordering ("+d.encoding+")"),f(">>"),f(">>"),f("endobj"),d.objectNumber=g(),f("<<"),f("/Type /Font"),f("/Subtype /Type0"),f("/ToUnicode "+R+" 0 R"),f("/BaseFont /"+$u(d.fontName)),f("/Encoding /"+d.encoding),f("/DescendantFonts ["+Y+" 0 R]"),f(">>"),f("endobj"),d.isAlreadyPutted=!0}})(u)}]),n.events.push(["putFont",function(u){(function(h){var d=h.font,f=h.out,g=h.newObject,v=h.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="WinAnsiEncoding"){for(var _=d.metadata.rawData,j="",w=0;w<_.length;w++)j+=String.fromCharCode(_[w]);var k=g();v({data:j,addLength1:!0,objectId:k}),f("endobj");var L=g();v({data:i(d.metadata.toUnicode),addLength1:!0,objectId:L}),f("endobj");var R=g();f("<<"),f("/Descent "+d.metadata.decender),f("/CapHeight "+d.metadata.capHeight),f("/StemV "+d.metadata.stemV),f("/Type /FontDescriptor"),f("/FontFile2 "+k+" 0 R"),f("/Flags 96"),f("/FontBBox "+t.API.PDFObject.convert(d.metadata.bbox)),f("/FontName /"+$u(d.fontName)),f("/ItalicAngle "+d.metadata.italicAngle),f("/Ascent "+d.metadata.ascender),f(">>"),f("endobj"),d.objectNumber=g();for(var E=0;E<d.metadata.hmtx.widths.length;E++)d.metadata.hmtx.widths[E]=parseInt(d.metadata.hmtx.widths[E]*(1e3/d.metadata.head.unitsPerEm));f("<</Subtype/TrueType/Type/Font/ToUnicode "+L+" 0 R/BaseFont/"+$u(d.fontName)+"/FontDescriptor "+R+" 0 R/Encoding/"+d.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(d.metadata.hmtx.widths)+">>"),f("endobj"),d.isAlreadyPutted=!0}})(u)}]);var o=function(u){var h,d=u.text||"",f=u.x,g=u.y,v=u.options||{},_=u.mutex||{},j=_.pdfEscape,w=_.activeFontKey,k=_.fonts,L=w,R="",E=0,Y="",H=k[L].encoding;if(k[L].encoding!=="Identity-H")return{text:d,x:f,y:g,options:v,mutex:_};for(Y=d,L=w,Array.isArray(d)&&(Y=d[0]),E=0;E<Y.length;E+=1)k[L].metadata.hasOwnProperty("cmap")&&(h=k[L].metadata.cmap.unicode.codeMap[Y[E].charCodeAt(0)]),h||Y[E].charCodeAt(0)<256&&k[L].metadata.hasOwnProperty("Unicode")?R+=Y[E]:R+="";var F="";return parseInt(L.slice(1))<14||H==="WinAnsiEncoding"?F=j(R,L).split("").map(function(X){return X.charCodeAt(0).toString(16)}).join(""):H==="Identity-H"&&(F=a(R,k[L])),_.isHex=!0,{text:F,x:f,y:g,options:v,mutex:_}};n.events.push(["postProcessText",function(u){var h=u.text||"",d=[],f={text:h,x:u.x,y:u.y,options:u.options,mutex:u.mutex};if(Array.isArray(h)){var g=0;for(g=0;g<h.length;g+=1)Array.isArray(h[g])&&h[g].length===3?d.push([o(Object.assign({},f,{text:h[g][0]})).text,h[g][1],h[g][2]]):d.push(o(Object.assign({},f,{text:h[g]})).text);u.text=d}else u.text=o(Object.assign({},f,{text:h})).text}])})(gt),(function(t){var n=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(a){return n.call(this),this.internal.vFS[a]!==void 0},t.addFileToVFS=function(a,i){return n.call(this),this.internal.vFS[a]=i,this},t.getFileFromVFS=function(a){return n.call(this),this.internal.vFS[a]!==void 0?this.internal.vFS[a]:null}})(gt.API),(function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(i){var o,u,h,d,f,g,v,_=n,j=[[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]],w=[[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]],k={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},L={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},R=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],E=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)$/),Y=!1,H=0;this.__bidiEngine__={};var F=function(O){var U=O.charCodeAt(),ne=U>>8,re=L[ne];return re!==void 0?_[256*re+(255&U)]:ne===252||ne===253?"AL":E.test(ne)?"L":ne===8?"R":"N"},X=function(O){for(var U,ne=0;ne<O.length;ne++){if((U=F(O.charAt(ne)))==="L")return!1;if(U==="R")return!0}return!1},_e=function(O,U,ne,re){var ve,ee,J,le,Le=U[re];switch(Le){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":Y=!1;break;case"N":case"AN":break;case"EN":Y&&(Le="AN");break;case"AL":Y=!0,Le="R";break;case"WS":case"BN":Le="N";break;case"CS":re<1||re+1>=U.length||(ve=ne[re-1])!=="EN"&&ve!=="AN"||(ee=U[re+1])!=="EN"&&ee!=="AN"?Le="N":Y&&(ee="AN"),Le=ee===ve?ee:"N";break;case"ES":Le=(ve=re>0?ne[re-1]:"B")==="EN"&&re+1<U.length&&U[re+1]==="EN"?"EN":"N";break;case"ET":if(re>0&&ne[re-1]==="EN"){Le="EN";break}if(Y){Le="N";break}for(J=re+1,le=U.length;J<le&&U[J]==="ET";)J++;Le=J<le&&U[J]==="EN"?"EN":"N";break;case"NSM":if(h&&!d){for(le=U.length,J=re+1;J<le&&U[J]==="NSM";)J++;if(J<le){var W=O[re],ce=W>=1425&&W<=2303||W===64286;if(ve=U[J],ce&&(ve==="R"||ve==="AL")){Le="R";break}}}Le=re<1||(ve=U[re-1])==="B"?"N":ne[re-1];break;case"B":Y=!1,o=!0,Le=H;break;case"S":u=!0,Le="N"}return Le},xe=function(O,U,ne){var re=O.split("");return ne&&oe(re,ne,{hiLevel:H}),re.reverse(),U&&U.reverse(),re.join("")},oe=function(O,U,ne){var re,ve,ee,J,le,Le=-1,W=O.length,ce=0,T=[],q=H?w:j,V=[];for(Y=!1,o=!1,u=!1,ve=0;ve<W;ve++)V[ve]=F(O[ve]);for(ee=0;ee<W;ee++){if(le=ce,T[ee]=_e(O,V,T,ee),re=240&(ce=q[le][k[T[ee]]]),ce&=15,U[ee]=J=q[ce][5],re>0)if(re===16){for(ve=Le;ve<ee;ve++)U[ve]=1;Le=-1}else Le=-1;if(q[ce][6])Le===-1&&(Le=ee);else if(Le>-1){for(ve=Le;ve<ee;ve++)U[ve]=J;Le=-1}V[ee]==="B"&&(U[ee]=0),ne.hiLevel|=J}u&&(function(te,se,ye){for(var je=0;je<ye;je++)if(te[je]==="S"){se[je]=H;for(var Ce=je-1;Ce>=0&&te[Ce]==="WS";Ce--)se[Ce]=H}})(V,U,W)},Z=function(O,U,ne,re,ve){if(!(ve.hiLevel<O)){if(O===1&&H===1&&!o)return U.reverse(),void(ne&&ne.reverse());for(var ee,J,le,Le,W=U.length,ce=0;ce<W;){if(re[ce]>=O){for(le=ce+1;le<W&&re[le]>=O;)le++;for(Le=ce,J=le-1;Le<J;Le++,J--)ee=U[Le],U[Le]=U[J],U[J]=ee,ne&&(ee=ne[Le],ne[Le]=ne[J],ne[J]=ee);ce=le}ce++}}},ge=function(O,U,ne){var re=O.split(""),ve={hiLevel:H};return ne||(ne=[]),oe(re,ne,ve),(function(ee,J,le){if(le.hiLevel!==0&&v)for(var Le,W=0;W<ee.length;W++)J[W]===1&&(Le=R.indexOf(ee[W]))>=0&&(ee[W]=R[Le+1])})(re,ne,ve),Z(2,re,U,ne,ve),Z(1,re,U,ne,ve),re.join("")};return this.__bidiEngine__.doBidiReorder=function(O,U,ne){if((function(ve,ee){if(ee)for(var J=0;J<ve.length;J++)ee[J]=J;d===void 0&&(d=X(ve)),g===void 0&&(g=X(ve))})(O,U),h||!f||g)if(h&&f&&d^g)H=d?1:0,O=xe(O,U,ne);else if(!h&&f&&g)H=d?1:0,O=ge(O,U,ne),O=xe(O,U);else if(!h||d||f||g){if(h&&!f&&d^g)O=xe(O,U),d?(H=0,O=ge(O,U,ne)):(H=1,O=ge(O,U,ne),O=xe(O,U));else if(h&&d&&!f&&g)H=1,O=ge(O,U,ne),O=xe(O,U);else if(!h&&!f&&d^g){var re=v;d?(H=1,O=ge(O,U,ne),H=0,v=!1,O=ge(O,U,ne),v=re):(H=0,O=ge(O,U,ne),O=xe(O,U),H=1,v=!1,O=ge(O,U,ne),v=re,O=xe(O,U))}}else H=0,O=ge(O,U,ne);else H=d?1:0,O=ge(O,U,ne);return O},this.__bidiEngine__.setOptions=function(O){O&&(h=O.isInputVisual,f=O.isOutputVisual,d=O.isInputRtl,g=O.isOutputRtl,v=O.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var n=["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"],a=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(i){var o=i.text;i.x,i.y;var u=i.options||{};i.mutex,u.lang;var h=[];if(u.isInputVisual=typeof u.isInputVisual!="boolean"||u.isInputVisual,a.setOptions(u),Object.prototype.toString.call(o)==="[object Array]"){var d=0;for(h=[],d=0;d<o.length;d+=1)Object.prototype.toString.call(o[d])==="[object Array]"?h.push([a.doBidiReorder(o[d][0]),o[d][1],o[d][2]]):h.push([a.doBidiReorder(o[d])]);i.text=h}else i.text=a.doBidiReorder(o);a.setOptions({isInputVisual:!0})}])})(gt),gt.API.TTFFont=(function(){function t(n){var a;if(this.rawData=n,a=this.contents=new vl(n),this.contents.pos=4,a.readString(4)==="ttcf")throw new Error("TTCF not supported.");a.pos=0,this.parse(),this.subset=new N_(this),this.registerTTF()}return t.open=function(n){return new t(n)},t.prototype.parse=function(){return this.directory=new h_(this.contents),this.head=new g_(this),this.name=new x_(this),this.cmap=new jy(this),this.toUnicode={},this.hhea=new m_(this),this.maxp=new w_(this),this.hmtx=new S_(this),this.post=new v_(this),this.os2=new y_(this),this.loca=new k_(this),this.glyf=new __(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var n,a,i,o,u;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var h,d,f,g;for(g=[],h=0,d=(f=this.bbox).length;h<d;h++)n=f[h],g.push(Math.round(n*this.scaleFactor));return g}.call(this),this.stemV=0,this.post.exists?(i=255&(o=this.post.italic_angle),32768&(a=o>>16)&&(a=-(1+(65535^a))),this.italicAngle=+(a+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(u=this.familyClass)===1||u===2||u===3||u===4||u===5||u===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(n){var a;return((a=this.cmap.unicode)!=null?a.codeMap[n]:void 0)||0},t.prototype.widthOfGlyph=function(n){var a;return a=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*a},t.prototype.widthOfString=function(n,a,i){var o,u,h,d;for(h=0,u=0,d=(n=""+n).length;0<=d?u<d:u>d;u=0<=d?++u:--u)o=n.charCodeAt(u),h+=this.widthOfGlyph(this.characterToGlyph(o))+i*(1e3/a)||0;return h*(a/1e3)},t.prototype.lineHeight=function(n,a){var i;return a==null&&(a=!1),i=a?this.lineGap:0,(this.ascender+i-this.decender)/1e3*n},t})();var Ki,vl=(function(){function t(n){this.data=n??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(n){return this.data[this.pos++]=n},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt32=function(){var n;return(n=this.readUInt32())>=2147483648?n-4294967296:n},t.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt16=function(){var n;return(n=this.readUInt16())>=32768?n-65536:n},t.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},t.prototype.readString=function(n){var a,i;for(i=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)i[a]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(n){var a,i,o;for(o=[],a=0,i=n.length;0<=i?a<i:a>i;a=0<=i?++a:--a)o.push(this.writeByte(n.charCodeAt(a)));return o},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(n){return this.writeInt16(n)},t.prototype.readLongLong=function(){var n,a,i,o,u,h,d,f;return n=this.readByte(),a=this.readByte(),i=this.readByte(),o=this.readByte(),u=this.readByte(),h=this.readByte(),d=this.readByte(),f=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^a)+1099511627776*(255^i)+4294967296*(255^o)+16777216*(255^u)+65536*(255^h)+256*(255^d)+(255^f)+1):72057594037927940*n+281474976710656*a+1099511627776*i+4294967296*o+16777216*u+65536*h+256*d+f},t.prototype.writeLongLong=function(n){var a,i;return a=Math.floor(n/4294967296),i=4294967295&n,this.writeByte(a>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(n){return this.writeInt32(n)},t.prototype.read=function(n){var a,i;for(a=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)a.push(this.readByte());return a},t.prototype.write=function(n){var a,i,o,u;for(u=[],i=0,o=n.length;i<o;i++)a=n[i],u.push(this.writeByte(a));return u},t})(),h_=(function(){var t;function n(a){var i,o,u;for(this.scalarType=a.readInt(),this.tableCount=a.readShort(),this.searchRange=a.readShort(),this.entrySelector=a.readShort(),this.rangeShift=a.readShort(),this.tables={},o=0,u=this.tableCount;0<=u?o<u:o>u;o=0<=u?++o:--o)i={tag:a.readString(4),checksum:a.readInt(),offset:a.readInt(),length:a.readInt()},this.tables[i.tag]=i}return n.prototype.encode=function(a){var i,o,u,h,d,f,g,v,_,j,w,k,L;for(L in w=Object.keys(a).length,f=Math.log(2),_=16*Math.floor(Math.log(w)/f),h=Math.floor(_/f),v=16*w-_,(o=new vl).writeInt(this.scalarType),o.writeShort(w),o.writeShort(_),o.writeShort(h),o.writeShort(v),u=16*w,g=o.pos+u,d=null,k=[],a)for(j=a[L],o.writeString(L),o.writeInt(t(j)),o.writeInt(g),o.writeInt(j.length),k=k.concat(j),L==="head"&&(d=g),g+=j.length;g%4;)k.push(0),g++;return o.write(k),i=2981146554-t(o.data),o.pos=d+8,o.writeUInt32(i),o.data},t=function(a){var i,o,u,h;for(a=ky.call(a);a.length%4;)a.push(0);for(u=new vl(a),o=0,i=0,h=a.length;i<h;i=i+=4)o+=u.readUInt32();return 4294967295&o},n})(),p_={}.hasOwnProperty,Cs=function(t,n){for(var a in n)p_.call(n,a)&&(t[a]=n[a]);function i(){this.constructor=t}return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};Ki=(function(){function t(n){var a;this.file=n,a=this.file.directory.tables[this.tag],this.exists=!!a,a&&(this.offset=a.offset,this.length=a.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t})();var g_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="head",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.revision=n.readInt(),this.checkSumAdjustment=n.readInt(),this.magicNumber=n.readInt(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.readLongLong(),this.modified=n.readLongLong(),this.xMin=n.readShort(),this.yMin=n.readShort(),this.xMax=n.readShort(),this.yMax=n.readShort(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort(),this.indexToLocFormat=n.readShort(),this.glyphDataFormat=n.readShort()},t.prototype.encode=function(n){var a;return(a=new vl).writeInt(this.version),a.writeInt(this.revision),a.writeInt(this.checkSumAdjustment),a.writeInt(this.magicNumber),a.writeShort(this.flags),a.writeShort(this.unitsPerEm),a.writeLongLong(this.created),a.writeLongLong(this.modified),a.writeShort(this.xMin),a.writeShort(this.yMin),a.writeShort(this.xMax),a.writeShort(this.yMax),a.writeShort(this.macStyle),a.writeShort(this.lowestRecPPEM),a.writeShort(this.fontDirectionHint),a.writeShort(n),a.writeShort(this.glyphDataFormat),a.data},t})(),zm=(function(){function t(n,a){var i,o,u,h,d,f,g,v,_,j,w,k,L,R,E,Y,H;switch(this.platformID=n.readUInt16(),this.encodingID=n.readShort(),this.offset=a+n.readInt(),_=n.pos,n.pos=this.offset,this.format=n.readUInt16(),this.length=n.readUInt16(),this.language=n.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(f=0;f<256;++f)this.codeMap[f]=n.readByte();break;case 4:for(w=n.readUInt16(),j=w/2,n.pos+=6,u=(function(){var F,X;for(X=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)X.push(n.readUInt16());return X})(),n.pos+=2,L=(function(){var F,X;for(X=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)X.push(n.readUInt16());return X})(),g=(function(){var F,X;for(X=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)X.push(n.readUInt16());return X})(),v=(function(){var F,X;for(X=[],f=F=0;0<=j?F<j:F>j;f=0<=j?++F:--F)X.push(n.readUInt16());return X})(),o=(this.length-n.pos+this.offset)/2,d=(function(){var F,X;for(X=[],f=F=0;0<=o?F<o:F>o;f=0<=o?++F:--F)X.push(n.readUInt16());return X})(),f=E=0,H=u.length;E<H;f=++E)for(R=u[f],i=Y=k=L[f];k<=R?Y<=R:Y>=R;i=k<=R?++Y:--Y)v[f]===0?h=i+g[f]:(h=d[v[f]/2+(i-k)-(j-f)]||0)!==0&&(h+=g[f]),this.codeMap[i]=65535&h}n.pos=_}return t.encode=function(n,a){var i,o,u,h,d,f,g,v,_,j,w,k,L,R,E,Y,H,F,X,_e,xe,oe,Z,ge,O,U,ne,re,ve,ee,J,le,Le,W,ce,T,q,V,te,se,ye,je,Ce,ze,We,Xe;switch(re=new vl,h=Object.keys(n).sort(function(Ve,dt){return Ve-dt}),a){case"macroman":for(L=0,R=(function(){var Ve=[];for(k=0;k<256;++k)Ve.push(0);return Ve})(),Y={0:0},u={},ve=0,Le=h.length;ve<Le;ve++)Y[Ce=n[o=h[ve]]]==null&&(Y[Ce]=++L),u[o]={old:n[o],new:Y[n[o]]},R[o]=Y[n[o]];return re.writeUInt16(1),re.writeUInt16(0),re.writeUInt32(12),re.writeUInt16(0),re.writeUInt16(262),re.writeUInt16(0),re.write(R),{charMap:u,subtable:re.data,maxGlyphID:L+1};case"unicode":for(U=[],_=[],H=0,Y={},i={},E=g=null,ee=0,W=h.length;ee<W;ee++)Y[X=n[o=h[ee]]]==null&&(Y[X]=++H),i[o]={old:X,new:Y[X]},d=Y[X]-o,E!=null&&d===g||(E&&_.push(E),U.push(o),g=d),E=o;for(E&&_.push(E),_.push(65535),U.push(65535),ge=2*(Z=U.length),oe=2*Math.pow(Math.log(Z)/Math.LN2,2),j=Math.log(oe/2)/Math.LN2,xe=2*Z-oe,f=[],_e=[],w=[],k=J=0,ce=U.length;J<ce;k=++J){if(O=U[k],v=_[k],O===65535){f.push(0),_e.push(0);break}if(O-(ne=i[O].new)>=32768)for(f.push(0),_e.push(2*(w.length+Z-k)),o=le=O;O<=v?le<=v:le>=v;o=O<=v?++le:--le)w.push(i[o].new);else f.push(ne-O),_e.push(0)}for(re.writeUInt16(3),re.writeUInt16(1),re.writeUInt32(12),re.writeUInt16(4),re.writeUInt16(16+8*Z+2*w.length),re.writeUInt16(0),re.writeUInt16(ge),re.writeUInt16(oe),re.writeUInt16(j),re.writeUInt16(xe),ye=0,T=_.length;ye<T;ye++)o=_[ye],re.writeUInt16(o);for(re.writeUInt16(0),je=0,q=U.length;je<q;je++)o=U[je],re.writeUInt16(o);for(ze=0,V=f.length;ze<V;ze++)d=f[ze],re.writeUInt16(d);for(We=0,te=_e.length;We<te;We++)F=_e[We],re.writeUInt16(F);for(Xe=0,se=w.length;Xe<se;Xe++)L=w[Xe],re.writeUInt16(L);return{charMap:i,subtable:re.data,maxGlyphID:H+1}}},t})(),jy=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="cmap",t.prototype.parse=function(n){var a,i,o;for(n.pos=this.offset,this.version=n.readUInt16(),o=n.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=o?i<o:i>o;i=0<=o?++i:--i)a=new zm(n,this.offset),this.tables.push(a),a.isUnicode&&this.unicode==null&&(this.unicode=a);return!0},t.encode=function(n,a){var i,o;return a==null&&(a="macroman"),i=zm.encode(n,a),(o=new vl).writeUInt16(0),o.writeUInt16(1),i.table=o.data.concat(i.subtable),i},t})(),m_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="hhea",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},t})(),y_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="OS/2",t.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=(function(){var a,i;for(i=[],a=0;a<10;++a)i.push(n.readByte());return i})(),this.charRange=(function(){var a,i;for(i=[],a=0;a<4;++a)i.push(n.readInt());return i})(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=(function(){var a,i;for(i=[],a=0;a<2;a=++a)i.push(n.readInt());return i})(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},t})(),v_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="post",t.prototype.parse=function(n){var a,i,o;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:case 196608:break;case 131072:var u;for(i=n.readUInt16(),this.glyphNameIndex=[],u=0;0<=i?u<i:u>i;u=0<=i?++u:--u)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],o=[];n.pos<this.offset+this.length;)a=n.readByte(),o.push(this.names.push(n.readString(a)));return o;case 151552:return i=n.readUInt16(),this.offsets=n.read(i);case 262144:return this.map=function(){var h,d,f;for(f=[],u=h=0,d=this.file.maxp.numGlyphs;0<=d?h<d:h>d;u=0<=d?++h:--h)f.push(n.readUInt32());return f}.call(this)}},t})(),b_=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},x_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="name",t.prototype.parse=function(n){var a,i,o,u,h,d,f,g,v,_,j;for(n.pos=this.offset,n.readShort(),a=n.readShort(),d=n.readShort(),i=[],u=0;0<=a?u<a:u>a;u=0<=a?++u:--u)i.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+d+n.readShort()});for(f={},u=v=0,_=i.length;v<_;u=++v)o=i[u],n.pos=o.offset,g=n.readString(o.length),h=new b_(g,o),f[j=o.nameID]==null&&(f[j]=[]),f[o.nameID].push(h);this.strings=f,this.copyright=f[0],this.fontFamily=f[1],this.fontSubfamily=f[2],this.uniqueSubfamily=f[3],this.fontName=f[4],this.version=f[5];try{this.postscriptName=f[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=f[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=f[7],this.manufacturer=f[8],this.designer=f[9],this.description=f[10],this.vendorUrl=f[11],this.designerUrl=f[12],this.license=f[13],this.licenseUrl=f[14],this.preferredFamily=f[15],this.preferredSubfamily=f[17],this.compatibleFull=f[18],this.sampleText=f[19]},t})(),w_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="maxp",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.numGlyphs=n.readUInt16(),this.maxPoints=n.readUInt16(),this.maxContours=n.readUInt16(),this.maxCompositePoints=n.readUInt16(),this.maxComponentContours=n.readUInt16(),this.maxZones=n.readUInt16(),this.maxTwilightPoints=n.readUInt16(),this.maxStorage=n.readUInt16(),this.maxFunctionDefs=n.readUInt16(),this.maxInstructionDefs=n.readUInt16(),this.maxStackElements=n.readUInt16(),this.maxSizeOfInstructions=n.readUInt16(),this.maxComponentElements=n.readUInt16(),this.maxComponentDepth=n.readUInt16()},t})(),S_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="hmtx",t.prototype.parse=function(n){var a,i,o,u,h,d,f;for(n.pos=this.offset,this.metrics=[],a=0,d=this.file.hhea.numberOfMetrics;0<=d?a<d:a>d;a=0<=d?++a:--a)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var g,v;for(v=[],a=g=0;0<=o?g<o:g>o;a=0<=o?++g:--g)v.push(n.readInt16());return v})(),this.widths=function(){var g,v,_,j;for(j=[],g=0,v=(_=this.metrics).length;g<v;g++)u=_[g],j.push(u.advance);return j}.call(this),i=this.widths[this.widths.length-1],f=[],a=h=0;0<=o?h<o:h>o;a=0<=o?++h:--h)f.push(this.widths.push(i));return f},t.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},t})(),ky=[].slice,__=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(n){var a,i,o,u,h,d,f,g,v,_;return n in this.cache?this.cache[n]:(u=this.file.loca,a=this.file.contents,i=u.indexOf(n),(o=u.lengthOf(n))===0?this.cache[n]=null:(a.pos=this.offset+i,h=(d=new vl(a.read(o))).readShort(),g=d.readShort(),_=d.readShort(),f=d.readShort(),v=d.readShort(),this.cache[n]=h===-1?new j_(d,g,_,f,v):new A_(d,h,g,_,f,v),this.cache[n]))},t.prototype.encode=function(n,a,i){var o,u,h,d,f;for(h=[],u=[],d=0,f=a.length;d<f;d++)o=n[a[d]],u.push(h.length),o&&(h=h.concat(o.encode(i)));return u.push(h.length),{table:h,offsets:u}},t})(),A_=(function(){function t(n,a,i,o,u,h){this.raw=n,this.numberOfContours=a,this.xMin=i,this.yMin=o,this.xMax=u,this.yMax=h,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t})(),j_=(function(){function t(n,a,i,o,u){var h,d;for(this.raw=n,this.xMin=a,this.yMin=i,this.xMax=o,this.yMax=u,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],h=this.raw;d=h.readShort(),this.glyphOffsets.push(h.pos),this.glyphIDs.push(h.readUInt16()),32&d;)h.pos+=1&d?4:2,128&d?h.pos+=8:64&d?h.pos+=4:8&d&&(h.pos+=2)}return t.prototype.encode=function(){var n,a,i;for(a=new vl(ky.call(this.raw.data)),n=0,i=this.glyphIDs.length;n<i;++n)a.pos=this.glyphOffsets[n];return a.data},t})(),k_=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Cs(t,Ki),t.prototype.tag="loca",t.prototype.parse=function(n){var a,i;return n.pos=this.offset,a=this.file.head.indexToLocFormat,this.offsets=a===0?function(){var o,u;for(u=[],i=0,o=this.length;i<o;i+=2)u.push(2*n.readUInt16());return u}.call(this):function(){var o,u;for(u=[],i=0,o=this.length;i<o;i+=4)u.push(n.readUInt32());return u}.call(this)},t.prototype.indexOf=function(n){return this.offsets[n]},t.prototype.lengthOf=function(n){return this.offsets[n+1]-this.offsets[n]},t.prototype.encode=function(n,a){for(var i=new Uint32Array(this.offsets.length),o=0,u=0,h=0;h<i.length;++h)if(i[h]=o,u<a.length&&a[u]==h){++u,i[h]=o;var d=this.offsets[h],f=this.offsets[h+1]-d;f>0&&(o+=f)}for(var g=new Array(4*i.length),v=0;v<i.length;++v)g[4*v+3]=255&i[v],g[4*v+2]=(65280&i[v])>>8,g[4*v+1]=(16711680&i[v])>>16,g[4*v]=(4278190080&i[v])>>24;return g},t})(),N_=(function(){function t(n){this.font=n,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var n,a,i,o,u;for(a in o=this.font.cmap.tables[0].codeMap,n={},u=this.subset)i=u[a],n[a]=o[i];return n},t.prototype.glyphsFor=function(n){var a,i,o,u,h,d,f;for(o={},h=0,d=n.length;h<d;h++)o[u=n[h]]=this.font.glyf.glyphFor(u);for(u in a=[],o)(i=o[u])!=null&&i.compound&&a.push.apply(a,i.glyphIDs);if(a.length>0)for(u in f=this.glyphsFor(a))i=f[u],o[u]=i;return o},t.prototype.encode=function(n,a){var i,o,u,h,d,f,g,v,_,j,w,k,L,R,E;for(o in i=jy.encode(this.generateCmap(),"unicode"),h=this.glyphsFor(n),w={0:0},E=i.charMap)w[(f=E[o]).old]=f.new;for(k in j=i.maxGlyphID,h)k in w||(w[k]=j++);return v=(function(Y){var H,F;for(H in F={},Y)F[Y[H]]=H;return F})(w),_=Object.keys(v).sort(function(Y,H){return Y-H}),L=(function(){var Y,H,F;for(F=[],Y=0,H=_.length;Y<H;Y++)d=_[Y],F.push(v[d]);return F})(),u=this.font.glyf.encode(h,L,w),g=this.font.loca.encode(u.offsets,L),R={cmap:this.font.cmap.raw(),glyf:u.table,loca:g,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(a)},this.font.os2.exists&&(R["OS/2"]=this.font.os2.raw()),this.font.directory.encode(R)},t})();gt.API.PDFObject=(function(){var t;function n(){}return t=function(a,i){return(Array(i+1).join("0")+a).slice(-i)},n.convert=function(a){var i,o,u,h;if(Array.isArray(a))return"["+(function(){var d,f,g;for(g=[],d=0,f=a.length;d<f;d++)i=a[d],g.push(n.convert(i));return g})().join(" ")+"]";if(typeof a=="string")return"/"+a;if(a?.isString)return"("+a+")";if(a instanceof Date)return"(D:"+t(a.getUTCFullYear(),4)+t(a.getUTCMonth(),2)+t(a.getUTCDate(),2)+t(a.getUTCHours(),2)+t(a.getUTCMinutes(),2)+t(a.getUTCSeconds(),2)+"Z)";if({}.toString.call(a)==="[object Object]"){for(o in u=["<<"],a)h=a[o],u.push("/"+o+" "+n.convert(h));return u.push(">>"),u.join(`
|
|
620
|
+
`)}return""+a},n})();function L_({session:t}){const n=()=>{const a=new gt,i=a.internal.pageSize.getWidth(),o=20,u=i-2*o;let h=20;const d=(_,j=10,w=!1)=>{a.setFontSize(j),w?a.setFont("helvetica","bold"):a.setFont("helvetica","normal"),a.splitTextToSize(_,u).forEach(L=>{h>270&&(a.addPage(),h=20),a.text(L,o,h),h+=j*.5}),h+=2},f=(_,j)=>{j.length!==0&&(h+=3,d(_,12,!0),h+=2,j.forEach(w=>{d(`• ${w}`,10,!1)}))},g=_=>{if(!_)return[];if(Array.isArray(_))return _;try{return JSON.parse(_)}catch{return[]}};d(t.summary_title||"Session Summary",16,!0),h+=2,d(`Date: ${yo(new Date(t.started_at*1e3),"PPpp")}`,9,!1),d(`Status: ${t.summary_status||t.status}`,9,!1),t.summary_mood&&d(`Mood: ${t.summary_mood}`,9,!1),t.summary_complexity&&d(`Complexity: ${t.summary_complexity}`,9,!1),t.summary_key_insight&&(h+=2,d(`💡 ${t.summary_key_insight}`,10,!0)),f("What We Did",g(t.summary_what_we_did)),f("Decisions Made",g(t.summary_decisions)),f("Blockers",g(t.summary_blockers)),f("Resolved",g(t.summary_resolved)),f("Files Changed",g(t.summary_files_changed)),f("Next Steps",g(t.summary_next_steps)),f("Gotchas / Remember",g(t.summary_gotchas)),f("Tech Notes",g(t.summary_tech_notes)),h+=5,a.setFontSize(8),a.setTextColor(128,128,128),a.text(`Generated by ClaudeContext on ${yo(new Date,"PPpp")}`,o,h);const v=`session-${t.id.slice(0,8)}-${yo(new Date(t.started_at*1e3),"yyyy-MM-dd")}.pdf`;a.save(v)};return m.jsxs("button",{onClick:n,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>a.currentTarget.style.background="var(--surface)",onMouseLeave:a=>a.currentTarget.style.background="var(--surface2)",children:[m.jsx(oh,{size:16}),"PDF"]})}function E_({sessionId:t}){const[n,a]=ae.useState(!1),i=async()=>{const o=`${window.location.origin}/session/${t}`;try{await navigator.clipboard.writeText(o),a(!0),Ke.success("Link copied to clipboard"),setTimeout(()=>a(!1),2e3)}catch{Ke.error("Failed to copy link")}};return m.jsxs("button",{onClick:i,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:n?"var(--green)15":"var(--surface2)",color:n?"var(--green)":"var(--text)",border:"1px solid",borderColor:n?"var(--green)30":"var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{n||(o.currentTarget.style.background="var(--surface)")},onMouseLeave:o=>{n||(o.currentTarget.style.background="var(--surface2)")},children:[n?m.jsx(p5,{size:16}):m.jsx(n4,{size:16}),n?"Copied!":"Copy Link"]})}function T_({sessionId:t,initialNotes:n="",isOpen:a,onClose:i}){const[o,u]=ae.useState(n),[h,d]=ae.useState(!1),f=Af(),g=ff({mutationFn:()=>cn.updateSessionNotes(t,o),onSuccess:()=>{f.invalidateQueries({queryKey:["session",t]}),Ke.success("Notes saved"),i()},onError:_=>Ke.error("Failed to save notes: "+_)}),v=async()=>{d(!0),await g.mutateAsync(),d(!1)};return a?m.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,animation:"fadeIn 0.15s"},onClick:i,children:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,maxWidth:600,width:"90%",maxHeight:"80vh",display:"flex",flexDirection:"column",animation:"scaleIn 0.2s"},onClick:_=>_.stopPropagation(),children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[m.jsx(vi,{size:20,color:"var(--accent)"}),m.jsx("h2",{style:{fontSize:20,fontWeight:700},children:"Session Notes"})]}),m.jsx("button",{onClick:i,style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",alignItems:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:_=>_.currentTarget.style.background="var(--surface2)",onMouseLeave:_=>_.currentTarget.style.background="none",children:m.jsx(ti,{size:20})})]}),m.jsx("textarea",{value:o,onChange:_=>u(_.target.value),placeholder:"Add notes about this session...",style:{flex:1,padding:12,background:"var(--bg)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,color:"var(--text)",fontFamily:"inherit",resize:"none",marginBottom:16,minHeight:200},autoFocus:!0}),m.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[m.jsx("button",{onClick:i,style:{padding:"8px 16px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:14,fontWeight:600,cursor:"pointer",color:"var(--text)",transition:"all 0.15s"},onMouseEnter:_=>_.currentTarget.style.background="var(--surface)",onMouseLeave:_=>_.currentTarget.style.background="var(--surface2)",children:"Cancel"}),m.jsx("button",{onClick:v,disabled:h,style:{padding:"8px 16px",background:h?"var(--surface)":"var(--accent)",border:"none",borderRadius:8,fontSize:14,fontWeight:600,cursor:h?"not-allowed":"pointer",color:"white",transition:"all 0.15s"},onMouseEnter:_=>{h||(_.currentTarget.style.background="var(--accent-hover)")},onMouseLeave:_=>{h||(_.currentTarget.style.background="var(--accent)")},children:h?"Saving...":"Save Notes"})]})]})}):null}function Bm(t){const n=[`# ${t.summary_title||"Session"}`,`Date: ${yo(new Date(t.started_at*1e3),"PPpp")}`,`Status: ${t.summary_status||t.status}`,""];t.summary_mood&&n.push(`Mood: ${t.summary_mood}`),t.summary_complexity&&n.push(`Complexity: ${t.summary_complexity}`),t.summary_key_insight&&(n.push(`Key Insight: ${t.summary_key_insight}`),n.push(""));const a=_=>{if(!_)return[];if(Array.isArray(_))return _;try{return JSON.parse(_)}catch{return[]}},i=a(t.summary_what_we_did);i.length&&(n.push("## What We Did"),i.forEach(_=>n.push(`- ${_}`)),n.push(""));const o=a(t.summary_decisions);o.length&&(n.push("## Decisions Made"),o.forEach(_=>n.push(`- ${_}`)),n.push(""));const u=a(t.summary_blockers);u.length&&(n.push("## Blockers"),u.forEach(_=>n.push(`- ${_}`)),n.push(""));const h=a(t.summary_resolved);h.length&&(n.push("## Resolved"),h.forEach(_=>n.push(`- ${_}`)),n.push(""));const d=a(t.summary_files_changed);d.length&&(n.push("## Files Changed"),d.forEach(_=>n.push(`- ${_}`)),n.push(""));const f=a(t.summary_next_steps);f.length&&(n.push("## Next Steps"),f.forEach(_=>n.push(`- ${_}`)),n.push(""));const g=a(t.summary_gotchas);g.length&&(n.push("## Gotchas / Remember"),g.forEach(_=>n.push(`- ${_}`)),n.push(""));const v=a(t.summary_tech_notes);return v.length&&(n.push("## Tech Notes"),v.forEach(_=>n.push(`- ${_}`)),n.push("")),n.join(`
|
|
621
|
+
`)}function C_({onOpenSession:t}){const{id:n}=j0(),[a,i]=ae.useState(!1),[o,u]=ae.useState(!1),[h,d]=ae.useState("overview"),{data:f,isLoading:g,refetch:v}=va({queryKey:["session",n],queryFn:()=>cn.getSession(n),enabled:!!n,refetchInterval:k=>k?.status==="active"?5e3:!1});ae.useEffect(()=>{f&&n&&t(n,f.summary_title||`Session ${n.slice(0,8)}`,f.project_id)},[f,n,t]),ae.useEffect(()=>{if(!n)return;let k;try{k=M0(),k.onmessage=L=>{try{const R=JSON.parse(L.data);R.session_id===n&&(R.type==="session_end"||R.type==="summary_ready"||R.type==="tool_use"||R.type==="stop")&&v()}catch{}},k.onerror=()=>{console.log("[SessionDetail] WebSocket error, falling back to polling")}}catch(L){console.log("[SessionDetail] WebSocket connection failed:",L)}return()=>{k?.close()}},[n,v]),ae.useEffect(()=>{n&&cn.updateSessionActivity(n).catch(k=>{console.error("Failed to update activity:",k)})},[n]);const _=async()=>{if(!n)return;const k=!!f?.summary_title;i(!0);const L=Ke.loading(k?"Resyncing summary...":"Syncing summary...");try{k?await cn.resyncSession(n):await cn.syncSession(n),Ke.dismiss(L),Ke.success("Session queued for summarization"),setTimeout(()=>v(),2e3)}catch(R){Ke.dismiss(L),Ke.error("Failed to sync: "+R)}finally{i(!1)}};if(g)return m.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading session..."});if(!f)return m.jsx("div",{style:{padding:32,color:"var(--red)",fontSize:13},children:"Session not found"});const j=f.ended_at?iw(new Date(f.ended_at*1e3),new Date(f.started_at*1e3)):null,w=!!f.summary_title;return m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsxs(Ns,{to:`/project/${f.project_id}`,style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:12,marginBottom:20},children:[m.jsx(R0,{size:13})," Back to Project"]}),m.jsxs("div",{style:{marginBottom:24},children:[m.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:12,marginBottom:12},children:[m.jsx("h1",{style:{fontSize:24,fontWeight:700,flex:1},children:f.summary_title||"Session "+f.id.slice(0,12)}),m.jsx(R5,{status:f.summary_status||f.status})]}),m.jsxs("div",{style:{display:"flex",gap:8,borderBottom:"1px solid var(--border)",marginBottom:24,marginTop:20},children:[m.jsx("button",{onClick:()=>d("overview"),style:{padding:"10px 16px",background:"transparent",border:"none",borderBottom:h==="overview"?"2px solid var(--accent)":"2px solid transparent",color:h==="overview"?"var(--accent)":"var(--text-muted)",fontSize:14,fontWeight:600,cursor:"pointer",transition:"all 0.15s",marginBottom:-1},children:"Overview"}),m.jsxs("button",{onClick:()=>d("timeline"),style:{padding:"10px 16px",background:"transparent",border:"none",borderBottom:h==="timeline"?"2px solid var(--accent)":"2px solid transparent",color:h==="timeline"?"var(--accent)":"var(--text-muted)",fontSize:14,fontWeight:600,cursor:"pointer",transition:"all 0.15s",marginBottom:-1},children:["Timeline (",f.observations?.length||0," events)"]})]}),h==="overview"&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{display:"flex",gap:20,alignItems:"flex-start"},children:[m.jsxs("div",{style:{flex:"0 0 70%"},children:[m.jsxs("div",{style:{display:"flex",gap:16,flexWrap:"wrap",color:"var(--text-muted)",fontSize:14,marginBottom:16},children:[m.jsx("span",{children:yo(new Date(f.started_at*1e3),"PPpp")}),j&&m.jsxs("span",{children:["Duration: ",j]}),f.total_turns>0&&m.jsxs("span",{children:[f.total_turns," turns"]}),f.total_tool_calls>0&&m.jsxs("span",{children:[f.total_tool_calls," tool calls"]})]}),m.jsx("div",{style:{marginBottom:16},children:m.jsx(O5,{sessionId:f.id,projectId:f.project_id,sessionTags:f.tags||[],onUpdate:v})}),f.summary_key_insight&&m.jsxs("div",{style:{padding:"10px 12px",background:"var(--accent)15",border:"1px solid var(--accent)30",borderRadius:8,fontSize:15,color:"var(--text)",display:"flex",alignItems:"flex-start",gap:8,marginBottom:16},children:[m.jsx(xf,{size:16,style:{color:"var(--accent)",flexShrink:0,marginTop:2}}),m.jsxs("div",{children:[m.jsx("strong",{style:{color:"var(--accent)"},children:"Key Insight:"})," ",f.summary_key_insight]})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:12},children:[f.observations&&f.observations.length>0&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Total Events"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--blue)"},children:f.observations.length})]}),f.observations&&f.observations.filter(k=>k.type==="tool_use").length>0&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Tool Uses"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:f.observations.filter(k=>k.type==="tool_use").length})]}),f.observations&&f.observations.filter(k=>k.type==="user_prompt").length>0&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"User Prompts"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--green)"},children:f.observations.filter(k=>k.type==="user_prompt").length})]}),(()=>{const k=f.summary_files_changed?Array.isArray(f.summary_files_changed)?f.summary_files_changed:JSON.parse(f.summary_files_changed):[];return k.length===0?null:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Files Changed"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--orange)"},children:k.length})]})})(),(()=>{const k=f.summary_decisions?Array.isArray(f.summary_decisions)?f.summary_decisions:JSON.parse(f.summary_decisions):[];return k.length===0?null:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Decisions Made"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:k.length})]})})(),(()=>{const k=f.summary_next_steps?Array.isArray(f.summary_next_steps)?f.summary_next_steps:JSON.parse(f.summary_next_steps):[];return k.length===0?null:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Next Steps"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--yellow)"},children:k.length})]})})(),(()=>{const k=f.summary_gotchas?Array.isArray(f.summary_gotchas)?f.summary_gotchas:JSON.parse(f.summary_gotchas):[];return k.length===0?null:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Gotchas"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--red)"},children:k.length})]})})(),(()=>{const k=f.summary_tech_notes?Array.isArray(f.summary_tech_notes)?f.summary_tech_notes:JSON.parse(f.summary_tech_notes):[];return k.length===0?null:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Tech Notes"}),m.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--blue)"},children:k.length})]})})()]})]}),m.jsxs("div",{style:{flex:"0 0 28%",display:"flex",flexDirection:"column",gap:12},children:[f.summary_mood&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Mood"}),m.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--text)",textTransform:"capitalize"},children:f.summary_mood})]}),f.summary_complexity&&m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:6},children:"Complexity"}),m.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--text)",textTransform:"capitalize"},children:f.summary_complexity.replace("_"," ")})]}),(()=>{const k=f.summary_resolved?JSON.parse(f.summary_resolved):[];return k.length===0?null:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"14px 16px"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[m.jsx(bl,{size:14,style:{color:"var(--green)"}}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},children:"Resolved"})]}),m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:k.map((L,R)=>m.jsxs("div",{style:{fontSize:13,color:"var(--text)",lineHeight:1.4},children:["• ",L]},R))})]})})()]})]}),(()=>{const k=f.summary_blockers?JSON.parse(f.summary_blockers):[];return k.length===0?null:m.jsx("div",{style:{marginTop:16},children:m.jsxs("div",{style:{padding:"10px 12px",background:"var(--red)10",border:"1px solid var(--red)30",borderRadius:8,fontSize:14},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6,color:"var(--red)",fontWeight:600},children:[m.jsx(ac,{size:16}),"Blockers"]}),k.map((L,R)=>m.jsxs("div",{style:{color:"var(--text-muted)",marginBottom:4},children:["• ",L]},R))]})})})(),m.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:20},children:[m.jsxs("button",{onClick:()=>u(!0),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:k=>{k.currentTarget.style.background="var(--surface)"},onMouseLeave:k=>{k.currentTarget.style.background="var(--surface2)"},children:[m.jsx(vi,{size:16}),f.notes?"Edit Notes":"Add Notes"]}),m.jsx(E_,{sessionId:f.id}),w&&m.jsxs(m.Fragment,{children:[m.jsx(zw,{text:Bm(f),label:"Copy as Markdown"}),m.jsx(Bw,{text:Bm(f),filename:`session-${f.id.slice(0,8)}-${yo(new Date(f.started_at*1e3),"yyyy-MM-dd")}.md`,label:"Download Markdown"}),m.jsx(L_,{session:f})]}),f.status!=="active"&&f.transcript_path&&m.jsxs("button",{onClick:_,disabled:a,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",background:a?"var(--surface)":"var(--blue)15",color:a?"var(--text-muted)":"var(--blue)",border:"1px solid",borderColor:a?"var(--border)":"var(--blue)30",borderRadius:8,fontSize:13,fontWeight:600,cursor:a?"not-allowed":"pointer",transition:"all 0.15s"},onMouseEnter:k=>{a||(k.currentTarget.style.background="var(--blue)25")},onMouseLeave:k=>{a||(k.currentTarget.style.background="var(--blue)15")},children:[m.jsx(ml,{size:14}),a?"Processing...":w?"Resync Summary":"Sync Summary"]})]}),w&&m.jsxs("div",{style:{marginBottom:28},children:[m.jsx("h2",{style:{fontSize:13,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:12},children:"Summary"}),m.jsx(Mw,{summary_what_we_did:f.summary_what_we_did,summary_decisions:f.summary_decisions,summary_files_changed:f.summary_files_changed,summary_next_steps:f.summary_next_steps,summary_gotchas:f.summary_gotchas,summary_tech_notes:f.summary_tech_notes})]}),!w&&f.status==="active"&&m.jsx("div",{style:{padding:"16px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,fontSize:13,color:"var(--text-muted)",marginBottom:24},children:"Session is active. Summary will be generated when the session ends."})]})]}),h==="timeline"&&f.observations&&f.observations.length>0&&m.jsx("div",{children:m.jsx(Dw,{observations:f.observations})}),m.jsx(T_,{sessionId:f.id,initialNotes:f.notes||"",isOpen:o,onClose:()=>u(!1)})]})}function M_(){const[t,n]=ae.useState(""),[a,i]=ae.useState(""),{data:o}=va({queryKey:["projects"],queryFn:cn.getProjects}),{data:u,isLoading:h,isFetching:d}=va({queryKey:["search",t,a],queryFn:()=>cn.search(t,a||void 0),enabled:t.length>=2});return m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsxs("div",{style:{marginBottom:24},children:[m.jsx("h1",{style:{fontSize:22,fontWeight:700,marginBottom:4},children:"Search"}),m.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"Full-text search across all session observations"})]}),m.jsxs("div",{style:{display:"flex",gap:12,marginBottom:20},children:[m.jsx("div",{style:{flex:1},children:m.jsx(D5,{onSearch:n,placeholder:"Search sessions, decisions, file paths...",autoFocus:!0})}),m.jsxs("select",{value:a,onChange:f=>i(f.target.value),style:{padding:"10px 12px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,outline:"none",minWidth:140},children:[m.jsx("option",{value:"",children:"All Projects"}),o?.map(f=>m.jsx("option",{value:f.id,children:f.name},f.id))]})]}),t.length<2&&m.jsxs("div",{style:{textAlign:"center",padding:"60px 0",color:"var(--text-muted)"},children:[m.jsx(I3,{size:36,color:"var(--border)",style:{marginBottom:12}}),m.jsx("div",{style:{fontSize:14},children:"Type at least 2 characters to search"})]}),h&&t.length>=2&&m.jsx("div",{style:{color:"var(--text-muted)",fontSize:13,padding:"20px 0"},children:"Searching..."}),u?.results&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:12},children:[u.results.length," result",u.results.length!==1?"s":"",' for "',t,'"']}),u.results.length===0?m.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:"var(--text-muted)",fontSize:13},children:"No results found"}):u.results.map(f=>m.jsx(Ns,{to:`/session/${f.session_id}`,style:{display:"block"},children:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"12px 14px",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s"},onMouseEnter:g=>g.currentTarget.style.borderColor="var(--accent)",onMouseLeave:g=>g.currentTarget.style.borderColor="var(--border)",children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8,marginBottom:6},children:[m.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--accent)"},children:f.project_name}),m.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",flexShrink:0},children:f.created_at?yo(new Date(f.created_at*1e3),"MMM d, yyyy"):""})]}),m.jsx("div",{style:{fontSize:13,color:"var(--text)",marginBottom:4},children:f.content}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)"},children:f.session_title||`Session ${f.session_id?.slice(0,8)}`})]})},f.observation_id))]})]})}const R_={session_start:{icon:xf,color:"var(--green)",label:"Session Started"},session_end:{icon:r0,color:"var(--text-muted)",label:"Session Ended"},tool_use:{icon:Ls,color:"var(--accent)",label:"Tool Use"},user_prompt:{icon:w5,color:"var(--blue)",label:"User Prompt"},stop:{icon:r0,color:"var(--text-muted)",label:"Response"},pre_compact:{icon:bf,color:"var(--yellow)",label:"Pre-Compact"},summary_ready:{icon:xf,color:"var(--green)",label:"Summary Ready"},connected:{icon:bf,color:"var(--green)",label:"Connected"}};function O_(){const[t,n]=ae.useState([]),[a,i]=ae.useState(!1),[o,u]=ae.useState(""),h=ae.useRef(null),d=ae.useRef(null);return ae.useEffect(()=>{let f;const g=()=>{try{f=M0(),h.current=f,f.onopen=()=>{i(!0),u("")},f.onmessage=v=>{try{const _=JSON.parse(v.data);n(j=>[_,...j].slice(0,200))}catch{}},f.onclose=()=>{i(!1),setTimeout(g,3e3)},f.onerror=()=>{u("WebSocket connection failed"),i(!1)}}catch(v){u(String(v))}};return g(),()=>{f?.close()}},[]),m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsxs("div",{style:{marginBottom:24},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[m.jsx("h1",{style:{fontSize:22,fontWeight:700},children:"Live Feed"}),m.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:a?"var(--green)":"var(--red)",display:"inline-block",animation:a?"pulse 1.5s infinite":"none"}}),m.jsx("style",{children:"@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }"})]}),m.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:a?"Real-time events from active Claude Code sessions":"Connecting..."}),o&&m.jsx("p",{style:{color:"var(--red)",fontSize:12,marginTop:4},children:o})]}),t.length===0&&m.jsxs("div",{style:{textAlign:"center",padding:"60px 0",color:"var(--text-muted)"},children:[m.jsx(bf,{size:36,color:"var(--border)",style:{marginBottom:12}}),m.jsx("div",{style:{fontSize:14},children:"Waiting for events..."}),m.jsx("div",{style:{fontSize:12,marginTop:8},children:"Start a Claude Code session to see live activity"})]}),m.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",gap:8},children:t.map((f,g)=>{const v=R_[f.type]||{icon:bf,color:"var(--text-muted)",label:f.type},_=v.icon;return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:8,padding:"10px 14px",display:"flex",gap:12,alignItems:"flex-start",opacity:g>50?.6:1},children:[m.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:`${v.color}15`,border:`1px solid ${v.color}30`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:m.jsx(_,{size:12,color:v.color})}),m.jsxs("div",{style:{flex:1,minWidth:0},children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[m.jsx("span",{style:{fontSize:12,fontWeight:600,color:v.color},children:v.label}),m.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",flexShrink:0},children:f.timestamp?yo(new Date(f.timestamp),"HH:mm:ss"):""})]}),f.tool_name&&m.jsxs("div",{style:{fontSize:12,color:"var(--text)",marginTop:2,fontFamily:"monospace"},children:[f.tool_name,f.file_path&&m.jsxs("span",{style:{color:"var(--text-muted)"},children:[" ",f.file_path]})]}),f.preview&&m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.preview}),f.session_id&&m.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2,fontFamily:"monospace"},children:[f.session_id.slice(0,16),"..."]}),f.project&&m.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Project: ",f.project.name]}),f.title&&m.jsx("div",{style:{fontSize:12,color:"var(--green)",marginTop:2},children:f.title})]})]},g)})})]})}function D_(){const{id:t}=j0(),{data:n,isLoading:a,error:i}=va({queryKey:["memory",t],queryFn:()=>cn.getMemory(t),refetchInterval:15e3,enabled:!!t});if(a)return m.jsx(I_,{});if(i)return m.jsx(H_,{message:String(i)});const o=n?.stats||{},u=o.total_preferences>0||o.total_knowledge>0||o.total_patterns>0||o.total_tasks>0||o.total_contacts>0;return m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsxs(Ns,{to:`/project/${t}`,style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-muted)",fontSize:13,marginBottom:20},children:[m.jsx(R0,{size:14})," Back to Project"]}),m.jsxs("div",{style:{marginBottom:32},children:[m.jsxs("h1",{style:{fontSize:28,fontWeight:700,marginBottom:8,display:"flex",alignItems:"center",gap:12},children:[m.jsx(vf,{size:28,color:"var(--accent)"}),"Memory System"]}),m.jsx("p",{style:{color:"var(--text-muted)",fontSize:15},children:"Accumulated knowledge, preferences, patterns, and tasks across all sessions"})]}),u?m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:16,marginBottom:40},children:[m.jsx(uf,{icon:m.jsx(yl,{size:20}),label:"Preferences",value:o.total_preferences,color:"var(--blue)"}),m.jsx(uf,{icon:m.jsx(hg,{size:20}),label:"Knowledge",value:o.total_knowledge,color:"var(--accent)"}),m.jsx(uf,{icon:m.jsx(a0,{size:20}),label:"Patterns",value:o.total_patterns,color:"var(--orange)"}),m.jsx(uf,{icon:m.jsx($d,{size:20}),label:"Tasks",value:o.total_tasks,color:"var(--green)"}),m.jsx(uf,{icon:m.jsx(gg,{size:20}),label:"Contacts",value:o.total_contacts,color:"var(--red)"})]}),n.preferences&&n.preferences.length>0&&m.jsx(lf,{title:"Your Preferences",icon:m.jsx(yl,{size:20,color:"var(--blue)"}),children:m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:12},children:n.preferences.map(h=>m.jsx(z_,{pref:h},h.id))})}),n.knowledge&&n.knowledge.length>0&&m.jsx(lf,{title:"Domain Knowledge",icon:m.jsx(hg,{size:20,color:"var(--accent)"}),children:m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:14},children:n.knowledge.map(h=>m.jsx(B_,{knowledge:h},h.id))})}),n.patterns&&n.patterns.length>0&&m.jsx(lf,{title:"Learned Patterns",icon:m.jsx(a0,{size:20,color:"var(--orange)"}),children:m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:14},children:n.patterns.map(h=>m.jsx(P_,{pattern:h},h.id))})}),n.tasks&&n.tasks.length>0&&m.jsx(lf,{title:"Pending Tasks",icon:m.jsx($d,{size:20,color:"var(--green)"}),children:m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:12},children:n.tasks.map(h=>m.jsx(q_,{task:h},h.id))})}),n.contacts&&n.contacts.length>0&&m.jsx(lf,{title:"Contacts",icon:m.jsx(gg,{size:20,color:"var(--red)"}),children:m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:14},children:n.contacts.map(h=>m.jsx(U_,{contact:h},h.id))})})]}):m.jsx(F_,{})]})}function lf({title:t,icon:n,children:a}){return m.jsxs("div",{style:{marginBottom:40},children:[m.jsxs("h2",{style:{fontSize:18,fontWeight:700,marginBottom:18,display:"flex",alignItems:"center",gap:10},children:[n,t]}),a]})}function uf({icon:t,label:n,value:a,color:i}){return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:"18px 20px"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10,color:i},children:[t,m.jsx("span",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:n})]}),m.jsx("div",{style:{fontSize:32,fontWeight:700},children:a})]})}function z_({pref:t}){return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"16px 18px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsxs("div",{children:[m.jsx("div",{style:{fontSize:14,fontWeight:600,marginBottom:4},children:t.key}),m.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:t.category})]}),m.jsx("div",{style:{fontSize:15,color:"var(--text)",fontWeight:500},children:t.value})]})}function B_({knowledge:t}){return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10},children:[m.jsx("div",{style:{fontSize:15,fontWeight:700},children:t.topic}),m.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--accent)15",color:"var(--accent)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:t.category})]}),m.jsx("div",{style:{fontSize:14,color:"var(--text-muted)",lineHeight:1.6},children:t.content}),t.confidence&&m.jsxs("div",{style:{marginTop:12,display:"flex",alignItems:"center",gap:8},children:[m.jsx("div",{style:{flex:1,height:5,background:"var(--border)",borderRadius:3,overflow:"hidden"},children:m.jsx("div",{style:{width:`${t.confidence*100}%`,height:"100%",background:"var(--accent)",transition:"width 0.3s"}})}),m.jsxs("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600},children:[Math.round(t.confidence*100),"%"]})]})]})}function P_({pattern:t}){return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:10},children:[m.jsx("div",{style:{fontSize:15,fontWeight:700},children:t.title}),m.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--orange)15",color:"var(--orange)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:t.pattern_type})]}),m.jsx("div",{style:{fontSize:14,color:"var(--text-muted)",lineHeight:1.6,marginBottom:12},children:t.description}),(t.success_count>0||t.failure_count>0)&&m.jsxs("div",{style:{display:"flex",gap:16,fontSize:12,color:"var(--text-muted)"},children:[m.jsxs("span",{style:{color:"var(--green)"},children:["✓ ",t.success_count," success"]}),t.failure_count>0&&m.jsxs("span",{style:{color:"var(--red)"},children:["✗ ",t.failure_count," failed"]})]})]})}function q_({task:t}){const n={urgent:"var(--red)",high:"var(--orange)",medium:"var(--blue)",low:"var(--text-muted)"};return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"16px 18px",display:"flex",alignItems:"center",gap:14},children:[m.jsx("div",{style:{width:10,height:10,borderRadius:"50%",background:n[t.priority]||"var(--text-muted)",flexShrink:0}}),m.jsxs("div",{style:{flex:1,minWidth:0},children:[m.jsx("div",{style:{fontSize:15,fontWeight:600,marginBottom:4},children:t.title}),t.description&&m.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:t.description})]}),m.jsx("div",{style:{fontSize:11,padding:"5px 12px",borderRadius:6,background:`${n[t.priority]||"var(--text-muted)"}15`,color:n[t.priority]||"var(--text-muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},children:t.priority})]})}function U_({contact:t}){return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:"18px 20px"},children:[m.jsx("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:t.name}),t.role&&m.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:8},children:t.role}),m.jsx("div",{style:{fontSize:10,padding:"3px 10px",borderRadius:6,background:"var(--red)15",color:"var(--red)",fontWeight:600,display:"inline-block",textTransform:"uppercase",letterSpacing:"0.5px"},children:t.type})]})}function F_(){return m.jsxs("div",{style:{textAlign:"center",padding:"80px 20px",background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12},children:[m.jsx(vf,{size:48,color:"var(--text-muted)",style:{marginBottom:16,opacity:.5}}),m.jsx("h3",{style:{fontSize:16,fontWeight:700,marginBottom:8},children:"No Memory Data Yet"}),m.jsx("p",{style:{color:"var(--text-muted)",fontSize:13,maxWidth:400,margin:"0 auto"},children:"Memory is extracted from session summaries. Complete a few sessions and the system will start learning your preferences, patterns, and knowledge."})]})}function I_(){return m.jsx("div",{style:{padding:"80px 20px",textAlign:"center"},children:m.jsx("div",{style:{fontSize:14,color:"var(--text-muted)"},children:"Loading memory..."})})}function H_({message:t}){return m.jsxs("div",{style:{padding:"80px 20px",textAlign:"center"},children:[m.jsx("div",{style:{fontSize:14,color:"#ef4444",marginBottom:8},children:"Failed to load memory"}),m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:t})]})}function W_(){const{data:t}=va({queryKey:["metrics"],queryFn:cn.getMetrics,refetchInterval:5e3});if(!t)return m.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading metrics..."});const{summarizations:n,sessions:a,memory:i,queue:o}=t,u=[{label:"Total Summarizations",value:n.total,icon:o3,color:"var(--accent)"},{label:"Success Rate",value:n.total>0?`${Math.round(n.successful/n.total*100)}%`:"0%",icon:yl,color:"var(--green)"},{label:"Avg Duration",value:n.avgDuration>0?`${(n.avgDuration/1e3).toFixed(1)}s`:"0s",icon:Ts,color:"var(--blue)"},{label:"Failed",value:n.failed,icon:ac,color:"var(--red)"}],h=[{label:"Total Sessions",value:a.total},{label:"Active",value:a.active},{label:"Completed",value:a.completed}],d=[{label:"Preferences",value:i.preferences},{label:"Knowledge",value:i.knowledge},{label:"Patterns",value:i.patterns},{label:"Tasks",value:i.tasks}],f=[{label:"High Priority",value:o.high,color:"var(--red)"},{label:"Normal Priority",value:o.normal,color:"var(--yellow)"},{label:"Low Priority",value:o.low,color:"var(--green)"}];return m.jsxs("div",{style:{padding:"28px 32px",maxWidth:"100%",width:"100%"},children:[m.jsx("h1",{style:{fontSize:24,fontWeight:700,marginBottom:24},children:"System Metrics"}),m.jsxs("div",{style:{marginBottom:32},children:[m.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Summarization Performance"}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16},children:u.map(g=>{const v=g.icon;return m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[m.jsx(v,{size:16,style:{color:g.color}}),m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.5},children:g.label})]}),m.jsx("div",{style:{fontSize:28,fontWeight:700,color:g.color},children:g.value})]},g.label)})})]}),m.jsxs("div",{style:{marginBottom:32},children:[m.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Sessions"}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:h.map(g=>m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:g.label}),m.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--accent)"},children:g.value})]},g.label))})]}),m.jsxs("div",{style:{marginBottom:32},children:[m.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Memory System"}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:d.map(g=>m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:g.label}),m.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--text)"},children:g.value})]},g.label))})]}),m.jsxs("div",{style:{marginBottom:32},children:[m.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16,color:"var(--text-muted)"},children:"Summarization Queue"}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:16},children:f.map(g=>m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:g.label}),m.jsx("div",{style:{fontSize:24,fontWeight:700,color:g.color},children:g.value})]},g.label))})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:16},children:[m.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:8},children:"Last Updated"}),m.jsx("div",{style:{fontSize:13,color:"var(--text)"},children:new Date().toLocaleString()})]})]})}const Y_=[{label:"Last 5 min",value:5},{label:"Last 10 min",value:10},{label:"Last 15 min",value:15},{label:"Last 30 min",value:30},{label:"Last 1 hour",value:60},{label:"All",value:0}],G_=[{label:"All",value:""},{label:"Info",value:"info",color:"var(--blue)"},{label:"Warn",value:"warn",color:"var(--yellow)"},{label:"Error",value:"error",color:"var(--red)"},{label:"Hook",value:"hook",color:"var(--purple)"},{label:"Broadcast",value:"broadcast",color:"var(--green)"}];function V_(){const[t,n]=ae.useState(!0),[a,i]=ae.useState([]),[o,u]=ae.useState(15),[h,d]=ae.useState(""),[f,g]=ae.useState(""),v=ae.useRef(null),_=ae.useRef(null),{data:j}=va({queryKey:["logs",o,h,f],queryFn:async()=>{const E=new URLSearchParams;return o>0&&E.append("minutes",String(o)),h&&E.append("level",h),f&&E.append("search",f),(await(await fetch(`/api/logs?${E}`)).json()).logs||[]},refetchInterval:t?!1:5e3});ae.useEffect(()=>{j&&i(j)},[j]),ae.useEffect(()=>{if(!t){_.current?.close();return}const E=new EventSource("/api/logs/stream");return _.current=E,E.onmessage=Y=>{const F=JSON.parse(Y.data).log;h&&!F.toLowerCase().includes(`[${h.toLowerCase()}]`)||f&&!F.toLowerCase().includes(f.toLowerCase())||i(X=>[...X.slice(-999),F])},E.onerror=()=>{console.error("SSE connection error"),E.close()},()=>{E.close()}},[t,h,f]),ae.useEffect(()=>{t&&v.current?.scrollIntoView({behavior:"smooth"})},[a,t]);const w=()=>{navigator.clipboard.writeText(a.join(`
|
|
622
|
+
`)),Ke.success("Logs copied to clipboard!")},k=()=>{const E=new Blob([a.join(`
|
|
623
|
+
`)],{type:"text/plain"}),Y=URL.createObjectURL(E),H=document.createElement("a");H.href=Y,H.download=`claudectx-logs-${new Date().toISOString()}.txt`,H.click(),URL.revokeObjectURL(Y),Ke.success("Logs downloaded!")},L=()=>{i([]),Ke.success("Logs cleared!")},R=E=>E.includes("[ERROR]")||E.includes("error")?"var(--red)":E.includes("[WARN]")||E.includes("warn")?"var(--yellow)":E.includes("[INFO]")||E.includes("info")?"var(--blue)":E.includes("[Hook]")?"var(--purple)":E.includes("[Broadcast]")?"var(--green)":"var(--text)";return m.jsxs("div",{style:{padding:"24px",maxWidth:"100%",width:"100%",margin:"0 auto"},children:[m.jsxs("div",{style:{marginBottom:24},children:[m.jsx("h1",{style:{fontSize:28,fontWeight:700,marginBottom:8},children:"System Logs"}),m.jsx("p",{style:{color:"var(--text-muted)",fontSize:14},children:"Real-time streaming logs from ClaudeContext worker"})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:16,marginBottom:16,display:"flex",flexWrap:"wrap",gap:12,alignItems:"center"},children:[m.jsx("div",{style:{display:"flex",gap:6},children:Y_.map(E=>m.jsx("button",{onClick:()=>u(E.value),style:{padding:"6px 12px",background:o===E.value?"var(--accent)":"var(--surface2)",color:o===E.value?"white":"var(--text)",border:"1px solid",borderColor:o===E.value?"var(--accent)":"var(--border)",borderRadius:6,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:E.label},E.value))}),m.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),m.jsx("div",{style:{display:"flex",gap:6},children:G_.map(E=>m.jsx("button",{onClick:()=>d(E.value),style:{padding:"6px 12px",background:h===E.value?E.color||"var(--accent)":"var(--surface2)",color:h===E.value?"white":"var(--text)",border:"1px solid",borderColor:h===E.value?E.color||"var(--accent)":"var(--border)",borderRadius:6,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 0.15s"},children:E.label},E.value))}),m.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),m.jsxs("div",{style:{flex:1,minWidth:200,position:"relative"},children:[m.jsx(D0,{size:16,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),m.jsx("input",{type:"text",placeholder:"Search logs...",value:f,onChange:E=>g(E.target.value),style:{width:"100%",padding:"8px 36px 8px 36px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,color:"var(--text)"}}),f&&m.jsx("button",{onClick:()=>g(""),style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:4,display:"flex"},children:m.jsx(ti,{size:14})})]}),m.jsx("div",{style:{width:1,height:24,background:"var(--border)"}}),m.jsxs("button",{onClick:()=>n(!t),style:{padding:"8px 12px",background:t?"var(--green)15":"var(--surface2)",color:t?"var(--green)":"var(--text)",border:"1px solid",borderColor:t?"var(--green)30":"var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[t?m.jsx(g4,{size:14}):m.jsx(y4,{size:14}),t?"Pause":"Resume"]}),m.jsxs("button",{onClick:w,style:{padding:"8px 12px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[m.jsx(m5,{size:14}),"Copy"]}),m.jsxs("button",{onClick:k,style:{padding:"8px 12px",background:"var(--surface2)",color:"var(--text)",border:"1px solid var(--border)",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[m.jsx(oh,{size:14}),"Download"]}),m.jsx("button",{onClick:L,style:{padding:"8px 12px",background:"var(--red)15",color:"var(--red)",border:"1px solid var(--red)30",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},children:"Clear"})]}),m.jsxs("div",{style:{background:"#1a1a1a",border:"1px solid var(--border)",borderRadius:12,padding:16,height:"calc(100vh - 320px)",overflow:"auto",fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:12,lineHeight:1.6},children:[a.length===0?m.jsx("div",{style:{textAlign:"center",padding:40,color:"var(--text-muted)"},children:"No logs to display. Waiting for logs..."}):a.map((E,Y)=>m.jsx("div",{style:{color:R(E),marginBottom:2,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:E},Y)),m.jsx("div",{ref:v})]}),m.jsxs("div",{style:{marginTop:12,display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12,color:"var(--text-muted)"},children:[m.jsxs("div",{children:[a.length," logs displayed",t&&m.jsx("span",{style:{color:"var(--green)",marginLeft:8},children:"● Live"})]}),m.jsxs("div",{children:[o>0?`Last ${o} minutes`:"All time",h&&` • ${h}`,f&&` • "${f}"`]})]})]})}function Q_(){const t=Af(),[n,a]=ae.useState({apiProvider:"local-9router",apiKey:"",baseURL:"http://localhost:20128/v1",model:"claude-opus-4-6",disableSummaries:!1}),[i,o]=ae.useState("idle"),{data:u,isLoading:h}=va({queryKey:["settings"],queryFn:cn.getSettings});ae.useEffect(()=>{if(u){let v="local-9router";u.baseURL==="http://localhost:20128/v1"?v="local-9router":u.baseURL&&u.baseURL.includes("9router")?v="cloud-9router":(!u.baseURL||u.baseURL==="https://api.anthropic.com")&&(v="direct"),a({apiProvider:v,apiKey:"",baseURL:u.baseURL||"http://localhost:20128/v1",model:u.model||"AWS",disableSummaries:u.disableSummaries||!1})}},[u]);const d=ff({mutationFn:cn.updateSettings,onSuccess:()=>{o("success"),t.invalidateQueries({queryKey:["settings"]}),t.invalidateQueries({queryKey:["health"]}),setTimeout(()=>o("idle"),3e3)},onError:()=>{o("error"),setTimeout(()=>o("idle"),3e3)}}),f=()=>{o("saving");let v="",_=n.apiKey;n.apiProvider==="local-9router"?(v="http://localhost:20128/v1",(!n.apiKey||n.apiKey.trim()==="")&&(_="sk_9router")):n.apiProvider==="cloud-9router"?v=n.baseURL:v="";const j={baseURL:v,model:n.model,disableSummaries:n.disableSummaries};n.apiKey&&n.apiKey.trim()!==""&&(j.apiKey=_),d.mutate(j)},g=[{value:"claude-opus-4-6",label:"Claude Opus 4.6",description:"Most capable - best for complex analysis"},{value:"claude-sonnet-4-6",label:"Claude Sonnet 4.6",description:"Balanced - great speed and quality"},{value:"claude-haiku-4-5",label:"Claude Haiku 4.5",description:"Fastest - good for simple tasks"},{value:"AWS",label:"AWS",description:"9router combo or Claude Code default"},{value:"custom",label:"Custom Combo/Model...",description:"Enter your own combo name or model"}];return h?m.jsx("div",{style:{padding:32,color:"var(--text-muted)",fontSize:13},children:"Loading settings..."}):m.jsxs("div",{style:{padding:"28px 32px",maxWidth:1200},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:24},children:[m.jsx(S5,{size:24,color:"var(--accent)"}),m.jsx("h1",{style:{fontSize:24,fontWeight:700},children:"Settings"})]}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:20,marginBottom:20},children:[m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:24},children:[m.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16},children:"API Configuration"}),m.jsxs("div",{style:{marginBottom:20},children:[m.jsx("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:"API Provider"}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[m.jsxs("button",{onClick:()=>a({...n,apiProvider:"local-9router",baseURL:"http://localhost:20128/v1"}),style:{padding:"12px 16px",background:n.apiProvider==="local-9router"?"var(--accent)":"var(--surface2)",color:n.apiProvider==="local-9router"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"9router Local (Recommended)"}),m.jsx("div",{style:{fontSize:12,opacity:.8},children:"Running on localhost:20128 - No API key needed"})]}),m.jsxs("button",{onClick:()=>a({...n,apiProvider:"cloud-9router"}),style:{padding:"12px 16px",background:n.apiProvider==="cloud-9router"?"var(--accent)":"var(--surface2)",color:n.apiProvider==="cloud-9router"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"9router Cloud"}),m.jsx("div",{style:{fontSize:12,opacity:.8},children:"Remote 9router endpoint - Requires API key only"})]}),m.jsxs("button",{onClick:()=>a({...n,apiProvider:"direct",baseURL:""}),style:{padding:"12px 16px",background:n.apiProvider==="direct"?"var(--accent)":"var(--surface2)",color:n.apiProvider==="direct"?"white":"var(--text)",border:"1px solid var(--border)",borderRadius:8,cursor:"pointer",fontSize:13,fontWeight:500,textAlign:"left"},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"Direct (Anthropic)"}),m.jsx("div",{style:{fontSize:12,opacity:.8},children:"Connect directly to Anthropic's Claude API"})]})]})]}),(n.apiProvider==="direct"||n.apiProvider==="cloud-9router")&&m.jsxs("div",{style:{marginBottom:20},children:[m.jsxs("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:["API Key ",n.apiProvider==="cloud-9router"&&m.jsx("span",{style:{color:"var(--accent)"},children:"(Required)"})]}),m.jsx("input",{type:"password",value:n.apiKey,onChange:v=>a({...n,apiKey:v.target.value}),placeholder:n.apiProvider==="direct"?"sk-ant-...":"Your 9router API key",style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13}}),m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:n.apiProvider==="direct"?"Get your API key from console.anthropic.com":"API key provided by your 9router cloud service"})]}),n.apiProvider==="cloud-9router"&&m.jsxs("div",{style:{marginBottom:20},children:[m.jsxs("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:["Base URL ",m.jsx("span",{style:{color:"var(--text-muted)",fontWeight:400},children:"(Optional - uses default if empty)"})]}),m.jsx("input",{type:"text",value:n.baseURL,onChange:v=>a({...n,baseURL:v.target.value}),placeholder:"https://your-9router-cloud.com/v1",style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13}}),m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:"Leave empty to use default 9router cloud endpoint"})]}),n.apiProvider==="local-9router"&&m.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:12,fontSize:12,color:"var(--text-muted)",lineHeight:1.6},children:[m.jsx("strong",{style:{color:"var(--text)"},children:"Local 9router:"})," Using localhost:20128/v1 - No API key needed. Make sure 9router is running locally."]})]}),m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:10,padding:24},children:[m.jsx("h2",{style:{fontSize:16,fontWeight:600,marginBottom:16},children:n.apiProvider==="direct"?"Model Selection":"Combo / Model Name"}),m.jsxs("div",{style:{marginBottom:20},children:[m.jsx("label",{style:{display:"block",fontSize:13,fontWeight:500,marginBottom:8,color:"var(--text)"},children:n.apiProvider==="direct"?"Claude Model":"Combo Name or Model"}),m.jsx("select",{value:g.find(v=>v.value===n.model)?n.model:"custom",onChange:v=>{v.target.value==="custom"?g.find(_=>_.value===n.model)&&a({...n,model:""}):a({...n,model:v.target.value})},style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,cursor:"pointer"},children:g.map(v=>m.jsx("option",{value:v.value,children:v.label},v.value))}),!g.find(v=>v.value===n.model)&&m.jsx("input",{type:"text",value:n.model,placeholder:n.apiProvider==="direct"?"Enter model name (e.g., claude-opus-4-6)":"Enter your combo name (e.g., my-fast-combo, production)",onChange:v=>a({...n,model:v.target.value}),style:{width:"100%",padding:"10px 12px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text)",fontSize:13,marginTop:8}}),m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6},children:n.apiProvider==="direct"?g.find(v=>v.value===n.model)?.description||"Direct Claude API model name":n.apiProvider==="local-9router"?"9router combo name (configured in your local 9router settings)":"9router combo name or model identifier"})]}),n.apiProvider!=="direct"&&m.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:8,padding:12,fontSize:12,color:"var(--text-muted)",lineHeight:1.6,marginBottom:20},children:[m.jsx("strong",{style:{color:"var(--text)"},children:"About 9router Combos:"}),' Combos are custom routing configurations you create in 9router. Each combo can route to different models/providers with specific settings. Common examples: "AWS", "production-combo", "fast-combo", etc.']}),m.jsxs("div",{style:{marginBottom:0},children:[m.jsxs("label",{style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer",fontSize:13,fontWeight:500},children:[m.jsx("input",{type:"checkbox",checked:n.disableSummaries,onChange:v=>a({...n,disableSummaries:v.target.checked}),style:{cursor:"pointer"}}),"Disable AI Summaries"]}),m.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:6,marginLeft:24},children:"Turn off automatic session summarization (saves API costs)"})]})]})]}),m.jsxs("div",{style:{background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:10,padding:16,marginBottom:20,display:"flex",gap:12},children:[m.jsx(ac,{size:18,color:"var(--accent)",style:{flexShrink:0,marginTop:2}}),m.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",lineHeight:1.6},children:[m.jsx("strong",{style:{color:"var(--text)"},children:"Note:"})," Changes require a worker restart to take effect. After saving, run ",m.jsx("code",{style:{background:"var(--surface)",padding:"2px 6px",borderRadius:4},children:"claudectx restart"})," in your terminal."]})]}),m.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[m.jsxs("button",{onClick:f,disabled:i==="saving",style:{padding:"12px 24px",background:i==="success"?"var(--green)":"var(--accent)",color:"white",border:"none",borderRadius:8,cursor:i==="saving"?"not-allowed":"pointer",fontSize:14,fontWeight:600,display:"flex",alignItems:"center",gap:8,opacity:i==="saving"?.6:1},children:[i==="saving"&&m.jsx(ml,{size:16,style:{animation:"spin 1s linear infinite"}}),i==="success"&&m.jsx(bl,{size:16}),i==="idle"&&m.jsx(S4,{size:16}),i==="error"&&m.jsx(ac,{size:16}),i==="saving"?"Saving...":i==="success"?"Saved!":i==="error"?"Error":"Save Settings"]}),i==="error"&&m.jsx("span",{style:{fontSize:13,color:"var(--red)"},children:"Failed to save settings. Please try again."})]}),m.jsx("style",{children:`
|
|
624
|
+
@keyframes spin {
|
|
625
|
+
from { transform: rotate(0deg); }
|
|
626
|
+
to { transform: rotate(360deg); }
|
|
627
|
+
}
|
|
628
|
+
`})]})}function X_(){const[t,n]=ae.useState(!1);if(ae.useEffect(()=>{const i=()=>n(!0),o=()=>n(!1);return document.addEventListener("show-shortcuts",i),document.addEventListener("close-modal",o),()=>{document.removeEventListener("show-shortcuts",i),document.removeEventListener("close-modal",o)}},[]),!t)return null;const a=[{keys:["j"],description:"Next item"},{keys:["k"],description:"Previous item"},{keys:["/"],description:"Focus search"},{keys:["Esc"],description:"Close modal"},{keys:["?"],description:"Show shortcuts"},{keys:["g","h"],description:"Go to home"},{keys:["g","s"],description:"Go to search"},{keys:["g","l"],description:"Go to live"},{keys:["g","m"],description:"Go to metrics"},{keys:["g","b"],description:"Go to memory"}];return m.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,animation:"fadeIn 0.15s"},onClick:()=>n(!1),children:m.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:12,padding:24,maxWidth:500,width:"90%",animation:"scaleIn 0.2s"},onClick:i=>i.stopPropagation(),children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[m.jsx("h2",{style:{fontSize:20,fontWeight:700},children:"Keyboard Shortcuts"}),m.jsx("button",{onClick:()=>n(!1),style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",alignItems:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:i=>i.currentTarget.style.background="var(--surface2)",onMouseLeave:i=>i.currentTarget.style.background="none",children:m.jsx(ti,{size:20})})]}),m.jsx("div",{style:{display:"grid",gap:12},children:a.map((i,o)=>m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx("span",{style:{fontSize:14,color:"var(--text-muted)"},children:i.description}),m.jsx("div",{style:{display:"flex",gap:4},children:i.keys.map((u,h)=>m.jsx("kbd",{style:{padding:"4px 8px",background:"var(--surface2)",border:"1px solid var(--border)",borderRadius:4,fontSize:13,fontFamily:"monospace",color:"var(--text)"},children:u},h))})]},o))})]})})}function K_({openTabs:t,onCloseTab:n}){const a=uc(),o=Qi().pathname.match(/\/(project|session)\/([^/]+)/)?.[2];return t.length===0?null:m.jsx("div",{style:{position:"fixed",bottom:0,left:240,right:0,height:48,background:"var(--surface)",borderTop:"1px solid var(--border)",display:"flex",alignItems:"center",gap:4,padding:"0 12px",overflowX:"auto",overflowY:"hidden",zIndex:100,scrollbarWidth:"thin"},children:t.map(u=>{const h=u.id===o;return m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:h?"var(--surface2)":"transparent",border:"1px solid",borderColor:h?"var(--accent)":"var(--border)",borderRadius:8,cursor:"pointer",transition:"all 0.15s",minWidth:120,maxWidth:200,whiteSpace:"nowrap"},onClick:()=>a(`/${u.type}/${u.id}`),onMouseEnter:d=>{h||(d.currentTarget.style.background="var(--surface2)")},onMouseLeave:d=>{h||(d.currentTarget.style.background="transparent")},children:[m.jsx("span",{style:{fontSize:13,fontWeight:h?600:500,color:h?"var(--accent)":"var(--text)",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:u.name}),m.jsx("button",{onClick:d=>{d.stopPropagation(),n(u.id)},style:{background:"transparent",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:2,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,transition:"all 0.15s"},onMouseEnter:d=>{d.currentTarget.style.background="var(--red)20",d.currentTarget.style.color="var(--red)"},onMouseLeave:d=>{d.currentTarget.style.background="transparent",d.currentTarget.style.color="var(--text-muted)"},children:m.jsx(ti,{size:14})})]},u.id)})})}function $_(){const t=uc();ae.useEffect(()=>{let n=!1;function a(i){if(!(i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement)){if(i.key==="/"){i.preventDefault(),document.querySelector('input[type="search"]')?.focus();return}if(i.key==="Escape"){document.dispatchEvent(new CustomEvent("close-modal"));return}if(i.key==="?"){i.preventDefault(),document.dispatchEvent(new CustomEvent("show-shortcuts"));return}if(i.key==="g"&&!n){n=!0;const o=setTimeout(()=>{n=!1},1e3),u=h=>{clearTimeout(o),n=!1,h.key==="h"?t("/"):h.key==="s"?t("/search"):h.key==="l"?t("/live"):h.key==="m"?t("/metrics"):h.key==="b"&&t("/memory"),window.removeEventListener("keydown",u)};window.addEventListener("keydown",u);return}if(i.key==="j"||i.key==="k"){const o=document.querySelectorAll("[data-keyboard-nav]");if(o.length===0)return;const u=Array.from(o).findIndex(f=>f===document.activeElement||f.contains(document.activeElement));let h=u;i.key==="j"?h=u<o.length-1?u+1:0:h=u>0?u-1:o.length-1;const d=o[h];d?.focus(),d?.scrollIntoView({behavior:"smooth",block:"center"})}}}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t])}function Z_(){$_();const t=uc(),[n,a]=ae.useState(()=>{const u=localStorage.getItem("openTabs");return u?JSON.parse(u):[]});ae.useEffect(()=>{localStorage.setItem("openTabs",JSON.stringify(n))},[n]);const i=(u,h,d,f)=>{a(g=>{if(console.log("addTab called:",{id:u,name:h,type:d,projectId:f,currentTabs:g}),g.some(v=>v.id===u&&v.type===d))return console.log("Tab already exists, skipping"),g;if(d==="session"&&f){const v=g.findIndex(_=>_.id===f&&_.type==="project");if(console.log("Looking for project tab:",f,"found at index:",v),v!==-1){const _=[...g];return _[v]={id:u,name:h,type:d,projectId:f},console.log("Replaced project tab with session tab"),_}}if(d==="project"){const v=g.findIndex(_=>_.projectId===u&&_.type==="session");if(console.log("Looking for session tab from project:",u,"found at index:",v),v!==-1){const _=[...g];return _[v]={id:u,name:h,type:d},console.log("Replaced session tab with project tab"),_}}return console.log("Adding new tab"),[...g,{id:u,name:h,type:d,projectId:f}]})},o=u=>{a(h=>{const d=h.filter(g=>g.id!==u);if(window.location.pathname.includes(`/${u}`))if(d.length>0){const g=d[d.length-1];t(`/${g.type}/${g.id}`)}else t("/");return d})};return m.jsxs(m.Fragment,{children:[m.jsx(Y4,{children:m.jsxs(bx,{children:[m.jsx(Ss,{path:"/",element:m.jsx(cw,{onOpenProject:(u,h)=>i(u,h,"project")})}),m.jsx(Ss,{path:"/project/:id",element:m.jsx(Cw,{onOpenProject:(u,h)=>i(u,h,"project")})}),m.jsx(Ss,{path:"/project/:id/memory",element:m.jsx(D_,{})}),m.jsx(Ss,{path:"/session/:id",element:m.jsx(C_,{onOpenSession:(u,h,d)=>i(u,h,"session",d)})}),m.jsx(Ss,{path:"/search",element:m.jsx(M_,{})}),m.jsx(Ss,{path:"/live",element:m.jsx(O_,{})}),m.jsx(Ss,{path:"/metrics",element:m.jsx(W_,{})}),m.jsx(Ss,{path:"/logs",element:m.jsx(V_,{})}),m.jsx(Ss,{path:"/settings",element:m.jsx(Q_,{})})]})}),m.jsx(K_,{openTabs:n,onCloseTab:o}),m.jsx(lw,{}),m.jsx(X_,{})]})}const J_=new cb({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:1e4}}});Uv.createRoot(document.getElementById("root")).render(m.jsx(Mv.StrictMode,{children:m.jsx(fb,{client:J_,children:m.jsx(Hx,{children:m.jsx(Z_,{})})})}));export{Sn as _,e7 as c,Pm as g};
|